You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a phonopy.yaml file is accompanied by a BORN file (which provides dielectric tensor and atomic Born charges) Euphonic attempts to read the BORN file. (This data is needed for the non-analytic-correction (NAC).)
From the directory, generate phonopy.yaml with phonopy --include-all -c POSCAR-unitcell phonopy.conf
Using Euphonic command-line tools with the resulting phonopy.yaml yields something like
ValueError: The shape of born (1, 3, 3) doesn’t match the expected shape(s) [(2, 3, 3)]
Workaround
@rebeccafair has quickly identified a useful workaround: if the --nac tag is included when calling Phonopy, it will open the BORN file to apply a NAC and write the relevant data into phonopy.yaml. Euphonic can use this succesfully without touching the BORN file
This is actually more convenient in the long run: you don't have to keep the BORN file to hand and can more easily rename files, move them into common directories etc.
Solution
Still, the existing behaviour is a fixable bug! We should use spglib to map the rows of a valid BORN file to the array needed by Euphonic.
The text was updated successfully, but these errors were encountered:
When a phonopy.yaml file is accompanied by a BORN file (which provides dielectric tensor and atomic Born charges) Euphonic attempts to read the BORN file. (This data is needed for the non-analytic-correction (NAC).)
According to the Phonopy documentation, the atom entries in this row should correspond to the "independent" atoms of the primitive cell.
https://phonopy.github.io/phonopy/input-files.html#format
Currently Euphonic expects this to be a list of all the primitive cell atoms, so it fails in many high-symmetry cases.
To reproduce
tar -xf mp-149-20180417.tar.lzma
phonopy --include-all -c POSCAR-unitcell phonopy.conf
Using Euphonic command-line tools with the resulting phonopy.yaml yields something like
Workaround
@rebeccafair has quickly identified a useful workaround: if the
--nac
tag is included when calling Phonopy, it will open the BORN file to apply a NAC and write the relevant data into phonopy.yaml. Euphonic can use this succesfully without touching the BORN fileThis is actually more convenient in the long run: you don't have to keep the BORN file to hand and can more easily rename files, move them into common directories etc.
Solution
Still, the existing behaviour is a fixable bug! We should use spglib to map the rows of a valid BORN file to the array needed by Euphonic.
The text was updated successfully, but these errors were encountered: