htesp.wannier90

Module to prepare wannier90 input files

Functions

epw_bandcheck([infile, out, proj, ...])

function to write input file for wannier90 calculations.

resolve_num_wann(config_settings[, ...])

Work out num_wann for the wannier90 input.

htesp.wannier90.resolve_num_wann(config_settings, projection_file='projection.in')[source]

Work out num_wann for the wannier90 input.

FIX(8): config_settings["num_wann"] raised KeyError with the shipped utility/input_files/wannier90.json, which does not define the key, so every VASP wannier90 input failed. The value is now looked up with .get and derived when it is missing.

Resolution order:
  1. config_settings['num_wann'] if present;

  2. the number of orbitals in projection_file;

  3. config_settings['num_bands'] (a crude upper bound - a warning is printed);

  4. otherwise a ValueError naming exactly what to add to the JSON file.

Parameters:
  • config_settings (dict) – The config_settings block of the wannier90 JSON file.

  • projection_file (str) – Projection file used for step 2. Default: ‘projection.in’.

Returns:

The number of Wannier functions.

Return type:

int

htesp.wannier90.epw_bandcheck(infile='scf.in', out='ex.win', proj=' ', json_file='wannier90.json', dft='QE')[source]

function to write input file for wannier90 calculations. Default: ‘ex.win’

Parameters:
  • infile (input file for scf calculation)

  • out (output file. Default: 'ex.win')

  • proj ('scdm' if used SCDM projection, '' otherwise)

  • json_file (JSON file containing element-value pairs for configurational settings)

  • dft (DFT package name, can be 'QE' (Quantum ESPRESSO), 'VASP', or 'other')