Skip to content

[wien2k] port and verify the non-spin-orbit (ifSO=0) path - #15

Open
krystophny wants to merge 14 commits into
TRIQS:unstablefrom
krystophny:port/dmftproj-noso
Open

krystophny wants to merge 14 commits into
TRIQS:unstablefrom
krystophny:port/dmftproj-noso

Conversation

@krystophny

@krystophny krystophny commented Jun 16, 2026 •

Copy link
Copy Markdown

Part of #7; stacks on #12 and feeds #16/#13.

Ports the non-spin-orbit projector paths: (2l+1) symmetry and local-rotation matrices, per-spin Loewdin orthonormalization, two independent density blocks, and no magnetic time-reversal phase. The retained spin-polarized CaOs2 references cover ctqmcout, symqmc, sympar and parproj.

The rebase preserves shell-specific density tables and odd-l parity from the preceding reviews. A regression keeps different l shells on one atom independent. Two-spin inputs with different band windows now fail explicitly because this implementation requires matching absolute windows.

Validation: all nine local generator tests pass, including the non-SO native references with finite 1e-11 comparisons. Full TRIQS integration runs in CI.

Chris&AI

krystophny added a commit to krystophny/dftkit that referenced this pull request Jun 16, 2026
run_dmftproj writes every case.* file the converter reads (band mode writes
case.outband), a drop-in for the dmftproj Fortran binary. Delete fortran/dmftproj
and its build. End-to-end: driver -> converter -> h5diff. The Fortran precision
fix is TRIQS#14; non-SO support is TRIQS#15. Closes the port. Part of TRIQS#7.
Port the dmftproj almblm reader and case.oubwin writer to NumPy. Given
case.almblm{up,dn} and the energy window in case.indmftpr, select the
contiguous band range per k-point and spin and write case.oubwin{up,dn}
in the dmftproj format. Support proj_mode 0; band-index modes remain
explicitly unsupported. Part of TRIQS#7.

Keep window-open and window-valid flags separate, as set_projections.f
does. A window opening only at nbmax remains excluded with zero bounds,
including nbmin == nbmax. Preserve this native behavior on both sides.

Reuse the existing compressed CaOs2 almblm fixtures, decompressing into
a temporary directory. Compare both spin outputs with CaOs2.oubwinup,
ignoring only trailing whitespace stripped from the shipped reference.
Add focused checks for the final-band edge cases, energy boundaries,
Fermi shifts, per-k lowest-band weights and excluded output records.

Validation: the generator test passes locally with NumPy, including both
reviewer reproducers and regeneration of the 43-92 CaOs2 band window.
@krystophny

Copy link
Copy Markdown
Author

GPT Sol rebased this onto the reviewed shared implementation and completed the non-SO fixes. Preserved odd-l parity and per-shell density keys, added a multi-shell regression, made golden comparisons NaN-safe, and reject mismatched two-spin windows instead of silently using the wrong offsets. All nine local generator tests pass; CI is running.

Chris&AI

Read the almblm coefficients, assemble and locally rotate correlated
projectors, apply the cubic/complex basis, and Loewdin-orthonormalize the
stacked shells before writing ctqmcout. Part of TRIQS#7, following TRIQS#8.

Keep the native separate window-open/valid flags. Validate matching SO
spin windows and use each spin's own band offsets. Reject unsupported
non-SO, band-index, cubic p/f and non-identity struct rotation paths
instead of producing misleading files; subsequent port stages add them.

Reuse the current full-rank CaOs2 inputs and TRIQS#8 fixture handling. Compare
integer fields exactly and finite float fields at atol=1e-7, rtol=0.
Add regressions for final-band-only windows and mismatched SO spins.
Local validation gives max native residual 1.3e-8 and full 20x50 projector
orthonormality error 3.2e-15. The old rank-deficient-window claims no
longer apply to this fixture.
Generate symmetry matrices for every included shell, including the uncorrelated Ca d shell in the native partial fixture. Rebase onto the corrected projector stack and reuse source fixtures without unused build-directory copies.

Correct the cubic p normalization/order and use the dmftsym iprop parity for improper rotations. Add independent inversion and basis-normalization regressions. Reject the unsupported non-SO and cubic f paths until their port stages. Compare headers exactly, finite complex matrices at atol=1e-7 with rtol=0, and verify unitarity at the native basis precision floor.
@krystophny

Copy link
Copy Markdown
Author

GPT Sol fixed acceptance of single-channel SO projectors and spinor bases in non-SO symmetry writers. The new rejection regressions and existing native-reference non-SO tests pass. Restacked on updated #12. Latest-head CI is running/queued.

Chris&AI

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