-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Dear developers,
I just want to give contribution on this function. There is a warning saying that "This subroutine is not tested yet, use it with care." I do find the unit in this function is incorrect. For example, phonopy use angstron as the distance unit and this is the same as the SSCHA so the line like self.structure.coords[:,:] = np.array(coords) * BOHR_TO_ANGSTROM should be changed into self.structure.coords[:,:] = np.array(coords) * 1. (Angstram to Angstram). Also, phonopy uses ev/A2 as the unit for force constants and the default one in SSCHA is Ry/bohr2. The following line needs to be changed from
dynq = GetDynQFromFCSupercell(fc, np.array(q_tot), self.structure, superstruct, itau)
to
fc = fc/(RY_TO_EV*A_TO_BOHR**2)
dynq = GetDynQFromFCSupercell(fc, np.array(q_tot), self.structure, superstruct, itau)
In this way the units for both distance and force constants are correct and this function works correctly.
Best wishes,
Kang