PAOFLOW.spectrum.do_adaptive_smearing#
Functions#
|
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_arraysanddata_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 to1.0for'm-p'smearing and0.7otherwise.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 bymin_widthandmax_widthwhen 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_widthis negative ormax_widthis belowmin_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_widthand \(w_{\max}\) =max_width; a bound left atNoneis 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).