Skip to content

wrong units in Phonons.load_phonopy() #167

@kw600

Description

@kw600

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions