PAOFLOW.projection.do_projectability#
Functions#
|
Compute the k-averaged projectability for each DFT band. |
|
Determine the number of well-projected bands and the optimal energy shift. |
Module Contents#
- PAOFLOW.projection.do_projectability.build_Pn(nawf, nbnds, nkpnts, nspin, U)[source]#
Compute the k-averaged projectability for each DFT band.
- Parameters:
- Returns:
Projectability vector \(P_n\); values close to 1 indicate that band
nis well represented in the PAO subspace.- Return type:
np.ndarray, shape
(nbnds,), float
Notes
The projectability is defined as the average squared norm of the projection coefficients:
\[P_n = \frac{1}{N_k N_\sigma} \sum_{\mathbf{k}, \sigma} \sum_i |U_{i n \mathbf{k} \sigma}|^2\]
- PAOFLOW.projection.do_projectability.do_projectability(data_controller)[source]#
Determine the number of well-projected bands and the optimal energy shift.
- Parameters:
data_controller (DataController) – Object providing
data_arraysanddata_attributes. Required arrays:U(shape(nawf, nbnds, nkpnts, nspin)),my_eigsmat(shape(nbnds, nkpnts, nspin)). Required attributes:nawf,nbnds,nkpnts,nspin,pthr,shift,verbose.- Returns:
Updates the following attributes in
data_controller.data_attributesand broadcasts them to all MPI ranks:bnd: int — number of bands whose projectability exceedspthr.shift: float — the energy shift \(\eta\) to apply to states outside the PAO subspace (set from the minimum eigenvalue at the band edge whenshift == 'auto').
- Return type:
None
Notes
Only rank 0 calls
build_Pn()and determinesbndandshift. Both values are then broadcast viaDataController.broadcast_attribute(). A warning is printed if all bands meet the threshold, indicating that the number of DFT bands may be too small.