Skip to content

[Bug] Wrong results when reusing NEP instance with charge mode (qNEP) #67

@mushroomfire

Description

@mushroomfire

NEP_CPU produces incorrect results when a single NEP instance is reused to compute multiple structures sequentially in charge mode. This bug does not occur when creating a new NEP instance for each structure.

The issue is caused by improper state management in the EwaldNep class. The num_kpoints_max variable only increases and never decreases, causing it to retain the maximum k-point count from previous calculations rather than using the current structure's actual k-point count.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions