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?
Describe the bug
When calculating band-decomposed charge density (
calculation=get_pchg) under LCAO basis set, many band-related cube files containnanvalues, and the output charge density is not properly normalized (Thanks to @Chentao168 who discovered this issue). Example output: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
Psirefactoring in that PR. @haozhihan Do you have any idea?