Skip to content

libqtaim 1.7.1

Latest

Choose a tag to compare

@ecbrown ecbrown released this 05 Dec 21:27
· 137 commits to master since this release
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".