Skip to content

Bug: LCAO band-decomposed charge density (get_pchg): nan values and non-normalized results #6057

@AsTonyshment

Description

@AsTonyshment

Describe the bug

When calculating band-decomposed charge density (calculation=get_pchg) under LCAO basis set, many band-related cube files contain nan values, and the output charge density is not properly normalized (Thanks to @Chentao168 who discovered this issue). Example output:

...
-nan -nan -nan -nan -nan -nan
...

Integration of charge density yields incorrect values (e.g., -0.007793...), while in v3.8.5 and earlier versions, results were correct and normalized (e.g., 1.000004...).

After some testing, I found that this bug was introduced in PR #5761 (commit: 8905ddf), the previous PR #5794 (commit: 4ddec65) is OK. The issue might be related to the Psi refactoring in that PR. @haozhihan Do you have any idea?

Metadata

Metadata

Assignees

Labels

BugsBugs that only solvable with sufficient knowledge of DFTInput&OutputSuitable for coders without knowing too many DFT details

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions