Skip to content

EoS workchain fails if structure has multiple site's names with the same symbol.  #87

@bosonie

Description

@bosonie

The problem is due to the fact that the rescale method (used to change the volume of the structure), also renames the atoms in case multiple site's names are associated to the same symbol.
This results on a structure whose sites do not match the pseudopotentials dictionary.

Let's suppose to have an hydrogen crystal with two sites:

 s.append_atom(position=(0.000, 2.233, 1.754), symbols=['H'])
 s.append_atom(position=(0.000, -1.225, 2.327), symbols=['H'], name="Hbis")

The structure returned by rescale has the volume changed, but also sites:

<Site: kind name 'H' @ 0.000, 2.233, 1.754>
<Site: kind name 'H1' @ 0.000, -1.225, 2.327>

"Hbis" became "H1" because the correct label is lost in the passage between the StructureData and the ase structure inside rescale. However the pseudopotential input dictionary still presents the key "Hbis", leading to an error ValueError: no pseudo available for element H1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions