Diagrams

Susceptibilities, self-energies, etc.

elphmod.diagrams.Pi_g(q, e, g, U, kT=0.025, eps=1e-10, occupations='fd', dd=True, status=True)[source]

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

Parameters:
qlist of tuple

List of q points in crystal coordinates \(q_i \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=None, kT=0.025, occupations='fd', comm=<elphmod.MPI.Communicator object>)[source]

Calculate double Fermi-surface average.

Please note that not the average itself is returned!

\[\langle g^2 \rangle = \frac { \sum_{\vec q \nu \vec k m n} |g_{\vec q \nu \vec k m n}|^2 \delta(\epsilon_{\vec k n}) \delta(\epsilon_{\vec k + \vec q m}) }{ \sum_{\vec q \vec k m n} \delta(\epsilon_{\vec k n}) \delta(\epsilon_{\vec k + \vec q m}) }\]
Parameters:
qlist of tuple

List of q points in crystal coordinates \(q_i \in [0, 2 \pi)\).

endarray

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

g2ndarray

Quantity to be averaged, typically squared electron-phonon coupling.

kTfloat

Smearing temperature.

occupationsfunction

Particle distribution as a function of energy divided by kT.

Returns:
ndarray

Enumerator of double Fermi-surface average before \(\vec q \nu\) summation.

ndarray

Denominator of double Fermi-surface average before \(\vec q\) summation.

elphmod.diagrams.fan_migdal_self_energy(k, e, w, g2, omega, kT=0.025, occupations='fd', comm=<elphmod.MPI.Communicator object>)[source]

Calculate Fan-Migdal electron self-energy (to be tested).

See Eq. (4) by Abramovitch et al., Phys. Rev. Mater. 7, 093801 (2023).

Parameters:
klist of tuple

List of k points in crystal coordinates \(k_i \in [0, 2 \pi)\).

endarray

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

wndarray

Phonon dispersion on same uniform mesh as e.

g2ndarray

Squared electron-phonon coupling.

omegandarray

Frequency argument including small imaginary regulator.

kTfloat

Smearing temperature.

occupationsfunction

Particle distribution as a function of energy divided by kT.

Returns:
ndarray

Fan-Migdal electron self-energy.

elphmod.diagrams.first_order(e, g, kT=0.025, U=None, eps=1e-10, occupations='fd')[source]

Calculate first-order diagram of grand potential.

Parameters:
endarray

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

gndarray

Electron-phonon coupling for selected q point.

kTfloat

Smearing temperature.

Undarray

Eigenvectors of Wannier Hamiltonian belonging to considered bands. If present (absent), the coupling g is assumed to be given in the same basis as U (eigenbasis of the Hamiltonian).

epsfloat

Smallest allowed absolute value of divisor.

occupationsfunction

Particle distribution as a function of energy divided by kT.

Returns:
complex

Value of first-order diagram.

elphmod.diagrams.grand_potential(e, kT=0.025, occupations='fd')[source]

Calculate (zeroth order of) grand potential.

Parameters:
endarray

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

kTfloat

Smearing temperature.

occupationsfunction

Particle distribution as a function of energy divided by kT.

Returns:
real

Grand potential.

elphmod.diagrams.green_kubo_conductivity(v, A, omega, kT=0.025, eps=1e-10, occupations='fd', dc_only=False, comm=<elphmod.MPI.Communicator object>)[source]

Calculate Green-Kubo optical conductivity (to be tested).

See Eq. (8) by Abramovitch et al., Phys. Rev. Mater. 7, 093801 (2023). Note that we have omitted the division by the unit-cell volume.

Parameters:
vndarray

Fermi velocity on uniform mesh.

Andarray

Electronic spectral function.

omegandarray

Frequency argument excluding small imaginary regulator.

kTfloat

Smearing temperature.

epsfloat

Negligible difference between two floating-point numbers.

occupationsfunction

Particle distribution as a function of energy divided by kT.

dc_onlybool

Only compute DC resistivity tensor (zero-frequency limit)?

Returns:
ndarray

Green-Kubo optical conductivity.

elphmod.diagrams.phonon_self_energy(q, e, g2=None, kT=0.025, eps=1e-10, omega=0.0, occupations='fd', fluctuations=False, Delta=None, Delta_diff=False, Delta_occupations='gauss', Delta_kT=0.025, g=None, G=None, symmetrize=True, diagonal=False, U=0.0, comm=<elphmod.MPI.Communicator object>)[source]

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 tuple

List of q points in crystal coordinates \(q_i \in [0, 2 \pi)\).

endarray

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

g2ndarray

Squared electron-phonon coupling. The resulting phonon self-energy will be a vector in the space of phonon modes.

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.

gndarray

Electron-phonon coupling on one side of the bubble. If given, g2 is ignored. The resulting phonon self-energy will be a matrix (an outer product of g and G) in the space of phonon modes or displacements.

Gndarray

Electron-phonon coupling on the other side of the bubble. If absent, g is used.

symmetrizebool

Symmetrize phonon self-energy with respect to swapping g and G?

diagonalbool

Neglect off-diagonal elements when using g and G?

Undarray

Contact interaction (a matrix in band indices) to model the effect of excitons. Only used if g is present. Associated terms are currently excluded from the integrand provided for fluctuation diagnostics.

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)[source]

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.phonon_self_energy_fermi_shift(e, g, kT=0.025, occupations='fd')[source]

Calculate phonon self-energy arising from change of chemical potential.

phonon_self_energy() provides the second derivative of the grand potential. To obtain the second derivative of the free energy, this shift associated with a possible change of the chemical potential has to be added.

Parameters:
endarray

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

gndarray

Electron-phonon coupling for \(\vec q = 0\).

kTfloat

Smearing temperature.

occupationsfunction

Particle distribution as a function of energy divided by kT.

Returns:
ndarray

Phonon self-energy correction.

elphmod.diagrams.polarization(e, U, kT=0.025, eps=1e-10, subspace=None, occupations='fd')[source]

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, q_3 \in [0, 2 \pi)\).

elphmod.diagrams.renormalize_coupling_band(q, e, g, W, U, kT=0.025, eps=1e-10, occupations='fd', nbnd_sub=None, status=True)[source]

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 tuple

List of q points in crystal coordinates \(q_i \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)[source]

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 tuple

List of q points in crystal coordinates \(q_i \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='fd')[source]

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)[source]

Calculate the Lindhard 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(q, Q, e, gq, gQ, gqQ, kT=0.025, eps=1e-10, occupations='fd', fluctuations=False)[source]

Calculate triangle diagram (third order of grand potential).

\[\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:
q, Qtuple

q points in crystal coordinates \(q_i, q'_i \in [0, 2 \pi)\).

endarray

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

gq, gQ, gqQndarray

Electron-phonon coupling for given q points and their difference.

kTfloat

Smearing temperature.

epsfloat

Smallest allowed absolute value of divisor.

occupationsfunction

Particle distribution as a function of energy divided by kT.

fluctuationsbool

Return integrand too (for fluctuation analysis)?

Returns:
complex

Value of triangle.