Dev vasp kpointsopt - #3
Conversation
see TRIQS/dftkit#3 for more information. - add test for spaghettis for vasp - add documentation for new vasp bands converter feature
see TRIQS/dftkit#3 for more information. - add test for spaghettis for vasp - add documentation for new vasp bands converter feature
|
Hi @the-hampel, thanks for this PR! This is a nice feature. While we are at, should we also add the high-symmetry path labels and x-ticks to the converter readers? For example, in Wien2k, the high-symmetry labels and high-symmetry points are printed at the end of the case.outband file. Our converters could be upgraded to read this and store in the hdf5. The user can then read data and metadata from the hdf5 file when making their plot. What do you think? |
|
Hi @harrisonlabollita , yes that might be a good idea. Problem is that in VASP this is optional. A kpath is specified in the Problem is that the 4 item in each coordinate is optional and you can write whatever you want. It is used by |
|
Indeed, the same problem would occur in Wien2k. If the high-symmetry label is not indicated in their case.klist_band, we would not know it either. By default, we could just do K1,..., KN. My thought was just include in the |
|
That sounds good. Let me instruct Mr Claude and we see how this looks. |
b92cdf9 to
e99f13b
Compare
|
7186a41 is a first draft. Let me know what you think and if this is compatible with wien2k. |
7186a41 to
03daf9e
Compare
Report the global DFT+DMFT iteration, each inner DMFT iteration, and the point just before the VASP charge update / DFT driver is triggered.
The upstream ctseg fix (real(...) in work_data.cpp mu extraction) means solve_generic now accepts the complex-flagged Hermitian impurity levels directly; no need to strip the imaginary noise with h.real.copy().
Skip the final VASP charge update so the run always terminates on a DMFT step instead of a now-unused DFT charge update, and add a header comment plus inline comments explaining the setup and the outer/inner loops.
Convert KPOINTS_OPT/LOCPROJ_OPT data into dft_bands_input with strict shell matching and optional cfg-driven PLO transforms so VASP bands can be consumed like other DFT backends. Auto-detect KPOINTS_OPT data during convert_dft_input, add dedicated SVO bands tests, and include minimal reproducibility inputs (INCAR/POSCAR/KPOINTS/KPOINTS_OPT/plo.cfg plus vaspout.h5) while suppressing confusing density/local-H diagnostics on the bands path.
Read the band-path labels for KPOINTS_OPT line-mode runs directly from vaspout.h5 (/input/kpoints_opt: mode, labels_kpoints, number_kpoints) and store them as kpts_labels + kpts_labels_idx in dft_bands_input, so the high-symmetry tick metadata is available from the h5 at plot time (as Wien2k exposes via case.outband). VASP writes two labels (start, end) per line segment; each is mapped to its 0-based position in the flattened band k-path via segment arithmetic, and the shared endpoint of two adjacent segments is collapsed into a single tick. Non-line-mode runs simply omit the labels (no text-file fallback). Extend the SVO bands test to check the Gamma-X-M-Gamma-R path (labels and indices [0, 49, 99, 149, 199]).
The KPOINTS_OPT bands test checked the shape of dft_bands_input and one hopping element, which passes even when the projectors themselves are wrong. Two errors on the VASP side got through it during development of this interface: raw LOCPROJ_OPT amplitudes that scaled with the MPI decomposition, and a LORBIT=14 optimal PAW channel rebuilt from the interpolated KPOINTS_OPT k-points instead of kept from the ground-state mesh, which collapsed the path projectors by about four orders of magnitude on the V t2g bands. Both are invisible in dft_bands_input because PLOVasp orthonormalizes the projectors and divides an overall factor out again, so add two checks that look where the error is visible: - _check_locproj_opt_scale compares the raw KPOINTS_OPT projectors with the regular-mesh ones at GAMMA, the k-point the line-mode path and the 15x15x15 mesh have in common. It compares sum_orb sum_band |<phi|psi>|^2, which is invariant under the arbitrary band phase and under mixing inside a degenerate multiplet and therefore does not depend on the MPI decomposition (equal to 1e-8 relative between 4 and 8 ranks). No hard-coded amplitude, so nothing to keep up to date. - _check_downfolded_t2g downfolds hopping with proj_mat and checks the SrVO3 t2g dispersion along the path: the 2.487 eV bandwidth, the threefold degeneracy at GAMMA and R, the band bottom at GAMMA and top at R, and that both GAMMA ticks give the same bands. This catches a wrong orbital character, a k/band misalignment or a broken label mapping, none of which the shape assertions see. Pin NBANDS in the fixture INCAR. VASP rounds the default up to a multiple of the band-group size, so regenerating at 4 instead of 8 ranks gives 23 bands, drops the topmost eg pair out of the [Group 1] EWINDOW and changes n_orbitals. Regenerate vaspout.h5 with a VASP that has both fixes, so the fixture carries correct projector amplitudes rather than a snapshot of the collapsed ones. The converted band structure is unchanged: the downfolded t2g eigenvalues agree with the previous fixture to 5e-8 eV, since the orthonormalization was already removing the error. Also extend .gitignore with the LOCPROJ_OPT, PROCAR_OPT and PROJCAR_OPT run outputs introduced with the KPOINTS_OPT workflow, and make the generated converter artifact patterns recursive so they also cover fixtures in subdirectories.
03daf9e to
0359f3d
Compare
Convert KPOINTS_OPT/LOCPROJ_OPT data (along kpath) into dft_bands_input as it is possible for Wien2k and Elk. Auto-detect KPOINTS_OPT data during convert_dft_input.
Add dedicated SVO bands tests, and include minimal reproducibility inputs (INCAR/POSCAR/KPOINTS/KPOINTS_OPT/plo.cfg plus vaspout.h5).
Warning: this is based on a non released VASP version. So reproducibility of the provided vaspout.h5 is limited.