spin_contamination
- sisl.physics.electron.spin_contamination(state_alpha, state_beta, S=None, sum: bool = True)[source]
Calculate the spin contamination value between two spin states
This calculation only makes sense for spin-polarized calculations.
The contamination value is calculated using the following formula:
\[\begin{split}S^2_{\alpha,i} &= \sum_j |\langle \psi_j^\beta | \mathbf S | \psi_i^\alpha \rangle|^2 \\ S^2_{\beta,j} &= \sum_i |\langle \psi_i^\alpha | \mathbf S | \psi_j^\beta \rangle|^2\end{split}\]where \(\alpha\) and \(\beta\) are different spin-components.
The arrays \(S^2_\alpha\) and \(S^2_\beta\) are returned.
- Parameters:
state_alpha (
array_like
) – vectors describing the electronic states of spin-channel \(\alpha\), 2nd dimension contains the statesstate_beta (
array_like
) – vectors describing the electronic states of spin-channel \(\beta\), 2nd dimension contains the statesS (
array_like
, optional) – overlap matrix used in the \(\langle\psi|\mathbf S|\psi\rangle\) calculation. If None the identity matrix is assumed. The overlap matrix should correspond to the system and \(\mathbf k\) point the eigenvectors have been evaluated at.sum – whether the spin-contamination should be summed for all states (a single number returned). If false, a spin-contamination per state per spin-channel will be returned.
Notes
state_alpha and state_beta need not have the same number of states.
- Returns:
oplist
– spin squared expectation value per spin channel \(\alpha\) and \(\beta\). If sum is true, only a single number is returned (not anoplist
, otherwise a list for each state.