Fix bug (deltaspin): restore LCAO spin rotation invariance - #7914
Open
Tao-Xia wants to merge 3 commits into
Open
Fix bug (deltaspin): restore LCAO spin rotation invariance#7914Tao-Xia wants to merge 3 commits into
Tao-Xia wants to merge 3 commits into
Conversation
dyzheng
approved these changes
Sep 6, 2026
dyzheng
left a comment
Collaborator
There was a problem hiding this comment.
LGTM,This PR may resolve the numerical instability issue in non‑collinear spin calculations with the LCAO basis set. Thank you for your submission.
This was referenced Sep 7, 2026
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
Fixes #7913
Unit Tests and/or Case Tests for my changes
cmake --build build-elpa-cpu --target deltaspin_core_test MODULE_HSOLVER_LCAO abacus_basic_para -j 12build-elpa-cpu/source/source_lcao/module_deltaspin/test/deltaspin_core_testsource/source_hsolver/test:build-elpa-cpu/source/source_hsolver/test/MODULE_HSOLVER_LCAOmpirun -np 4 build-elpa-cpu/source/source_hsolver/test/MODULE_HSOLVER_LCAO --gtest_filter='DiagoElpaComplexTest.UsesAuthoritativeUpperTriangle:DiagoTest/DiagoKPointsTest.LCAO/0'xandytarget moments, no SOC, andks_solver genelpa.x/ytotal energies differ by only1.82e-8 eV; both target moments converge with transverse residuals of order1e-6 mu_B.What's changed?
PZHEMMwith the authoritative upper triangle when the complex custom ELPA solver forms the generalized Hamiltonian. This prevents stale lower-triangle entries from entering the eigensolve without allocating an extra full matrix.<psi | lambda dot sigma | psi> = lambda dot M, including the sign-sensitiveychannel.There are no INPUT parameter or serialized-data changes. The user-visible correction is restored non-SOC spin-rotation invariance for LCAO DeltaSpin with
genelpa.Governance Notes
HSolverchanges one complex generalized-transform kernel from general to Hermitian distributed multiplication;OperatorLCAOuses a shared DeltaSpin Pauli conversion.ESolver,ElecState, andPsiinterfaces are unchanged.