triqs_dftkit.wien2k.oubwin
Pure-Python generation of the dmftproj band-window file (case.oubwin), replacing the corresponding output of the dmftproj Fortran executable.
Given the alm/blm coefficient file (case.almblm, or the spin pair case.almblmup / case.almblmdn) and the projector definition (case.indmftpr), this selects, per k-point and spin, the contiguous band range whose Fermi- shifted Kohn-Sham eigenvalues fall in the energy window, and writes the result in the case.oubwin format read by the charge self-consistency.
It reproduces the Fortran path: read elecn/nk/nloat/eferm from the almblm header (outbwin.f / dmftproj.f), parse the energy window (e_bot, e_top, proj_mode) from the last line of case.indmftpr, shift every band eigenvalue by eferm, and apply the proj_mode==0 selection of set_projections.f (strict lower bound e_bot < E, inclusive upper bound E <= e_top, yielding a single contiguous [nb_bot, nb_top] per k). The weight written per included k-point is the tetrahedron weight of the lowest band nbmin.
Spin-polarization is detected from the input files: case.almblmup / case.almblmdn present => two spin files (case.oubwinup / case.oubwindn), otherwise the single case.oubwin. The spin-orbit flag (ifSO) comes from case.indmftpr; with -so the up and dn windows must coincide and dmftproj aborts otherwise, a check this generator also performs.
Functions
|
Read <case>.almblm{up,dn} (or <case>.almblm) and write the matching <case>.oubwin{up,dn} (or <case>.oubwin) in the dmftproj format. |