Repository navigation
[wien2k] complete the port to machine precision: shared module, fromfile, proj_mode, outband - #12
krystophny wants to merge 12 commits into
Conversation
|
Updated to machine precision on every output (with the Fortran precision fix #14): ctqmcout uses the same LAPACK/BLAS routines the Fortran does (scipy |
cd177f8 to
36b8868
Compare
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.
49d1618 to
d4dc0e1
Compare
|
GPT Sol rebased this onto reviewed #11/#14 and preserved the earlier window, spin-offset, shell-key and parity fixes through deduplication. Fixed equivalent-atom transfer in custom-basis density symmetrization, rejected singular overlaps, and made numeric comparisons NaN-safe. Eight local generator tests pass; native reference checks are within Chris&AI |
4eeefbd to
d9baf96
Compare
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.
d9baf96 to
d52a695
Compare
|
GPT Sol fixed shared parsing, tiny spin mixing, scale-relative Loewdin rank detection, and partial-projector modes 1/2, including below-window validation. Corrected the band-path fixture and regenerated its reference with native dmftproj. All eight generator tests pass; native mode comparisons differ by at most 1.2e-16. Restacked on updated #11 plus the precision fix. Latest-head CI is running/queued. Chris&AI |
Part of #7; stacks on reviewed #11 and the native precision fix #14.
Extracts shared parsing, angular transforms, window selection and formatting into
_dmftproj. Adds double-precision projector construction, spin-mixing fromfile bases, projection modes 1/2 for oubwin/ctqmcout/parproj, and the SP+SO band-mode outband generator.Carries forward native terminal-band selection, per-spin offsets, shell-specific tables, odd-l parity and the normalized native p-basis ordering. Mixing density symmetrization now transfers contributions between equivalent atoms. Loewdin rank detection is relative to the overlap scale, preserving small full-rank projectors while rejecting singular overlaps. Shared parsing reads every correlated-shell representation record and every atomic-sort local rotation, and retains arbitrarily small spin mixing. Unsupported selected irreducible subspaces and multiple local orbitals fail explicitly. Existing converter fixtures remain intact; separate full-rank references test the precision layer.
Validation: all eight local generator tests pass. Native CMake producer comparisons reproduce the full-rank ctqmcout, custom-basis parproj, sympar and outband references within
1e-11(observed residuals at most1.4e-15on this build). Independent regressions cover two shells on one atom, transfer between equivalent atoms, singular overlaps and native window edge cases. Band-mode partial projectors also match the native energy-window reference within1.2e-16; the one-k-point band fixture and native reference now agree on their path length. CI runs full TRIQS integration.Chris&AI