You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
dyzheng
committed
Fix(deltaspin): fix pauli_to_moment My sign convention and enable PW escon
Source fixes:
- spin_constrain.h: fix My = -Im(occ1-occ2) → Im(occ1-occ2)
The magnetic moment y-component had the wrong sign in the Pauli matrix
transformation, causing incorrect Mi computation for nspin=4 DeltaSpin.
- cal_escon(): replace is_Mi_converged guard with lambda_/Mi_ empty check
- elecstate_pw: add get_spin_constrain_energy() for PW basis DeltaSpin
Refs regenerated for nspin=4 DeltaSpin cases: 14, 15, 16, 19, 21, 41
Test 18 unchanged, nspin=2 tests unchanged.
0 commit comments