Skip to content

Bug in load_phonopy function in Phonons.py – incorrect handling of dynamical matrices #113

@FlemkMeserath

Description

@FlemkMeserath

Hi,

I noticed that the load_phonopy function in Phonons.py does not properly load and save the dynamical matrices.

Specifically, I identified three issues:

The FORCE_CONSTANTS file loaded via cellconstructor does not correctly assign the force constants to the respective atoms.

The standard force constants in phonopy are stored in eV/Ų, but cellconstructor expects them in Ry/Bohr², leading to unit inconsistencies.

The alat parameter is not properly initialized, resulting in incorrect vector scaling.

I’ve implemented a possible fix addressing all three points:

Adjusted the code to correctly map the full force constants as output by phonopy.

Applied proper unit conversion to Ry/Bohr².

Correctly initialized the alat parameter.

I’ve attached a modified version of the load_phonopy function for your review if you deem appropriate.

vasp_load.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions