Skip to content

Releases

libqtaim 1.7.1

Choose a tag to compare

@ecbrown ecbrown released this 05 Dec 21:27
v1.7.1
ba9399b

Patch release: no function or structure changed. Upgrade from 1.7.0 or 1.6.0: their symmetry shortcuts can copy one
atom's results onto an inequivalent atom, and can change the basins of every basin call, often without an error.

Molecular symmetry shortcuts are off

1.6.0 and 1.7.0 accepted a mirror plane, inversion centre or twofold or threefold axis of the nuclei once the density
agreed at two points near the centre of the nuclei. Where the nuclei are more symmetric than the density (fields, core
holes, charge-localised or broken-symmetry states, unequal basis sets on equivalent atoms), qtaim_integrate_basins,
_sym, _flat and _zero_ode could copy one atom's results onto an inequivalent atom, and false mirror planes changed
the basins of every basin call, QTAIM_SYM_C1 and the single-atom calls included, often with QTAIM_OK. Two protons
20 bohr apart with the electron on the first gave one electron on each: with QTAIM_OK in 1.6.0, and in 1.7.0 once
the second proton carries a trace of the orbital (without it 1.7.0 returns -6). Until a symmetry can be proven for the
whole wavefunction, 1.7.1 uses none for molecules:

  • QTAIM_SYM_MAXIMAL integrates every atom, as QTAIM_SYM_C1 does; n_unique_computed_out is the number of atoms
    and unfold_full_orbit has no effect.
  • No mirror plane is taken from a wavefunction, and qtaim_ias_gauss_maxwell_zero_ode never takes the mirror disk.
  • Crystals use the octant rule and the cubic torus sites only where the cubic group maps the lattice, the atoms and
    the k set (with its weights and band occupations) onto themselves; otherwise the full sphere is integrated
    (r_bcp_along_bond NaN) and qtaim_crystal_torus_topology returns QTAIM_ERR_UNSUPPORTED.
  • The native Wolfram mirror does the same.

Fixed

  • Zero-ODE surface solver: a pair whose bond path does not join its two atoms (a density maximum between the
    nuclei, as midway in Li2, or a third atom on the segment) is refused with QTAIM_ERR_UNSUPPORTED, or with -6 where
    the search for a bond saddle runs and finds none, as for the para carbons of benzene (1.7.0 answered those from the
    ring point, with QTAIM_OK). 1.7.0 gave Li2 the mirror disk with QTAIM_OK.
  • Crystal models: the constructors return NULL where the lattice sums would be cut short (BCC Li at a <= 5.728312
    bohr, rock-salt LiH at a <= 7.137742 bohr) and for a constant that is not a positive finite number, and put no
    default cell in place of a refused one. 1.6.0 and 1.7.0 built the default cell (6.597 or 7.716 bohr) for a <= 2
    (BCC) or a <= 3 (rock salt), and above that cut those sums short up to 5.185449 and 6.350852 bohr with QTAIM_OK
    (BCC a = 3.5 at nk 3: octants 4.44 electrons per cell, full sphere 4.11, torus Euler characteristic -24).
    qtaim_crystal_from_caveman passes the constant from the cell volume as it is, so a cell too small for its model,
    or a lattice of zero volume, is refused (1.6.0 and 1.7.0 built the default cell for cells of up to 4 bohr³ with one
    atom or 6.75 bohr³ with more).
  • qtaim_hermitian_eig and qtaim_quat_eig could lose an eigenvalue of a matrix with a repeated or nearly repeated
    eigenvalue and return QTAIM_OK (also in 1.6.0): a column that the earlier picks already spanned could pass the
    threshold of 1e-7 on rounding errors alone. In 2260 accepted crystal cells an eigenvalue was lost in 12 to 21 (BCC Li,
    depending on compiler and flags); BCC a = 5.74 bohr at nk 7 gave 3.337 electrons per cell instead of 2.997 (gcc). A
    column is now taken only if its residual is at least 1/sqrt(n+1) (sqrt(2/(3n+1)) for the quaternion solver), which by
    a count of the residuals still yields n eigenvectors.
  • Unlisted maxima: the basin of a density maximum (1e-8 or more) that the attractor list lacks is shared among the
    listed attractors by distance on every call path; 1.7.0's rule was decided by rounding when the maximum lies midway
    between two attractors, as in Li2, where the mirror plane of 1.7.0 split it evenly.
  • Ray crossings are placed only between owners confirmed at the fine ascent tolerance (3e-7 bohr per step); a
    coarse owner moved a crossing of a ray of ethane by 4.4e-4 bohr in 1.7.0.
  • A failed allocation in a ray's probe list returns QTAIM_ERR_NOMEM.
  • Tetrahedrane (RHF/def2-TZVP) now returns QTAIM_OK from qtaim_integrate_basins, where 1.7.0 returned -6.

Behaviour changes: read before upgrading

  • Results move by up to a few 1e-6 electron per atom where a crossing came from a coarse owner.
  • The default crystal cells keep their numbers to rounding: against 1.7.0 the density of the default cells changes by
    less than 1e-14 relative (rock salt, a = 7.716, not at all without fused multiply-add).
  • Slower: every atom is integrated (up to 2.7 times the time of 1.7.0 for the symmetric molecules in the README
    table), and placing ray crossings costs about a quarter more time on water.
  • New refusals: QTAIM_ERR_UNSUPPORTED from the zero-ODE solver where the segment has two density minima or the saddle
    found does not join the two atoms, non-bonded pairs that 1.7.0 answered among them, QTAIM_ERR_CONVERGE (-6) from it
    for pairs that 1.7.0 answered from a ring point, and QTAIM_ERR_UNSUPPORTED from qtaim_crystal_torus_topology where
    the cubic group does not map the lattice, the atoms and the k set (with its weights and band occupations) onto
    themselves; NULL from the crystal constructors for cells whose sums would be cut short and for constants that are not
    positive finite numbers.

Known limits

  • 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 ray that changes owner on the order of a hundred times fills its list of 2048 points first, and its crossings stay
    between coarse owners: along a chain of 150 helium-like atoms qtaim_ray_basin_integrals returns QTAIM_OK with
    N = 0.1343 per steradian against 0.1519. The adaptive integrators count such a ray as unconverged. New in 1.7.1.
  • Rock-salt LiH above a = 22/√3 = 12.70 bohr: the 22-bohr lattice sums drop hydrogen images that the density needs,
    and basin populations are wrong with QTAIM_OK (a = 13: N(H) 1.23 with QTAIM_SYM_MAXIMAL and 1.91 with
    QTAIM_SYM_C1, against 1.998 with the sums taken to 36 bohr), as in 1.6.0 and 1.7.0.
  • qtaim_crystal_torus_topology returns QTAIM_OK with a nonzero Euler characteristic for large cells (BCC Li from
    25.5 bohr at every constant tried, rock-salt LiH at 18 to 25, 30 and 40 bohr), as 1.7.0 does.
  • The Wolfram call qtaimCCrystalAudit takes 6.597 bohr as its default constant for both models. For rock-salt LiH
    that constant is now refused (a Failure, new in 1.7.1): pass the constant (7.716 for the built-in cell).
  • Two documentation errors in CONVENTIONS.md, older than 1.7.1: section 3 gives the magnetic induction B in
    ħ/(|e| a0²) beside the minimal coupling π = -i∇ + A/c (the code follows the stated unit of B), and Principle 2 gives
    derivative orders 0 to 3 where the library computes 0 to 2.
  • The native Wolfram reference (wolfram/QTAIM.wl): qtaimEvalAOJet and qtaimEvalDensityBatch accept derivative
    orders of 3 and higher and silently return second-order results, as in 1.6.0 and 1.7.0 (the C library refuses these
    orders). Use orders 0 to 2. Found after the release; added to these notes on 5 December 2026.
  • A nucleus holding no electron can still carry a density maximum made of rounding noise (about 6e-19 in a Dalton case,
    6e-32 in a DIRAC case), which becomes that atom's attractor. The zero-flux surface, and with it both atoms' V_IQA
    and E_IQA, then depend on the noise (by about 2e-3 hartree in the Dalton case and 4e-4 in the DIRAC case); their
    sum, N, L(Ω) and the sum of N(Ω) minus N do not. 1.7.0 shows it too (DIRAC case); in the Dalton case its false mirror
    plane hid it. Found after the release; added to these notes on 5 December 2026.
  • On a diffuse basis (the H2+ aug-cc-pVQZ file) the orbital changes sign far out (about 7 bohr from the bond midpoint
    along the axis), and the basis density has a weak maximum (about 5.5e-10) beyond that zero on each side. At the
    default floor of 1e-10 the region at or above the floor falls into three separate pieces, so n - b + r - c = 3,
    which is correct for them: qtaim_search_critical_points reports it with status -6, and
    qtaim_find_critical_points returns the five points. A search with rho_floor = 1e-9 returns the two maxima at the
    nuclei and the bond point (sum 1). 1.6.0 lists neither weak maximum. Found after the release; added to these notes
    on 5 December 2026.
  • Built with Intel icx at its default floating-point model (-fp-model=fast), density values depend on the
    derivative order requested (at 5000 test points, rho at orders 0 or 1 differs from order 2 at 879, and the gradient
    at order 1 from order 2 at 3237). Compile with -fp-model=precise: then they agree at every point, as in gcc
    builds. CI does not build with icx. Found after the release; added to these notes on 5 December 2026.

Platforms

The full test suite (20 tests: 15 in C, 5 through Wolfram Language) was run on a commit with the same code, tests,
Wolfram and build files as this release (only comments and documents differ), on Linux x86-64 with gcc, OpenMP, system
BLAS and Wolfram. The maintainer's Mac and Windows machine were not run for this release: macOS and Windows were
checked only by GitHub CI, which builds the C-only configuration (no OpenMP, BLAS, LAPACK, Wolfram or libcint) and
runs the 11 quick tests on Linux (gcc, clang), macOS (AppleClang) and Windows (MSVC, clang-cl). The four slow C tests
and the Wolfram tests do not run there.

Details and a timing table: README, "Changes in 1.7.1".

libqtaim 1.7.0

Choose a tag to compare

@ecbrown ecbrown released this 05 Dec 02:01
v1.7.0
1e29ca4

Warnings added after release (corrected 4 and 5 December 2026)

  • A symmetry check that samples only two points can give wrong atoms and report success (found after the release;
    also in 1.6.0). The density is tested for symmetry at two points near the centre of the nuclei. For a symmetric
    nuclear frame with a less symmetric density, qtaim_integrate_basins and _flat can copy one atom onto another: two
    protons 20 bohr apart with the electron on the first get one electron each, with QTAIM_OK in 1.6.0 and in 1.7.0
    once the second proton carries a trace of the orbital (without it 1.7.0 returns -6). The same check also sets mirror
    planes that the basin calls use, so QTAIM_SYM_C1 and the single-atom calls do not fully avoid the fault
    (correction of the workaround given earlier). There is no reliable workaround in 1.7.0 or 1.6.0 (1.7.1 turns the
    shortcuts off): do not rely on basin results when the density may be less symmetric than the nuclei (fields, core
    holes, broken-symmetry or charge-localised states).
  • qtaim_hermitian_eig and qtaim_quat_eig can lose an eigenvalue of a matrix with a repeated or nearly repeated
    eigenvalue and return QTAIM_OK
    (found after the release; also in 1.6.0). In the BCC lithium crystal model this
    gives wrong cell populations with QTAIM_OK at some lattice constants and k grids (a = 5.74 bohr at nk 7: 3.337
    electrons per cell instead of 2.997, gcc). Fixed in 1.7.1.
  • The crystal constructors build the default cell (a = 6.597 or 7.716 bohr) in place of a lattice constant of at
    most 2 bohr (BCC Li) or 3 bohr (rock-salt LiH)
    , and qtaim_crystal_from_caveman does the same for cells of up to
    4 bohr³ (one atom) or 6.75 bohr³ (more atoms), a lattice of zero volume included. Above that they cut the lattice
    sums short up to a = 5.185449 bohr (BCC) and 6.350852 bohr (rock salt)
    , with QTAIM_OK: BCC a = 3.5 bohr at nk 3
    gives 4.1 to 4.5 electrons per cell instead of 3 and a torus Euler characteristic of -24. Also in 1.6.0; 1.7.1 refuses
    these constants and cells.
  • Rock-salt LiH above a = 22/√3 = 12.70 bohr: the 22-bohr lattice sums miss hydrogen images that the density needs,
    and basin populations are wrong with QTAIM_OK (a = 13, automatic grid: N(H) 1.23 with QTAIM_SYM_MAXIMAL and 1.91
    with QTAIM_SYM_C1, against 1.998 with the sums taken to 36 bohr). Also in 1.6.0, and still open in 1.7.1.

Minor release: new exports, structs and status values. Existing struct layouts are unchanged. Upgrade from 1.6.0: it
has faults, listed in the README, that return wrong results without an error.

Fixed (1.6.0 faults)

  • Well-separated fragments no longer integrate to several times their electrons.
  • Four-component, truncated, incomplete and inconsistent .wfx / .wfn files are refused instead of loading as
    something else; open-shell and fractionally occupied files no longer get a closed-shell exchange formula.
  • qtaim_wfn_create_raw_prims and the GTO constructor no longer overflow memory on high angular momentum, invalid
    exponents or very large counts.
  • The critical-point search finds points that 1.6.0 missed, and the symmetric eigensolver is scale invariant.
  • Builds with MSVC 19.50 and with MinGW (MSYS2 ucrt64) gcc 15.2. 1.6.0 does not build with that MSVC; MinGW was not
    tried on 1.6.0.

New

  • qtaim_integrate_attractor_basin and qtaim_integrate_density_basins: basins of any listed or searched density
    maximum, non-nuclear ones included (no IQA).
  • Adaptive basin integration in both angles, with convergence reported per atom.
  • qtaim_search_critical_points with a report; qtaim_symmetric_inertia; status QTAIM_ERR_UNSUPPORTED (-8).

Behaviour changes: read before upgrading

  • Whole-molecule basin calls now return QTAIM_ERR_CONVERGE (-6), with all outputs written, when an atom is not
    converged. Code that treats any non-zero status as fatal will stop where 1.6.0 continued. LiF and LiH with 6-31G*, Li2
    and molecules with counterpoise ghost atoms are examples.
  • The default interaction energies can be less accurate than in 1.6.0: the H2+ model total is off by 5.0e-4 hartree
    (1.6.0: 9e-8), whatever the mesh arguments. Ask qtaim_integrate_atom_adaptive for a tighter tol_E.
  • Much slower: the critical-point search costs one to two orders of magnitude more CPU time, and basin integration
    and interaction energies can be many times slower.
  • Nuclear coordinates beyond 1e6 bohr, non-finite input and out-of-range exponents are refused (the Wolfram mirror does
    not apply the coordinate bound).

Known faults that remain

  • A very small basin next to a newly born maximum can be wrong while reported converged. Measured on test densities:
    0.0101 electrons for 0.0092 (single-atom calls), 0.0034 for 0.0032, and 0.0023 for 0.0010 (also through the
    whole-molecule density-basins call). The cause of the last two is not established.
  • Nuclei closer than about 0.3 bohr can give badly wrong populations while reported converged.
  • The critical-point search is sampled and can miss points, in some cases without a flag. A maximum it misses gets no
    basin.
  • Error estimates are not bounds; L(Omega) has no error control of its own.
  • Localization and delocalization indices are not computed; dV_surf is zero; qtaim_crystal_from_caveman ignores the
    atoms given to it.
  • Four-component (spinor) densities are not supported.
  • macOS: with MacPorts libomp the Wolfram bridge aborts (two OpenMP runtimes).

The full list is in the README and in include/QTAIM.h.

How it was tested

No single run of all 18 tests passed on the release commit. The results below come from commits with the same library
code (they differ in one test file, comments and documentation).

  • Linux: all 18 tests pass (16 in one run; the two density-basins tests after a fix to the test itself).
  • macOS (Apple silicon, with Wolfram, OpenMP off): the same 18 pass in the same way.
  • Windows: all 13 C tests pass with MinGW gcc in one run and with MSVC across two commits; the six Wolfram scripts run
    with the MSVC library pass.
  • GitHub C core workflow (quick C tests): Linux gcc and clang, macOS AppleClang, Windows MSVC and clang-cl.
  • Not run: the opt-in slow Wolfram-against-C comparison with several attractors.

libqtaim 1.6.0

Choose a tag to compare

@ecbrown ecbrown released this 04 Dec 18:35
v1.6.0
11083e4

Warnings added after release (corrected 4 and 5 December 2026)

  • A symmetry check that samples only two points can give wrong atoms and report success (found after the release
    of 1.7.0, which has it too). The density is tested for symmetry at two points near the centre of the nuclei. For a
    symmetric nuclear frame with a less symmetric density, qtaim_integrate_basins and _flat can copy one atom onto
    another (two protons 20 bohr apart with the electron on one: 1 electron on each, with QTAIM_OK). The same check
    also sets mirror planes that the basin calls use, so QTAIM_SYM_C1 and the single-atom calls do not fully avoid
    the fault
    (correction of the workaround given earlier). There is no reliable workaround in 1.6.0 (1.7.1 turns the
    shortcuts off): do not rely on basin results when the density may be less symmetric than the nuclei (fields, core
    holes, broken-symmetry or charge-localised states).
  • qtaim_hermitian_eig and qtaim_quat_eig can lose an eigenvalue of a matrix with a repeated or nearly repeated
    eigenvalue and return QTAIM_OK
    (found after the release of 1.7.0, which has it too). In the BCC lithium crystal
    model this gives wrong cell populations with QTAIM_OK at some lattice constants and k grids (a = 5.74 bohr at nk 7:
    3.337 electrons per cell instead of 2.997, gcc). Fixed in 1.7.1.
  • The crystal constructors build the default cell (a = 6.597 or 7.716 bohr) in place of a lattice constant of at
    most 2 bohr (BCC Li) or 3 bohr (rock-salt LiH)
    , and qtaim_crystal_from_caveman does the same for cells of up to
    4 bohr³ (one atom) or 6.75 bohr³ (more atoms), a lattice of zero volume included. Above that they cut the lattice
    sums short up to a = 5.185449 bohr (BCC) and 6.350852 bohr (rock salt)
    , with QTAIM_OK: BCC a = 3.5 bohr at nk 3
    gives 4.1 to 4.5 electrons per cell instead of 3 and a torus Euler characteristic of -24. Also in 1.7.0; 1.7.1 refuses
    these constants and cells.
  • Rock-salt LiH above a = 22/√3 = 12.70 bohr: the 22-bohr lattice sums miss hydrogen images that the density needs,
    and basin populations are wrong with QTAIM_OK (a = 13, automatic grid: N(H) 1.23 with QTAIM_SYM_MAXIMAL and 1.91
    with QTAIM_SYM_C1, against 1.998 with the sums taken to 36 bohr). Also in 1.7.0, and still open in 1.7.1.

libqtaim 1.6.0. All 10 tests passed on the released library tree.

Changes

  • Basin integration follows every in-basin segment of each ray and places the surface accurately.
  • Corrected H2+/HD+ summit model; several quantities that were never derived are now reported as not-a-number.
  • Integrals: repairs (including a stack overflow and large-argument Boys function) and extensions; an optional libcint
    provider plugin, off by default.

Known issues

  • Do not load a four-component (spinor) .wfn or .wfx file: it is accepted and only the large component is returned,
    without an error.
  • The critical-point search can miss points (for example all four ring points of tetrahedrane); certified is a local
    sampled test, not a proof; rank decisions can depend on units.
  • Basin integration is slow and may not converge for some atoms (ethane carbon); error estimates are not bounds.
  • Density maxima away from nuclei get no basin from the standard entry points.
  • Localization and delocalization indices are not computed (placeholder fields).
  • Interaction energies (IQA) of open-shell wavefunctions reloaded from a .wfn or .wfx file are wrong: a
    closed-shell exchange formula is applied (reproduced: helium triplet off by 0.67 hartree, lithium doublet by 0.087).
  • Open-shell interaction energies from the geometry-only constructor (qtaim_wfn_from_caveman) are also wrong: no
    exchange is applied (helium triplet off by 1.35 hartree).
  • Basin populations of well-separated fragments can be badly wrong without any error (without IQA): two helium atoms
    34 bohr apart each integrate to 4 electrons, 8 in place of 4 in all; in a 6-31G test it begins between 10 and 12 bohr.
  • Truncated or incomplete .wfx files can load without an error: a file cut off inside its state density matrices
    loads as a molecule with fewer electrons, and an empty, garbled or cut-off two-electron density block is accepted as
    exact (HeH+: an empty block drops about 1 hartree of repulsion). Check the loaded electron count against the file.
  • Loading a truncated .wfn file can read out of bounds: a file cut off inside a centre or type-assignment line makes
    the loader read past the end of its buffer. Load only complete files.
  • qtaim_crystal_from_caveman ignores 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_loc returns the atom's electron population (zero
    for a one-electron system) and delta_pair_out is returned as all zeros. Do not read either as a result.
  • qtaim_wfn_create_raw_prims overflows the stack for an occupied primitive with angular momentum above 6. Do not
    pass it such input.
  • qtaim_find_critical_points can miss critical points, including a maximum away from the nuclei, while
    n − b + r − c still equals 1. Do not treat the list as complete.
  • Interaction energies of a .wfn file with fractional occupations are wrong, without an error, because a
    closed-shell determinant formula is applied. For a correlated wavefunction attach its pair density; otherwise do not
    use them.
  • Basin populations can miss the requested tolerance although the report says converged. Check the sum of the
    populations and each atom's L, and tighten tol_N.
  • dV_surf is returned as zero and is not a result.
  • QTAIM_OK from qtaim_refine_and_certify_cp does not mean it converged. Check the gradient relative to the
    density.
  • qtaim_spacetime_sylvester_4d depends on the scale of its matrix. Rescale it to entries of order one first.

Fixes for several of these are in progress.