Forece constants conversion from hiphive to hdf5 question?

Dear hiphive developers:

I am using the hiphive tool to obtain “fc2.hdf5” from FORCE_CONSTANTS. Now, I found that this is failed (error:“Traceback (most recent call last): File “test.py”, line 6, in fcs = ForceConstants.read_phonopy(supercell, ‘FORCE_CONSTANTS’, prim)
File “/home/zxl/miniconda3/envs/hiphive-0.7.1/lib/python3.7/site-packages/hiphive/force_constants.py”, line 343, in read_phonopy
fc2_array = phonopyIO.read_phonopy_fc2(fname, format=format) File “/home/zxl/miniconda3/envs/hiphive-0.7.1/lib/python3.7/site-packages/hiphive/input_output/phonopy.py”, line 60, in read_phonopy_fc2
if format not in fc2_readers.keys():TypeError: unhashable type: ‘Atoms’”
) when i run “python test.py” (see test.py "from hiphive import ForceConstants
from ase.io import read

prim = read(‘POSCAR’)
supercell = read(‘SPOSCAR’)
fcs = ForceConstants.read_phonopy(supercell, ‘FORCE_CONSTANTS’, prim)
fcs.write_to_phonopy(‘fc2.hdf5’, format=‘hdf5’)").

I want to invite the developer help me to check it, the problem has been bothering me for a long time!

Best wishes.

Zheng Chang

If you look at the documentation for the function fcs.read_phonopy, you can see that it should be read_phonopy(supercell, fname, format) and not include prim.
See here

You can also see the function used in this example.

If possible try to use the matsci-formatting (specially for code blocks) to make posts more readable

Thank you, sir. It worked if i delete the “prim”.
I will use the code-blocks in matsci-formatting when having a question in the furture!

Best,
Zheng