abinit / abipy

Open-source library for analyzing the results produced by ABINIT

Home Page:http://abinit.github.io/abipy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possible bug in abipy.dfpt.converters

akentphonon opened this issue · comments

Dear developers,

I think there may be a bug in abinit_to_phonopy code. When converting the DDB files to FORCE_CONSTANTS format the IFCs are sorted in (natom_unitcell, natom_supercell) fashion.

In the original phonopy IFCs natom index corresponds to index of unit cell atom in the super-cell. For example, in the MgO_phonopy_FORCE_CONSTANTS; IFCS are ordered as 1 1 ...... 1 16; 9 1 ...... 9 16 fashion.

If I take MgO_DDB file and convert it to phonopy format the the IFCs are ordered in 1 1 ...... 1 16; 2 1 ...... 2 16 fashion.

This breaks the compatibility of phonopy with IFCs for calculations of phonon, etc...

Not sure if I am doing some wrong?

Your input on this will be very useful.

Best,
Alex kent

Dear Alex,

thanks for pointing this out. Indeed the call to the function writing the FORCE_CONSTANTS file was missing the correct p2s_map.
The PR #238 should fix the issue. Let me know if this is not the case.