Recursion strategies for Gaussian integrals: Obara-Saika and McMurchie-Davidson
Quantum Chemistry
Quantum chemistry on a Gaussian basis ends up computing 2-electron repulsion integrals over Cartesian-Gaussian primitives — billions of them per SCF cycle, for a real molecule. The Boys/Gaussian-product machinery handles the pure-s case (), but real basis sets have orbitals with polynomial prefactors that don't disappear under the Gaussian Product Theorem. The integrand becomes a (high-degree polynomial) times Gaussian, and direct algebraic expansion blows up combinatorially with angular momentum. You need a recurrence scheme.
Two recurrence schemes dominate the literature:
- Obara-Saika (Obara & Saika 1986) — recurse directly on the angular-momentum indices of the Cartesian Gaussians. Climb the angular-momentum ladder one unit at a time, with a recurrence whose terms are all lower-angular-momentum integrals (already computed). Base case is , the Boys-function auxiliary integral. Few auxiliary quantities, lots of recurrence steps, very direct.
- McMurchie-Davidson (McMurchie & Davidson 1978) — change basis to Hermite Gaussians on the product center, where the Coulomb integrals are diagonal. Two pre-computations: (a) Cartesian-to-Hermite expansion coefficients via a small recursion in , and (b) Hermite-integral auxiliaries via a Boys-function ladder. Contract the two to get the answer. More intermediate quantities, fewer ladder-rungs to climb, more parallelization-friendly.
Both compute the same integrals to machine precision via different intermediates. The Obara-Saika and McMurchie-Davidson pages each work through the same example — a integral on four distinct centers — and arrive at the same number () by recurrences that share no intermediate quantities. That's a clean cross-check.
Which to use
- Routine, low-angular-momentum integrals. Obara-Saika tends to be faster: fewer auxiliary quantities to build and store, recurrences with small fixed-size term lists. Most production codes use OS for the SCF inner loop of typical basis sets (cc-pVDZ scale).
- High angular momentum, mixed-derivative integrals. McMurchie-Davidson scales better: the ladder is computed once and reused for every Cartesian recombination on that shell pair, and Hermite intermediates handle derivatives cleanly. Used for shells, geometric derivatives, and relativistic-correction integrals.
- In practice modern codes mix. Pople-style specialized routines (PRISM, ERI engines like Libint and Libcint) switch strategy by shell type. Head-Gordon & Pople 1988 generalized OS with contraction-friendly tweaks; Lindh-Ryu-Liu 1991 introduced rys quadrature as a third option entirely. The two algorithms on this site are the two foundational ones — both still in active use and worth understanding cold before reading anything else in the literature.
How to read Helgaker
Helgaker, Jørgensen & Olsen's Molecular Electronic-Structure Theory chapter 9 is the canonical reference. It's also where most people drown — chapter 9 introduces both schemes in full multi-index recurrence generality without ever saying "these are two different ways of solving the same problem." The framing on these two sub-pages is the missing chapter zero. Read OS first (the recurrence is more direct), then MD (the basis change pays off when you see why), then go back to Helgaker. The dense notation collapses into "OS recurrence on " or "MD -table plus -table" and the chapter becomes navigable.
Related on this site
- Gaussian Product Theorem — the underlying identity that makes both recurrences start from a finite base case.
- Two-electron integrals (from scratch) — the full pipeline for the H₂ special case, where everything is and the machinery is invisible. The OS/MD pages are what kicks in past H₂.
- STO-nG fitting — why we have Gaussians to integrate in the first place.
References
- Obara, S. & Saika, A. (1986). Efficient recursive computation of molecular integrals over Cartesian Gaussian functions. J. Chem. Phys., 84, 3963.
- McMurchie, L. E. & Davidson, E. R. (1978). One- and two-electron integrals over Cartesian Gaussian functions. J. Comput. Phys., 26, 218.
- Helgaker, T., Jørgensen, P., Olsen, J. (2000). Molecular Electronic-Structure Theory, ch. 9. Wiley.
- Head-Gordon, M. & Pople, J. A. (1988). A method for two-electron Gaussian integral and integral derivative evaluation using recurrence relations. J. Chem. Phys., 89, 5777.