QTAIM: topological analysis of the electron density¶
QTAIM (Quantum Theory of Atoms in Molecules, Bader 1985/1990) is a topological analysis of the electron density ρ(r). It locates stationary points (critical points) of ρ(r), classifies them by the Hessian eigenvalue sign pattern (nuclear, bond, ring, cage), and traces gradient paths (bond paths) connecting bonded atoms.
Feature status
vibeqc.qtaim.qtaim_analysis() ships critical-point search via
finite-difference Hessian and gradient-path bond tracing. The
implementation is pure Python with NumPy, calling vibe-qc’s
evaluate_ao_with_gradient native binding for density and gradient
evaluation. QVF output (topology.qtaim section) is supported
through qtaim_result_to_qvf().
Algorithm sketch¶
Build a uniform grid around the molecule.
Evaluate ρ(r) and ∇ρ(r) on the grid via
evaluate_ao_with_gradient.Finite-difference the gradient to get the density Hessian H_ρ(r).
Scan grid cells for sign changes in ∇ρ – seed points.
Newton-Raphson refine each seed to a stationary point.
Classify by Hessian eigenvalues: (3,-3) = ncp, (3,-1) = bcp, (3,+1) = rcp, (3,+3) = ccp.
For each BCP, trace gradient paths to the two connected atoms.
Quick start¶
from vibeqc.qtaim import qtaim_analysis, qtaim_result_to_qvf
import vibeqc as vq
# Run a molecular SCF first
mol = vq.Molecule([vq.Atom(8, [0.0, 0.0, 0.0]),
vq.Atom(1, [0.0, 0.757, -0.469]),
vq.Atom(1, [0.0, -0.757, -0.469])])
basis = vq.BasisSet(mol, "6-31g*")
result = vq.run_rhf(mol, basis)
# Run QTAIM analysis
qtaim = qtaim_analysis(result, basis, mol, grid_spacing=0.1)
for cp in qtaim.critical_points:
print(f"{cp.type}: rho={cp.rho:.4f} e/A^3, laplacian={cp.laplacian:.4f} e/A^5")
for bp in qtaim.bond_paths:
print(f"Bond {bp.atoms[0]}-{bp.atoms[1]}: {len(bp.path)} points")
# Export as QVF-ready dict
qvf_data = qtaim_result_to_qvf(qtaim)
Data types¶
Class |
Attributes |
|---|---|
|
|
|
|
|
|
Where to look in the code¶
Layer |
File |
|---|---|
Python API |
|
AO evaluation (density + gradient) |
|
Grid infrastructure |
|
QVF topology writer |
|
Citation route |
|
Tests |
|
Known limitations¶
The Hessian uses finite differences on the gradient grid. An
evaluate_ao_with_hessiannative binding would replace this with analytic second derivatives, improving accuracy near nuclei.Atomic basin integration (the full AIM partitioning) is not yet implemented; the current scope is critical-point search and bond-path tracing.
References¶
Bader, R. F. W., Atoms in Molecules, Oxford University Press (1990).
Bader, R. F. W., Acc. Chem. Res. 18, 9-15 (1985) – original QTAIM formulation.
Lu, T. & Chen, F., J. Comput. Chem. 33, 580-592 (2012) – MultiWFN reference implementation.
Citations are automatically included in the output manifest when
QTAIM analysis is performed; see docs/user_guide/citations.md.
See also¶
Volumetric data (cube / molden) – density and orbital export.
Post-SCF properties – Mulliken / Lowdin / Mayer bond-order analysis.
QVF file format – the container that carries QTAIM topology data.