API usage¶
You can call a function in this library as follows:
import libtetrabz
Total energy, charge density, occupations¶
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 \(\varepsilon_{n k}\) 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¶
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 \(\varepsilon_{n k}\) 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 = # floatThe number of electrons.
Return
ef = # floatThe 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¶
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 \(\varepsilon_{n k}\) 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 \(\omega\) 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¶
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 \(\varepsilon_{n k}\) 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 \(\omega\) 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öhlich parameter¶
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 \(\varepsilon_{n k}\) 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 \(\varepsilon'_{n k}\) in the same unit of eig1. Typically it is assumed to be \(\varepsilon_{n k+q}\).
Return
wght = numpy.empty([ng0, ng1, ng2, nb, nb], dtype=numpy.float_)The integration weights.
A part of DFPT calculation¶
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 \(\varepsilon_{n k}\) 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 \(\varepsilon'_{n k}\) in the same unit of eig1. Typically it is assumed to be \(\varepsilon_{n k+q}\).
Return
wght = numpy.empty([ng0, ng1, ng2, nb, nb], dtype=numpy.float_)The integration weights.
Static polarization function¶
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 \(\varepsilon_{n k}\) 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 \(\varepsilon'_{n k}\) in the same unit of eig1. Typically it is assumed to be \(\varepsilon_{n k+q}\).
Return
wght = numpy.empty([ng0, ng1, ng2, nb, nb], dtype=numpy.float_)The integration weights.
Phonon linewidth¶
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 \(\varepsilon_{n k}\) 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 \(\varepsilon'_{n k}\) in the same unit of eig1. Typically it is assumed to be \(\varepsilon_{n k+q}\).
e0 = numpy.empty(ne, dtype=numpy.float_)The energy point \(\omega\) 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)¶
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 \(\varepsilon_{n k}\) 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 \(\varepsilon'_{n k}\) in the same unit of eig1. Typically it is assumed to be \(\varepsilon_{n k+q}\).
e0 = numpy.empty(ne, dtype=numpy.complex_)The energy point \(\omega\) 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.