PAOFLOW.response.do_ipr#

Functions#

inverse_participation_ratio(data_controller)

Compute the inverse participation ratio (IPR) for each Bloch eigenstate.

Module Contents#

PAOFLOW.response.do_ipr.inverse_participation_ratio(data_controller)[source]#

Compute the inverse participation ratio (IPR) for each Bloch eigenstate.

Parameters:

data_controller (DataController) – Object providing data_arrays and data_attributes. Required arrays: v_k (shape (nkpnts, nawf, bnd, nspin)), E_k (shape (nkpnts, bnd, nspin)), and either kpnts (shape (nkpnts, 3)) or kq (shape (3, nkpnts)) for the k-point coordinates. Required attribute: bnd.

Returns:

Array of object dtype. For each spin, k-point, and band the three elements along the last axis are:

  • index 0 : np.ndarray, shape (3,) — crystal k-point coordinates.

  • index 1 : float — band eigenvalue \(E_{nk}\) in eV.

  • index 2 : float — inverse participation ratio value.

Return type:

np.ndarray, shape (nspin, nkpnts, nbands, 3)

Notes

The IPR quantifies the spatial localisation of a Bloch eigenstate. For eigenstate \(|\psi_{nk}\rangle\) expressed in a localised basis \(\{|w_m\rangle\}\) with coefficients \(v_{nk,m}\), the IPR is

\[\text{IPR}_{nk} = \frac{\sum_m |v_{nk,m}|^4}{\left(\sum_m |v_{nk,m}|^2\right)^2}\]

A value of 1 indicates a state fully localised on a single basis function; values near \(1/N_{\text{orb}}\) indicate delocalised (Bloch-like) states. The function works for both k-path (bands) and full k-grid computations, selecting kpnts or the transpose of kq accordingly.