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:
where
and are different spin-components.The arrays
and are returned.- Parameters:
state_alpha (
ndarray
) – vectors describing the electronic states of spin-channel , 2nd dimension contains the statesstate_beta (
ndarray
) – vectors describing the electronic states of spin-channel , 2nd dimension contains the statesS (
ndarray
, optional) – overlap matrix used in the calculation. If None the identity matrix is assumed. The overlap matrix should correspond to the system and 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.