wannier_ham

class edrixs.wannier_ham.HR(nwann, nrpt, irpt0, rpts, deg_rpt, hr)[source]

Class for post-process of the Wannier90 tight-binding (TB) Hamiltonian in real space.

Parameters:
nwann: int

Number of Wannier orbitals.

nrpt: int

Number of \(r\) points.

irpt0: int

Index of the point (0,0,0).

rpts: float array

The coordinates of \(r\) points.

deg_rpt: int array

Degenerancy of \(r\) points.

hr: complex array

Hamiltonian \(H(r)\) from Wannier90.

static copy_hr(other)[source]

Copy instance of HR.

Parameters:
other: HR object

A HR object to be copied.

Returns:
HR: HR object

Return a new HR object.

static from_file(fname='wannier90_hr.dat')[source]

Generate a TB Hamiltonian from Wannier90 output file “case_hr.dat”.

Parameters:
fname: str

The file that contains the Wannier90 output file: “case_hr.dat”.

Returns:
HR: HR object

A HR object.

get_hr(ispin)[source]

Return the Hamiltonian of \(H(r)\).

Parameters:
ispin: logical

Whether to include spin degree of freedom or not (default: False)

Returns:
hr: 3d complex array

The Hamiltonian \(H(r)\).

get_hr0(ispin=False)[source]

Return the on-site term \(H(r=0)\).

Parameters:
ispin: logical

Whether to include spin degree of freedom or not (default: False).

Returns:
hr: 2d complex array

The on-site Hamiltonian.

class edrixs.wannier_ham.KVec(kpt_type='uni', kbase=None, nkpt=None, kvec=None)[source]

Define \(k\) points in BZ, high symmetry line or uniform grid.

Parameters:
kpt_type: str

The type of \(k\) points, ‘uni’ or ‘sym’.

kbase: :math:`3 times 3` float array

The basis vectors of the primitive reciprocal space.

nkpt: int

Number of \(k\) points.

kvec: float array

The \(k\) points.

kvec_from_file(fname)[source]

Read \(k\) points from file.

Parameters:
fname: str

File name.

set_base(kbase)[source]

Set the basis of the primitive reciprocal.

Parameters:
kbase: :math:`3 times 3` float array

The basis with respect to the global axis.

class edrixs.wannier_ham.SymKVec(kbase=None, hsymkpt=None, klen=None)[source]

Class for defining \(k\) points in high symmetry line, derived from KVec.

Parameters:
kbase: :math:`3 times 3` float array

Basis of the primitive reciprocal lattice.

hsymkpt: float array

Starting and end \(k\) points along high symmetry lines.

klen: float array

Length of segments of \(k\) points line.

from_hsymkpt(nkpt_per_path=20)[source]

Given starting and end \(k\) points of each segment, and the number of points per each segment, return the high symmetry \(k\) points.

Parameters:
nkpt_per_path: int

Number of \(k\) points per each segment.

from_hsymkpt_uni(step)[source]

Given a step, return high symmetry \(k\) points.

Parameters:
step: float

Step size.

get_klen()[source]

Return length of \(k\) points segments.

class edrixs.wannier_ham.UniKVec(grid=None)[source]

Class for defining uniform \(k\) points grid, derived from KVec.

Parameters:
grid: 3-elements tuple

Three numbers defining a uniform grid, for example: \(11 \times 11 \times 11\).

from_grid()[source]

Return uniform \(k\) points.