Skip to main content

Physics V course sequence · Interactive lesson

Hartree-Fock and the self-consistent field

Every electron here sees the others only as an averaged cloud, and that cloud is built from the very orbitals you are still solving for. This is how you break the circle — guess, build, diagonalise, repeat — and what the converged answer still leaves out.

UPV-12.05 · Lesson 5 of 9 in this unit. Position is not a completion score.
Starting model: Hartree-Fock and the self-consistent fieldDensity deviation d_n / d_0 against SCF cycle for a linearised self-consistency loop: each cycle multiplies the deviation by r = (1 - a) + a k, so the trace is r to the power n and flips sign whenever r is negative. Here k = -1.5, a = 0.50 and r = -0.25. The trace is clipped a little outside the dashed +1 and -1 guides, so a curve that runs flat beyond a guide is a diverging loop.dₙ / d₀ density deviation from self-consistencyr = (1 - a) + a k = −0.25the loop converges only while |r| < 1+10−1n = 01020 SCF cyclesmarker at n = 6, d = 0.0002
Start with a picture. Change the model in the lab below.
1

Build the model

The best single determinant — found by an operator that depends on its own answer.

The key idea

Hartree-Fock is the best single Slater determinant: the one whose orbitals minimise the energy, each orbital an eigenfunction of a Fock operator built from the averaged Coulomb and exchange field of all the others.

Example. For helium the converged solution gives ε₁ₛ = −0.91796 Ha and EHF = −2.86168 Ha = −77.87 eV — a rigorous upper bound that still sits 1.14 eV above the exact −79.01 eV.

The complete physical model and assumptions

Hartree-Fock is the variational principle run over the smallest space that already respects antisymmetry: all single Slater determinants. Fix that ansatz and the energy becomes a functional of the N occupied spin-orbitals — E = Σᵢ hᵢᵢ + ½ ΣᵢΣⱼ (Jᵢⱼ − Kᵢⱼ) by the Slater–Condon rules — so minimising it under ⟨χᵢ|χⱼ⟩ = δᵢⱼ is a calculus-of-variations problem with a Hermitian matrix of Lagrange multipliers. Diagonalise that matrix, which costs nothing because a unitary mixing of occupied orbitals leaves the determinant and the density alone, and stationarity becomes an eigenvalue problem: f̂χᵢ = εᵢχᵢ with f̂ = ĥ + Σⱼ (Ĵⱼ − K̂ⱼ). It looks like a one-electron Schrödinger equation and it is not, because the operator is assembled from the orbitals it is supposed to produce. The equations are nonlinear, so they are solved by driving a guess to a fixed point — the self-consistent field. In a finite basis the whole thing collapses to the Roothaan generalised eigenproblem FC = SCε, one scipy.linalg.eigh call per cycle. What it costs is correlation: a determinant hands each electron an orbital that does not know where the others are at that instant, so it keeps the Fermi hole exchange gives it free and misses the Coulomb hole entirely — 1.14 eV in helium, 1.4% of that atom's total energy but of the order of a chemical bond in absolute size.

1One determinant is the whole ansatz

Hartree-Fock does not approximate the Schrödinger equation; it restricts the search. The trial state is a single Slater determinant of N orthonormal spin-orbitals, and the energy is minimised over those orbitals themselves — an infinite-dimensional variation, not a linear one. Because the trial state is normalised and antisymmetric, the result is a rigorous upper bound: EHF ≥ Eexact, always. Slater–Condon rules reduce the expectation value to integrals over one and two orbitals at a time, E = Σᵢ hᵢᵢ + ½ ΣᵢΣⱼ (Jᵢⱼ − Kᵢⱼ), where hᵢᵢ is the kinetic plus nuclear-attraction integral, Jᵢⱼ = ⟨ij|ij⟩ is the classical repulsion between the charge clouds |χᵢ|² and |χⱼ|², and Kᵢⱼ = ⟨ij|ji⟩ is an integral with no classical analogue that survives only when χᵢ and χⱼ carry the same spin. Everything downstream — the operator, the loop, the missing correlation — follows from having chosen one determinant and nothing more.

2Varying under orthonormality gives the Fock operator

Minimise E subject to ⟨χᵢ|χⱼ⟩ = δᵢⱼ. Each constraint buys a Lagrange multiplier εᵢⱼ, and stationarity gives f̂χᵢ = Σⱼ εᵢⱼ χⱼ with f̂ = ĥ + Σⱼ (Ĵⱼ − K̂ⱼ). The multiplier matrix is Hermitian, so some unitary transformation diagonalises it — and that same unitary mixing of the occupied orbitals leaves the determinant unchanged up to a phase, so it moves neither the density nor the energy. In that canonical gauge the condition becomes an ordinary eigenvalue problem, f̂χᵢ = εᵢχᵢ, which is the only reason orbital energies exist at all. Read the two-electron pieces carefully. Ĵⱼψ(r) = [∫ |χⱼ(r′)|²/|r − r′| dr′] ψ(r) multiplies ψ by a potential. K̂ⱼψ(r) = [∫ χⱼ*(r′)ψ(r′)/|r − r′| dr′] χⱼ(r) carries the value of ψ at r′ over to r: a nonlocal integral operator, not a potential at all. Put j = i and the two cancel exactly, so an electron never repels itself. Hartree's earlier scheme, with no K̂, let it.

3The operator depends on its own eigenvectors, so you iterate

f̂ is assembled from the orbitals it is meant to produce. That circularity is what makes the equations nonlinear, and there is no direct solution — only a fixed-point loop. Guess a density, build f̂ from it, diagonalise, occupy the N lowest orbitals by aufbau, form a new density, and repeat until the density stops moving; convergence is usually declared when the RMS change in the density matrix falls below about 10⁻⁸ and the energy below 10⁻¹⁰ hartree. The loop is not guaranteed to converge. Linearise about the fixed point and each cycle multiplies the density error by a factor λ, so the error goes as λⁿ and the loop converges only while |λ| < 1; for λ < −1 the error flips sign every cycle and grows, which in atoms shows up as charge sloshing between shells, while λ = −1 sits on the boundary and oscillates forever without decaying. Damping fixes most of it: feed forward Pnew = (1 − α)Pold + αPcalc, which replaces λ by r = (1 − α) + αλ, so for λ < 1 the damped loop converges whenever 0 < α < 2/(1 − λ). Production codes use DIIS instead, extrapolating from several stored Fock matrices, which routinely turns a hundred cycles into fifteen.

4In a finite basis it becomes FC = SCε

Numerically you do not solve for functions, you expand them. Write χᵢ = Σμ Cμi φμ over M fixed basis functions — Gaussians centred on nuclei, in practice — and the integro-differential equation collapses to matrices: FC = SCε, with Fμν = ⟨φμ|f̂|φν⟩ and Sμν = ⟨φμ|φν⟩. S is not the identity, because atom-centred functions overlap, so this is a generalised eigenvalue problem. Hand it straight to scipy.linalg.eigh(F, S), or orthogonalise first with X = S(−1/2), solve X†FX C′ = C′ε, and recover C = XC′. The cost is lopsided. Building F needs the two-electron integrals (μν|λσ), about M⁴/8 of them once permutational symmetry is used — 7.8 × 10⁵ for a modest M = 50 — while the diagonalisation inside the loop is only O(M³). That is why integrals are computed once and stored, or recomputed on the fly in direct SCF when memory runs short, and why the basis size rather than the cycle count sets the bill.

5Reading the output: εᵢ, Koopmans, and ΔSCF

Three things are easy to misread. First, E ≠ Σᵢ εᵢ. Each εᵢ is hᵢᵢ + Σⱼ (Jᵢⱼ − Kᵢⱼ), so summing over occupied orbitals counts every pair twice, and the total is E = Σᵢ εᵢ − ½ ΣᵢΣⱼ (Jᵢⱼ − Kᵢⱼ). Second, Koopmans' theorem, IEᵢ ≈ −εᵢ, holds only if the other N − 1 orbitals stay frozen and neither state carries correlation. Both assumptions fail, and in opposite directions: relaxation lowers the ion and so lowers the true ionisation energy, while correlation stabilises the neutral more than the ion and raises it. In helium −ε₁ₛ = 24.98 eV against 24.587 eV measured, because +1.53 eV of relaxation error nearly cancels −1.14 eV of correlation error. Third, a virtual orbital is not an excited state: it is an eigenfunction of a Fock operator built from N electrons, so it feels N of them rather than N − 1 and comes out too high and too diffuse. Where accuracy matters, take the difference of two separately converged calculations — ΔSCF — not an eigenvalue.

6The Fermi hole is free; the Coulomb hole is not

Antisymmetry alone keeps same-spin electrons apart: exchange digs a Fermi hole around each electron, and Hartree-Fock carries it exactly. What one determinant cannot represent is the Coulomb hole — the instantaneous avoidance of electrons regardless of spin — because each electron is assigned an orbital that does not depend on where the others happen to be. Löwdin's definition names the deficit, Ecorr = Eexact − EHF: −0.042 Ha (−1.14 eV) in helium, −0.094 Ha in beryllium, −0.390 Ha (−10.6 eV) in neon. As a fraction of the total that is 1.4% for helium, 0.6% for beryllium and 0.3% for neon — negligible-looking, yet each is of the order of a chemical bond energy, which is why Hartree-Fock geometries are usually good and its energetics are not. Brillouin's theorem says where to go next: singly excited determinants have zero matrix element with the converged determinant, so any correction must start from double excitations — which is what MP2, CISD and coupled cluster do. One determinant also fails qualitatively wherever a second is nearly degenerate with it: a stretched bond, or beryllium's 2s and 2p.

2

Key equations

Read the units, assumptions and limits before substituting.

Energy of a single determinant

E = Σᵢ hᵢᵢ + ½ ΣᵢΣⱼ (Jᵢⱼ − Kᵢⱼ)

The j = i term is Jᵢᵢ − Kᵢᵢ = 0, so exchange cancels self-interaction exactly — the Hartree method's worst flaw, gone.

hᵢᵢ, Jᵢⱼ, Kᵢⱼ in hartree; i and j run over all N occupied spin-orbitals

The Fock operator

f̂ = ĥ + Σⱼ (Ĵⱼ − K̂ⱼ)

One effective one-electron operator carrying the averaged field of all N electrons; only K̂ knows which of them share its spin.

ĥ = −(ħ²/2m)∇² − Ze²/4πε₀r; Ĵⱼ multiplies by a potential, K̂ⱼ is a nonlocal integral operator

Canonical Hartree-Fock equations

f̂ χᵢ = εᵢ χᵢ, ⟨χᵢ|χⱼ⟩ = δᵢⱼ, χᵢ → 0 as r → ∞

Orthonormality enters as a Hermitian multiplier matrix; the unitary rotation that diagonalises it changes nothing physical.

εᵢ in hartree; the boundary condition selects bound orbitals in L²(R³) ⊗ C²

Roothaan equations in a finite basis

F C = S C ε, Fμν = ⟨φμ|f̂|φν⟩, Sμν = ⟨φμ|φν⟩

scipy.linalg.eigh(F, S) solves it in one line — but C rebuilds F, so that line sits inside a loop.

M × M matrices over a non-orthogonal basis of φμ; S ≠ I because atom-centred functions overlap

Why Σ εᵢ is not the total energy

E = Σᵢ εᵢ − ½ ΣᵢΣⱼ (Jᵢⱼ − Kᵢⱼ)

Helium: 2ε₁ₛ = −49.96 eV against EHF = −77.87 eV, a 27.91 eV gap that is one pair repulsion counted twice.

Each εᵢ already carries the repulsion with every other occupied orbital, in hartree

Koopmans' theorem and the correlation deficit

IEᵢ ≈ −εᵢEcorr = Eexact − EHF < 0

Helium gives −ε₁ₛ = 24.98 eV against 24.587 eV measured, because +1.53 eV of relaxation nearly cancels −1.14 eV of correlation.

Frozen orbitals only: the ion may not relax, and neither state carries correlation
3

Interactive lab

Predict first. Explore the model. Compare the result.

Explore the model

−1.5
−2.5 to 0.9; steps of 0.1.
0.50
0.05 to 1; steps of 0.05.
6 cycles
0 to 20 cycles; steps of 1.

Try this. Start at a = 0.50 with k = −1.5: r = −0.25, the deviation flips sign every cycle and takes 14 of them to fall below 1e-8. Push a to 1.00 - plain undamped iteration - and r = −1.5 throws the trace past both guides onto the clip, the charge sloshing that stalls a real SCF. Then set a = 0.40, where r collapses to zero.

Live results

AMPLIFICATION r
-0.250
MAGNITUDE |r|
0.250
DEVIATION SIZE AT n
0.0002 x d0
CYCLES TO 1e-8, 999 = capped
14 cycles

Results follow this lesson’s model and assumptions. Displayed values are rounded.

Interactive Physics V modelDensity deviation d_n / d_0 against SCF cycle for a linearised self-consistency loop: each cycle multiplies the deviation by r = (1 - a) + a k, so the trace is r to the power n and flips sign whenever r is negative. Here k = -1.5, a = 0.50 and r = -0.25. The trace is clipped a little outside the dashed +1 and -1 guides, so a curve that runs flat beyond a guide is a diverging loop.dₙ / d₀ density deviation from self-consistencyr = (1 - a) + a k = −0.25the loop converges only while |r| < 1+10−1n = 01020 SCF cyclesmarker at n = 6, d = 0.0002
Density deviation dₙ / d₀ against SCF cycle for a linearised self-consistency loop: each cycle multiplies the deviation by r = (1 - a) + a k, so the trace is r to the power n and flips sign whenever r is negative. Here k = −1.5, a = 0.50 and r = −0.25. The trace is clipped a little outside the dashed +1 and −1 guides, so a curve that runs flat beyond a guide is a diverging loop.

Predict → change one variable → check

Plan a change before running it. Every other input stays at the saved baseline.

Saved baseline. Feedback coefficient k: −1.5; Damping / mixing fraction a: 0.50; SCF cycle n: 6 cycles

Baseline −1.5; choose −2.5 to 0.9, in steps of 0.1.
4. Compared with the saved baseline, this result will…

This experiment is kept only while this page is open. It does not change saved course progress.

4

Catch the common trap

The commonest error is to add the orbital energies and call the sum the atom's energy. Each εᵢ is an eigenvalue of a Fock operator that already contains the Coulomb and exchange field of every other occupied orbital, so summing them counts each pair interaction twice: in helium 2ε₁ₛ = −49.96 eV against EHF = −77.87 eV, an error of 27.91 eV rather than a rounding slip. The repair is E = Σᵢ εᵢ − ½ ΣᵢΣⱼ (Jᵢⱼ − Kᵢⱼ). A second error rides with the first: self-consistent names the fixed point of the iteration, not agreement with nature. A calculation converged to 10⁻¹⁰ hartree still misses helium's 1.14 eV of correlation, because the single determinant it converged to has nowhere to put it.

5

Practice & worked examples

3 authored examples. Make an attempt, then reveal the reasoning one step at a time.

EasyExample 1

A converged restricted Hartree-Fock calculation on helium returns the orbital energy ε₁ₛ = −0.91796 Ha and the Coulomb integral J₁ₛ₁ₛ = 1.02576 Ha for its two occupied spin-orbitals. Find the one-electron integral h₁₁, then the total Hartree-Fock energy, in hartree and in eV. Take 1 Ha = 27.2114 eV.

Sketch your answer or reasoning, then compare it with the authored solution. Your writing is not automatically graded or saved.

0 of 5 steps revealed.

MediumExample 2

At the Hartree-Fock limit helium has EHF = −2.86168 Ha and ε₁ₛ = −0.91796 Ha. He⁺ has one electron, so Hartree-Fock is exact for it: E = −2.00000 Ha. The exact non-relativistic energy of helium is −2.90372 Ha. Find the Koopmans and ΔSCF ionisation energies, the orbital relaxation energy and the correlation energy, and account for the measured 24.587 eV.

Sketch your answer or reasoning, then compare it with the authored solution. Your writing is not automatically graded or saved.

0 of 6 steps revealed.

HardExample 3

One SCF cycle for a model two-electron closed shell in a two-function basis has S = [[1, 0.400], [0.400, 1]], core Hamiltonian H = [[−1.400, −1.100], [−1.100, −1.400]] Ha, and a Fock matrix built from the current density, F = [[−1.200, −0.900], [−0.900, −1.200]] Ha. Solve FC = SCε for the occupied orbital, build the density matrix, find the electronic energy, and compare it with 2ε₁.

Sketch your answer or reasoning, then compare it with the authored solution. Your writing is not automatically graded or saved.

0 of 6 steps revealed.

6

Quick check

Select an answer and explain it before checking.

A converged restricted Hartree-Fock calculation on helium returns the orbital energy ε₁ₛ = −0.91796 Ha and a total energy of −2.86168 Ha. Why is the total energy not simply 2ε₁ₛ = −1.83592 Ha?
7

Review & continue

Hartree-Fock is the best single Slater determinant: the one whose orbitals minimise the energy, each orbital an eigenfunction of a Fock operator built from the averaged Coulomb and exchange field of all the others.

  • Explain the relationship without looking at the equation.
  • Check a sign, a unit and a model assumption in your working.
  • Return to the lab or worked example if a step is still unclear.

Extra challenging questions

Connect several ideas, explore supplied data, and compare your reasoning with a worked solution.