Hartree–Fock Computation
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.
Closed-shell matrix conventions
Section titled “Closed-shell matrix conventions”Consider a nonrelativistic, spin-restricted closed shell in real atomic orbitals , using atomic units and fixed nuclei. Let denote occupied spatial-orbital coefficients with . Define the spin-summed density
For real orbitals and chemists’ electron-repulsion integrals,
Solve , occupy orbitals, and construct a new . The electronic and total energies are
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.
Self-consistency as a nonlinear solve
Section titled “Self-consistency as a nonlinear solve”A practical iteration orthogonalizes the basis, constructs , 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
for an integer-occupied restricted determinant. A useful stationarity residual in the atomic-orbital representation is
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.
One doubly occupied orbital
Section titled “One doubly occupied orbital”With one normalized spatial orbital occupied by two opposite-spin electrons, the Coulomb integral is
The total electronic energy is . The orbital energy is , so 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.
Convergence beyond the SCF loop
Section titled “Convergence beyond the SCF loop”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.
Exercises
Section titled “Exercises”Verify the electron-count and idempotency identities for .
Solution
Since , cyclicity gives . Also . The factor two disappears for a spin-orbital density whose occupations are zero or one.
References
Section titled “References”- 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.