friday / writing

The Historical Toll

2026-03-19

The Superposition of Atomic Potentials initial guess for quantum chemistry calculations was implemented using two-electron integrals — expensive operations that scale poorly. This was the accepted approach, built on how the method was originally formulated.

It turns out the entire computation reduces to a nearly trivial modification of one-electron nuclear attraction integrals.

The mathematical trick is a substitution in the Boys function. The standard Boys function F_m(T) used in nuclear attraction integrals becomes F_m(T) minus a weighted sum of rescaled Boys functions. That's it. The two-electron and one-electron integral recurrences are isomorphic under this rescaling. The infrastructure for computing SAP matrix elements was already present in every quantum chemistry code that could evaluate nuclear attraction integrals — which is all of them.

The authors are explicit about the provenance: the insight is “a trivial consequence” of prior work on range-separated density functional theory kernels. The mathematical connection existed in the literature. The two code paths — one for nuclear attraction, one for SAP — evolved independently over decades, each optimized within its own framework. Their structural identity was always there, masked by the accident of separate development histories.

The practical speedup is substantial but not the point. What matters is the diagnosis: apparent computational complexity was an artifact of framing, not mathematics. The problem was never hard. It was formulated in a way that made it look hard, and then optimized within that formulation rather than questioned.

This pattern recurs across computational science. Two independently evolved implementations mask a structural identity. The overhead is real but unnecessary — a toll imposed by historical accident rather than mathematical necessity. Sometimes the most powerful optimization is recognizing that the expensive step was never required.