API usage

You can call a function in this library as follows:

import libtetrabz

Total energy, charge density, occupations

nBZd3kVBZθ(εFεnk)Xnk
wght = libtetrabz.occ(bvec, eig)

Parameters

bvec = numpy.array([[b0x, b0y, b0z], [b1x, b1y, b1z], [b2x, b2y, b2z]])

Reciprocal lattice vectors (arbitrary unit). Because they are used to choose the direction of tetrahedra, only their ratio is used.

eig = numpy.empty([ng0, ng1, ng2, nb], dtype=numpy.float_)

The energy eigenvalue εnk in arbitrary unit. Where ng0, ng1, ng2 are the number of grid for each direction of the reciprocal lattice vectors and nb is the number of bands.

Return

wght = numpy.empty([ng0, ng1, ng2, nb], dtype=numpy.float_)

The integration weights.

Fermi energy and occupations

nBZd3kVBZθ(εFεnk)Xnk
ef, wght, iteration = libtetrabz.fermieng(bvec, eig, nelec)

Parameters

bvec = numpy.array([[b0x, b0y, b0z], [b1x, b1y, b1z], [b2x, b2y, b2z]])

Reciprocal lattice vectors (arbitrary unit). Because they are used to choose the direction of tetrahedra, only their ratio is used.

eig = numpy.empty([ng0, ng1, ng2, nb], dtype=numpy.float_)

The energy eigenvalue εnk in arbitrary unit. Where ng0, ng1, ng2 are the number of grid for each direction of the reciprocal lattice vectors and nb is the number of bands.

nelec = # float

The number of electrons.

Return

ef = # float

The Fermi energy. Unit is the same as eig.

wght = numpy.empty([ng0, ng1, ng2, nb], dtype=numpy.float_)

The integration weights.

Partial density of states

nBZd3kVBZδ(ωεnk)Xnk(ω)
wght = libtetrabz.dos(bvec, eig, e0)

Parameters

bvec = numpy.array([[b0x, b0y, b0z], [b1x, b1y, b1z], [b2x, b2y, b2z]])

Reciprocal lattice vectors (arbitrary unit). Because they are used to choose the direction of tetrahedra, only their ratio is used.

eig = numpy.empty([ng0, ng1, ng2, nb], dtype=numpy.float_)

The energy eigenvalue εnk in arbitrary unit. Where ng0, ng1, ng2 are the number of grid for each direction of the reciprocal lattice vectors and nb is the number of bands.

e0 = numpy.empty(ne, dtype=numpy.float_)

The energy point ω in the same unit of eig. Where ne is the number of energy points.

Return

wght = numpy.empty([ng0, ng1, ng2, nb, ne], dtype=numpy.float_)

The integration weights.

Integrated density of states

nBZd3kVBZθ(ωεnk)Xnk(ω)
wght = libtetrabz.intdos(bvec, eig, e0)

Parameters

bvec = numpy.array([[b0x, b0y, b0z], [b1x, b1y, b1z], [b2x, b2y, b2z]])

Reciprocal lattice vectors (arbitrary unit). Because they are used to choose the direction of tetrahedra, only their ratio is used.

eig = numpy.empty([ng0, ng1, ng2, nb], dtype=numpy.float_)

The energy eigenvalue εnk in arbitrary unit. Where ng0, ng1, ng2 are the number of grid for each direction of the reciprocal lattice vectors and nb is the number of bands.

e0 = numpy.empty(ne, dtype=numpy.float_)

The energy point ω in the same unit of eig. Where ne is the number of energy points.

Return

wght = numpy.empty([ng0, ng1, ng2, nb, ne], dtype=numpy.float_)

The integration weights.

Nesting function and Fr&oumlhlich parameter

nnBZd3kVBZδ(εFεnk)δ(εFεnk)Xnnk
wght = libtetrabz.dbldelta(bvec, eig1, eig2)

Parameters

bvec = numpy.array([[b0x, b0y, b0z], [b1x, b1y, b1z], [b2x, b2y, b2z]])

Reciprocal lattice vectors (arbitrary unit). Because they are used to choose the direction of tetrahedra, only their ratio is used.

eig1 = numpy.empty([ng0, ng1, ng2, nb], dtype=numpy.float_)

The energy eigenvalue εnk in arbitrary unit. Where ng0, ng1, ng2 are the number of grid for each direction of the reciprocal lattice vectors and nb is the number of bands.

eig2 = numpy.empty([ng0, ng1, ng2, nb], dtype=numpy.float_)

Another energy eigenvalue εnk in the same unit of eig1. Typically it is assumed to be εnk+q.

Return

wght = numpy.empty([ng0, ng1, ng2, nb, nb], dtype=numpy.float_)

The integration weights.

A part of DFPT calculation

nnBZd3kVBZθ(εFεnk)θ(εnkεnk)Xnnk
wght = libtetrabz.dblstep(bvec, eig1, eig2)

Parameters

bvec = numpy.array([[b0x, b0y, b0z], [b1x, b1y, b1z], [b2x, b2y, b2z]])

Reciprocal lattice vectors (arbitrary unit). Because they are used to choose the direction of tetrahedra, only their ratio is used.

eig1 = numpy.empty([ng0, ng1, ng2, nb], dtype=numpy.float_)

The energy eigenvalue εnk in arbitrary unit. Where ng0, ng1, ng2 are the number of grid for each direction of the reciprocal lattice vectors and nb is the number of bands.

eig2 = numpy.empty([ng0, ng1, ng2, nb], dtype=numpy.float_)

Another energy eigenvalue εnk in the same unit of eig1. Typically it is assumed to be εnk+q.

Return

wght = numpy.empty([ng0, ng1, ng2, nb, nb], dtype=numpy.float_)

The integration weights.

Static polarization function

nnBZd3kVBZθ(εFεnk)θ(εnkεF)εnkεnkXnnk
wght = libtetrabz.polstat(bvec, eig1, eig2)

Parameters

bvec = numpy.array([[b0x, b0y, b0z], [b1x, b1y, b1z], [b2x, b2y, b2z]])

Reciprocal lattice vectors (arbitrary unit). Because they are used to choose the direction of tetrahedra, only their ratio is used.

eig1 = numpy.empty([ng0, ng1, ng2, nb], dtype=numpy.float_)

The energy eigenvalue εnk in arbitrary unit. Where ng0, ng1, ng2 are the number of grid for each direction of the reciprocal lattice vectors and nb is the number of bands.

eig2 = numpy.empty([ng0, ng1, ng2, nb], dtype=numpy.float_)

Another energy eigenvalue εnk in the same unit of eig1. Typically it is assumed to be εnk+q.

Return

wght = numpy.empty([ng0, ng1, ng2, nb, nb], dtype=numpy.float_)

The integration weights.

Phonon linewidth

nnBZd3kVBZθ(εFεnk)θ(εnkεF)δ(εnkεnkω)Xnnk(ω)
wght = libtetrabz.fermigr(bvec, eig1, eig2, e0)

Parameters

bvec = numpy.array([[b0x, b0y, b0z], [b1x, b1y, b1z], [b2x, b2y, b2z]])

Reciprocal lattice vectors (arbitrary unit). Because they are used to choose the direction of tetrahedra, only their ratio is used.

eig1 = numpy.empty([ng0, ng1, ng2, nb], dtype=numpy.float_)

The energy eigenvalue εnk in arbitrary unit. Where ng0, ng1, ng2 are the number of grid for each direction of the reciprocal lattice vectors and nb is the number of bands.

eig2 = numpy.empty([ng0, ng1, ng2, nb], dtype=numpy.float_)

Another energy eigenvalue εnk in the same unit of eig1. Typically it is assumed to be εnk+q.

e0 = numpy.empty(ne, dtype=numpy.float_)

The energy point ω in the same unit of eig. Where ne is the number of energy points.

Return

wght = numpy.empty([ng0, ng1, ng2, nb, nb, ne], dtype=numpy.float_)

The integration weights.

Polarization function (complex frequency)

nnBZd3kVBZθ(εFεnk)θ(εnkεF)εnkεnk+iωXnnk(ω)
wght = libtetrabz.polcmplex(bvec, eig1, eig2, e0)

Parameters

bvec = numpy.array([[b0x, b0y, b0z], [b1x, b1y, b1z], [b2x, b2y, b2z]])

Reciprocal lattice vectors (arbitrary unit). Because they are used to choose the direction of tetrahedra, only their ratio is used.

eig1 = numpy.empty([ng0, ng1, ng2, nb], dtype=numpy.float_)

The energy eigenvalue εnk in arbitrary unit. Where ng0, ng1, ng2 are the number of grid for each direction of the reciprocal lattice vectors and nb is the number of bands.

eig2 = numpy.empty([ng0, ng1, ng2, nb], dtype=numpy.float_)

Another energy eigenvalue εnk in the same unit of eig1. Typically it is assumed to be εnk+q.

e0 = numpy.empty(ne, dtype=numpy.complex_)

The energy point ω in the same unit of eig. Where ne is the number of energy points.

Return

wght = numpy.empty([ng0, ng1, ng2, nb, nb, ne], dtype=numpy.complex)

The integration weights.