EPW files

WannierIO.UkkType

Struct for the EPW .ukk file.

Similar to the W90 .chk file.

struct Ukk{T<:Real}

Fields

  • ibndstart: index of the first band

  • ibndend: index of the last band

  • n_kpts: number of kpoints

  • n_bands: number of bands

  • n_wann: number of wannier functions

  • U: gauge matrices, length-n_kpts vector, each element is a n_bands * n_wann matrix

  • frozen_bands: flag for frozen bands, length-n_kpts vector, each element is a length-n_bands vector

  • excluded_bands: flag for excluded bands, length-n_bands + n_excl_bands vector, where n_excl_bands is the number of excluded bands

  • centers: centers of WFs, length-n_wann vector of Vec3. Note that EPW uses Cartesian coordinates w.r.t the QE alat, so it is dimensionless.

source
WannierIO.UkkMethod
Ukk(chk, alat)

Construct a EPW Ukk from a W90 Chk.

Arguments

  • chk: the Chk struct
  • alat: the QE alat in Å unit. Note that the alat from QE stdout file is in Bohr unit, you need to do the conversion by multiplying it with Bohr_QE.

Examples

Convert a W90 .chk file to a EPW .ukk file:

using WannierIO
chk = read_chk("BN.chk")
# Note we need QE `alat` for ukk. You can get it
# - either by inspecting the QE stdout file, from line like
#       lattice parameter (alat)  =       6.8330  a.u.
#   where the 6.8330 is the alat in Bohr unit. However, the Bohr constant
#   in W90 and QE are slightly different, to be exact we need to do the unit
#   conversion using QE constant:
alat = 6.8330 * WannierIO.Bohr_QE
# - or better by parsing the QE xml file, and the unit conversion is done automatically
alat = read_qe_xml("BN.xml").alat
ukk = Ukk(chk, alat)
WannierIO.write_epw_ukk("BN.ukk", ukk)
source
WannierIO.read_epw_mmnMethod
read_epw_mmn(filename; n_kpts, n_bvecs, n_bands)

Read the EPW mmn file.

The EPW mmn format is different from that of W90. It does not contain the number of kpoints/bvectors/bands, so they need to be provided as keyword arguments.

Arguments

  • filename: the mmn file name

Keyword arguments

  • n_kpts: number of kpoints
  • n_bvecs: number of bvectors
  • n_bands: number of bands

Return

  • M: length-n_kpts vector of length-n_bvecs vector of n_bands * n_bands matrices
source