Skip to content

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
AsTonyshment:fix_PW_pchg
Jul 28, 2024
Merged

Fix the incorrect calculation of partial charge for multi-k-points under both PW and LCAO when symmetry is turned on#4803
mohanchen merged 16 commits intodeepmodeling:developfrom
AsTonyshment:fix_PW_pchg

Conversation

@AsTonyshment
Copy link
Collaborator

@AsTonyshment AsTonyshment commented Jul 26, 2024

Linked Issue

Fix #4740

What's changed?

  • Added a new begin function in symmetry_rho.cpp that can be initialized without using the Charge class. The original begin function will be removed to eliminate the dependency of Symmetry_rho on Charge, but this change will be addressed in a separate PR (not this one).
  • Symmetrized the charge density in 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.
  • Symmetrized the charge density in 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 with nspin = 2 was also conducted, and it worked correctly.

BAND1 (VASP)
image
BAND1 (ABACUS, LCAO)
image
BAND1 (ABACUS, PW)
image

@AsTonyshment AsTonyshment requested a review from mohanchen July 26, 2024 08:58
@mohanchen mohanchen added the Bugs Bugs that only solvable with sufficient knowledge of DFT label Jul 26, 2024
@mohanchen mohanchen merged commit 3ef860a into deepmodeling:develop Jul 28, 2024
@AsTonyshment AsTonyshment deleted the fix_PW_pchg branch July 28, 2024 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugs Bugs that only solvable with sufficient knowledge of DFT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Incorrect calculation of partial charge for multi-k-points under both PW and LCAO when symmetry is turned on

2 participants