3. The Hartree-Fock Method
Reading time: ~55 minutes | 5 full derivations | 2 interactive simulations
1. Introduction: The Many-Electron Problem
The Hartree-Fock method is the cornerstone of ab initio quantum chemistry, providing the best single-determinant approximation to the exact many-electron wavefunction.
For an atom or molecule with $N$ electrons and $M$ nuclei, the non-relativistic electronic Hamiltonian (in atomic units, $\hbar = m_e = e = 1$) is:
The first term is the electron kinetic energy, the second is the nuclear-electron attraction, and the third is the electron-electron repulsion. It is the final term that makes the Schrödinger equation unsolvable in closed form for $N \geq 2$.
The electron-electron repulsion $\sum_{i<j} 1/r_{ij}$ couples the coordinates of every pair of electrons, preventing separation of variables. For helium alone, we face a six-dimensional partial differential equation. For a molecule like benzene with 42 electrons, exact solution is utterly intractable. The central idea of the Hartree-Fock (HF) method is to replace this intractable many-body problem with an effective one-electron problem: each electron moves in the average field created by all the other electrons.
The Independent Particle Model
As a zeroth approximation, we might try writing the $N$-electron wavefunction as a simple product of one-electron functions (orbitals):
where $\mathbf{x}_i = (\mathbf{r}_i, \sigma_i)$ denotes both spatial and spin coordinates. This is the Hartree product. However, it fails to satisfy the antisymmetry requirement for fermions. A proper fermionic wavefunction must change sign under exchange of any two electrons: $\Psi(\ldots, \mathbf{x}_i, \ldots, \mathbf{x}_j, \ldots) = -\Psi(\ldots, \mathbf{x}_j, \ldots, \mathbf{x}_i, \ldots)$.
2. Derivation 1: The Slater Determinant and Antisymmetry
Constructing an Antisymmetric Wavefunction
Given $N$ orthonormal spin orbitals $\{\chi_1, \chi_2, \ldots, \chi_N\}$, we construct the antisymmetrized product as a determinant. For $N = 2$ electrons, antisymmetrization of $\chi_1(\mathbf{x}_1)\chi_2(\mathbf{x}_2)$ gives:
This is a $2 \times 2$ determinant. Expanding:
Swapping $\mathbf{x}_1 \leftrightarrow \mathbf{x}_2$ flips the sign — antisymmetry is built in.
General N-Electron Slater Determinant
For $N$ electrons in $N$ spin orbitals, the Slater determinant is:
In compact notation: $|\Psi\rangle = |\chi_1 \chi_2 \cdots \chi_N\rangle$.
Derivation of the Normalization Factor
The determinant expands as a sum over all $N!$ permutations $\hat{P}$of the symmetric group $S_N$:
where $(-1)^p$ is the parity of permutation $P$. To verify normalization, compute $\langle\Psi|\Psi\rangle$:
Since the spin orbitals are orthonormal, $\langle\chi_i|\chi_j\rangle = \delta_{ij}$, the only non-vanishing terms occur when $P = Q$, giving:
Since $(-1)^{2p} = 1$ always. This confirms the $1/\sqrt{N!}$ prefactor ensures proper normalization.
Pauli Exclusion Principle
If two electrons occupy the same spin orbital, say $\chi_i = \chi_j$ with$i \neq j$, then the determinant has two identical columns and vanishes identically:
This is precisely the Pauli exclusion principle: no two electrons can occupy the same quantum state. The antisymmetry of the Slater determinant automatically encodes this fundamental requirement.
3. Derivation 2: Hartree-Fock Equations from the Variational Principle
Energy of a Slater Determinant
Using Slater-Condon rules, the expectation value of the Hamiltonian with a single Slater determinant $|\Psi_0\rangle$ is:
where the one-electron integrals are:
and the two-electron integrals in physicist's notation are:
The first is the Coulomb integral and the second is the exchange integral. Note that the exchange integral has no classical analogue — it arises purely from antisymmetry.
Variational Minimization with Constraints
We seek the spin orbitals $\{\chi_i\}$ that minimize $E_0$ subject to orthonormality constraints $\langle\chi_i|\chi_j\rangle = \delta_{ij}$. Using Lagrange multipliers $\varepsilon_{ij}$, we define the functional:
Setting the functional derivative $\delta\mathcal{L}/\delta\chi_i^* = 0$ requires:
A unitary transformation among the occupied orbitals diagonalizes the Lagrange multiplier matrix, giving the canonical Hartree-Fock equations.
The Coulomb and Exchange Operators
The Coulomb operator $\hat{J}_j$ represents the classical electrostatic repulsion from the charge density of electron $j$:
The exchange operator $\hat{K}_j$ has no classical analogue and arises from the antisymmetry requirement:
Note how $\hat{K}_j$ exchanges the orbital labels: $\chi_i$ enters under the integral but $\chi_j$ appears outside. This operator is non-local — it depends on $\chi_i$ everywhere in space, not just at the point $\mathbf{x}_1$.
The Fock Operator and Canonical HF Equations
Defining the Fock operator:
For a closed-shell system with $N/2$ doubly occupied spatial orbitals, summing over spatial orbitals with the factor of 2 for each occupation gives:
The canonical Hartree-Fock equations are the pseudo-eigenvalue problem:
These are pseudo-eigenvalue equations because $\hat{f}$ itself depends on its eigenfunctions through $\hat{J}_j$ and $\hat{K}_j$. The solutions must therefore be obtained iteratively — this is the self-consistent field (SCF) procedure.
Roothaan-Hall Equations
In practice, we expand each molecular orbital (MO) as a linear combination of $K$known basis functions $\{\phi_\mu\}$:
Substituting into the HF equation $\hat{f}\psi_i = \varepsilon_i\psi_i$, multiplying on the left by $\phi_\nu^*$, and integrating:
where $F_{\nu\mu} = \langle\phi_\nu|\hat{f}|\phi_\mu\rangle$ is the Fock matrix and$S_{\nu\mu} = \langle\phi_\nu|\phi_\mu\rangle$ is the overlap matrix. In matrix form:
This is the Roothaan-Hall equation (Roothaan, 1951; Hall, 1951). It converts the integro-differential HF equation into a matrix eigenvalue problem. The Fock matrix elements are:
where $P_{\lambda\sigma} = 2\sum_{i}^{N/2} C_{\lambda i}C_{\sigma i}$ is the density matrix and $(\mu\nu|\lambda\sigma)$ are two-electron integrals in chemist's notation.
4. Derivation 3: The Self-Consistent Field (SCF) Procedure
Why Iteration Is Necessary
The Fock matrix $\mathbf{F}$ depends on the density matrix $\mathbf{P}$, which in turn depends on the MO coefficients $\mathbf{C}$, which are the eigenvectors of $\mathbf{F}$. This circular dependency means we must solve the problem self-consistently: guess an initial $\mathbf{P}$, build $\mathbf{F}$, solve for new $\mathbf{C}$ and $\mathbf{P}$, and repeat until convergence.
Step-by-Step SCF Algorithm
- Specify the molecule and basis set. Choose nuclear coordinates $\{R_A, Z_A\}$ and a basis set $\{\phi_\mu\}$ of$K$ functions.
- Compute all one- and two-electron integrals. Calculate$S_{\mu\nu}$, $H_{\mu\nu}^{\text{core}}$, and all $K^4/8$unique two-electron integrals $(\mu\nu|\lambda\sigma)$.
- Diagonalize the overlap matrix. Compute$\mathbf{S}^{-1/2}$ for the orthogonalization transformation. Using the eigendecomposition$\mathbf{S} = \mathbf{U}\mathbf{s}\mathbf{U}^\dagger$:$$\mathbf{S}^{-1/2} = \mathbf{U}\mathbf{s}^{-1/2}\mathbf{U}^\dagger$$
- Initial guess for density matrix. Common choices: diagonalize $\mathbf{H}^{\text{core}}$ (core Hamiltonian guess), use extended Hückel theory, or use a superposition of atomic densities (SAD).
- Build the Fock matrix. From the current density matrix $\mathbf{P}$:$$F_{\mu\nu} = H_{\mu\nu}^{\text{core}} + \sum_{\lambda\sigma}P_{\lambda\sigma}\left[(\mu\nu|\lambda\sigma) - \tfrac{1}{2}(\mu\lambda|\nu\sigma)\right]$$
- Transform to orthogonal basis. Compute$\mathbf{F}' = \mathbf{S}^{-1/2\dagger}\mathbf{F}\mathbf{S}^{-1/2}$.
- Diagonalize. Solve$\mathbf{F}'\mathbf{C}' = \mathbf{C}'\boldsymbol{\varepsilon}$.
- Back-transform. Obtain$\mathbf{C} = \mathbf{S}^{-1/2}\mathbf{C}'$.
- Form new density matrix. Using the $N/2$lowest eigenvectors:$$P_{\mu\nu} = 2\sum_{i=1}^{N/2}C_{\mu i}C_{\nu i}$$
- Check convergence. If$|\Delta E| < \epsilon_E$ and $||\mathbf{P}^{(n)} - \mathbf{P}^{(n-1)}|| < \epsilon_P$, the SCF has converged. Otherwise, return to step 5.
Convergence Criteria and Acceleration
Typical convergence thresholds are $\epsilon_E \sim 10^{-8}$ Hartree for energy and $\epsilon_P \sim 10^{-6}$ for the density matrix RMS change. The total electronic energy at convergence is:
Plain SCF iteration often oscillates or diverges. Common acceleration techniques include:
- DIIS (Direct Inversion in the Iterative Subspace): Pulay's method (1980) extrapolates the Fock matrix from previous iterations to minimize the error vector $\mathbf{e} = \mathbf{FPS} - \mathbf{SPF}$
- Damping: Mix new and old density matrices: $\mathbf{P}^{(n+1)} = \alpha\mathbf{P}^{\text{new}} + (1-\alpha)\mathbf{P}^{(n)}$
- Level shifting: Add a constant shift to virtual orbital energies to increase the HOMO-LUMO gap
5. Derivation 4: Koopmans's Theorem
Statement and Proof
Koopmans's theorem (1934): Within the frozen orbital approximation, the ionization energy for removing an electron from occupied orbital $\chi_k$ equals the negative of its orbital energy:
Proof: The $N$-electron HF energy can be written:
where $\langle ij||ij\rangle = \langle ij|ij\rangle - \langle ij|ji\rangle$ is the antisymmetrized two-electron integral. The orbital energy is:
Now remove electron $k$ while keeping all other orbitals unchanged (frozen orbital approximation). The $(N-1)$-electron energy is:
Taking the difference:
Since $\langle kj||kj\rangle = \langle jk||jk\rangle$ (by symmetry of the antisymmetrized integrals), the two sums are identical:
Since $\varepsilon_k < 0$ for bound orbitals,$IP_k = E(N-1,k) - E(N) = -\varepsilon_k > 0$. QED.
Limitations of Koopmans's Theorem
- Orbital relaxation: In reality, when an electron is removed, the remaining$N-1$ electrons relax to lower the energy. This relaxation energy is neglected in the frozen orbital approximation, causing Koopmans's IP to overestimate the true IP.
- Electron correlation: The correlation energy changes between the $N$- and$(N-1)$-electron systems are ignored. Correlation effects typically reduce the IP.
- Fortuitous cancellation: For many molecules, the overestimation from neglecting relaxation is partially cancelled by the underestimation from neglecting differential correlation, making Koopmans's values surprisingly accurate (typically within 1–2 eV of experiment).
- Electron affinities: Koopmans's theorem applied to virtual orbital energies gives very poor estimates of electron affinities because virtual orbitals are optimized for the$N$-electron system, not the $(N+1)$-electron system.
6. Derivation 5: Electron Correlation and Post-Hartree-Fock Methods
Definition of Correlation Energy
Löwdin (1959) defined the correlation energy as the difference between the exact non-relativistic energy and the Hartree-Fock limit:
By the variational principle, $E_{\text{HF}} \geq E_{\text{exact}}$, so$E_{\text{corr}} \leq 0$ always. The correlation energy typically accounts for about 1% of the total electronic energy but is crucial for chemical accuracy ($\sim 1$ kcal/mol $\approx 1.6$ mHartree).
The HF method recovers ~99% of the total energy, but the missing 1% can represent the entire bond dissociation energy. For $\text{N}_2$, for example,$E_{\text{corr}} \approx -0.55$ Ha while the bond energy is only 0.36 Ha.
Configuration Interaction (CI)
The most conceptually straightforward post-HF method: expand the wavefunction in a basis of Slater determinants formed by exciting electrons from occupied to virtual orbitals:
Full CI (all possible excitations) gives the exact answer within the chosen basis set, but scales factorially with system size. Truncated CI (CISD = singles + doubles) is practical but not size-consistent: the energy of two non-interacting fragments$A + B$ does not equal $E(A) + E(B)$.
Møller-Plesset Perturbation Theory (MP2)
Treat electron correlation as a perturbation to the Fock operator. The zeroth-order Hamiltonian is $\hat{H}_0 = \sum_i \hat{f}(i)$ and the perturbation is $\hat{V} = \hat{H} - \hat{H}_0$. The second-order energy correction is:
MP2 scales as $\mathcal{O}(N^5)$ and recovers 80–90% of the correlation energy for many systems. It is size-consistent but not variational.
Coupled Cluster Theory
The coupled cluster (CC) ansatz uses an exponential parameterization:
where $\hat{T}_n$ generates all $n$-fold excitations. The exponential form ensures size-consistency at every truncation level. CCSD(T) — coupled cluster with singles, doubles, and perturbative triples — is often called the “gold standard” of quantum chemistry:
- CCSD: $\mathcal{O}(N^6)$ — includes $\hat{T}_1 + \hat{T}_2$
- CCSD(T): $\mathcal{O}(N^7)$ — adds perturbative triples correction
- Chemical accuracy ($< 1$ kcal/mol) for most main-group chemistry
7. Applications: Basis Sets and Computational Considerations
Slater-Type vs. Gaussian-Type Orbitals
Slater-type orbitals (STOs) have the correct functional form:
They have the correct cusp at the nucleus ($r = 0$) and correct exponential decay at large $r$, but multi-center two-electron integrals cannot be computed analytically.
Gaussian-type orbitals (GTOs) use a Gaussian radial part:
The key advantage: the product of two Gaussians centered at different points is itself a Gaussian centered at a third point (Gaussian product theorem). This makes all two-electron integrals analytically tractable. Boys (1950) introduced GTOs for this reason. The trade-off is that more GTOs are needed to approximate an STO — hence the STO-$n$G contracted basis sets that fit $n$ Gaussians to each STO.
Common Basis Set Families
| Basis Set | Type | Functions per atom | Use case |
|---|---|---|---|
| STO-3G | Minimal | 1 per occupied AO | Qualitative, large systems |
| 6-31G* | Split-valence + polarization | ~15 (2nd row) | Routine geometry optimization |
| cc-pVDZ | Correlation-consistent DZ | ~14 (2nd row) | Correlated calculations |
| cc-pVTZ | Correlation-consistent TZ | ~30 (2nd row) | High accuracy |
| aug-cc-pVQZ | Augmented QZ | ~80 (2nd row) | Near basis set limit |
Computational Scaling
The computational cost of HF and post-HF methods scales as a power of the number of basis functions $K$:
- Two-electron integrals: $\mathcal{O}(K^4)$ — the bottleneck for HF
- HF (with screening): effectively $\mathcal{O}(K^{2-3})$ for large molecules
- MP2: $\mathcal{O}(K^5)$
- CCSD: $\mathcal{O}(K^6)$
- CCSD(T): $\mathcal{O}(K^7)$
- Full CI: $\mathcal{O}(K!)$ — exact but exponentially expensive
Modern HF implementations exploit integral screening, density fitting (RI approximation), and linear-scaling techniques to handle systems with thousands of basis functions.
Molecular Properties from HF
The converged HF wavefunction provides access to numerous molecular properties:
- Total energy and equilibrium geometry (via gradient optimization)
- Dipole moment: $\boldsymbol{\mu} = -\text{Tr}(\mathbf{P}\mathbf{D}) + \sum_A Z_A \mathbf{R}_A$ where $\mathbf{D}$ is the dipole integral matrix
- Mulliken charges: $q_A = Z_A - \sum_{\mu \in A}(\mathbf{PS})_{\mu\mu}$
- Harmonic frequencies from the Hessian (second derivatives of energy)
- Ionization energies via Koopmans's theorem
8. Historical Context
1928 — Douglas Hartree
Proposed the self-consistent field method for atoms, treating each electron as moving in the average field of all others. His original formulation used simple product wavefunctions (no antisymmetry), and he performed calculations by hand with the help of his father, who was a skilled numerical analyst.
1930 — Vladimir Fock
Generalized Hartree's method to include antisymmetry (exchange), deriving the full Hartree-Fock equations using the variational principle with Slater determinants. This introduced the exchange operator $\hat{K}$ that has no classical analogue.
1930 — John C. Slater
Independently introduced the determinantal wavefunction (now called the Slater determinant) and developed Slater-type orbitals (STOs) with the correct radial behavior for atoms. His rules for estimating effective nuclear charges remain widely used.
1951 — Clemens C. J. Roothaan & George G. Hall
Independently formulated the matrix form of the HF equations ($\mathbf{FC} = \mathbf{SC}\boldsymbol{\varepsilon}$), transforming the integro-differential equations into an algebraic eigenvalue problem suitable for digital computers. This was the breakthrough that made HF calculations practical.
1950 — S. Francis Boys
Introduced Gaussian-type orbitals (GTOs) as basis functions, exploiting the Gaussian product theorem to make all molecular integrals analytically computable. This insight underlies every modern quantum chemistry program (Gaussian, ORCA, Q-Chem, etc.).
9. Python Simulation: SCF for Helium
The following code implements a complete restricted Hartree-Fock SCF calculation for the helium atom using a two-function STO-3G basis. It computes all one- and two-electron integrals analytically for s-type Gaussians centered at the origin, solves the Roothaan-Hall equations iteratively, and plots the energy convergence:
Hartree-Fock SCF for Helium Atom (STO-3G Basis)
PythonComplete RHF/STO-3G calculation for He. Computes overlap, kinetic, nuclear attraction, and two-electron integrals over contracted Gaussian basis functions. Iterates the Roothaan-Hall equations to self-consistency and plots energy convergence.
Click Run to execute the Python code
Code will be executed with Python 3 on the server
Key observations: The SCF converges rapidly (typically 5–10 iterations) to the HF/STO-3G energy for helium. The converged energy is higher than the exact value ($-2.8617$ Ha) because the minimal basis set is too inflexible. A larger basis would approach the Hartree-Fock limit. The difference between the HF limit and the exact energy is the correlation energy ($\approx -0.042$ Ha for He).
10. Fortran Simulation: HF Orbital Energies for H–Ne
This Fortran program uses tabulated Hartree-Fock orbital energies (from Clementi & Roetti, 1974) to demonstrate Koopmans's theorem across the first row of the periodic table. It compares the negative HOMO orbital energy with the experimental first ionization energy:
HF Orbital Energies and Koopmans's Theorem (H-Ne)
FortranComputes orbital energy sums and tests Koopmans's theorem (IP = -epsilon_HOMO) for atoms H through Ne using tabulated Clementi-Roetti HF orbital energies. Compares with experimental ionization energies.
Click Run to execute the Fortran code
Code will be compiled with gfortran and executed on the server
Key observations: Koopmans's theorem predictions agree with experimental ionization energies to within 5–15% for light atoms. The systematic overestimation reflects the neglect of orbital relaxation, while the occasional underestimation for atoms like O and F reflects the role of differential correlation. The fortuitous partial cancellation of these two errors is a well-known feature of Koopmans's theorem.
Chapter Summary
The Hartree-Fock method provides the optimal single-determinant description of many-electron systems. Starting from the antisymmetric Slater determinant, application of the variational principle yields the Fock operator and the HF equations. The Roothaan-Hall matrix formulation converts these into an algebraic eigenvalue problem that is solved iteratively via the SCF procedure.
Key Results
- The Slater determinant automatically satisfies the Pauli exclusion principle
- The Fock operator: $\hat{f} = \hat{h} + \sum_j(2\hat{J}_j - \hat{K}_j)$
- Roothaan-Hall equations: $\mathbf{FC} = \mathbf{SC}\boldsymbol{\varepsilon}$
- Koopmans's theorem: $IP_k = -\varepsilon_k$ (frozen orbital approximation)
- Correlation energy: $E_{\text{corr}} = E_{\text{exact}} - E_{\text{HF}} < 0$
- Post-HF hierarchy: CI, MP2, CCSD, CCSD(T) for systematic improvement