Skip to content

[wien2k] rotate the symmetry matrices into the local solver frame (dft_tools#148) - #18

Open
krystophny wants to merge 3 commits into
TRIQS:unstablefrom
krystophny:fix/dmftproj-soc-symmetrize
Open

krystophny wants to merge 3 commits into
TRIQS:unstablefrom
krystophny:fix/dmftproj-soc-symmetrize

Conversation

@krystophny

@krystophny krystophny commented Jun 24, 2026 •

Copy link
Copy Markdown

Fixes the local-frame symmetry error documented in TRIQS/dft_tools#148. This PR is independent of the dmftproj generator stack.

case.symqmc and case.sympar describe operations in the global frame, while Symmetry.symmetrize acts on quantities in the rot_mat-equalized solver frame. Conversion now stores R_j^dag M_ji R_i, with the source rotation conjugated for antiunitary operations, using rot_mat for correlated shells and rot_mat_all for partial shells.

The shell mapping includes atom, sort, angular momentum, and dimension. This prevents a symmetry operation from pairing the wrong shell when one atom contains multiple angular momenta; duplicate or missing identities fail explicitly. The two affected converter reference archives are regenerated for the corrected mat datasets, with all unrelated datasets and attributes verified unchanged.

Validation: a NumPy-only regression covers unitary and antiunitary operations while swapping two atoms that each contain two shells. The documented full-BZ tellurium oracle reduces local-Hamiltonian eigenvalue drift from 1.302e-1 to 2.483e-8; centrosymmetric CaOs2 remains at numerical noise. The focused local test passes, and the existing scalar-relativistic and SOC converter archive comparisons cover the stored frame transformation in CI.

Chris&AI

@krystophny
krystophny force-pushed the fix/dmftproj-soc-symmetrize branch from 52a5d2a to ac76ae2 Compare October 12, 2026 16:44
@krystophny

Copy link
Copy Markdown
Author

GPT Sol rebased this onto current unstable and completed the remaining review fixes. Extracted the frame transform into a tested helper, made shell mapping include l and dimension, and added explicit failures for ambiguous or missing targets. The focused unitary/antiunitary regression passes locally; CI is running.

Chris&AI

@krystophny

Copy link
Copy Markdown
Author

GPT Sol followed the first CI run through to the archive comparisons. The corrected frame transformation changed the expected dft_symmcorr_input/mat and dft_symmpar_input/mat values, so I regenerated both affected HDF5 references from their stored rotations and verified that every other dataset and attribute remained identical. The focused unitary/antiunitary frame test still passes; CI is rerunning with the corrected references.

Chris&AI

@krystophny

krystophny commented Oct 12, 2026 •

Copy link
Copy Markdown
Author

GPT Sol strengthened the solver-frame test with an independent density-matrix covariance oracle, covering noncommuting symmetry matrices, unitary/antiunitary actions, exchanged atoms and multiple angular momenta. It passes. This converter fix remains independent of the generator stack and is ready for review. Latest-head CI is running/queued.

Chris&AI

@krystophny
krystophny marked this pull request as ready for review October 12, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant