Fix the incorrect calculation of partial charge for multi-k-points under both PW and LCAO when symmetry is turned on#4803
Merged
mohanchen merged 16 commits intodeepmodeling:developfrom Jul 28, 2024
Conversation
mohanchen
reviewed
Jul 26, 2024
mohanchen
reviewed
Jul 27, 2024
mohanchen
approved these changes
Jul 28, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked Issue
Fix #4740
What's changed?
beginfunction insymmetry_rho.cppthat can be initialized without using theChargeclass. The originalbeginfunction will be removed to eliminate the dependency ofSymmetry_rhoonCharge, but this change will be addressed in a separate PR (not this one).istate_charge.cpp, ensuring that the band-decomposed charge density calculation remains correct under multi-k-points in the LCAO basis when symmetry is enabled.esolver_ks_pw.cpp, ensuring that the band-decomposed charge density calculation remains correct under multi-k-points in the PW basis when symmetry is enabled.Benchmark
All the results below were obtained with
symmetry = 1. The benchmark system used is a monolayer of graphene. Testing withnspin = 2was also conducted, and it worked correctly.BAND1 (VASP)



BAND1 (ABACUS, LCAO)
BAND1 (ABACUS, PW)