htesp.kpoint_path

Module to write the Kpoint_Path card used by wannier90 / WannierTools.

Functions

kpoint_path(file_name[, out, slab, ...])

Write the Kpoint_Path card for wannier90 / WannierTools.

split_path_segments(labels)

Split a list of high-symmetry labels into continuous segments.

htesp.kpoint_path.split_path_segments(labels)[source]

Split a list of high-symmetry labels into continuous segments.

A label containing | or , (e.g. "K|U") marks a break in the band path: the part before the separator closes the running segment and the part after it opens a new one. Segments shorter than two labels carry no line and are dropped.

Parameters:

labels (list of str) – High-symmetry point names as returned by kpath.

Returns:

One list of labels per continuous stretch of the path.

Return type:

list of list of str

Example

>>> split_path_segments(['G', 'X', 'W', 'K|U', 'X'])
[['G', 'X', 'W', 'K'], ['U', 'X']]
htesp.kpoint_path.kpoint_path(file_name, out='wannier_kpath.in', slab=False, slab_file='POSCAR-slab', slab_out='wannier_kpath_slab.in')[source]

Write the Kpoint_Path card for wannier90 / WannierTools.

Parameters:
  • file_name (str) – QE scf.in file (a VASP POSCAR is accepted as a fallback).

  • out (str) – Output file. Default 'wannier_kpath.in'.

  • slab (bool) – Also write the 2D path for slab_file when that file exists. Used by htesp.create_wt_inputs. Default False.

  • slab_file (str) – Slab structure to read for the 2D path. Default 'POSCAR-slab'.

  • slab_out (str) – Output file for the 2D path. Default 'wannier_kpath_slab.in'.

Return type:

None