Repository navigation
[wien2k] Pure-Python case.symqmc generator (first dmftproj port step) - #5
Conversation
3aecab1 to
7d21b9c
Compare
7d21b9c to
4a26e2b
Compare
|
Hi @krystophny, #4 is merged ( Rebase. We force-pushed a rebase onto current
Fresh build: 22/23 tests pass. Two issues, which we'd leave to you since they depend on the precision question below:
Precision question. The commit message says the cubic path matches dmftproj "to machine precision" and that the HDF5 is "identical (h5diff)". With the #4 fixture (cubic basis from Attribution: this comment was produced by Claude (Opus 5.5) running in Claude Code, driven by @the-hampel. |
Generate correlated-shell spinor symmetry matrices from case.dmftsym, case.indmftpr and case.struct using the dmftproj Wigner-D, angular-basis, time-reversal and spin-phase construction. Cover the non-mixing cubic, spin-mixing fromfile (|j,m_j>) and l=0 paths on the CaOs2 fixture. The cubic matrices differ from the shipped native fixture by 8.6e-8 in complex magnitude (6.9e-8 per real/imaginary component). set_ang_trans.f reads the 8-digit cubic template through CMPLX without KIND=8; magnetic operations apply this rounded basis twice. outputqmc.f also evaluates spin phases in single precision. Python uses exact cubic d coefficients and double-precision phases. Reproducing the native rounding in a local check reduces the complex residual to 2.2e-14; the native precision fixes remain separate in TRIQS#14. Generate into a temporary directory and compare the complete symqmc header exactly and the complex matrices at atol=1e-7, rtol=0. Check Python cubic unitarity at 1e-12. This preserves the SOC converter's shared fixture and avoids h5diff's hard-coded array tolerance and the unrelated parproj archive groups. The fromfile and l=0 tests retain their native matrix references. Read generator inputs from the source fixtures instead of copying unused files into the build directory.
4a26e2b to
1622e01
Compare
|
GPT Sol did the remaining updates in 1622e01. The cubic test now uses a temporary directory, compares the native symqmc directly at The cubic Chris&AI |
|
Okay thanks @krystophny . All good from my side. I will go ahead with the merge. |
Part of #7 (dmftproj Fortran-to-Python port).
triqs_dftkit.wien2k.symqmc.write_symqmc(case)readscase.dmftsym,case.indmftprandcase.structand writes the correlated-shell symmetry matrices incase.symqmc. It implements the dmftproj construction using Wigner D matrices, angular-basis transforms, orbital and spinor time reversal, and spin-1/2 phase blocks.The CaOs2 tests cover the non-mixing cubic d basis, a spin-mixing
fromfilebasis (|j,m_j>), and anl=0shell, using 16 operations including 8 antiunitary operations.The cubic test generates into a temporary directory and compares directly against the shipped native
CaOs2.symqmc: headers exactly, complex matrix entries atatol=1e-7, rtol=0, and Python unitarity at1e-12. The converter tests retain their original Fortran fixture. The mixing andl=0tests use their existing native matrix references.The cubic matrices differ from the native fixture by
8.6e-8in complex magnitude (6.9e-8per real/imaginary component). The cause is native precision loss:set_ang_trans.freads the eight-digit cubic template throughCMPLXwithoutKIND=8, magnetic operations apply the rounded basis twice, andoutputqmc.fevaluates spin phases in single precision. Python uses exact cubic d coefficients and double-precision phases. Reproducing the native rounding and time-reversal construction in a local check reduces the residual to2.2e-14. The separate native precision work remains in #14; this PR uses the existing fixture.Both generator scripts pass locally with NumPy, and source/working-directory fixture preservation was checked. Full TRIQS integration runs in the PR's four-platform CI matrix.
Chris&AI