spin_contamination
- sisl.physics.electron.spin_contamination(state_alpha, state_beta, S=None, sum=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 (
ndarray) – vectors describing the electronic states of spin-channel \(\alpha\), 2nd dimension contains the statesstate_beta (
ndarray) – vectors describing the electronic states of spin-channel \(\beta\), 2nd dimension contains the statesS (
ndarray, 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 (bool) – whether the spin-contamination should be summed for all states (a single number returned). If sum, a spin-contamination per state per spin-channel will be returned.
- Return type:
Notes
state_alpha and state_beta need not have the same number of states.