diagrams: susceptibilities, self-energies, etc.

elphmod.diagrams.Pi_g(q, e, g, U, kT=0.025, eps=1e-15, occupations=<function fermi_dirac>, dd=True, status=True)

Join electron-phonon coupling and Lindhard bubble in orbital basis.

Parameters
qlist of 2-tuples

Considered q points defined via crystal coordinates \(q_1, q_2 \in [0, 2 \pi)\).

endarray

Electron dispersion on uniform mesh. The Fermi level must be at zero.

gndarray

Bare electron-phonon coupling in orbital basis.

Undarray

Eigenvectors of Wannier Hamiltonian belonging to considered bands.

kTfloat

Smearing temperature.

epsfloat

Smallest allowed absolute value of divisor.

occupationsfunction

Particle distribution as a function of energy divided by kT.

ddbool

Consider only density-density terms?

statusbool

Print status messages during the calculation?

Returns
ndarray

(k-independent) product of electron-phonon coupling and Lindhard bubble.

elphmod.diagrams.double_fermi_surface_average(q, e, g2, kT=0.025, occupations=<function fermi_dirac>, comm=<mpi4py.MPI.Intracomm object>)

Calculate double Fermi-surface average.

Parameters
qlist of 2-tuples

Considered q points defined via crystal coordinates \(q_1, q_2 \in [0, 2 \pi)\).

endarray

Electron dispersion on uniform mesh. The Fermi level must be at zero.

g2ndarray

Quantity to be averaged, typically electron-phonon coupling.

kTfloat

Smearing temperature.

occupationsfunction

Particle distribution as a function of energy divided by kT.

Returns
float

Double Fermi-surface average.

elphmod.diagrams.phonon_self_energy(q, e, g2=None, kT=0.025, eps=1e-15, omega=0.0, occupations=<function fermi_dirac>, fluctuations=False, Delta=None, Delta_diff=False, Delta_occupations=<function gauss>, Delta_kT=0.025, comm=<mpi4py.MPI.Intracomm object>)

Calculate phonon self-energy.

\[\Pi_{\vec q \nu}(\omega) = \frac 2 N \sum_{\vec k m n} |g_{\vec q \nu \vec k m n}|^2 \frac {f(\epsilon_{\vec k n}) - f(\epsilon_{\vec k + \vec q m})} {\epsilon_{\vec k n} - \epsilon_{\vec k + \vec q m} + \omega}\]
Parameters
qlist of 2-tuples

Considered q points defined via crystal coordinates \(q_1, q_2 \in [0, 2 \pi)\).

endarray

Electron dispersion on uniform mesh. The Fermi level must be at zero.

g2ndarray

Squared electron-phonon coupling.

kTfloat

Smearing temperature.

epsfloat

Smallest allowed absolute value of divisor.

omegafloat

Nonadiabatic frequency argument; shall include small imaginary regulator if nonzero.

occupationsfunction

Particle distribution as a function of energy divided by kT.

fluctuationsbool

Return integrand too (for fluctuation analysis)?

Deltafloat

Half the width of energy window around Fermi level to be excluded.

Delta_diffbool

Calculate derivative of phonon self-energy w.r.t. Delta?

Delta_occupationsfunction

Smoothened Heaviside function to realize excluded energy window.

Delta_kTfloat

Temperature to smoothen Heaviside function.

Returns
ndarray

Phonon self-energy.

elphmod.diagrams.phonon_self_energy2(q, e, g2, kT=0.025, nmats=1000, hyb_width=1.0, hyb_height=0.0, GB=4.0)

Calculate phonon self-energy using the Green’s functions explicitly.

Parameters
qlist of 2-tuples

Considered q points defined via crystal coordinates \(q_1, q_2 \in [0, 2 \pi)\).

endarray

Electron dispersion on uniform mesh. The Fermi level must be at zero.

g2ndarray

Squared electron-phonon coupling.

kTfloat

Smearing temperature.

nmatsint

Number of fermionic Matsubara frequencies.

hyb_widthfloat

Width of box-shaped hybridization function.

hyb_heightfloat

Height of box-shaped hybridization function.

GBfloat

Memory limit in gigabytes. Exit if exceeded.

Returns
ndarray

Phonon self-energy.

See also

susceptibility2

Similar function with g2 set to one.

elphmod.diagrams.polarization(e, U, kT=0.025, eps=1e-15, subspace=None, occupations=<function fermi_dirac>)

Calculate RPA polarization in orbital basis (density-density).

\[\Pi_{\vec q \alpha \beta} = \frac 2 N \sum_{\vec k m n} \bracket{\vec k + \vec q \alpha}{\vec k + \vec q m} \bracket{\vec k n}{\vec k \alpha} \frac {f(\epsilon_{\vec k + \vec q m}) - f(\epsilon_{\vec k n})} {\epsilon_{\vec k + \vec q m} - \epsilon_{\vec k n}} \bracket{\vec k + \vec q m}{\vec k + \vec q \beta} \bracket{\vec k \beta}{\vec k n}\]

The resolution in q is limited by the resolution in k.

If subspace is given, a cRPA calculation is performed. subspace must be a boolean array with the same shape as e, where True marks states of the target subspace, interactions between which are excluded.

Parameters
endarray

Electron dispersion on uniform mesh. The Fermi level must be at zero.

Undarray

Coefficients for transform to orbital basis. These are given by the eigenvectors of the Wannier Hamiltonian.

kTfloat

Smearing temperature.

epsfloat

Smallest allowed absolute value of divisor.

subspacendarray or None

Boolean array to select k points and/or bands in cRPA target subspace.

occupationsfunction

Particle distribution as a function of energy divided by kT.

Returns
function

RPA polarization in orbital basis as a function of \(q_1, q_2 \in [0, 2 \pi)\).

elphmod.diagrams.renormalize_coupling_band(q, e, g, W, U, kT=0.025, eps=1e-15, occupations=<function fermi_dirac>, nbnd_sub=None, status=True)

Calculate renormalized electron-phonon coupling in band basis.

\[\tilde g_{\vec q \nu \vec k m n} = g_{\vec q \nu \vec k m n} + \frac 2 N \sum_{\vec k' m' n' \alpha \beta \gamma \delta} U_{\vec k + \vec q \alpha m}^* U_{\vec k \beta n} W_{\vec q \alpha \beta \gamma \delta} U_{\vec k' + \vec q \gamma m'} U_{\vec k' \delta n'}^* \frac {f(\epsilon_{\vec k' + \vec q m'}) - f(\epsilon_{\vec k' n'})} {\epsilon_{\vec k' + \vec q m'} - \epsilon_{\vec k' n'}} g_{\vec q \nu \vec k' m' n'}\]
Parameters
qlist of 2-tuples

Considered q points defined via crystal coordinates \(q_1, q_2 \in [0, 2 \pi)\).

endarray

Electron dispersion on uniform mesh. The Fermi level must be at zero.

gndarray

Bare electron-phonon coupling in band basis.

Wndarray

Dressed q-dependent Coulomb interaction in orbital basis.

Undarray

Eigenvectors of Wannier Hamiltonian belonging to considered bands.

kTfloat

Smearing temperature.

epsfloat

Smallest allowed absolute value of divisor.

occupationsfunction

Particle distribution as a function of energy divided by kT.

nbnd_subint

Number of bands for Lindhard bubble. Defaults to all bands.

statusbool

Print status messages during the calculation?

Returns
ndarray

Dressed electron-phonon coupling in band basis.

elphmod.diagrams.renormalize_coupling_orbital(q, e, g, W, U, **kwargs)

Calculate renormalized electron-phonon coupling in orbital basis.

\[\tilde g_{\vec q \nu \vec k \alpha \beta} = g_{\vec q \nu \vec k \alpha \beta} + \frac 2 N \sum_{\vec k m n \alpha' \beta' \gamma \delta} W_{\vec q \alpha \beta \gamma \delta} U_{\vec k + \vec q \gamma m} U_{\vec k \delta n}^* \frac {f(\epsilon_{\vec k + \vec q m}) - f(\epsilon_{\vec k n})} {\epsilon_{\vec k + \vec q m} - \epsilon_{\vec k n}} U_{\vec k + \vec q \alpha' m}^* U_{\vec k \beta' n} g_{\vec q \nu \vec k \alpha' \beta'}\]
Parameters
qlist of 2-tuples

Considered q points defined via crystal coordinates \(q_1, q_2 \in [0, 2 \pi)\).

endarray

Electron dispersion on uniform mesh. The Fermi level must be at zero.

gndarray

Bare electron-phonon coupling in orbital basis.

Wndarray

Dressed q-dependent Coulomb interaction in orbital basis.

Undarray

Eigenvectors of Wannier Hamiltonian belonging to considered bands.

**kwargs

Parameters passed to Pi_g().

Returns
ndarray

Dressed electron-phonon coupling in orbital basis.

elphmod.diagrams.susceptibility(e, kT=0.025, eta=1e-10, occupations=<function fermi_dirac>)

Calculate real part of static electronic susceptibility.

\[\chi_{\vec q} = \frac 2 N \sum_{\vec k} \frac {f(\epsilon_{\vec k + \vec q}) - f(\epsilon_{\vec k})} {\epsilon_{\vec k + \vec q} - \epsilon_{\vec k} + \I \eta}\]

The resolution in q is limited by the resolution in k.

Parameters
endarray

Electron dispersion on uniform mesh. The Fermi level must be at zero.

kTfloat

Smearing temperature.

etafloat

Absolute value of “infinitesimal” imaginary number in denominator.

occupationsfunction

Particle distribution as a function of energy divided by kT.

Returns
function

Static electronic susceptibility as a function of \(q_1, q_2 \in [0, 2 \pi)\).

elphmod.diagrams.susceptibility2(e, kT=0.025, nmats=1000, hyb_width=1.0, hyb_height=0.0)

Calculate the Lindhardt bubble using the Green’s functions explicitly.

\[\chi = \frac \beta 4 - \frac 1 \beta \sum_n G(\nu_n) - \frac 1 {(\I \nu_n)^2}\]

Only omega = 0 (static) calculation is performed.

For the treatment of the \(1 / \I \nu_n\) tail, see:

Appendix B of the thesis of Hartmut Hafermann.

Multiply by 2 for spin.

The resolution in q is limited by the resolution in k.

Original implementation by Erik G.C.P. van Loon.

Parameters
endarray

Electron dispersion on uniform mesh. The Fermi level must be at zero.

kTfloat

Smearing temperature.

nmatsint

Number of fermionic Matsubara frequencies.

hyb_widthfloat

Width of box-shaped hybridization function.

hyb_heightfloat

Height of box-shaped hybridization function.

Returns
function

Static electronic susceptibility as a function of \(q_1, q_2 \in [0, 2 \pi)\).

elphmod.diagrams.triangle(q1, q2, q3, e, g1, g2, g3, kT=0.025, eps=1e-14, occupations=<function fermi_dirac>, comm=<mpi4py.MPI.Intracomm object>)

Calculate triangle diagram.

\[\begin{split}\chi_{\vec q \mu \vec q' \nu} &= \sum_{\vec k \alpha \beta \gamma} \frac { \epsilon_{\vec k \alpha} (f_{\vec k + \vec q \beta} - f_{\vec k + \vec q' \gamma}) + \epsilon_{\vec k + \vec q \beta} (f_{\vec k + \vec q' \gamma} - f_{\vec k \alpha}) + \epsilon_{\vec k + \vec q' \gamma} (f_{\vec k \alpha} - f_{\vec k + \vec q \beta}) }{ (\epsilon_{\vec k + \vec q \beta} - \epsilon_{\vec k + \vec q' \gamma}) (\epsilon_{\vec k + \vec q' \gamma} - \epsilon_{\vec k \alpha}) (\epsilon_{\vec k \alpha} - \epsilon_{\vec k + \vec q \beta}) } \\ &\times g^*_{\vec q \mu \vec k \beta \alpha} g_{\vec q' \nu \vec k \gamma \alpha} g_{\vec q - \vec q' \nu \vec k + \vec q' \beta \gamma}\end{split}\]
           q u
            o
           / \
          /   \
         /     \
   k a  v       ^  k+q b
       /         \
      /           \
     /             \
    o------->-------o
q' v     k+q' c      q-q' v
Parameters
q1, q2, q32-tuples

q points of the vertices in crystal coordinates \(q_1, q_2 \in [0, 2 \pi)\). In the above diagram, \(q_1 = q, q_2 = q', q3 = q - q'\).

endarray

Electron dispersion on uniform mesh. The Fermi level must be at zero.

g1, g2, g3ndarray

Electron-phonon coupling for given q points.

kTfloat

Smearing temperature.

epsfloat

Smallest allowed absolute value of divisor.

occupationsfunction

Particle distribution as a function of energy divided by kT.

Returns
ndarray

Value of triangle.