Internal
The following symbols used by AutoBZ may change in future versions
AutoBZ.hinv
— Functionhinv(A::SHermitianCompact{3})
Calculate the inverse of a SHermitianCompact
matrix using its lower triangle. Note that if the elements on the diagonal are complex, the inverse is not Hermitian.
AutoBZ.tr_kron
— Functiontr_kron(A::T, B::T) where {T<:SVector{AbstractMatrix}}
Returns a matrix whose [i,j]
th entry is tr(A[i]*B[j])
.
AutoBZ.diag_inv
— Functiondiag_inv(A)
Calculate the diagonal entries of the inverse of A
.
AutoBZ.tr_mul
— Functiontr_mul(A, B)
Calculate tr(A*B)
without storing the intermediate result.
AutoBZ.to_gauge!
— Functionto_gauge!(cache, ::AbstractGauge, h) where gauge
Transform the Hamiltonian according to the following values of gauge
Wannier
: keepsh, vs
in the original, orbital basisHamiltonian
: diagonalizesh
and rotatesh
into the energy, band basis
AutoBZ.fermi_window_halfwidth
— Functionfermi_window_halfwidth(Ω, β, atol)
fermi_window_halfwidth(β, atol)
One can show that βΩfermiwindow(ω, β, Ω) = -tanh(βΩ/2)/(cosh(β(ω+Ω/2))/cosh(βΩ/2)+1) > -tanh(βΩ/2)/(exp(abs(β(ω+Ω/2)))/2cosh(βΩ/2)+1) as well as when Ω==0, β*fermiwindow(ω, β, 0.0) = and these can be inverted to give a good bound on the width of the frequency window for which the Fermi window function is greater than atol
. Returns half the width of this window.
AutoBZ.CoordDefault
— FunctionCoordDefault(::Type{T})::AbstractCoordinate where T
AbstractCoordInterp
s should define this trait to declare the coordinate basis where they assume their data is in.
AutoBZ.CartesianRep
— TypeCartesianRep()
Symmetry representation of objects that transform under the group action in the same way as the lattice and in Cartesian coordinates.
AutoBZ.to_coord
— Functionto_coord(B::AbstractCoordinate, D::AbstractCoordinate, A, vs)
If B
and D
are the same type return vs
, however and if they differ return A*vs
.
AutoBZ.shift!
— Functionshift!(h::AbstractHamiltonianInterp, λ::Number)
Modifies and returns h
such that it returns h - λ*I
. Will throw a BoundsError
if this operation cannot be done on the existing data.
shift!(::AbstractVelocityInterp, λ)
Offset the zero-point energy in a Hamiltonian system by a constant
AutoBZ.tr_inv
— Functiontr_inv(A)
Calculate the trace of the inverse of A
.
AutoBZ.to_vcomp_gauge!
— Functionto_vcomp_gauge!(cache, ::Val{C}, ::Val{G}, h, vs...) where {C,G}
Take the velocity components of vs
in any gauge according to the value of C
Whole
: return the whole velocity (sum of interband and intraband components)Intra
: return the intraband velocity (diagonal in Hamiltonian gauge)Inter
: return the interband velocity (off-diagonal terms in Hamiltonian gauge)
Transform the velocities into a gauge according to the following values of G
Wannier
: keepsH, vs
in the original, orbital basisHamiltonian
: diagonalizesH
and rotatesH, vs
into the energy, band basis
AutoBZ.get_safe_fermi_window_limits
— Functionget_safe_fermi_window_limits(Ω, β, lb, ub)
Given a frequency, Ω
, inverse temperature, β
, returns an interval (l,u)
with possibly truncated limits of integration for the frequency integral at each (Ω, β)
point that are determined by the fermi_window_limits
routine set to the default tolerances for the decay of the Fermi window function. The arguments lb
and ub
are lower and upper limits on the frequency to which the default result gets truncated if the default result would recommend a wider interval. If there is any truncation, a warning is emitted to the user, but the program will continue with the truncated limits.
AutoBZ.parentseries
— Functionparentseries(::AbstractHamiltonianInterp)::FourierSeries
Return the Fourier series that the Hamiltonian wraps
parentseries(::AbstractVelocityInterp)::AbstractHamiltonianInterp
Return the Hamiltonian object used for Wannier interpolation
AutoBZ.commutator
— Functioncommutator(A, B)
Return the commutator [A, B] = A*B - B*A
.
AutoBZ.covariant_velocity
— Functioncovariant_velocity(H, Hα, Aα)
Evaluates the velocity operator $\hat{v}_{\alpha} = -\frac{i}{\hbar} [\hat{r}_{\alpha}, \hat{H}]$ with the following expression, equivalent to eqn. 18 in Yates et al.
\[\hat{v}_{\alpha} = \frac{1}{\hbar} \hat{H}_{\alpha} + \frac{i}{\hbar} [\hat{H}, \hat{A}_{\alpha}]\]
where the $\alpha$ index implies differentiation by $k_{\alpha}$. Note that the terms that correct the derivative of the band velocity Also, this function takes $\hbar = 1$.
AutoBZ.coord
— Functioncoord(::AbstractCoordInterp{B})::AbstractCoordinate where B = B
Return the AbstractCoordinate
basis in which an AbstractCoordInterp
will be evaluated.
AutoBZ.LatticeRep
— TypeLatticeRep()
Symmetry representation of objects that transform under the group action in the same way as the lattice.
AutoBZ.GaugeDefault
— FunctionGaugeDefault(::Type{T})::AbstractCoordinate where T
AbstractGaugeInterp
s should define this trait to declare the gauge that they assume their data is in.
AutoBZ.VcompDefault
— FunctionVcompDefault(::Type{T})::AbstractVelocityComponent where T
AbstractVelocityInterp
s should define this trait to declare the velocity component that they assume their data is in.
AutoBZ.herm
— Functionherm(A::AbstractMatrix)
Return the Hermitian part of the matrix A
, i.e. (A+A')/2
.
AutoBZ.EigenProblem
— TypeEigenProblem(A::AbstractMatrix, [vecs::Bool=true, sortby]; kws...)
Define an eigenproblem for the matrix A
with the option vecs
to return the spectrum with the eigenvectors (true
by default) or only the spectrum (false
). A comparison function sortby(λ)
can be provided to sort the eigenvalues, which by default are sorted lexicographically. sortby=nothing
will leave the eigenvalues in an arbitrary order. Additonal keywords are forwarded to the solver.
Aims to provide a non-allocating interface to LinearAlgebra.eigen
.
When vecs
is true
, the value of the solution will be a LinearAlgebra.Eigen
factorization object. When vecs
is false, the solution will be a vector containing the eigenvalues. The function hasvecs
will return vecs
.
AutoBZ.hasvecs
— Functionhasvecs(::EigenProblem{vecs}) where {vecs} = vecs
Test whether the eigenproblem also needs the eigenvectors
hasvecs(::EigenSolver{vecs}) where {vecs} = vecs
Test whether the eigensolver also calculates the eigenvectors
hasvecs(sol::EigenSolution{vecs}) where {vecs} = vecs
Test whether the eigensolution contains the eigenvectors. If true
, sol.value
will be a LinearAlgebra.Eigen
and otherwise a vector containing the spectrum.
AutoBZ.LinearSystemProblem
— TypeLinearSystemProblem(A, [Pl=identity, Pr=identity]; abstol, reltol)
Constructor for a linear system of equations, represented by the matrix operator A
, whose solution is the matrix inverse. The solution does not need to be the inverse, but instead a representation that can be used to solve $Ax=b$. The solution, sol.value
, should implement x = sol.value\b
, ldiv!(x, sol.value, b)
, and inv
.
AutoBZ.LUFactorization
— TypeLUFactorization()
Construct the LU factorization of the matrix so that the inverse can be efficiently calculated for a small number of right-hand sides. Intended for mutable matrices
AutoBZ.JLInv
— TypeJLInv()
Solve a linear system by explicitly constructing the inverse. This should only be used for very small matrices, such as 3x3, or when the full matrix is desired. Intended for immutable matrices.