[wien2k] rotate the symmetry matrices into the local solver frame (dft_tools#148)#18
Draft
krystophny wants to merge 1 commit into
Draft
[wien2k] rotate the symmetry matrices into the local solver frame (dft_tools#148)#18krystophny wants to merge 1 commit into
krystophny wants to merge 1 commit into
Conversation
Fixes the spin-orbit symmetrization error reported in TRIQS/dft_tools#148. case.symqmc / case.sympar store the symmetry representation matrices that relate equivalent atoms in the global frame. Symmetry.symmetrize, however, is applied to the impurity quantity in the rot_mat-equalized local solver frame (the frame eff_atomic_levels returns). The two agree only when rot_mat is trivial, i.e. for centrosymmetric cells, so the bug stayed hidden; for a non-centrosymmetric cell the symmetrization is wrong and shifts the local-Hamiltonian eigenvalues. convert_symmetry_input now rotates each matrix into the local frame, rot_mat[j]^dag . mat . rot_mat[i] with j the atom i maps to under the operation (rot_mat[i] conjugated for a time-inversion operation, matching the conjugation symmetrize applies). rot_mat is the correlated-shell rotation for case.symqmc and rot_mat_all for case.sympar. Verified on a non-centrosymmetric SP+SO case (tellurium, P3_1 21): the symmetrization of the already-symmetric full-BZ local Hamiltonian goes from a 0.130 Ry eigenvalue drift to 2.5e-8 (a no-op), while centrosymmetric CaOs2 stays at ~1e-15 (unchanged).
This was referenced Jun 24, 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.
Fixes the spin-orbit symmetrization error in TRIQS/dft_tools#148. Independent of the dmftproj Python port, so it can be reviewed and merged on its own.
case.symqmc/case.symparstore the symmetry representation matrices that relate equivalent atoms in the global frame.Symmetry.symmetrize, however, is applied to the impurity quantity in therot_mat-equalized local solver frame (the frameeff_atomic_levelsreturns). The two coincide only whenrot_matis trivial, i.e. for centrosymmetric cells, so the existing centrosymmetric tests never exposed it; for a non-centrosymmetric cell the symmetrization is wrong and shifts the local-Hamiltonian eigenvalues.convert_symmetry_inputnow rotates each matrix into the local frame,rot_mat[j]^dag . mat . rot_mat[i], wherejis the atomimaps to under the operation (rot_mat[i]conjugated for a time-inversion operation, matching the conjugationsymmetrizeapplies). It usesrot_matforcase.symqmcandrot_mat_allforcase.sympar. Centrosymmetric output is unchanged becauserot_matis trivial there.Verification
Non-centrosymmetric SP+SO case, tellurium (P3_1 21, no inversion, full BZ): symmetrizing the already-symmetric full-BZ local Hamiltonian must be a no-op (zero eigenvalue shift).
Before (unstable):
After (this branch):
Centrosymmetric CaOs2 (no regression): 1.998e-15 before, 2.887e-15 after.