Skip to content

Read exchanged q-state occupation in non-KPAR PW EXX - #7992

Open
shaneraphel wants to merge 1 commit into
deepmodeling:developfrom
shaneraphel:fix-7426-exx-q-occupation
Open

shaneraphel wants to merge 1 commit into
deepmodeling:developfrom
shaneraphel:fix-7426-exx-q-occupation

Conversation

@shaneraphel

@shaneraphel shaneraphel commented Sep 18, 2026

Copy link
Copy Markdown

Reminder

  • I have read AGENTS.md and docs/developers_guide/agent_governance.md.
  • I have linked an issue or explained why this PR does not need one.
  • I have added adequate unit tests and/or case tests, or explained why not.
  • I have listed the exact verification commands run and their results.
  • I have described user-visible behavior changes, including INPUT parameter changes.
  • I have explained core-module impact for ESolver, HSolver, ElecState, Hamilt, Operator, Psi, or other source/ changes.
  • I have requested any needed governance exception below.

Linked Issue

Fix #7426

Unit Tests and/or Case Tests for my changes

  • Commands run:
    • git apply --check of this patch on op_pw_exx.cpp at develop cfd4dcf8
  • Result summary: apply succeeds. After the change the non-KPAR scalar is occupation(iq,m)/nqs and still multiplies get_pw(m_iband, iq).
  • Checks not run, with reason: full CMake/CTest of ABACUS is not run here; ACE/KPAR is the default route and is not edited. The edited site is the non-KPAR act_op gather of wg.

What's changed?

wg stores k-weighted occupation. Non-KPAR PW EXX/HSE read (*wg)(this->ik, m_iband) while the exchanged orbital is get_pw(m_iband, iq) and the denominator is already wk[iq]. That mixes the current-k numerator with the q denominator.

This change reads (*wg)(iq, m_iband), so the scalar is the occupation of the exchanged state. The KPAR path already gathers (*wg)(iq_loc_spin, m_iband). KPAR wk[iq] is pool-local and is not rewritten.

Fixes #7426.

Governance Notes

  • INPUT/docs changes: none. No INPUT parameter change.
  • Core module impact: OperatorEXXPW::act_op non-KPAR occupation gather only. Hamilt/ESolver/HSolver/ElecState/Psi interfaces unchanged.
  • Exceptions requested: none.

wg stores k-weighted occupation. Non-KPAR EXX mixed wg(this->ik,m)
with wk[iq] while the exchanged orbital is get_pw(m, iq).

Signed-off-by: shan yu <shanyu@shans-MacBook-Air.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Possible inconsistent k-point occupation weighting in PW EXX/HSE paths

1 participant