Formula

Basic classes:

class wannierberri.formula.Formula_ln(data_K=None, correction_wcc=False, dT_wcc=False, **parameters)[source]

Bases: Formula

A “Formula” is a ground concept of our calculation. Assume that we have divided all our Wannierised states into two subspaces, called “inn” and “out”. We call a matrix “covariant” if it is covariant under gauge transformations inside the “inn” or “out” subspaces but do not intermix them. A Formula_ln object has methods that returns submatrices of the covariant matrix.

class wannierberri.formula.Matrix_ln(matrix, **kwargs)[source]

Bases: Formula_ln

anything that can be called just as elements of a matrix

class wannierberri.formula.Matrix_GenDer_ln(matrix, matrix_comader, D, transformTR=None, transformInv=None)[source]

Bases: Formula_ln

generalized erivative of MAtrix_ln

class wannierberri.formula.FormulaProduct(formula_list, name='unknown', hermitian=False)[source]

Bases: Formula_ln

a class to store a product of several formulae

Some implemented formulae:

class wannierberri.formula.covariant.DEinv_ln(data_K)[source]

Bases: Matrix_ln

DEinv_ln.matrix[ik, m, n] = 1 / (E_mk - E_nk)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant.Dcov(data_K)[source]

Bases: Matrix_ln

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant.Der2A(data_K)[source]

Bases: Formula_ln

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant.Der2B(data_K)[source]

Bases: Formula_ln

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant.Der2Dcov(data_K)[source]

Bases: Formula_ln

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant.Der2H(data_K)[source]

Bases: Formula_ln

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant.Der2Morb(data_K, sign=1, **parameters)[source]

Bases: Formula_ln

property additive

if Trace_A+Trace_B = Trace_{A+B} holds. needs override for quantities that do not obey this rule (e.g. Orbital magnetization)

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant.Der2Morb_H(data_K, **parameters)[source]

Bases: Formula_ln

property additive

if Trace_A+Trace_B = Trace_{A+B} holds. needs override for quantities that do not obey this rule (e.g. Orbital magnetization)

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant.Der2O(data_K)[source]

Bases: Formula_ln

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant.Der2Omega(data_K, **parameters)[source]

Bases: Formula_ln

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant.Der2Spin(data_K)[source]

Bases: Formula_ln

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant.Der2morb(data_K, **parameters)[source]

Bases: Der2Morb

class wannierberri.formula.covariant.Der3E(data_K, **parameters)[source]

Bases: Formula_ln

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant.DerDcov(data_K)[source]

Bases: Dcov

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

class wannierberri.formula.covariant.DerMorb(data_K, sign=1, **parameters)[source]

Bases: Formula_ln

property additive

if Trace_A+Trace_B = Trace_{A+B} holds. needs override for quantities that do not obey this rule (e.g. Orbital magnetization)

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant.DerMorb_H(data_K, **parameters)[source]

Bases: Formula_ln

property additive

if Trace_A+Trace_B = Trace_{A+B} holds. needs override for quantities that do not obey this rule (e.g. Orbital magnetization)

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant.DerOmega(data_K, **parameters)[source]

Bases: Formula_ln

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant.DerSpin(data_K)[source]

Bases: Matrix_GenDer_ln

class wannierberri.formula.covariant.DerWln(data_K)[source]

Bases: Matrix_GenDer_ln

\(\overline{W}^{bc:d}\)

class wannierberri.formula.covariant.Dermorb(data_K, **parameters)[source]

Bases: DerMorb

class wannierberri.formula.covariant.Eavln(data_K)[source]

Bases: Matrix_ln

be careful : this is not a covariant matrix

class wannierberri.formula.covariant.Hamiltonian(data_K)[source]

Bases: Matrix_ln

class wannierberri.formula.covariant.Identity(data_K=None, **parameters)[source]

Bases: Formula_ln

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant.InvMass(data_K)[source]

Bases: Matrix_GenDer_ln

\(\overline{V}^{b:d}\)

class wannierberri.formula.covariant.MassMass(data_K, **kwargs_formula)[source]

Bases: FormulaProduct

class wannierberri.formula.covariant.MassVel(data_K, **kwargs_formula)[source]

Bases: FormulaProduct

class wannierberri.formula.covariant.Morb_H(data_K, **parameters)[source]

Bases: Formula_ln

property additive

if Trace_A+Trace_B = Trace_{A+B} holds. needs override for quantities that do not obey this rule (e.g. Orbital magnetization)

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant.Morb_Hpm(data_K, sign=1, **parameters)[source]

Bases: Formula_ln

property additive

if Trace_A+Trace_B = Trace_{A+B} holds. needs override for quantities that do not obey this rule (e.g. Orbital magnetization)

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant.NLDrude_Z_orb_Hplus(data_K, **kwargs_formula)[source]

Bases: FormulaSum

class wannierberri.formula.covariant.NLDrude_Z_orb_Omega(data_K, **kwargs_formula)[source]

Bases: FormulaSum

class wannierberri.formula.covariant.NLDrude_Z_spin(data_K, **kwargs_formula)[source]

Bases: FormulaSum

class wannierberri.formula.covariant.Omega(data_K, **parameters)[source]

Bases: Formula_ln

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant.OmegaHplus(data_K, **kwargs_formula)[source]

Bases: FormulaProduct

class wannierberri.formula.covariant.OmegaOmega(data_K, **kwargs_formula)[source]

Bases: FormulaProduct

class wannierberri.formula.covariant.OmegaS(data_K, **kwargs_formula)[source]

Bases: FormulaProduct

class wannierberri.formula.covariant.Spin(data_K)[source]

Bases: Matrix_ln

class wannierberri.formula.covariant.SpinOmega(data_K, spin_current_type='ryoo', **parameters)[source]

Bases: Formula_ln

spin Berry curvature

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant.SpinVelocity(data_K, spin_current_type, external_terms=True)[source]

Bases: Matrix_ln

spin current matrix elements. SpinVelocity.matrix[ik, m, n, a, s] = <u_mk|{v^a S^s}|u_nk> / 2

class wannierberri.formula.covariant.VelHplus(data_K, **kwargs_formula)[source]

Bases: FormulaProduct

class wannierberri.formula.covariant.VelMassVel(data_K, **kwargs_formula)[source]

Bases: FormulaProduct

class wannierberri.formula.covariant.VelOmega(data_K, **kwargs_formula)[source]

Bases: FormulaProduct

class wannierberri.formula.covariant.VelSpin(data_K, **kwargs_formula)[source]

Bases: FormulaProduct

class wannierberri.formula.covariant.VelVel(data_K, **kwargs_formula)[source]

Bases: FormulaProduct

class wannierberri.formula.covariant.VelVelVel(data_K, **kwargs_formula)[source]

Bases: FormulaProduct

class wannierberri.formula.covariant.Velocity(data_K, external_terms=False)[source]

Bases: Matrix_ln

class wannierberri.formula.covariant.emcha_surf(data_K, **kwargs_formula)[source]

Bases: FormulaSum

class wannierberri.formula.covariant.morb(data_K, **parameters)[source]

Bases: Morb_Hpm

Some extra formulae (for testiing):

class wannierberri.formula.covariant_basic.AntiSymmetric(full, data_K, **parameters)[source]

Bases: Formula_ln

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant_basic.Der_morb(data_K, **parameters)[source]

Bases: tildeHGc_d

class wannierberri.formula.covariant_basic.Symmetric(full, data_K, axes=[0, 1], **parameters)[source]

Bases: Formula_ln

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant_basic.tildeFab(data_K, **parameters)[source]

Bases: Formula_ln

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant_basic.tildeFab_d(data_K, **parameters)[source]

Bases: Formula_ln

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant_basic.tildeFc(data_K, **parameters)[source]

Bases: AntiSymmetric

class wannierberri.formula.covariant_basic.tildeFc_d(data_K, **parameters)[source]

Bases: AntiSymmetric

class wannierberri.formula.covariant_basic.tildeHGab(data_K, sign=1, **parameters)[source]

Bases: Formula_ln

property additive

if Trace_A+Trace_B = Trace_{A+B} holds. needs override for quantities that do not obey this rule (e.g. Orbital magnetization)

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant_basic.tildeHGab_d(data_K, sign=1, **parameters)[source]

Bases: Formula_ln

property additive

if Trace_A+Trace_B = Trace_{A+B} holds. needs override for quantities that do not obey this rule (e.g. Orbital magnetization)

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant_basic.tildeHGc(data_K, **parameters)[source]

Bases: AntiSymmetric

property additive

if Trace_A+Trace_B = Trace_{A+B} holds. needs override for quantities that do not obey this rule (e.g. Orbital magnetization)

class wannierberri.formula.covariant_basic.tildeHGc_d(data_K, **parameters)[source]

Bases: AntiSymmetric

property additive

if Trace_A+Trace_B = Trace_{A+B} holds. needs override for quantities that do not obey this rule (e.g. Orbital magnetization)

class wannierberri.formula.covariant_basic.tildeHab(data_K, **parameters)[source]

Bases: Formula_ln

property additive

if Trace_A+Trace_B = Trace_{A+B} holds. needs override for quantities that do not obey this rule (e.g. Orbital magnetization)

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)

class wannierberri.formula.covariant_basic.tildeHab_d(data_K, **parameters)[source]

Bases: Formula_ln

property additive

if Trace_A+Trace_B = Trace_{A+B} holds. needs override for quantities that do not obey this rule (e.g. Orbital magnetization)

ln(ik, inn, out)[source]

Returns the submatrix \(X_{ln}\) at point ik, where \(l \in \mathrm{out}\) and \(n \in \mathrm{inn}\)

nn(ik, inn, out)[source]

Returns the submatrix \(X_{nn'}\) at point ik, where \(n, n' \in \mathrm{inn}\)