Hartree–Fock replaces the full two-electron problem with orbitals moving in a field built from those same orbitals. Self-consistency means that solving in the field returns the density used to construct it.
A product that assigns electron one to one orbital and electron two to another treats the electrons as distinguishable. Antisymmetrizing that product produces a Slater determinant. Hartree–Fock chooses the best single determinant, with orthonormal occupied spin orbitals, for the fixed Hamiltonian.
The determinant generates a Coulomb contribution and an exchange contribution. Coulomb energy describes repulsion between orbital densities. Exchange comes from antisymmetry and acts between same-spin occupations. It is a contribution to the energy expression, not an additional classical force exerted by electron spin.
Restricted Hartree–Fock, or RHF, pairs opposite spins in the same spatial orbital. Hydrogen has one such occupied orbital. Exchange cancels the unphysical interaction of an occupied spin orbital with itself, but the remaining two electrons still repel one another.
For a closed-shell density matrix P, construct the Fock matrix F by adding Coulomb and exchange terms to the one-electron matrix. Its coefficients define the effective one-electron problem. Because the atomic functions overlap, the orbital equation contains S on the right.
Begin with a trial density. Build the Fock matrix, solve for orbitals, occupy the lowest orbital and rebuild the density. Repeat until input and output agree. Damping an update can reduce oscillation. This experiment blends old and new orbital coefficients, then renormalizes the orbital with the overlap matrix. Each displayed density therefore remains a single-determinant density; the damping changes the numerical path, not the stationary equations.
Symmetry makes this particular minimal-basis molecule unusually simple: the bonding combination can already be fixed by symmetry. A symmetric starting density may settle almost immediately. A deliberately displaced starting density makes the numerical relaxation easier to see without adding a physical time dependence.
Fμν=hμν+λσ∑Pλσ[(μν∣λσ)−21(μλ∣νσ)]
This convention uses the total spatial density, with two electrons in each occupied restricted orbital.
FC=SCε,CTSC=I
The diagonal matrix of orbital energies is written as epsilon. The second relation normalizes and orthogonalizes the orbitals using the overlap.
The residual FPS−SPF vanishes when the occupied density and Fock operator are compatible. Its norm measures a failure of self-consistency. The experiment displays the root mean square of its four matrix entries, half the Frobenius norm in this two-by-two representation. Monitoring it together with density change and energy change is stronger than checking the last printed energy alone.
A tiny mixing step can make consecutive energies almost identical even when the density remains wrong. A converged stationary solution can also be an excited or unstable solution. Later we will find that a restricted stationary state can lose stability against spin-dependent orbital changes.
The iteration index counts numerical updates. Electrons do not literally spend time passing through these guessed densities. A cloud that changes during SCF is a view of an optimization procedure.
rSCF=21∥FPS−SPF∥F
The Frobenius norm is the square root of the sum of squared matrix entries. This residual is in hartree; its numerical value depends on the representation. The experiment stops below one billionth of a hartree.
For hydrogen RHF, let hgg be the one-electron energy in the occupied bonding orbital and Jgg=(gg∣gg) its Coulomb integral. Each occupied spin orbital feels the other electron, so its orbital energy is εg=hgg+Jgg. Adding two orbital energies counts the same pair interaction twice.
The correct electronic energy is 2hgg+Jgg. Add nuclear repulsion to obtain the molecular total. At R=1.4 bohr, the fixed STO-3G RHF total is approximately −1.116714325 hartree. FCI in the same basis is lower, approximately −1.137275944 hartree: self-consistency has optimized the determinant, but it has not included all two-electron correlation.
ERHF=21μν∑Pμν(hμν+Fμν)+R1
The factor of one half removes the duplicated interaction contribution while retaining the full one-electron energy.
ERHF=2εg−Jgg+R1
For this one-pair molecule, subtract one copy of the Coulomb integral from the orbital-energy sum.
Press “Replay iterations” to follow the saved initial guess toward the converged default. Compare energy change with the SCF residual.
Use another initial guess or orbital-damping setting in the advanced controls. Compare the final state and the number of updates.
Change the nuclear separation and explain which part of the Hamiltonian changed. Reset to return to the original geometry.
Exercises and explanations
For a hypothetical occupied orbital, hgg=−1.2 and Jgg=0.7 hartree. Find the orbital energy and total electronic energy.
Read the explanation
The orbital energy is −0.5 hartree. The electronic total is 2(−1.2)+0.7=−1.7 hartree, or 2(−0.5)−0.7. Nuclear repulsion still has to be added at the chosen separation.
Two iterations print the same rounded energy but a substantial residual. Has the SCF calculation converged?
Read the explanation
The displayed energy has insufficient resolution to establish convergence. Inspect the unrounded energy change, density change and residual. Small updates caused by strong mixing can conceal a density that still fails the stationary equations.
Would changing the orbital-damping setting change the physical ground-state energy?
Read the explanation
It should change the convergence path and speed. If both calculations find the same stationary solution to the same tolerance, their final energies agree. Different final states indicate incomplete convergence or different stationary solutions, which must be inspected.
Original generated data: H2/STO-3G method energies, forces and occupations; independent Psi4 checks; basis and DFT-grid checks; fixed-orbital fractional-spin data. The guide links scripts, raw outputs, runtime versions and data licenses.
Author tutorial: electronic Hamiltonian, variational principle, density matrices, SCF, basis convergence and spin-symmetry breaking. The browser calculation specializes these equations to two hydrogen STO-3G functions.
Theory and numerical methods sections: restricted and unrestricted references, generalized eigenproblem, total energy and convergence. The reproducible reference manifest records the installed version and settings.