Classes to store Wannier90 input and output files

class wannierberri.system.Wannier90data(seedname='wannier90', read_chk=False, kmesh_tol=1e-07, bk_complete_tol=1e-05, read_npz=True, write_npz_list=('mmn', 'eig', 'amn'), write_npz_formatted=True, overwrite_npz=False, formatted=())[source]
A class to describe all input files of wannier90, and to construct the Wannier functions

via disentanglement procedure

Parameters:
  • formatted – list(str) list of files which should be read as formatted files (uHu, uIu, etc)

  • read_npz – bool if True, try to read the files converted to npz (e.g. wanier90.mmn.npz instead of wannier90.

  • write_npz_list – list(str) for which files npz will be written

  • write_npz_formatted – bool write npz for all formatted files

  • overwrite_npz – bool overwrite existing npz files (incompatinble with read_npz)

class wannierberri.system.w90_files.AMN(seedname, npar=2, **kwargs)[source]

Bases: W90_file

property NB
property NW
from_w90_file(seedname, npar)[source]
class wannierberri.system.w90_files.CheckPoint(seedname, kmesh_tol=1e-07, bk_complete_tol=1e-05)[source]

Bases: object

A class to store the data about wannierisation, written by Wannier90

Parameters:
  • seedname (str) – the prefix of the file (including relative/absolute path, but not including the extension .chk)

  • kmesh_tol (float) – tolerance to distinguish different/same k-points

  • bk_complete_tol (float) – tolerance for the completeness relation for finite-difference scheme

get_AABB_qb(mmn, transl_inv=False, eig=None, phase=None, sum_b=False)[source]
get_AA_q(mmn, transl_inv=False)[source]
get_AA_qb(mmn, transl_inv=False, phase=None, sum_b=False)[source]
get_BB_qb(mmn, eig, phase=None, sum_b=False)[source]
get_CCOOGG_qb(mmn, uhu, antisym=True, phase=None, sum_b=False)[source]
get_CC_qb(mmn, uhu, phase=None, sum_b=False)[source]
get_GG_qb(mmn, uiu, phase=None, sum_b=False)[source]
get_HH_q(eig)[source]
get_OO_qb(mmn, uiu, phase=None, sum_b=False)[source]
get_SHA_q(shu, mmn, phase=None, sum_b=False)[source]

SHA or SA (if siu is used instead of shu)

get_SHR_q(spn, mmn, eig=None, phase=None)[source]

SHR or SR(if eig is None)

get_SH_q(spn, eig)[source]
get_SS_q(spn)[source]
property wannier_centers
wannier_gauge(mat, ik1, ik2)[source]
class wannierberri.system.w90_files.CheckPoint_bare(win, eig, amn, mmn)[source]

Bases: CheckPoint

Class to store data from Wanierisationm obtained internally Initialize without the v_matrix (to be written later by ~wannierberri.system.disentangle)

Parameters:
  • win (~wannierberri.system.w90_files.WIN)

  • eig (~wannierberri.system.w90_files.EIG)

  • amn (~wannierberri.system.w90_files.AMN)

  • mmn (~wannierberri.system.w90_files.MMN)

class wannierberri.system.w90_files.MMN(seedname, npar=2, **kwargs)[source]

Bases: W90_file

MMN.data[ik, ib, m, n] = <u_{m,k}|u_{n,k+b}>

from_w90_file(seedname, npar)[source]
property n_neighb
set_bk(kpt_latt, mp_grid, recip_lattice, kmesh_tol=1e-07, bk_complete_tol=1e-05)[source]
set_bk_chk(chk, **argv)[source]
class wannierberri.system.w90_files.SHU(seedname='wannier90', formatted=False, **kwargs)[source]

Bases: SXU

SHU.data[ik, ib, m, n, ipol] = <u_{m,k}|S_ipol*H(k)|u_{n,k+b}>

class wannierberri.system.w90_files.SIU(seedname='wannier90', formatted=False, **kwargs)[source]

Bases: SXU

SIU.data[ik, ib, m, n, ipol] = <u_{m,k}|S_ipol|u_{n,k+b}>

class wannierberri.system.w90_files.SPN(seedname, **kwargs)[source]

Bases: W90_file

SPN.data[ik, m, n, ipol] = <u_{m,k}|S_ipol|u_{n,k}>

from_w90_file(seedname='wannier90', formatted=False)[source]
class wannierberri.system.w90_files.SXU(seedname, ext, tags=['data'], read_npz=True, write_npz=True, **kwargs)[source]

Bases: W90_file

Read and setup sHu or sIu object. pw2wannier90 writes data_pw2w90[n, m, ipol, ib, ik] = <u_{m,k}|S_ipol * X|u_{n,k+b}> in column-major order. (X = H for SHU, X = I for SIU.) Here, we read to have data[ik, ib, m, n, ipol] = <u_{m,k}|S_ipol * X|u_{n,k+b}>.

from_w90_file(seedname='wannier90', formatted=False, suffix='sHu', **kwargs)[source]
property n_neighb
class wannierberri.system.w90_files.UHU(seedname='wannier90', **kwargs)[source]

Bases: UXU

UHU.data[ik, ib1, ib2, m, n] = <u_{m,k+b1}|H(k)|u_{n,k+b2}>

class wannierberri.system.w90_files.UIU(seedname='wannier90', **kwargs)[source]

Bases: UXU

UIU.data[ik, ib1, ib2, m, n] = <u_{m,k+b1}|u_{n,k+b2}>

class wannierberri.system.w90_files.UXU(seedname, ext, tags=['data'], read_npz=True, write_npz=True, **kwargs)[source]

Bases: W90_file

Read and setup uHu or uIu object. pw2wannier90 writes data_pw2w90[n, m, ib1, ib2, ik] = <u_{m,k+b1}|X|u_{n,k+b2}> in column-major order. (X = H for UHU, X = I for UIU.) Here, we read to have data[ik, ib1, ib2, m, n] = <u_{m,k+b1}|X|u_{n,k+b2}>.

from_w90_file(seedname='wannier90', suffix='uXu', formatted=False)[source]
property n_neighb
class wannierberri.system.w90_files.WIN(seedname='wannier90')[source]

Bases: object

get_kpoints()[source]
get_param(param)[source]
get_unit_cell_cart_ang()[source]