Skip to content

[wien2k] pure-Python case.oubwin band-window generator#8

Open
krystophny wants to merge 3 commits into
TRIQS:unstablefrom
krystophny:port/dmftproj-oubwin-python
Open

[wien2k] pure-Python case.oubwin band-window generator#8
krystophny wants to merge 3 commits into
TRIQS:unstablefrom
krystophny:port/dmftproj-oubwin-python

Conversation

@krystophny

Copy link
Copy Markdown

Part of #7 (dmftproj Fortran-to-Python port). Stacks on #5 (merge #4, #5 first;
this branch contains them, so the net diff here is oubwin.py + its test).

Pure-Python case.oubwin generator: reads case.almblm{up,dn} and the energy
window in case.indmftpr, selects the contiguous in-window band range per
k-point and spin, and writes case.oubwin{up,dn} in the dmftproj format.
proj_mode 0; band-index modes raise NotImplementedError pending a fixture.

Verification

Regenerates CaOs2.oubwin{up,dn} and compares byte for byte to the committed
dmftproj reference:

wien2k_oubwin_python: ok

numpy only; the almblm fixtures are truncated to the header + first-sort band
block the selection reads (~5 kB each).

…CaOs2)

dftkit's Wien2k converter is only covered by the non-SOC SrVO3 case. This adds a
SOC + spin-polarized golden test: CaOs2, a cubic fluorite cell with two
symmetry-equivalent correlated Os atoms whose magnetic point group has 16
operations, 8 of them time-reversal. It exercises the combined-spin 'ud' block
and the time-reversal symmetry path of dmftproj + the converter on a small
8-k-point fixture, validated by h5diff against a reference produced by this
converter.
triqs_dftkit.wien2k.symqmc.write_symqmc builds the correlated-shell spinor
symmetry matrices (case.symqmc) from case.dmftsym + case.indmftpr + case.struct,
reproducing the dmftproj Fortran construction (Wigner D, orbital and spinor
time-reversal operators, angular-harmonics basis transform, spin-1/2 phase
blocks). It is a full replacement of the symqmc-writing, covering every path:

- non-mixing spin-diagonal bases (complex, cubic): the up/up block scaled by
  the +-(a+g)/2 phase, with the orbital time-reversal operator on the magnetic
  operations;
- mixing fromfile bases that couple spin (the |j,m_j> basis): the full 2(2l+1)
  spinor representation P spinrot P^dag with the spinor time-reversal
  -i sigma_y (x) T on the magnetic operations;
- l=0 (s) shells: the 2x2 spin phase block.

Verified against the dmftproj Fortran output for all three paths on CaOs2 (16
operations, 8 time-reversal): the cubic converter HDF5 is identical (h5diff) and
every matrix matches to machine precision. The mixing fromfile path is the one
dft_tools #148 singles out; dmftproj reads that basis with a single-precision
CMPLX cast and a 250-column line cap (set_ang_trans.f), so its case.symqmc
carries a ~1e-7 error there while this generator is full double precision.

Tests: the cubic path reuses the SOC golden h5; the mixing and l=0 paths compare
to the dmftproj matrix data (single precision, ~26 kB) and assert unitarity.
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. Proven byte-identical to the Fortran output on
CaOs2 (proj_mode 0; band-index modes raise NotImplementedError pending a
fixture). Part of TRIQS#7.
@krystophny

Copy link
Copy Markdown
Author

Accuracy: case.oubwin is integer band-window data, reproduced byte-identically (independent of the precision fix).

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