Skip to content

Type map issue in DeepmdData #920

@yhliu918

Description

@yhliu918

type map may be wrong in init of Deepmddata

In the init function of Deepmddata class, it read type.raw and cast it from local type map (which is read from a system's type_map.raw) to the global type map which is defined in the input.json file. The code is below:
image

However, for example, in the Al Cu Mg alloy case, the global type map is [Mg, Al, Cu]. If a system only have one elements Al, and the local type_map.raw is [Al]. After process of init, self.type_map would be [Mg], which is incorrect logically.

my deepmd-kit version is v2.0.0.b3, and I print out the type map before and after init cast to identify want I'm trying to say.
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions