Build your own SCF
Quantum Chemistry
Below is the complete output of a converged Hartree-Fock calculation on H₂ — the same one the live wasm SCF on this site produces, the same numbers the course's lessons keep quoting. Your assignment, in six projects: rebuild this output, line by line, in a live Python editor, until your own code prints the final answer.
S: [[1, 0.659318], [0.659318, 1]] project 2 → T: [[0.760032, 0.236455], [0.236455, 0.760032]] project 3 → V: [[-1.88044, -1.19483], [-1.19483, -1.88044]] project 3 → H_core: [[-1.12041, -0.95838], [-0.95838, -1.12041]] project 3 → eri: [0.774606, 0.444108, ..., 0.297029, ..., 0.774606] project 4 → X: [[1.24479, -0.468479], [-0.468479, 1.24479]] project 5 → E_nuc: 0.714286 project 6 → iter: 0 E_total: -1.79131 delta: 0.602657 project 6 → iter: 1 E_total: -1.11671 delta: 4.4e-16 project 6 → E_total: -1.11671 project 6 → Each project is a function or two. Tests check your numbers against the run; passing unlocks a short quiz that asks you to explain what your code is doing, because running code is not the same as understanding it. Every starter ships the previous milestones as a toolkit, so a rough patch never blocks the path.
- 1 The Boys function rebuilds the number inside every Coulomb line: F₀(1) = 0.746824
- 2 Overlap rebuilds the S line
- 3 The core Hamiltonian rebuilds the T, V, and H_core lines
- 4 Electron repulsion rebuilds the eri line
- 5 Orthogonalization rebuilds the X line
- 6 The SCF loop rebuilds the iterations — and the final answer
Beyond the run
The output above is mean-field, fixed-geometry, one molecule. Three more projects go where it never went: past Hartree-Fock, off the fixed bond length, and onto the textbook's own test molecule — with Szabo & Ostlund's published tables as the answer key.
- 7 MP2: buying back correlation E₂ = −0.013158 — below the run’s final answer
- 8 The dissociation curve E(6.0) = −0.645 vs two atoms at −0.933: RHF caught failing
- 9 HeH⁺: the transfer test E = −2.8607 — Szabo & Ostlund’s own table
- 10 UHF: fixing the curve E(6.0) = −0.9332 ≈ two atoms — at the price ⟨S²⟩ → 1
- 11 Charges & dipole q_He = +0.47, μ = 0.889 a.u. — properties, finally
Lineage: the discipline of a checkable milestone after every function is borrowed, with admiration, from the Crawford group's quantum chemistry programming projects. The rebuild-the-run framing, in-browser execution against this site's own artifact, and the explain-your-code gates are this course's additions.