Skip to content

Dev vasp kpointsopt#3

Open
the-hampel wants to merge 13 commits into
TRIQS:unstablefrom
the-hampel:dev_vasp_kpointsopt
Open

Dev vasp kpointsopt#3
the-hampel wants to merge 13 commits into
TRIQS:unstablefrom
the-hampel:dev_vasp_kpointsopt

Conversation

@the-hampel

Copy link
Copy Markdown
Member

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.

the-hampel added a commit to TRIQS/dft_tools that referenced this pull request May 26, 2026
see TRIQS/dftkit#3 for more information.

- add test for spaghettis for vasp
- add documentation for new vasp bands converter feature
the-hampel added a commit to TRIQS/dft_tools that referenced this pull request Jun 19, 2026
see TRIQS/dftkit#3 for more information.

- add test for spaghettis for vasp
- add documentation for new vasp bands converter feature
@harrisonlabollita

Copy link
Copy Markdown
Collaborator

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?

@the-hampel

Copy link
Copy Markdown
Member Author

Hi @harrisonlabollita , yes that might be a good idea. Problem is that in VASP this is optional. A kpath is specified in the KPOINTS or KPOINTS_OPT file and might look like this:

k-points for bandstructure using Γ–X–M–Γ–R
100
line
reciprocal
  0.00000000   0.00000000   0.00000000 GAMMA
  0.00000000   0.50000000   0.00000000 X

  0.00000000   0.50000000   0.00000000 X
  0.50000000   0.50000000   0.00000000 M

  0.50000000   0.50000000   0.00000000 M
  0.00000000   0.00000000   0.00000000 GAMMA

  0.00000000   0.00000000   0.00000000 GAMMA
  0.50000000   0.50000000   0.50000000 R

Problem is that the 4 item in each coordinate is optional and you can write whatever you want. It is used by py4vasp and it is already stored by vasp into the vaspout.h5. So I can simply add this with a line of code to store it. But I shall add a check because the user can write there whatever. Where do we want to store it?

@harrisonlabollita

Copy link
Copy Markdown
Collaborator

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 dft_bands_input group. The field could be kpts_labels and kpts_labels_idx?

@the-hampel

Copy link
Copy Markdown
Member Author

That sounds good. Let me instruct Mr Claude and we see how this looks.

@the-hampel the-hampel force-pushed the dev_vasp_kpointsopt branch from b92cdf9 to e99f13b Compare June 23, 2026 14:02
@the-hampel

Copy link
Copy Markdown
Member Author

7186a41 is a first draft. Let me know what you think and if this is compatible with wien2k.

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-hampel the-hampel force-pushed the dev_vasp_kpointsopt branch from 7186a41 to 03daf9e Compare June 26, 2026 11:32
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.

2 participants