pengwann.utils.get_spilling_factor#

utils.get_spilling_factor(u, num_wann)#

Compute the spilling factor for a set of Wannier functions.

Parameters:
undarray of complex

The U matrices that define the Wannier functions in terms of the canonical Bloch states.

num_wannint

The total number of Wannier functions.

Returns:
spilling_factorfloat

The spilling factor.

Notes

The spilling factor is calculated as [1][2]

\[S = \frac{1}{N_{k}}\frac{1}{N_{w}}\sum_{nk} 1 - \sum_{\alpha} |\braket{\psi_{nk}|w_{\alpha}}|^{2},\]

where \(N_{k}\) is the total number of k-points, \(N_{w}\) is the total number of Wannier functions, \(n\) labels bands, \(k\) labels k-points and \(\alpha\) labels Wannier functions \(\ket{w_{\alpha}}\).

References