Calculators

class wannierberri.calculators.Calculator(degen_thresh=0.0001, degen_Kramers=False, save_mode='bin+txt', print_comment=False)[source]
Parameters:
  • save_mode (str) – ‘bin’ or ‘txt’ or ‘bin+txt’ - save result in text format (‘txt’) or binary ‘npz’ files (‘bin’)

  • print_comment (bool) – print the comment (or docstring) during initialization

  • degen_Kramers (bool) – consider all bands as Kramers degenerate

  • degen_thresh (float) – threshold (in eV) to consider bands as degenerate

Static (dependent only on Fermi level)

class wannierberri.calculators.static.StaticCalculator(Efermi, tetra=False, smoother=None, constant_factor=1.0, use_factor=True, kwargs_formula=None, Emin=-inf, Emax=inf, hole_like=False, k_resolved=False, Formula=None, fder=None, **kwargs)[source]
__call__(data_K)[source]

Call self as a function.

__init__(Efermi, tetra=False, smoother=None, constant_factor=1.0, use_factor=True, kwargs_formula=None, Emin=-inf, Emax=inf, hole_like=False, k_resolved=False, Formula=None, fder=None, **kwargs)[source]

In the following **kwargs refer to the arguments of StaticCalculator

class wannierberri.calculators.static.AHC(constant_factor=-2434134.805787947, **kwargs)[source]

Bases: StaticCalculator

Anomalous Hall conductivity (\(s^3 \cdot A^2 / (kg \cdot m^3) = S/m\))

With Fermi sea integral Eq(11) in Ref
Output: \(O = -e^2/\hbar \int [dk] \Omega f\)
Instruction: \(j_\alpha = \sigma_{\alpha\beta} E_\beta = \epsilon_{\alpha\beta\delta} O_\delta E_\beta\)
class wannierberri.calculators.static.AHC_Zeeman_orb(constant_factor=-18.49050887090995, **kwargs)[source]

Bases: StaticCalculator

AHC conductivity Zeeman correction term orbital part (\(S/m/T\))

With Fermi surface integral.
Output: \(ZAHC^{orb}_{\alpha\beta :\mu} = e^2/\hbar \int [dk] \Omega_\delta * m_\mu f'\)
Where \(m = H + G - 2Ef*\Omega\)
Instruction: \(j_\alpha = \sigma_{\alpha\beta :\mu} E_\beta B_\mu = e \epsilon_{\alpha\beta\delta} ZAHC^{orb}_{\alpha\beta:\mu} E_\beta B_\mu\)
class wannierberri.calculators.static.AHC_Zeeman_spin(constant_factor=-140.89701623353938, **kwargs)[source]

Bases: StaticCalculator

AHC conductivity Zeeman correction term spin part (\(S/m/T\))

With Fermi surface integral.
Output: \(ZAHC^{spin}_{\alpha\beta :\mu} = e^2/\hbar \int [dk] \Omega_\delta * s_\mu f'\)
Instruction: \(j_\alpha = \sigma_{\alpha\beta :\mu} E_\beta B_\mu = \epsilon_{\alpha\beta\delta} ZAHC^{spin}_{\alpha\beta:\mu} E_\beta B_\mu\)
class wannierberri.calculators.static.AHC_test(constant_factor=-2434134.805787947, **kwargs)[source]

Bases: StaticCalculator

Anomalous Hall conductivity for testing (\(s^3 \cdot A^2 / (kg \cdot m^3) = S/m\))

Output: \(O = - e^2/\hbar \int [dk] \Omega f\)
Instruction: \(j_\alpha = \sigma_{\alpha\beta} E_\beta = \epsilon_{\alpha\beta\delta} O_\delta E_\beta\)
class wannierberri.calculators.static.BerryDipole_FermiSea(**kwargs)[source]

Bases: StaticCalculator

Berry curvature dipole (dimensionless)

With Fermi sea integral. Eq(29) in Ref
Output: \(D_{\beta\delta} = \int [dk] \partial_\beta \Omega_\delta f\)
class wannierberri.calculators.static.BerryDipole_FermiSea_test(**kwargs)[source]

Bases: StaticCalculator

Berry curvature dipole for testing (dimensionless)

With Fermi sea integral.
Output: \(D_{\beta\delta} = \tau \int [dk] \partial_beta \Omega_\delta f\)
class wannierberri.calculators.static.BerryDipole_FermiSurf(**kwargs)[source]

Bases: StaticCalculator

Berry curvature dipole (dimensionless)

With Fermi surface integral. Eq(8) in Ref
Output: \(D_{\beta\delta} = -\int [dk] v_\beta \Omega_\delta f'\)
class wannierberri.calculators.static.CumDOS(**kwargs)[source]

Bases: _DOS

Cumulative density of states

class wannierberri.calculators.static.DOS(**kwargs)[source]

Bases: _DOS

Density of states

class wannierberri.calculators.static.GME_orb_FermiSea(constant_factor=-0.00012170674028939735, **kwargs)[source]

Bases: StaticCalculator

Gyrotropic tensor orbital part (\(A\)) | With Fermi sea integral. Eq(30) in Ref | Output: \(K^{orb}_{\alpha :\mu} = -\int [dk] \partial_\alpha m_\mu f\) | Where \(m = H + G - 2E_f \cdot \Omega\)

class wannierberri.calculators.static.GME_orb_FermiSea_test(constant_factor=-0.00012170674028939735, **kwargs)[source]

Bases: StaticCalculator

Gyrotropic tensor orbital part for testing (\(A\)) | With Fermi sea integral. | Output: \(K^{orb}_{\alpha :\mu} = -\int [dk] \partial_\alpha m_\mu f\) | Where :math: m = H + G - 2E_f cdot Omega

class wannierberri.calculators.static.GME_orb_FermiSurf(constant_factor=-0.00012170674028939735, **kwargs)[source]

Bases: StaticCalculator

Gyrotropic tensor orbital part (\(A\)) | With Fermi surface integral. Eq(9) Ref | Output: \(K^{orb}_{\alpha :\mu} = \int [dk] v_\alpha m^{orb}_\mu f'\) | Where \(m^{orb} = H + G - 2E_f \cdot \Omega\)

class wannierberri.calculators.static.GME_spin_FermiSea(constant_factor=-0.0009274010078362162, **kwargs)[source]

Bases: StaticCalculator

Gyrotropic tensor spin part (\(A\))

With Fermi sea integral. Eq(30) in Ref
Output: \(K^{spin}_{\alpha :\mu} = -\int [dk] \partial_\alpha s_\mu f\)
class wannierberri.calculators.static.GME_spin_FermiSurf(constant_factor=-0.0009274010078362162, **kwargs)[source]

Bases: StaticCalculator

Gyrotropic tensor spin part (\(A\))

With Fermi surface integral. Eq(9) Ref
Output: \(K^{spin}_{\alpha :\mu} = \tau \int [dk] v_\alpha s_\mu f'\)
class wannierberri.calculators.static.Hall_classic_FermiSea(constant_factor=-85.35860804600885, **kwargs)[source]

Bases: StaticCalculator

Classic Hall conductivity (\(S/m/T\))

With Fermi sea integral.
Output: \(\sigma_{\alpha\beta :\mu} = -e^3/\hbar^2 \tau^2 \epsilon_{\gamma\mu\rho} \int [dk] \partial_\gamma v_\alpha \partial_\rho v_\beta f\)
Instruction: \(j_\alpha = \sigma_{\alpha\beta :\mu} E_\beta B_\mu\)
class wannierberri.calculators.static.Hall_classic_FermiSurf(constant_factor=-85.35860804600885, **kwargs)[source]

Bases: StaticCalculator

Classic Hall conductivity (\(S/m/T\))

With Fermi surface integral.
Output: \(\sigma_{\alpha\beta :\mu} = e^3/\hbar^2 \tau^2 \epsilon_{\gamma\mu\rho} \int [dk] v_\alpha \partial_\rho v_\beta v_\gamma f'\)
Instruction: \(j_\alpha = \sigma_{\alpha\beta :\mu} E_\beta B_\mu\)
class wannierberri.calculators.static.Morb(constant_factor=-0.13123421180424588, **kwargs)[source]

Bases: StaticCalculator

Orbital magnetic moment per unit cell (\(\mu_B\))

Eq(1) in Ref
Output: \(M = -\int [dk] (H + G - 2E_f \cdot \Omega) f\)
class wannierberri.calculators.static.Morb_test(constant_factor=-0.13123421180424588, **kwargs)[source]

Bases: Morb

class wannierberri.calculators.static.NLAHC_FermiSea(constant_factor=0.000369810177418199, **kwargs)[source]

Bases: BerryDipole_FermiSea

Nonlinear anomalous Hall conductivity (\(S^2/A\))

With Fermi sea integral. Eq(29) in Ref
Output: \(D_{\beta\delta} = e^3/\hbar^2 \tau \int [dk] \partial_\beta \Omega_\delta f\)
Instruction: \(j_\alpha = \epsilon_{\alpha\delta\gamma} D_{\beta\delta} E_\beta E\gamma\)
class wannierberri.calculators.static.NLAHC_FermiSurf(constant_factor=0.000369810177418199, **kwargs)[source]

Bases: BerryDipole_FermiSurf

Nonlinear anomalous Hall conductivity (\(S^2/A\))

With Fermi surface integral. Eq(8) in Ref
Output: \(D_{\beta\delta} = -e^3/\hbar^2 \tau \int [dk] v_\beta \Omega_\delta f'\)
Instruction: \(j_\alpha = \epsilon_{\alpha\delta\gamma} D_{\beta\delta} E_\beta E\gamma\)
class wannierberri.calculators.static.NLDrude_FermiSea(constant_factor=-0.0005618405644456891, **kwargs)[source]

Bases: StaticCalculator

Drude conductivity (\(S^2/A\))

With Fermi sea integral. Eq(3) in Ref
Output: \(\sigma_{\alpha\beta\gamma} = -e^3/\hbar^2 \tau^2 \int [dk] \partial_{\beta\gamma} v_\alpha f\)
Instruction: \(j_\alpha = \sigma_{\alpha\beta\gamma} E_\beta E\gamma\)
class wannierberri.calculators.static.NLDrude_FermiSurf(constant_factor=-0.0005618405644456891, **kwargs)[source]

Bases: StaticCalculator

Drude conductivity (\(S^2/A\))

With Fermi surface integral.
Output: \(\sigma_{\alpha\beta\gamma} = e^3/\hbar^2 \tau^2 \int [dk] \partial_\beta v_\alpha v_\gamma f'\)
Instruction: \(j_\alpha = \sigma_{\alpha\beta\gamma} E_\beta E\gamma\)
class wannierberri.calculators.static.NLDrude_Fermider2(constant_factor=-0.00028092028222284453, **kwargs)[source]

Bases: StaticCalculator

Drude conductivity (\(S^2/A\))

With second derivative of distribution function. Eq(A28) in Ref
Output: \(\sigma_{\alpha\beta\gamma} = -e^3/\hbar^2 \tau^2 \int [dk] v_\beta v_\alpha v_\gamma f'\)
Instruction: \(j_\alpha = \sigma_{\alpha\beta\gamma} E_\beta E\gamma\)
class wannierberri.calculators.static.NLDrude_Zeeman_orb(**kwargs)[source]

Bases: StaticCalculator

class wannierberri.calculators.static.NLDrude_Zeeman_orb_Omega(**kwargs)[source]

Bases: StaticCalculator

class wannierberri.calculators.static.NLDrude_Zeeman_spin(constant_factor=-3.252147701151662e-08, **kwargs)[source]

Bases: StaticCalculator

class wannierberri.calculators.static.Ohmic_FermiSea(constant_factor=3698101.77418199, **kwargs)[source]

Bases: StaticCalculator

Ohmic conductivity (\(S/m\))

With Fermi sea integral. Eq(31) in Ref
Output: \(\sigma_{\alpha\beta} = e^2/\hbar \tau \int [dk] \partial_\beta v_\alpha f`for \tau=1fs| Instruction: :math:`j_\alpha = \sigma_{\alpha\beta} E_\beta\)
class wannierberri.calculators.static.Ohmic_FermiSurf(constant_factor=3698101.77418199, **kwargs)[source]

Bases: StaticCalculator

Ohmic conductivity (\(S/m\))

With Fermi surface integral.
Output: \(\sigma_{\alpha\beta} = -e^2/\hbar \tau \int [dk] v_\alpha v_\beta f'\)
Instruction: \(j_\alpha = \sigma_{\alpha\beta} E_\beta\)
class wannierberri.calculators.static.OmegaOmega(**kwargs)[source]

Bases: StaticCalculator

class wannierberri.calculators.static.SHC(constant_factor=1217067.4028939735, **kwargs)[source]

Bases: StaticCalculator

Spin Hall conductivity with dc (\(S/m\))

With Fermi sea integral. Eq(1) in Ref
Qiao type : with kwargs_formula={‘spin_current_type’:’qiao’}. Eq(49,50) in Ref
Ryoo type : with kwargs_formula={‘spin_current_type’:’ryoo’}. Eq(17,26-29) in Ref
Output: \(\sigma_{\alpha\beta} = -e^2/\hbar \int [dk] Im(j_{nm,\alpha} v_{mn,\beta})/(\epsilon_n - \epsilon_m)^2 f\)
Instruction: \(j_\alpha = \sigma_{\alpha\beta} E_\beta\)
class wannierberri.calculators.static.Spin(**kwargs)[source]

Bases: StaticCalculator

Spin per unit cell (dimensionless)

Output: \(\int [dk] s f\)
class wannierberri.calculators.static.eMChA_FermiSurf(constant_factor=-8.535860804600888e-09, **kwargs)[source]

Bases: StaticCalculator

Dynamic (dependent on Fermi level and frequency)

class wannierberri.calculators.dynamic.DynamicCalculator(Efermi=None, omega=None, kBT=0, smr_fixed_width=0.1, smr_type='Lorentzian', kwargs_formula=None, **kwargs)[source]
class wannierberri.calculators.dynamic.Formula_OptCond(data_K, **parameters)[source]

Bases: Formula

trace_ln(ik, inn1, inn2)[source]
class wannierberri.calculators.dynamic.Formula_SDCT_asym_sea_I(data_K, M1_terms=True, E2_terms=True, V_terms=True, spin=False, **parameters)[source]

Bases: Formula

trace_ln(ik, inn1, inn2)[source]
class wannierberri.calculators.dynamic.Formula_SDCT_asym_sea_II(data_K, M1_terms=True, E2_terms=True, V_terms=True, spin=False, **parameters)[source]

Bases: Formula

trace_ln(ik, inn1, inn2)[source]
class wannierberri.calculators.dynamic.Formula_SDCT_asym_surf_I(data_K, M1_terms=True, E2_terms=True, V_terms=True, spin=False, **parameters)[source]

Bases: Formula

trace_ln(ik, inn1, inn2)[source]
class wannierberri.calculators.dynamic.Formula_SDCT_asym_surf_II(data_K, M1_terms=True, E2_terms=True, V_terms=True, spin=False, **parameters)[source]

Bases: Formula

trace_ln(ik, inn1, inn2)[source]
class wannierberri.calculators.dynamic.Formula_SDCT_sym_sea_I(data_K, M1_terms=True, E2_terms=True, V_terms=True, spin=False, **parameters)[source]

Bases: Formula

trace_ln(ik, inn1, inn2)[source]
class wannierberri.calculators.dynamic.Formula_SDCT_sym_sea_II(data_K, M1_terms=True, E2_terms=True, V_terms=True, spin=False, **parameters)[source]

Bases: Formula

trace_ln(ik, inn1, inn2)[source]
class wannierberri.calculators.dynamic.Formula_SDCT_sym_surf_I(data_K, M1_terms=True, E2_terms=True, V_terms=True, spin=False, **parameters)[source]

Bases: Formula

trace_ln(ik, inn1, inn2)[source]
class wannierberri.calculators.dynamic.Formula_SDCT_sym_surf_II(data_K, M1_terms=True, E2_terms=True, V_terms=True, spin=False, **parameters)[source]

Bases: Formula

trace_ln(ik, inn1, inn2)[source]
class wannierberri.calculators.dynamic.Formula_SHC(data_K, SHC_type='ryoo', shc_abc=None, **parameters)[source]

Bases: Formula

trace_ln(ik, inn1, inn2)[source]
class wannierberri.calculators.dynamic.Formula_dyn_ident(data_K)[source]

Bases: Formula

trace_ln(ik, inn1, inn2)[source]
class wannierberri.calculators.dynamic.InjectionCurrent(**kwargs)[source]

Bases: DynamicCalculator

factor_omega(E1, E2)[source]

determines a frequency-dependent factor for bands with energies E1 and E2

class wannierberri.calculators.dynamic.InjectionCurrentFormula(data_K, **parameters)[source]

Bases: Formula

Eq. (10) of Lihm and Park, PRB 105, 045201 (2022) Use v_mn = i * r_mn * (e_m - e_n) / hbar to replace v with r.

trace_ln(ik, inn1, inn2)[source]
class wannierberri.calculators.dynamic.JDOS(**kwargs)[source]

Bases: DynamicCalculator

energy_factor(E1, E2)[source]
nonzero(E1, E2)[source]
class wannierberri.calculators.dynamic.MultitermCalculator(**kwargs)[source]

Bases: DynamicCalculator

factor_omega(E1, E2)[source]

determines a frequency-dependent factor for bands with energies E1 and E2

class wannierberri.calculators.dynamic.OpticalConductivity(**kwargs)[source]

Bases: DynamicCalculator

factor_omega(E1, E2)[source]

determines a frequency-dependent factor for bands with energies E1 and E2

class wannierberri.calculators.dynamic.SDCT_asym(fermi_sea=True, fermi_surf=True, **kwargs)[source]

Bases: MultitermCalculator

class wannierberri.calculators.dynamic.SDCT_asym_sea_I(M1_terms=True, E2_terms=True, V_terms=True, spin=False, **kwargs)[source]

Bases: DynamicCalculator

factor_omega(E1, E2)[source]

determines a frequency-dependent factor for bands with energies E1 and E2

class wannierberri.calculators.dynamic.SDCT_asym_sea_II(M1_terms=True, E2_terms=True, V_terms=True, spin=False, **kwargs)[source]

Bases: DynamicCalculator

factor_omega(E1, E2)[source]

determines a frequency-dependent factor for bands with energies E1 and E2

class wannierberri.calculators.dynamic.SDCT_asym_surf_I(M1_terms=True, E2_terms=True, V_terms=True, spin=False, **kwargs)[source]

Bases: DynamicCalculator

factor_Efermi(E1, E2)[source]
factor_omega(E1, E2)[source]

determines a frequency-dependent factor for bands with energies E1 and E2

class wannierberri.calculators.dynamic.SDCT_asym_surf_II(M1_terms=True, E2_terms=True, V_terms=True, spin=False, **kwargs)[source]

Bases: DynamicCalculator

factor_Efermi(E1, E2)[source]
factor_omega(E1, E2)[source]

determines a frequency-dependent factor for bands with energies E1 and E2

class wannierberri.calculators.dynamic.SDCT_sym(fermi_sea=True, fermi_surf=True, **kwargs)[source]

Bases: MultitermCalculator

class wannierberri.calculators.dynamic.SDCT_sym_sea_I(M1_terms=True, E2_terms=True, V_terms=True, spin=False, **kwargs)[source]

Bases: DynamicCalculator

factor_omega(E1, E2)[source]

determines a frequency-dependent factor for bands with energies E1 and E2

class wannierberri.calculators.dynamic.SDCT_sym_sea_II(M1_terms=True, E2_terms=True, V_terms=True, spin=False, **kwargs)[source]

Bases: DynamicCalculator

factor_omega(E1, E2)[source]

determines a frequency-dependent factor for bands with energies E1 and E2

class wannierberri.calculators.dynamic.SDCT_sym_surf_I(M1_terms=True, E2_terms=True, V_terms=True, spin=False, **kwargs)[source]

Bases: DynamicCalculator

factor_Efermi(E1, E2)[source]
factor_omega(E1, E2)[source]

determines a frequency-dependent factor for bands with energies E1 and E2

class wannierberri.calculators.dynamic.SDCT_sym_surf_II(M1_terms=True, E2_terms=True, V_terms=True, spin=False, **kwargs)[source]

Bases: DynamicCalculator

factor_Efermi(E1, E2)[source]
factor_omega(E1, E2)[source]

determines a frequency-dependent factor for bands with energies E1 and E2

class wannierberri.calculators.dynamic.SHC(SHC_type='ryoo', shc_abc=None, **kwargs)[source]

Bases: DynamicCalculator

factor_omega(E1, E2)[source]

determines a frequency-dependent factor for bands with energies E1 and E2

class wannierberri.calculators.dynamic.ShiftCurrent(sc_eta, **kwargs)[source]

Bases: DynamicCalculator

factor_omega(E1, E2)[source]

determines a frequency-dependent factor for bands with energies E1 and E2

class wannierberri.calculators.dynamic.ShiftCurrentFormula(data_K, sc_eta, **parameters)[source]

Bases: Formula

trace_ln(ik, inn1, inn2)[source]

Tabulating

class wannierberri.calculators.TabulatorAll(tabulators, ibands=None, mode='grid', save_mode='bin', print_comment=False)[source]

Bases: Calculator

TabulatorAll - a pack of all k-resolved calculators (Tabulators)

class wannierberri.calculators.tabulate.Tabulator(Formula, ibands=None, kwargs_formula=None, **kwargs)[source]

Bases: Calculator

class wannierberri.calculators.tabulate.BerryCurvature(**kwargs)[source]

Bases: Tabulator

class wannierberri.calculators.tabulate.Der2BerryCurvature(**kwargs)[source]

Bases: Tabulator

Second Derivative of Berry curvature \(X_{ab}\partial_bc\Omega_a\)

class wannierberri.calculators.tabulate.Der2OrbitalMoment(**kwargs)[source]

Bases: Tabulator

class wannierberri.calculators.tabulate.Der2Spin(**kwargs)[source]

Bases: Tabulator

class wannierberri.calculators.tabulate.Der3E(**kwargs)[source]

Bases: Tabulator

class wannierberri.calculators.tabulate.DerBerryCurvature(**kwargs)[source]

Bases: Tabulator

Derivative of Berry curvature \(X_{ab}\partial_b\Omega_a\)

class wannierberri.calculators.tabulate.DerOrbitalMoment(**kwargs)[source]

Bases: Tabulator

class wannierberri.calculators.tabulate.DerOrbitalMoment_test(**kwargs)[source]

Bases: Tabulator

class wannierberri.calculators.tabulate.DerSpin(**kwargs)[source]

Bases: Tabulator

class wannierberri.calculators.tabulate.Energy(**kwargs)[source]

Bases: Tabulator

class wannierberri.calculators.tabulate.InvMass(**kwargs)[source]

Bases: Tabulator

class wannierberri.calculators.tabulate.OrbitalMoment(**kwargs)[source]

Bases: Tabulator

class wannierberri.calculators.tabulate.Spin(**kwargs)[source]

Bases: Tabulator

Spin expectation :math:` langle u | mathbf{sigma} | u rangle`

class wannierberri.calculators.tabulate.SpinBerry(**kwargs)[source]

Bases: Tabulator

class wannierberri.calculators.tabulate.TabulatorAll(tabulators, ibands=None, mode='grid', save_mode='bin', print_comment=False)[source]

Bases: Calculator

TabulatorAll - a pack of all k-resolved calculators (Tabulators)

property allow_grid
property allow_path
class wannierberri.calculators.tabulate.Velocity(**kwargs)[source]

Bases: Tabulator

wannierberri.npz_to_fermisurfer(npz_file, quantity=None, frmsf_file=None, component=None)[source]

Convert npz file to frmsf

Parameters:
  • npz_file (str) – name of the npz file to read

  • frmsf_file (str) – name of the frmsf file to write. If None - not written, just returned as str

  • quantity (str) – name of the quantity to write to the frmsf file

  • component (str or tuple) – cartesian component, e.g. ‘x’, ‘xxz’, (0,2), ‘trace’, ‘norm’

Returns:

the text of the frmsf file

Return type:

str