Feat/issue 7726 dftu pw nspin fixes - #7744
Open
dyzheng wants to merge 3 commits into
Open
Conversation
added 3 commits
August 1, 2026 21:03
…r nspin=1 In cal_occ_pw(): - Swap the imaginary signs in the Pauli-to-spin conversion for nspin=4: index[1] (spin down-up): -i*vu_tmp[2] -> +i*vu_tmp[2] index[2] (spin up-down): +i*vu_tmp[2] -> -i*vu_tmp[2] The DFT+U vu array convention requires opposite sign from deeq_nc. - Fix weight_eu for nspin=1: 0.25 -> 1.0 nspin=1 has single occupancy, not the Pauli double-counting factor. Verified with tests/17_DS_DFTU/08 and 09: 08: -6792.33351671617 (ref -6792.33351670950, diff 6.7e-9 eV) 09: -6364.26587638707 (ref -6364.26587639017, diff 3.1e-9 eV)
815_PW_DFTU_S2_Z — nspin=2 DFT+U, matches ref -6792.33351671614 816_PW_DFTU_S4_XY — nspin=4 DFT+U, matches ref -6364.26587638708
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.
Reminder
AGENTS.mdanddocs/developers_guide/agent_governance.md.source/changes.Linked Issue
Fix #
Unit Tests and/or Case Tests for my changes
What's changed?
Governance Notes