Two-Electron Integrals

Electron repulsion integrals (ERIs) are the computational bottleneck of Hartree–Fock and post-Hartree–Fock calculations:

Permutational Symmetry

ERIs have 8-fold permutational symmetry:

Only unique ERIs are stored and computed. This reduces storage and computation by a factor of 8.

ERI Engine Selection

OpenQuantum provides multiple ERI algorithms, selectable via the INT section:

INT
  Eri  auto  # auto, md, sp, rys
END
EngineKeyBest ForNotes
McMurchie–DavidsonmdAll systems (default)Universal, correct for all angular momenta
SP Fast Pathssp / spfastOrganic (H,C,N,O,F)10× speedup for S/P shells
Rys Quadraturerys / rysquadratureTransition metals, D/F+Rys-first with MD fallback
AutoautoGeneral useFast SP + Rys routing, MD fallback

The selected engine applies to all ERI computation paths:

  • In-core integral build
  • Direct SCF
  • Analytical nuclear gradients
  • Fully analytical Hessians
  • Semi-analytical (FD) Hessians

McMurchie–Davidson Algorithm

The MD algorithm uses Hermite Gaussian intermediates and is universal for all angular momenta. It builds ERIs by:

  1. Computing Hermite integrals over Gaussian primitives
  2. Contracting to shell-pair level
  3. Applying permutational symmetry

Complexity scales as for maximum angular momentum .

SP Fast Paths

For S and P shells (angular momentum ), analytical formulas give exact ERIs with far fewer operations. These are ~10× faster than MD for organic molecules. For higher angular momentum shells, MD is used as fallback.

Rys Quadrature

Rys quadrature is a numerical integration method that becomes competitive for D/F+ shells. OpenQuantum implements the Phenix-style Rys algorithm with precomputed roots and weights. MD is used as fallback when the Rys path is unavailable.

Schwarz Screening

For direct SCF and large systems, ERIs are pre-screened using the Cauchy–Schwarz inequality:

Only ERIs above the threshold Acc2E (default 10⁻¹²) are computed. This dramatically reduces the number of ERIs for large systems.