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).
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
where 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: