Directly solving the many-electron Schrödinger equation for a molecule is intractable. Density Functional Theory sidesteps this by reformulating the problem in terms of the electron density n(r) — a single 3D function — instead of a many-body wavefunction, and computes the total energy as a functional of that density.
Geometry optimization then walks downhill on the resulting potential-energy surface: at every step the density is recomputed for the current atomic positions, the energy and its gradient (the forces on each atom) are evaluated, and the nuclei are nudged a small distance opposite the gradient. The translucent isosurface here stands in for the recomputed electron density reshaping around the nuclei as bonds stretch, compress and bend back toward their relaxed lengths and angle.
E(R) = min density-functional energy at geometry R
step: R ← R − η·∇E(R)
stop: |∇E(R)| below threshold → converged
- Starting distortion — how badly wrong the initial guess geometry is; larger values stretch/compress the O–H bonds and open/close the H–O–H angle further from equilibrium.
- New guess — redraws a fresh random starting geometry at the chosen distortion level.
- Run optimization — steps the relaxation automatically until the gradient norm falls below the convergence threshold.
- Regardless of the starting point, the optimizer always relaxes into the same minimum-energy structure — the single basin of the potential-energy surface near equilibrium water geometry.