DOS

2D tetrahedron methods.

elphmod.dos.double_delta(x, y, f=None, eps=1e-07)[source]

Calculate double-delta integrals via 2D tetrahedron method .

\[I(z) = \frac 1 N \sum_{\vec k} \delta(x_{\vec k} - z) \delta(y_{\vec k} - z) f_{\vec k}\]
Parameters:
x, y, fndarray

Three functions sampled on uniform N x N mesh.

epsndarray

Negligible difference between fractional mesh-point indices.

Returns:
functionfloat -> dict

Intersection points of \(x, y = z\) isolines and corresponding weights as a function of \(z\). The above double-delta integral \(I(z)\) can be calculated as:

I_z = sum(double_delta(x, y, f)(z).values())
elphmod.dos.hexDOS(energies, minimum=None, maximum=None)[source]

Calculate DOS from energies on triangular mesh (2D tetrahedron method).

Parameters:
energiesndarray

Energies on triangular mesh.

minimum, maximumfloat, optional

Energy window of interest (for efficiency).

Returns:
function

Density of states as a function of energy.

Notes

Integration over all energies yields unity.

Derivation: The density of states can be expressed as

\[\rho(E) = \frac 1 V \int_{W(k) = E} \frac{\D k}{|\vec \nabla W(k)|},\]

where \(V\) is the volume of a reciprocal unit cell, \(W(k)\) is the dispersion relation and the integral is over an energy isosurface/line in k space.

In the following, consider a two dimensional reciprocal unit cell which can be divided into \(2 \times N \times N\) equilateral triangles of reciprocal side length \(a\), on each of which the energy is interpolated linearly. On a triangle with the energies \(A, B, C\) at its corners, the gradient of the energy plane is

\[|\vec \nabla W| = \frac 2 {\sqrt 3 a} \sqrt{A^2 + B^2 + C^2 - A B - A C - B C}.\]

For the special case \(A < B < E < C\), the reciprocal length of the \(E\) isoline within the triangle reads

\[\D k = a \sqrt{A^2 + B^2 + C^2 - A B - A C - B C} \frac{C - E}{(C - A) (C - B)}.\]

Taking into account that \(V = N^2 a^2 \sqrt 3 / 2\), one finds the contribution of this triangle to the density of states:

\[\frac 1 {N^2} \frac{C - E}{(C - A) (C - B)}.\]
elphmod.dos.hexa2F(energies, couplings, minimum=None, maximum=None)[source]

Calculate \(\alpha^2 F\) from energies and coupling.

Parameters:
energiesndarray

Energies on triangular mesh.

couplingsndarray

Couplings on triangular mesh.

minimum, maximumfloat, optional

Energy window of interest (for efficiency).

Returns:
function

\(\alpha^2 F\) as a function of energy.

Notes

Integration over all energies yields the arithmetic mean of the coupling.

Note that it may be more convenient to calculate the mass renormalization

\[\lambda_n = \int_0^\infty \D \omega \frac{2 \omega \alpha^2 F(\omega)} {\omega^2 + \omega_n^2} = N(0) \sum_{\vec q \nu} \frac{2 \omega_{\vec q \nu} g^2_{\vec q \nu}} {\omega_{\vec q \nu}^2 + \omega_n^2}\]

directly from energies and couplings, without integrating this function.

elphmod.dos.isoline(energies)[source]

Calculate isoline on triangular mesh (2D tetrahedron method).