Spin contamination

In computational chemistry, spin contamination is the artificial mixing of different electronic spin-states. This can occur when an approximate orbital-based wave function is represented in an unrestricted form – that is, when the spatial parts of α and β spin-orbitals are permitted to differ. Approximate wave functions with a high degree of spin contamination are undesirable. In particular, they are not eigenfunctions of the total spin-squared operator, Ŝ2, but can formally be expanded in terms of pure spin states of higher multiplicities (the contaminants).

Open-shell wave functions
Within Hartree–Fock theory, the wave function is approximated as a Slater determinant of spin-orbitals. For an open-shell system, the mean-field approach of Hartree–Fock theory gives rise to different equations for the α and β orbitals. Consequently, there are two approaches that can be taken – either to force double occupation of the lowest orbitals by constraining the α and β spatial distributions to be the same (restricted open-shell Hartree–Fock, ROHF) or permit complete variational freedom (unrestricted Hartree–Fock UHF). In general, an N-electron Hartree–Fock wave function composed of Nα α-spin orbitals and Nβ β-spin orbitals can be written as


 * $$\Psi^{\mathrm{HF}}(\mathbf{r}_{1}\sigma(1)\cdots\mathbf{r}_{N}\sigma(N)) = \mathcal{A}\left(\psi_{1}^{\alpha}(\mathbf{r}_{1}\alpha_{1})\cdots\psi_{N_{\alpha}}^{\alpha}(\mathbf{r}_{N_{\alpha}}\alpha_{N_{\alpha}})

\psi_{N_{\alpha}+1}^{\beta}(\mathbf{r}_{N_{\alpha}+1}\beta_{N_{\alpha}+1})\cdots\psi_{N}^{\beta}(\mathbf{r}_{N}\beta_{N})\right).$$

where $$\mathcal{A}$$ is the antisymmetrization operator. This wave function is an eigenfunction of the total spin projection operator, Ŝz, with eigenvalue (Nα − Nβ)/2 (assuming Nα ≥ Nβ). For a ROHF wave function, the first 2Nβ spin-orbitals are forced to have the same spatial distribution:


 * $$\psi^{\alpha}_{j}(\mathbf{r}_{j}) = \psi^{\beta}_{N_{\alpha}+j}(\mathbf{r}_{N_{\alpha}+j}),\ \ \ 1\leq j\leq N_{\beta}.$$

There is no such constraint in an UHF approach.

Contamination
The total spin-squared operator commutates with the nonrelativistic molecular Hamiltonian so it is desirable that any approximate wave function is an eigenfunction of Ŝ2. The eigenvalues of Ŝ2 are S(S + 1), where S is the spin quantum number of the system and can take the values 0 (singlet), 1/2 (doublet), 1 (triplet), 3/2 (quartet), and so forth. The Ŝ2 eigenvalues of the most common spin multiplicities are listed below.

The ROHF wave function is an eigenfunction of Ŝ2: the expectation value Ŝ2 for a high-spin ROHF wave function is


 * $$ \langle S^{2}\rangle_{\mathrm{ROHF}} = \langle S^{2}\rangle_{\mathrm{exact}} =\left(\frac{N_{\alpha}-N_{\beta}}{2}\right)\left(\frac{N_{\alpha}-N_{\beta}}{2}+1\right).$$

However, the UHF wave function is not: the expectation value of Ŝ2 for an UHF wave function is


 * $$ \langle S^{2}\rangle_{\mathrm{UHF}} = \langle S^{2}\rangle_{\mathrm{exact}} + N_{\beta} - \sum_{i,j}^{\mathrm{occupied}}|\langle\psi_{i}^{\alpha}|\psi_{j}^{\beta}\rangle|^{2}.$$

The sum of the last two terms is a measure of the extent of spin contamination in the unrestricted Hartree–Fock approach and is always non-negative – the wave function is usually contaminated to some extent by higher order spin eigenstates unless a ROHF approach is taken. Therefore, the deviation of the UHF expectation value of Ŝ2 from the exact Ŝ2 eigenvalue as would be expected from the spin multiplicity (see the table above) is usually taken as a measure of the severity of the spin contamination. Naturally, there is no contamination if all electrons are the same spin. Also, there is often (but not always, as in open-shell singlets) no contamination if the number of α and β electrons is the same. A small basis set could also constrain the wavefunction sufficiently to prevent spin contamination.

Such contamination is a manifestation of the different treatment of α and β electrons that would otherwise occupy the same molecular orbital. It is also present in Møller–Plesset perturbation theory calculations that employ an unrestricted wave function as a reference state (and even some that employ a restricted wave function) and, to a much lesser extent, in the unrestricted Kohn–Sham approach to density functional theory using approximate exchange-correlation functionals.

Elimination
Although the ROHF approach does not suffer from spin contamination, it is less commonly available in quantum chemistry computer programs. Given this, several approaches to remove or minimize spin contamination from UHF wave functions have been proposed.

The annihilated UHF (AUHF) approach involves the annihilation of first spin contaminant of the density matrix at each step in the self-consistent solution of the Hartree–Fock equations using a state-specific Löwdin annihilator. The resulting wave function, while not completely free of contamination, dramatically improves upon the UHF approach especially in the absence of high order contamination.

Projected UHF (PUHF) annihilates all spin contaminants from the self-consistent UHF wave function. The projected energy is evaluated as the expectation of the projected wave function.

The spin-constrained UHF (SUHF) introduces a constraint into the Hartree–Fock equations of the form λ(Ŝ2 − S(S + 1)), which as λ tends to infinity reproduces the ROHF solution.

All of these approaches are readily applicable to unrestricted Møller–Plesset perturbation theory.

Density functional theory
Although many density functional theory (DFT) codes simply calculate spin-contamination using the Kohn-Sham orbitals as if they were Hartree-Fock orbitals, this is not necessarily correct. The unrestricted Kohn-Sham (UKS) wavefunction of a spin-pure electronic state may have a Ŝ2 expectation value that is inconsistent with a spin-pure state, if it is calculated using the UHF formula. Therefore, the benefits of using a restricted open-shell treatment over an unrestricted one is smaller in a DFT context than in HF. In particular, the exact spin density of the Sz=S spin-component of an open-shell molecule generally adopts negative values in small parts of the real space due to spin polarization, but a restricted open-shell Kohn-Sham (ROKS) treatment necessarily gives non-negative spin density everywhere, which proves that, in general, only UKS can possibly give the exact spin density of a system. In practical calculations, the energy error of an unrestricted DFT calculation due to spin contamination can sometimes be remedied by a spin projection approach, particularly if the spin contamination is large (e.g. when there is antiferromagnetic coupling in the system). However, for moderate spin contamination, spin projection may actually be counterproductive, and create unphysical cusps (i.e. derivative discontinuities) on potential energy curves.

On the other hand, in TDDFT  calculations, one frequently observes severe spin contamination in the excited states, even if the ground state is described by ROKS (i.e. even when the ground state itself is not spin contaminated). This is because the single excitations out of an open-shell reference state (usually the ground state) do not span a spin-complete manifold, i.e. it is impossible to unitarily transform the set of all single excitations of an open-shell reference state, such that all of the transformed states are eigenstates of the Ŝ2 operator. The excited state 〈Ŝ2〉 values of a TDDFT calculation of an open-shell state can have a maximum error of 2 when the ground state is described by ROKS, and sometimes slightly larger than 2 when the ground state is described by UKS. To eliminate the excited state spin contamination in TDDFT, spin-adapted TDDFT methods must be used, which either explicitly or implicitly include some double excitations and thereby go beyond the adiabatic approximation of the TDDFT response kernel. Spin-adapted TDDFT methods not only improve the prediction of absorption spectra, but also improve the prediction of the fluorescence spectra and excited state relaxation pathways of open-shell molecules.