Topological analysis theory: QTAIM & ELF#

The population-analysis chapter derived a family of ways to divide the density among atoms — every one of them a partitioning choice. This chapter instead studies the electron density (and closely related scalar fields) directly, as a genuine mathematical object with its own critical points, basins, and localization structure — extracting chemical meaning (bonds, lone pairs, rings, cages) from the topology of \(\rho(\mathbf r)\) itself, with no partitioning decision to make at all. This is Bader’s Quantum Theory of Atoms in Molecules (QTAIM) and Becke-Edgecombe’s Electron Localization Function (ELF), grounded directly in crates/qc-prop/src/{qtaim,basin,realspace}.rs.

QTAIM: the density as a topological object#

The electron density is a smooth, everywhere-defined scalar field with a single, chemically decisive structural fact: it has local maxima almost exactly at every nucleus (the nuclear cusp), and saddle points connecting pairs of those maxima along what turns out to be exactly the chemical bond paths a structural chemist would draw by hand. QTAIM makes this rigorous by studying \(\nabla\rho\)’s critical points — points where \(\nabla\rho=\mathbf 0\) — and classifying each by the eigenvalue signature of the density Hessian there.

Classifying critical points by curvature signature#

At a critical point, the (real, symmetric) Hessian of \(\rho\) has three real eigenvalues; every chemically meaningful critical point is nondegenerate (all three eigenvalues nonzero — a genuine local extremum or saddle, not a flat/degenerate direction), and its type is decided purely by how many of the three eigenvalues are negative:

Signature \((3,\sigma)\)

Negative eigenvalues

Type

Chemical meaning

\((3,-3)\)

3

Nuclear (NCP)

a density maximum — sits on (almost exactly) a nucleus

\((3,-1)\)

2

Bond (BCP)

a saddle between two bonded atoms — density decreasing in the two directions perpendicular to the bond, increasing along it

\((3,+1)\)

1

Ring (RCP)

the density minimum within a ring of bonds

\((3,+3)\)

0

Cage (CCP)

a genuine local density minimum, enclosed by rings

\(\sigma\) (the trace’s sign count: \(+1\) per positive eigenvalue, \(-1\) per negative) together with the rank (always 3 for these nondegenerate types) is the traditional \((3,\sigma)\) notation; a Bond CP’s defining property — two negative curvatures perpendicular to the bond path and one positive curvature along it — is precisely the mathematical statement “this is a mountain pass between two peaks,” which is exactly the topological signature of a genuine chemical bond in this framework, not merely a suggestive analogy.

The Poincaré-Hopf invariant: a free, whole-molecule consistency check#

A remarkable topological fact ties every critical point count together for a complete, isolated molecular system, independent of which molecule it is:

\[ n_{\text{NCP}} - n_{\text{BCP}} + n_{\text{RCP}} - n_{\text{CCP}} = 1. \]

This is the Poincaré-Hopf index theorem applied to the density’s gradient vector field, and it holds for any correctly and completely characterized molecular topology — water’s 3 nuclear + 2 bond + 0 ring + 0 cage critical points give \(3-2+0-0=1\); benzene’s 12 nuclear + 12 bond + 1 ring + 0 cage give \(12-12+1-0=1\); a tetrahedral \(P_4\) cage’s 4 nuclear + 6 bond + 4 ring + 1 cage give \(4-6+4-1=1\). Any other value means a critical point was missed (an expected bond or ring point the search failed to locate) or a spurious one was found — this identity is therefore a genuinely free correctness check on a numerical critical-point search, needing no reference calculation to compare against, only internal consistency.

Bond-critical-point energetics: the local virial theorem#

A bond critical point’s position and density value alone already carry qualitative information, but Bader’s local virial theorem extracts genuine energy densities at that single point, turning a purely topological classification into an energetic one. The theorem relates the density’s Laplacian to the local kinetic and potential energy densities:

\[ \tfrac14\nabla^2\rho = 2G+V, \qquad G(\mathbf r) = \tfrac12\sum_{\mu\nu}D_{\mu\nu}\nabla\varphi_\mu\cdot \nabla\varphi_\nu\ (\ge0), \]

with \(G\) the (always positive) Lagrangian kinetic energy density. This one relation, together with the already-known \(\rho\), \(\nabla^2\rho\), and \(G\) at the critical point, is enough to solve directly for the potential energy density and the total local energy density:

\[ V = \tfrac14\nabla^2\rho - 2G\ (\le0\text{ in bonding regions}), \qquad H = G+V = \tfrac14\nabla^2\rho - G. \]

Two dimensionless ratios built from these classify the bond’s character directly from local energetics rather than from the Hessian signature alone: the bond-character ratio \(|V|/G\) (empirically, \(>2\) signals a covalent/shared-shell interaction, \(<1\) a closed-shell/ionic-or-van-der-Waals one, with a partially-covalent regime in between) and the bond degree \(H/\rho\) (negative for covalent bonds — the total local energy density is stabilizing — positive for closed-shell interactions).

Verified example — water’s full QTAIM topology, computed and classified automatically:

import qc
water = "O 0 0 0.117; H 0 0.757 -0.469; H 0 -0.757 -0.469"
m = qc.chk.new(atom=water, ao="def2-svp", unit="angstrom").scf(ref="r").run()

topo = m.prop.qtaim.topology()
topo["counts"]          # {'nuclear': 3, 'bond': 2, 'ring': 0, 'cage': 0}
topo["poincare_hopf"]    # {'sum': 1, 'holds': True}

bcp = topo["critical_points"][3]   # one O-H bond critical point
bcp["rho"], bcp["laplacian"]        # (0.3659441002679062, -2.5397077300947384)
bcp["v_over_g"], bcp["h_over_rho"]  # (11.152930010504011, -1.9245989766373959)

Both O–H bond CPs (which are, by the molecule’s \(C_{2v}\) symmetry, equivalent) give \(|V|/G\approx11.2\gg2\) and \(H/\rho\approx-1.92<0\) — an unambiguous covalent classification, exactly as chemical intuition demands for an O–H single bond, but now derived from a rigorous local-energy-density calculation at a single, mathematically well-defined point rather than from any partitioning scheme.

Bond ellipticity#

The two negative eigenvalues at a bond CP (\(\lambda_1,\lambda_2\), with \(|\lambda_1|\ge|\lambda_2|\) by convention) need not be equal in magnitude — real bonds are not perfectly cylindrically symmetric — and their ratio defines the bond ellipticity,

\[ \varepsilon = \frac{\lambda_1}{\lambda_2} - 1, \]

which measures how much more the density is depleted in one perpendicular direction than the other. A perfectly cylindrical bond (a genuine single bond, or a triple bond with full axial symmetry) has \(\varepsilon\approx0\); a double bond with a preferential \(\pi\)-accumulation direction shows a measurably larger ellipticity. The water O–H bond CP above has \(\varepsilon\approx0.024\) — small, consistent with an ordinary, close-to-cylindrical single bond with no special \(\pi\) character.

Basin integration: Bader charges from the density’s own watershed#

The critical points alone classify bonds; basin integration goes further, using the topology to partition all of space without any external reference density (unlike every scheme in the population-analysis chapter) — each atomic nucleus is an attractor of \(\nabla\rho\)’s gradient flow, and its basin \(\Omega_A\) is the set of every point whose steepest-ascent path in \(\rho\) terminates there. The basins are bounded by zero-flux surfaces (\(\nabla\rho(\mathbf r)\cdot\hat{\mathbf n}(\mathbf r)=0\) for every point \(\mathbf r\) on the surface) — surfaces the gradient field never crosses, which is exactly what makes the resulting atomic populations \(N_A=\int_{\Omega_A}\rho\,d\mathbf r\) a genuine, unambiguous partition of the total electron count, with no smooth weight function and no arbitrary reference density anywhere. Numerically, on a cubic real-space grid, qc-rs assigns every grid point to a basin by on-grid steepest ascent (a Henkelman-style algorithm): walk from each point toward its distance-weighted, density-increasing neighbor until a local maximum (a nucleus) is reached, with path compression so repeated walks from nearby points are cheap.

Verified example — water’s Bader (basin-integrated) atomic populations and charges:

b = m.prop.qtaim.basin_integrate()
b["atoms"]
# O: 9.2826916251811 electrons -> q = 8 - 9.283 = -1.283
# H: 0.37835478988956356       -> q = 1 - 0.378 = +0.622
# H: 0.3626332357145994        -> q = 1 - 0.363 = +0.637

Bader charges here (\(q_O\approx-1.28\)) are noticeably larger in magnitude than every scheme derived in the population-analysis chapter — even NPA/MBIS/Hirshfeld-I’s \(\sim-0.87\) to \(-0.92\). This is not a bug or an outlier: QTAIM’s zero-flux partitioning genuinely divides space by a different, topology-driven criterion than any stockholder-weight or AO-index scheme, and (as that chapter’s own closing point emphasized) there is no single “true” atomic charge to converge toward — QTAIM is simply one more, independently well-motivated definition, not a more-correct version of the others.