Fix: match spin density symmetrization with the new convention changed in #7664 - #7804
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to restore consistency between the post-#7664 Pauli/sigma_y convention used when extracting spin density components and the spin-rotation applied during reciprocal-space (rhog) spin-density symmetrization, addressing symmetry-off vs symmetry-on energy deviations (e.g., NiO).
Changes:
- Introduces a
y-channel handedness correction concept (S=diag(1,-1,1)conjugation) inpsymmg_socwhen building per-symmetry-operation spin-rotation matrices. - Adds a new SOC coupling unit test to validate that SU(2) spinor rotation + Pauli decomposition matches the SO(3) pseudovector rotation (with nonzero
m_ycases).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
source/source_estate/module_charge/symmetry_rhog.cpp |
Adds the intended y-channel handedness correction logic for spin-density symmetrization matrix construction (currently not applied). |
source/source_cell/module_symmetry/test/symmetry_rho_soc_test.cpp |
Adds a coupling test that checks SU(2)-induced Pauli rotation and extracted Pauli components against spin_so3 rotation for nonzero m_y. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
mohanchen
approved these changes
Aug 12, 2026
Collaborator
|
Any integrate or unit tests to protect this feature? |
AroundPeking
pushed a commit
to AroundPeking/abacus-develop
that referenced
this pull request
Sep 24, 2026
Port deepmodeling/abacus-develop PR deepmodeling#7832 (f29968d) onto the magnetic LibRPA producer baseline. Correct both density-extraction templates and the DeltaSpin driving field. Include the prerequisite deepmodeling#7748 pauli_to_moment sign correction absent from this older baseline. Preserve the existing cubic and hexagonal spin-rotation tests and LibRPA exports. Adapt the upstream physical-spinor tests to the legacy filenames; make the DeltaSpin unit test call the production measurement helper. The old baseline has no deepmodeling#7804 yflip rotation compensation to remove. Validation on dongfang: release MPI build, 84 C++ cases in 14 CTest targets, 12 ABF Python tests, and all three deepmodeling#7832 integration references passed with unchanged acceptance thresholds. Separate material comparisons are retained in workspace/symmetry/runs/20260919-abacus-msg-upstream-r1 in the GW topic. (cherry picked from commit f29968d) (cherry picked from commit 07d0470b1610eb44b7b6cb4a8009229f3b8b6e0f)
AroundPeking
pushed a commit
to AroundPeking/abacus-develop
that referenced
this pull request
Sep 26, 2026
Port deepmodeling/abacus-develop PR deepmodeling#7832 (f29968d) onto the magnetic LibRPA producer baseline. Correct both density-extraction templates and the DeltaSpin driving field. Include the prerequisite deepmodeling#7748 pauli_to_moment sign correction absent from this older baseline. Preserve the existing cubic and hexagonal spin-rotation tests and LibRPA exports. Adapt the upstream physical-spinor tests to the legacy filenames; make the DeltaSpin unit test call the production measurement helper. The old baseline has no deepmodeling#7804 yflip rotation compensation to remove. Validation on dongfang: release MPI build, 84 C++ cases in 14 CTest targets, 12 ABF Python tests, and all three deepmodeling#7832 integration references passed with unchanged acceptance thresholds. Separate material comparisons are retained in workspace/symmetry/runs/20260919-abacus-msg-upstream-r1 in the GW topic. (cherry picked from commit f29968d) (cherry picked from commit 07d0470b1610eb44b7b6cb4a8009229f3b8b6e0f)
AroundPeking
pushed a commit
to AroundPeking/abacus-develop
that referenced
this pull request
Sep 27, 2026
Port deepmodeling/abacus-develop PR deepmodeling#7832 (f29968d) onto the magnetic LibRPA producer baseline. Correct both density-extraction templates and the DeltaSpin driving field. Include the prerequisite deepmodeling#7748 pauli_to_moment sign correction absent from this older baseline. Preserve the existing cubic and hexagonal spin-rotation tests and LibRPA exports. Adapt the upstream physical-spinor tests to the legacy filenames; make the DeltaSpin unit test call the production measurement helper. The old baseline has no deepmodeling#7804 yflip rotation compensation to remove. Validation on dongfang: release MPI build, 84 C++ cases in 14 CTest targets, 12 ABF Python tests, and all three deepmodeling#7832 integration references passed with unchanged acceptance thresholds. Separate material comparisons are retained in workspace/symmetry/runs/20260919-abacus-msg-upstream-r1 in the GW topic. (cherry picked from commit f29968d) (cherry picked from commit 07d0470b1610eb44b7b6cb4a8009229f3b8b6e0f)
AroundPeking
pushed a commit
to AroundPeking/abacus-develop
that referenced
this pull request
Sep 27, 2026
Port deepmodeling/abacus-develop PR deepmodeling#7832 (f29968d) onto the magnetic LibRPA producer baseline. Correct both density-extraction templates and the DeltaSpin driving field. Include the prerequisite deepmodeling#7748 pauli_to_moment sign correction absent from this older baseline. Preserve the existing cubic and hexagonal spin-rotation tests and LibRPA exports. Adapt the upstream physical-spinor tests to the legacy filenames; make the DeltaSpin unit test call the production measurement helper. The old baseline has no deepmodeling#7804 yflip rotation compensation to remove. Validation on dongfang: release MPI build, 84 C++ cases in 14 CTest targets, 12 ABF Python tests, and all three deepmodeling#7832 integration references passed with unchanged acceptance thresholds. Separate material comparisons are retained in workspace/symmetry/runs/20260919-abacus-msg-upstream-r1 in the GW topic. (cherry picked from commit f29968d) (cherry picked from commit 07d0470b1610eb44b7b6cb4a8009229f3b8b6e0f)
AroundPeking
pushed a commit
to AroundPeking/abacus-develop
that referenced
this pull request
Sep 29, 2026
Port deepmodeling/abacus-develop PR deepmodeling#7832 (f29968d) onto the magnetic LibRPA producer baseline. Correct both density-extraction templates and the DeltaSpin driving field. Include the prerequisite deepmodeling#7748 pauli_to_moment sign correction absent from this older baseline. Preserve the existing cubic and hexagonal spin-rotation tests and LibRPA exports. Adapt the upstream physical-spinor tests to the legacy filenames; make the DeltaSpin unit test call the production measurement helper. The old baseline has no deepmodeling#7804 yflip rotation compensation to remove. Validation on dongfang: release MPI build, 84 C++ cases in 14 CTest targets, 12 ABF Python tests, and all three deepmodeling#7832 integration references passed with unchanged acceptance thresholds. Separate material comparisons are retained in workspace/symmetry/runs/20260919-abacus-msg-upstream-r1 in the GW topic. (cherry picked from commit f29968d) (cherry picked from commit 07d0470b1610eb44b7b6cb4a8009229f3b8b6e0f)
AroundPeking
added a commit
to AroundPeking/abacus-develop
that referenced
this pull request
Sep 29, 2026
Port deepmodeling/abacus-develop PR deepmodeling#7832 (f29968d) onto the magnetic LibRPA producer baseline. Correct both density-extraction templates and the DeltaSpin driving field. Include the prerequisite deepmodeling#7748 pauli_to_moment sign correction absent from this older baseline. Preserve the existing cubic and hexagonal spin-rotation tests and LibRPA exports. Adapt the upstream physical-spinor tests to the legacy filenames; make the DeltaSpin unit test call the production measurement helper. The old baseline has no deepmodeling#7804 yflip rotation compensation to remove. Validation on dongfang: release MPI build, 84 C++ cases in 14 CTest targets, 12 ABF Python tests, and all three deepmodeling#7832 integration references passed with unchanged acceptance thresholds. Separate material comparisons are retained in workspace/symmetry/runs/20260919-abacus-msg-upstream-r1 in the GW topic. (cherry picked from commit f29968d) (cherry picked from commit 07d0470b1610eb44b7b6cb4a8009229f3b8b6e0f)
AroundPeking
added a commit
to AroundPeking/abacus-develop
that referenced
this pull request
Sep 30, 2026
Port deepmodeling/abacus-develop PR deepmodeling#7832 (f29968d) onto the magnetic LibRPA producer baseline. Correct both density-extraction templates and the DeltaSpin driving field. Include the prerequisite deepmodeling#7748 pauli_to_moment sign correction absent from this older baseline. Preserve the existing cubic and hexagonal spin-rotation tests and LibRPA exports. Adapt the upstream physical-spinor tests to the legacy filenames; make the DeltaSpin unit test call the production measurement helper. The old baseline has no deepmodeling#7804 yflip rotation compensation to remove. Validation on dongfang: release MPI build, 84 C++ cases in 14 CTest targets, 12 ABF Python tests, and all three deepmodeling#7832 integration references passed with unchanged acceptance thresholds. Separate material comparisons are retained in workspace/symmetry/runs/20260919-abacus-msg-upstream-r1 in the GW topic. (cherry picked from commit f29968d) (cherry picked from commit 07d0470b1610eb44b7b6cb4a8009229f3b8b6e0f)
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.
#7664 breaks NiO's energy (from ~ μeV to ~ meV deviation from symmetry-off) due to the out-of-sync of the convention in spin density symmetrization. This PR fix the problem.