How Much of the Chemical Lagrangian Does QTAIM Here Cover?
The project aims to carry the quantum theory of atoms in molecules through every term of the chemical Lagrangian. Which pieces can be computed with the released library, which are studied on published pages, which have statements written in Lean, and which are not done?
Library version 1.7.1. The library column, the known issues and the audit marks are as of 5 December 2026; the list of pages and the Lean column are as written on 4 December 2026.
1. The Words Used Here
The quantum theory of atoms in molecules (QTAIM, Bader 1990) works with the electron density ρ. Its critical points are the places where the gradient ∇ρ vanishes. An atom is a region Ω of space whose boundary no gradient line of ρ crosses, so that ∇ρ · n = 0 on it, where n is the normal to the boundary. Properties of the atom are integrals over Ω, such as its electron count N(Ω).
A Lagrangian density is an energy per unit volume from which equations of motion follow by requiring the action to be stationary. The starting point, written , has clamped point nuclei, nonrelativistic electrons and no external field: the Born–Oppenheimer setting. The chemical Lagrangian density adds the terms that this leaves out: electrons described by four-component Dirac fields restricted to positive-energy states; the electromagnetic field, static, time-dependent or quantized, with the Breit interaction at second order in 1/c; and nuclei with mass, charge, spin, size and moments. See the chemical Lagrangian step by step and what lies outside it, which places the weak interaction, pair creation, general radiative corrections and gravity outside. Radiative corrections therefore appear in the table only beside quantized light, as an extension with a stated route in.
Two such integrals recur below: G(Ω) and K(Ω), two forms of the kinetic energy of an atom. For real orbitals ψ with occupations n their densities are one half of the sum of n |∇ψ|² and minus one half of the sum of n ψ ∇²ψ. The integral L(Ω) = K(Ω) − G(Ω) vanishes for an exact zero-flux atom.
2. How to Read the Table
- Released library: the C library as tagged for version 1.7.1 (commit
ba9399b). The entries come from reading its public header, source and tests; where an entry rests on running the library, small programs were run against a build of the tag, not its test suite. An AI reviewer agent reviewed the library column and the known issues of this edition independently on 5 December 2026 and re-ran its new runs. The words used are: included, with limits; partial; one model system (or model system only); interface only (names exist, the quantity is not computed); not included; excluded by choice. Work that has not been released is not counted. - Published pages: reviewed pages of this site, and the Ladder overview, which carries a correction notice. They are mostly computed by a separate research code, so a page is not evidence that the library can do the same. The list of pages and their notes are those of 4 December 2026; a mark shows a page that carries a public notice of problems found by an audit, as of 5 December 2026.
- Lean: Lean is a proof assistant, in which mathematical statements and arguments are checked by machine. Statements bearing on many rows have been written. This column was written on 4 December 2026, when all of them were proposed and the maintainer had approved none, including the 15 marked as headline statements; it has not been brought up to date. Under the project's standard a proposed statement may not be cited as established. Apart from that standard, the Lean files are not yet in the public repository. A statement about mathematics says nothing about a computed number or about the C program.
- Not done: the main gap in that row, not an exhaustive list.
3. Why There Is No Percentage
The page gives no percentage and no overall score. The rows have no common unit: “critical points” and “quantized photons” are not equal shares of anything, and splitting a row in two would change any count. A term can be present for one two-nucleus ion and absent for every other molecule. A reviewed page, a released routine and a proposed statement are different kinds of evidence and cannot be added. Terms also combine, such as a magnetic field acting on Dirac electrons with moving nuclei, and having each separately does not give the combination. Finally, parts of the theory, such as the boundary of a Dirac atom, are open questions whose size is not known.
4. Born–Oppenheimer QTAIM, Quantity by Quantity
Fixed nuclei, nonrelativistic electrons, no external field. Solids and the two electron-sharing indices are listed here too.
| Piece | Released Library 1.7.1 | Published Pages | Lean, 4 December 2026 | Not Done |
|---|---|---|---|---|
| The Density and Its Derivativesρ and its derivatives, from a stored wavefunction | Included, with limits Loaders for .wfn, wider free-form .wfn and .wfx files, an in-memory constructor, and a geometry-only Hartree–Fock solver. Density, gradient, Hessian, Laplacian and electric field evaluated analytically. Its own Gaussian integrals, tested against stored reference data from the libcint library. Four-component and incomplete files are refused or withheld, and the in-memory constructor refuses occupied functions of angular momentum above 6; the loader limits that remain are among the known issues below. |
| Statements proposed, none approved. Formulas for some Gaussian integrals and a few bounds used in evaluating them. They are about the mathematics, not about the C program or its rounding. | Recognising a file cut exactly between blocks, and reading densities stored as non-orthonormal rows. |
| Critical Points and Bond Pathspoints where ∇ρ = 0, their types, and the paths of ascent that link nuclei | Included, with limits A sampled search by Newton’s method from seeds taken from the geometry, from points already found and from a fixed quasi-random sequence in a box about the nuclei, and a bond-path tracer; one interface reports status flags. On the release’s own lithium hydride test wavefunction it finds the four points beyond lithium on the axis that version 1.6.0 missed. It can still miss points, and n − b + r − c = 1 does not show that the list is complete. The test reported with each point samples a small box and is not a proof. The search costs much more computer time than in 1.6.0. |
| Statements proposed, none approved. The type of a critical point under changes of coordinates; the counting relation for smooth functions under stated conditions, which exclude the cusps at point nuclei; conditional statements about bond paths along a line and about critical points forced by symmetry; an interval test for model sums of Gaussians, which are not molecular wavefunctions; an example showing that a test at sampled points does not show that a zero exists. | A guarantee of completeness for molecular densities. |
| Interatomic Surfaces, Atomic Basins and Populationsthe zero-flux surfaces ∇ρ · n = 0, the regions Ω they bound, and the electron count N(Ω) of each | Included, with limits Basins around nuclei, and of any listed maximum of the density, nuclear or not, integrated along rays with adaptive refinement; one routine also solves for a patch of a surface between two atoms, and refuses a pair whose bond path does not join the two. No symmetry is used for molecules: every atom is integrated. A test compares the populations of formaldehyde with stored values from the independent program critic2. That is the only comparison with another QTAIM program in the release’s tests; none compares with Multiwfn. Two helium atoms 34 bohr apart, counted twice by 1.6.0, integrate to 2 electrons each. The whole-molecule calls report when a basin misses its tolerance, but a population can still miss the requested accuracy while convergence is reported. In a full-CI lithium hydride calculation, where reviewing the first edition of this page found 1.6.0 reporting convergence with the populations 4.7 × 10⁻⁴ short of 4, the default call of 1.7.1 gives a sum within 1.1 × 10⁻⁵ of 4. |
| Statements proposed, none approved. Flux and variation identities on boxes, also carried by smooth maps, which give integrals over the image only if the map is one to one and keeps orientation; conditions under which the basins of a smooth function cover almost all space, not shown to hold for any molecular density. No atomic basin of a molecule is constructed. | Error bounds for the populations: the estimates are differences of successive rules. |
| Dipoles, Volumes and Higher Multipolesmoments of the density inside one atom | Partial The atomic dipole moment and the volume inside the 0.001 atomic unit density contour. No quadrupole or higher moments and no other atomic averages. |
| Statements proposed, none approved. Only the additivity over atoms of an integrable quantity, assuming that the atoms cover space. | Higher moments and further atomic properties. |
| Kinetic Energies, the Atomic Lagrangian and the Virial EnergyG(Ω), K(Ω), the integral L(Ω) = K(Ω) − G(Ω), and an atomic energy from the virial theorem | Included, with limits G, K and L(Ω) are returned as computed. The virial energy returned is −G(Ω), an estimate that applies at an equilibrium geometry with an accurate virial ratio. L(Ω) and the volumes have no error control of their own. |
| Statements proposed, none approved. K − G = −¼∇²ρ for real and for complex orbitals; a vanishing regional Lagrangian and a regional virial relation for boxes carried by smooth maps with zero flux, which are integrals over the image only if the map is one to one and keeps orientation. These exclude point nuclei; a separate identity treats the flux of the hydrogen 1s density on a box around its nucleus. | The virial theorem for an actual atomic basin of a molecule, among the Lean statements. |
| Interaction Energies (IQA)interacting quantum atoms (IQA): the total energy divided into atomic and pairwise terms, here the potential energy assigned to each atom | Partial A potential energy and a total for each basin; no pairwise terms are returned, and the field for the flux between atoms (dV_surf) is always zero. Open shells use exchange per spin; where the data do not fix the pair density, as for fractional occupations or an open-shell .wfn file, the request is refused. The default calls converge each atomic energy to 3 millihartree; the single-atom call takes a tighter tolerance. Tests on water and lithium hydride at the Hartree–Fock level compare the sum over atoms with the self-consistent energy to 3 millihartree, and others cover H₂⁺ and open-shell helium and H₂. A correlated pair density can be attached; no test in the release compares the resulting atomic sum with a correlated total energy. In a full-CI lithium hydride calculation run for this edition (6-31G, 3.015 bohr), interaction energies were refused without the pair density; with it attached, the default call returned a sum 0.64 millihartree below the full-CI energy. |
| Statements proposed, none approved. Divergence-theorem identities on boxes with a box removed, and integral formulas. No statement of an atomic energy partition. | Pairwise terms. Tests with correlated wavefunctions. |
| Local Force, Stress and Atomic Forcesthe Ehrenfest force on the electrons of an atom and the stress that carries it | Not included No routine returns an atomic force or a quantum stress tensor. The electric field of the molecule can be evaluated, also with one nucleus left out, but no routine integrates it into a force. |
| Statements proposed, none approved. Local force and virial identities for one particle with smooth functions; momentum and energy balances of classical electromagnetic fields on boxes; force, momentum and spin balances for a single Dirac field with classical fields, without a projector or point nuclei. No atomic force on an atom of a molecule. | Atomic forces and stress in the library. |
| Localization and Delocalization Indicesλ(A), how many electrons stay in atom A, and δ(A,B), how many are shared with atom B | Interface only Not computed. The result fields exist: the localization field returns the atom's population (zero for a one-electron system, where the exact value is the square of the population), and the array for shared pairs is filled with zeros. Do not use either (known issues below). |
| Statements proposed, none approved. Sum rules for the indices over any partition of space, the formula for a single determinant, and an example state with a negative delocalization index. | The indices themselves in a release. |
| Solidsperiodic densities, critical points on the repeating cell, atoms in crystals | Model system only Two built-in model densities, shaped as body-centred cubic lithium and rock-salt lithium hydride, with exponents and on-site energies set by hand: their numbers describe the models, not those materials. The critical points are counted from a prepared list of positions, used only where the cubic symmetry holds. Cells too small for the models’ lattice sums, and flat or one-dimensional lattices, are refused, but the constructor that accepts any atoms and lattice still returns one of the two models, ignoring charges, positions and shape. Large rock-salt cells give wrong populations (known issues below). No periodic wavefunction file is read, and there are no interaction energies. |
| Statements proposed, none approved. The counting relation for a smooth periodic function whose critical points are all listed. | Reading and analysing computed periodic wavefunctions. |
5. The Terms Beyond It
Each further piece of the chemical Lagrangian.
| Piece | Released Library 1.7.1 | Published Pages | Lean, 4 December 2026 | Not Done |
|---|---|---|---|---|
| Four-Component Dirac Electronsspinor wavefunctions and the atoms of a relativistic electron | Not included No spinor analysis. A four-component file is refused; two-component spinor files load for the density and the kinetic energy. One routine rewrites a single supplied spinor value in polar form. The in-memory constructor takes spinor components as separate real rows, for which a test checks only that interaction energies are refused; the kinetic energies computed from such rows use the Schrödinger formulas. The H₂⁺ and HD⁺ model adds the leading relativistic energy corrections (mass–velocity and Darwin), which are not a Dirac calculation. |
| Statements proposed, none approved. The first-order Lagrangian vanishes on solutions, so it singles out no region; current conservation; further identities of the Dirac equation; conditions on a general rule for choosing atoms, and a statement that a pointwise zero-flux condition passes to a limit of gradients, which involves no surface. Which surface bounds a Dirac atom is open theory. | Spinor wavefunctions and Dirac atoms in a release (unreleased, unreviewed work exists). |
| Static Electric Fieldsatoms of a molecule polarized by a constant field | One model system Only in a model of the ions H₂⁺ and HD⁺ with its own basis: fields along or across the bond. No atomic populations are returned when both are present, and no bond-point values or atomic energies with a field across the bond. A wavefunction computed in a field by another program can be loaded and its density analysed, but no energy then contains the field. For general molecules, field values stored in a .wfx file are read and then used by no calculation. Since version 1.6.0 the model integrates both atoms on the zero-flux surface. The ladder page carries a correction notice for the model's atomic quantities, which has not been withdrawn. |
| Statements proposed, none approved. Balances for classical fields on boxes and an identity of the Dirac equation in static fields. Nothing about the response of an atom. | Field-dressed atomic properties for general wavefunctions. |
| Magnetic Fields, Vector Potential, Currents and Gaugea vector potential A, the current density it drives, and independence of the choice of gauge | One model system No complex wavefunctions with a vector potential and no current density. The H₂⁺ and HD⁺ model has a static axial field with some response coefficients; its source marks several coefficients as having no cited derivation, and returns no value where it cannot partition a term. Another routine does pointwise algebra on field values supplied by the caller. |
| Statements proposed, none approved. Gauge invariance of G and K, gauge covariance of the Dirac equation. No magnetic response and no atomic current. | Vector potentials, currents and magnetic atomic properties for general molecules. |
| Time Dependence and Spacetimemoving densities, moving surfaces, critical points in space and time | One model system Outside the model, one routine classifies a 4 × 4 matrix of second derivatives supplied by the caller. That routine reports an eigenvalue it cannot tell from zero, a decision without error bounds. No time-dependent wavefunctions, propagation or moving surfaces. The H₂⁺ and HD⁺ model gives some response at one frequency. |
| Statements proposed, none approved. Transport and balance theorems for integrals written on boxes carried by moving smooth maps, which equal integrals over the moving image only if the map is one to one with a non-negative Jacobian; charge balance of a Dirac field on a box; and the time-dependent squared Dirac equation. | Time-dependent analysis of general wavefunctions. |
| The Breit Interactionthe magnetic and retardation corrections to the repulsion between charges, to second order in 1/c | Not included No Breit interaction between electrons, nor its magnetic part alone (the Gaunt term). The one-electron H₂⁺ and HD⁺ model contains relativistic corrections of its own from the expansion in 1/c (the Breit–Pauli form). |
| None. Several integral statements say that they do not cover Gaunt or Breit terms. | Breit interaction for many electrons and its atomic partition. |
| Many Relativistic Electrons and the Positive-Energy Projectorseveral Dirac electrons need a rule, a projector, that excludes negative-energy states, and the atoms depend on how it is chosen | Not included No projector. The interface has flags by which an external plug-in can label its data relativistic, and a smooth boundary weight that a header comment calls a Furry POVM skin; no routine applies a projector to a wavefunction. |
| None about a projector. The Dirac force and stress statements treat a single field without one. | The theory of the projector for open atoms, then code. |
| Quantum Nuclei and Nuclear Structurenuclei that move as quantum particles, their size and their magnetic and quadrupole moments | One model system Only the H₂⁺ and HD⁺ model, which has mass, size and moment terms. It returns no value for the first energy correction for nuclear motion (the diagonal Born–Oppenheimer correction), and none for HD⁺ quantities that depend on the density when the three-body treatment of the nuclei is requested. General wavefunctions have fixed nuclei. |
| None. | Quantum nuclei beyond the two-nucleus hydrogen ions. |
| Quantized Photons and Radiative Termsa quantized light mode in a cavity, and corrections from quantum electrodynamics | One model system Only in the H₂⁺ and HD⁺ model: a small matrix model of one cavity mode, and one leading radiative contact term for fixed nuclei, accepted up to a bond length of 7 bohr. Recoil at the same order and all higher orders are omitted. This is not complete radiative quantum electrodynamics. |
| None. The electromagnetic statements are classical. | Quantized fields for general molecules, with stated modes and cutoff; further radiative terms. |
| The Weak Interactionthe force that distinguishes mirror-image molecules very slightly | Excluded by choice Not included, deliberately: it lies outside the chemical Lagrangian as defined here. |
| None. | Not planned within this scope. |
6. Known Issues in Version 1.7.1
The first 15 are the open items of the README at tag v1.7.1 (its lists for 1.7.1 and for 1.7.0, without the symmetry fault that 1.7.1 removes), copied with their sub-lists run together and one ratio left out. The last 6 summarise further limits given in the release notes of 1.7.1 on GitHub, some of them added there after the release.
- A ray that changes owner on the order of a hundred times fills its list of 2048 points before the changes are ascended again, and its crossings stay between owners of the coarser points. Along a chain of 150 helium-like atoms (one s Gaussian of exponent 6 each) 1 bohr apart,
qtaim_ray_basin_integralsfrom the first atom returnsQTAIM_OKwith N = 0.1343 per steradian along the axis, against 0.1519 at 0.01 rad from it (1.7.0: 0.1519 along the axis). The adaptive integrators count such a ray inn_unconverged_panelsand reportconverged= 0. New in 1.7.1. - Rock-salt LiH above a = 22/√3 = 12.70 bohr: the lattice sums keep the vectors within 22 bohr of the origin once the point is folded into the primitive cell, which drops hydrogen images that the density needs at the far corner of the cell, and basin populations are wrong with
QTAIM_OK(a = 13, automatic grid: N(H) 1.23 withQTAIM_SYM_MAXIMALand 1.91 withQTAIM_SYM_C1, against 1.998 with the sums taken to 36 bohr), as in 1.6.0 and 1.7.0. qtaim_crystal_torus_topologyon large cells returnsQTAIM_OKwith counts whose Euler characteristic n − b + r − c is not the 0 of a periodic density: BCC Li at every constant tried from 25.5 bohr (25.5 to 30, 40 and 50 bohr: −24 to 26) and rock-salt LiH at 18 to 25, 30 and 40 bohr (−2 to 28), on the 3 × 3 × 3 and the automatic grids. 1.7.0 gives the same counts. With the sums taken to 36 bohr, rock salt at 18 to 25 bohr and BCC at 25.5 to 28 bohr give 0, and BCC from 28.5 bohr does not.qtaim_crystal_from_cavemanignores the atoms you give it: with one atom it returns the built-in lithium model and otherwise the built-in lithium hydride model, using only the cell volume. Do not use it for any other crystal.- Localization and delocalization indices are not computed:
lambda_locreturns the atom's electron population (zero for a one-electron system) anddelta_pair_outis returned as all zeros. Do not read either as a result. dV_surfis returned as zero and is not a result.- The critical-point search is sampled and can miss points, and n − b + r − c does not always show it.
- Basin populations can miss the requested tolerance although the report says converged. The error estimates are differences of successive rules, not bounds. Check the sum of the populations and each atom's L, and tighten
tol_N.max_raysdoes not limit the first mesh; L(Ω) and volumes have no error control; a single ray near tangency can be wrong by up to 4e-4 electron per steradian;convergeddoes not cover radial panels accepted at the bisection limit. Seeinclude/QTAIM.h. - A small basin of a non-nuclear maximum can still be too large and reported converged (variants of a three-Gaussian model; the reference is an independent integration): the capture check is sampled and can miss a saddle in
qtaim_integrate_atom_adaptive(whose check the whole-molecule calls share) andqtaim_integrate_attractor_basin: saddles 0.036 bohr from the maximum, off every sample direction: 0.010067 against 0.009175 electron (estimate 5.6e-6);qtaim_integrate_density_basinsgave 0.009188; very near a bifurcation, saddles 0.0036 bohr from the maximum:qtaim_integrate_attractor_basingave 0.003389 against 0.003178; saddles 0.0011 bohr from the maximum:qtaim_integrate_attractor_basinandqtaim_integrate_density_basinsgave 0.002296 against 0.001005 (2.3 times), and about the same at ten times the length scale. The cause of the last two is not established. - Found with model densities: nuclei closer than 0.3 bohr (muonic or other exotic cases) give wrong basins reported as converged, with closure errors up to 0.89 electron; the search missed smooth bond points of density 1e-8 to 2e-5 in several random Gaussian models, in some cases with success and no warning flag. Cusps of point-nucleus Slater densities are never listed (the sum flags it).
- A self-consistent
.wfxthat stores a density as non-orthonormal rows is refused. In a.wfn, the mark of an unavailable pair density followsEND DATAand is lost if the file is cut there. - A
.wfxor.wfnwithout the optional end markers that is cut exactly between blocks cannot be recognised. - With a spin-free X2C file,
GandE_IQAuse non-relativistic operators. - The Wolfram native reference has no critical-point search.
- macOS: a library built with a libomp other than Wolfram's (MacPorts, for instance) aborts the Wolfram kernel (
OMP: Error #15), also in 1.6.0. For use from Wolfram build with-DQTAIM_ENABLE_OPENMP=OFFor link to the libomp that Wolfram ships. A default Apple clang configuration does not find OpenMP and builds without it. - Only changes of owner that the samples along a ray show are ascended again at the fine tolerance, so a wrong sample that hides a change stays: against every sample at the fine tolerance, N(H) of LiH (RHF/def2-TZVP) differs by 2e-6.
- A nucleus holding no electron can still carry a density maximum made of rounding noise, which becomes that atom’s attractor. The zero-flux surface, and with it both atoms’
V_IQAandE_IQA, then depend on the noise (by about 2e-3 hartree in one case and 4e-4 in another); their sum, N, L(Ω) and the sum of N(Ω) minus N do not. - On a diffuse basis the density can have weak maxima beyond a zero of an orbital far out (about 5.5e-10 for H₂⁺ in aug-cc-pVQZ). At the default floor of 1e-10 the region at or above the floor falls into three pieces, so n − b + r − c is 3, which is right for them;
qtaim_search_critical_pointsreports status -6. Withrho_floor= 1e-9 the search returns the two nuclear maxima and the bond point. - In the native Wolfram reference,
qtaimEvalAOJetandqtaimEvalDensityBatchaccept derivative orders of 3 and higher and silently return second-order results. The Wolfram callqtaimCCrystalAudittakes a default lattice constant that is now refused for rock-salt lithium hydride. - Built with Intel
icxat its default floating-point model, density values depend on the derivative order requested; compile with-fp-model=precise. CONVENTIONS.mdhas two documentation errors: the unit given for the magnetic induction beside the minimal coupling, and derivative orders 0 to 3 where the library computes 0 to 2.
The table adds further limits, among them: the test reported with each critical point is sampled; the default atomic interaction energies are converged only to 3 millihartree per atom; and a correlated wavefunction has interaction energies only once its pair density is attached.
7. What Comes Next
The intended order is below. These are plans, not promises, and no dates are attached.
- Further Repairs. The known issues above, among them a critical-point search that is still incomplete.
- Indices and Atomic Properties. Localization and delocalization indices, and a wider set of atomic properties.
- Spinors. Review of four-component wavefunction support before any of it is released.
- Currents and Magnetic Fields. Vector potentials, current densities and magnetic atomic properties; static fields first, then time-dependent classical fields, then quantized ones.
- The Relativistic Projector Question. Which positive-energy projector to use for many Dirac electrons, and what it means for an open atom.
- Quantum Nuclei. Beyond the molecular hydrogen ions with two nuclei, H₂⁺ and its isotopes.
This page is to be updated as pieces land, with a new date and version.
- R. F. W. Bader, Atoms in Molecules: A Quantum Theory (Oxford University Press, 1990).
- Library: source repository, tag
v1.7.1:include/QTAIM.h,src/,tests/. - Release notes of version 1.7.1: on GitHub.