PAOFLOW.spectrum.do_adaptive_smearing#

Functions#

do_adaptive_smearing(data_controller, smearing, afac)

Compute adaptive smearing widths for each k-point and band.

Module Contents#

PAOFLOW.spectrum.do_adaptive_smearing.do_adaptive_smearing(data_controller, smearing, afac, min_width=None, max_width=None)[source]#

Compute adaptive smearing widths for each k-point and band.

Parameters:
  • data_controller (DataController) – Object providing data_arrays and data_attributes. Required array: pksp (shape (npks, 3, nawf, nawf, nspin)) — the momentum matrix elements in the Bloch eigenstate basis. Required attributes: nawf, nspin, nkpnts, omega.

  • smearing (str) – Smearing method identifier. Pass 'm-p' for Methfessel–Paxton; any other value selects the default prefactor.

  • afac (float or None) – Adaptive smearing prefactor \(\alpha\). If None, defaults to 1.0 for 'm-p' smearing and 0.7 otherwise.

  • min_width (float or None, optional) – Lower bound of every width (eV); None (default) keeps the raw widths. The Yates width vanishes at the band extrema and is below the resolution of any energy grid on flat bands; a state narrower than the grid spacing of a later DOS, PDOS or transport call drops out of the sums, so a floor at or above that spacing restores the state count.

  • max_width (float or None, optional) – Upper bound of every width (eV); None (default) leaves the widths uncapped.

Returns:

Adds the following keys to data_controller.data_arrays:

  • deltakp : np.ndarray, shape (npks, nawf, nspin) — band-resolved adaptive smearing widths \(\sigma_{nk} = \alpha \, |\nabla_k E_n| \, \delta k\), bounded by min_width and max_width when given.

  • deltakp2 : np.ndarray, shape (npks, nawf, nawf, nspin) — interband adaptive smearing widths proportional to \(|\nabla_k E_n - \nabla_k E_m|\), bounded the same way.

Return type:

None

Raises:

ValueError – If min_width is negative or max_width is below min_width (or below zero).

Notes

The mean k-point spacing is estimated as

\[\delta k = \left(\frac{8\pi^3}{\Omega \, N_k}\right)^{1/3}\]

where \(\Omega\) is the unit-cell volume and \(N_k\) is the total number of k-points. The diagonal elements of pksp (proportional to the band velocities) are used as a proxy for \(\nabla_k E_n\). With both bounds given the stored widths are

\[\sigma_{nk} = \min\left(\max\left(\alpha \, |\nabla_k E_n| \, \delta k, \; w_{\min}\right), \; w_{\max}\right)\]

with \(w_{\min}\) = min_width and \(w_{\max}\) = max_width; a bound left at None is skipped. The floor plays the role of the minimum width of the electron-phonon deltas (PAOFLOW.elphon.adaptive_smearing): without it a state sitting at a band extremum has a vanishing width and is lost from every sum over an energy grid.

Reference: J. R. Yates, X. Wang, D. Vanderbilt, I. Souza, Phys. Rev. B 75, 195121 (2007).