# occupations: step and delta smearing functions¶

elphmod.occupations.fermi_dirac(x)

Calculate Fermi function.

elphmod.occupations.fermi_dirac_delta(x)

Calculate negative derivative of Fermi function.

elphmod.occupations.fermi_dirac_matsubara(x, nmats=1000)

Calculate Fermi function as Matsubara sum.

elphmod.occupations.fermi_dirac_matsubara_delta(x, nmats=1000)

Calculate negative derivative of Fermi function as Matsubara sum.

elphmod.occupations.gauss(x)

Calculate Gaussian step function.

elphmod.occupations.gauss_delta(x)

Calculate negative derivative of Gaussian step function.

elphmod.occupations.heaviside(x)

Calculate (refleced) Heaviside function.

elphmod.occupations.heaviside_delta(x)

Calculate negative derivative of (refleced) Heaviside function.

elphmod.occupations.lorentz(x)

Calculate Lorentz step function.

Used to simulate the influence of a wide box-shaped hybridization function at low temperatures. Formula derived by Tim O. Wehling and Erik G.C.P. van Loon. Here, we have $$x = \epsilon / h$$ with the height $$h$$ of the hybridization, instead of $$x = \epsilon / k T$$ with the temperature $$T$$.

elphmod.occupations.lorentz_delta(x)

Calculate negative derivative of Lorentz step function.

elphmod.occupations.marzari_vanderbilt(x)

Calculate Marzari-Vanderbilt (cold smearing) step function.

elphmod.occupations.marzari_vanderbilt_delta(x)

Calculate negative derivative of Marzari-Vanderbilt step function.

elphmod.occupations.methfessel_paxton(x)

Calculate first-order Methfessel-Paxton step function.

elphmod.occupations.methfessel_paxton_delta(x)

Calculate negative derivative of first-order MP step function.

elphmod.occupations.methfessel_paxton_general(x, N=0)

Calculate Methfessel-Paxton step function and its negative derivative.

From Phys. Rev. B 40, 3616 (1989):

$\begin{split}S_0(x) &= \frac {1 - erf(x)} 2 \\ S_N(x) &= S_0(x) + \sum_{n = 1}^N A_n H_{2 n - 1}(x) \exp(-x^2) \\ D_N(x) &= -S'(N, x) = \sum{n = 0}^N A_n H_{2 n}(x) \exp(-x^2) \\ A_n &= \frac{(-1)^n}{\sqrt \pi n! 4^n}\end{split}$

Hermite polynomials:

$\begin{split}H_0(x) &= 1 \\ H_1(x) &= 2 x \\ H_{n + 1}(x) &= 2 x H_n(x) - 2 n H_{n - 1}(x) \\\end{split}$

For N = 0, the Gaussian step function is returned.

This routine has been adapted from Quantum ESPRESSO:

• Step function: Modules/wgauss.f90

• Delta function: Modules/w0gauss.f90