Skip to content

Hartree–Fock computation finds a stationary Slater determinant through a nonlinear sequence of one-particle eigenproblems. The Hartree–Fock approximation explains the determinant ansatz and exchange interaction; here we construct and solve the finite-basis equations and check their numerical accuracy.

Helpful background. Molecular integrals fixes integral conventions, and Rayleigh–Ritz explains generalized diagonalization.

Consider a nonrelativistic, spin-restricted closed shell in real atomic orbitals χμ\chi_\mu, using atomic units and fixed nuclei. Let CμiC_{\mu i} denote occupied spatial-orbital coefficients with C†SC=IC^\dagger SC=I. Define the spin-summed density

Pμν=2∑i occupiedCμiCνi∗.P_{\mu\nu}=2\sum_{i\ {\rm occupied}} C_{\mu i}C_{\nu i}^*.

For real orbitals and chemists’ electron-repulsion integrals,

Fμν=hμν+∑λσPλσ[(μν∣λσ)−12(μλ∣νσ)].F_{\mu\nu}=h_{\mu\nu} +\sum_{\lambda\sigma}P_{\lambda\sigma} \left[(\mu\nu|\lambda\sigma) -\frac12(\mu\lambda|\nu\sigma)\right].

Solve FC=SCεFC=SC\varepsilon, occupy Ne/2N_e/2 orbitals, and construct a new PP. The electronic and total energies are

Eel=12Tr⁡[P(h+F)],Etot=Eel+Enuc.E_{\rm el}=\frac12\operatorname{Tr}[P(h+F)], \qquad E_{\rm tot}=E_{\rm el}+E_{\rm nuc}.

The trace expression assumes the stated real-basis density convention; complex integral implementations must preserve the corresponding conjugations and index order. Doubling an already spin-summed density produces a factor-of-two error in Coulomb and exchange contributions.

A practical iteration orthogonalizes the basis, constructs F[P]F[P], diagonalizes, updates occupations, and mixes densities or extrapolates Fock matrices. Use an initial guess compatible with electron number and the intended spin and spatial symmetry. A converged energy difference alone is insufficient: a stalled iteration can have nearly constant energy and a nonzero orbital gradient.

Check

Tr⁡(PS)=Ne,PSP=2P,\operatorname{Tr}(PS)=N_e,\qquad PSP=2P,

for an integer-occupied restricted determinant. A useful stationarity residual in the atomic-orbital representation is

R=FPS−SPF.R=FPS-SPF.

Its norm should be assessed in a consistent orthonormal representation when comparing differently conditioned bases. DIIS minimizes a combination of previous residuals and often accelerates convergence, but an ill-conditioned history can produce erratic steps. Damping, level shifts, and history resets are tools to reach stationarity; final observables should be evaluated with the intended unshifted Hamiltonian.

Mean-field self-consistency treats the general fixed-point stability problem. In Hartree–Fock, a stationary solution can be a saddle under orbital rotations. Test stability and alternative spin or broken-symmetry guesses before interpreting it as the lowest determinant.

With one normalized spatial orbital ϕ\phi occupied by two opposite-spin electrons, the Coulomb integral is

J=(ϕϕ∣ϕϕ).J=(\phi\phi|\phi\phi).

The total electronic energy is Eel=2hϕϕ+JE_{\rm el}=2h_{\phi\phi}+J. The orbital energy is ε=hϕϕ+J\varepsilon=h_{\phi\phi}+J, so 2ε=2hϕϕ+2J2\varepsilon=2h_{\phi\phi}+2J double-counts the electron repulsion. This is an exact small test of the energy formula and a reminder that occupied orbital energies do not sum to the total energy.

For a one-electron unrestricted calculation, Coulomb self-interaction and same-spin exchange cancel exactly within the represented basis. Testing that cancellation helps detect index errors. It does not imply that Hartree–Fock describes correlated two-electron motion exactly.

Vary the orbital basis and integral screening or density-fitting thresholds independently. Compare restricted and unrestricted solutions where symmetry breaking is plausible; an unrestricted energy can be lower while spin contamination increases. At bond dissociation, a well-converged restricted determinant can remain qualitatively inadequate. Configuration interaction and coupled cluster introduce different correlation approximations.

Verify the electron-count and idempotency identities for P=2CoccCocc†P=2C_{\rm occ}C_{\rm occ}^\dagger.

Solution

Since Cocc†SCocc=IC_{\rm occ}^\dagger S C_{\rm occ}=I, cyclicity gives Tr⁡(PS)=2nocc=Ne\operatorname{Tr}(PS)=2n_{\rm occ}=N_e. Also PSP=4Cocc(Cocc†SCocc)Cocc†=2PPSP=4C_{\rm occ}(C_{\rm occ}^\dagger SC_{\rm occ})C_{\rm occ}^\dagger=2P. The factor two disappears for a spin-orbital density whose occupations are zero or one.

  • Psi4 developers, “HF: Hartree–Fock Theory” documentation, accessed 13 October 2026 — practical convergence and integral controls.
  • Roothaan, C. C. J., “New developments in molecular orbital theory,” Reviews of Modern Physics 23, 69–89 (1951), doi:10.1103/RevModPhys.23.69 — finite-basis self-consistent orbital equations.
  • Szabo, A., and N. S. Ostlund, Modern Quantum Chemistry: Introduction to Advanced Electronic Structure Theory, Dover, 1996 — density and energy conventions.