QTAIM-WFX-3.0 & Wide-WFN Wavefunction Standard
Standard .wfn and .wfx files were designed for single-reference clamped-nucleus Born–Oppenheimer molecules () of modest size: fixed I3/I5 Fortran columns in .wfn overflow past 999 nuclei or 99,999 primitives, third-party codes disagree on high-angular-momentum shell orderings, and neither format carries state-averaged multireference 1-/2-RDMs, Z-vector relaxed response densities, four-component Dirac quaternion spinors, external electromagnetic fields, quantum nuclei, pseudopotential core reconstructions, or periodic Brillouin-zone Bloch states. Here we specify Wide-WFN, QTAIM-WFX-3.0, and the direct in-memory C-ABI wavefunction constructors (qtaim_wfn_create_raw_prims, qtaim_wfn_set_active_2rdm) linked across DIRAC, Dalton, OpenMolcas, PySCF, and CP2K.
- libqtaim does not read most of the optional blocks listed here (state-ensemble, transition-density, coupling, relativistic, gauge, laser, cavity, pseudopotential and periodic blocks). It reads extended molecular orbitals, state one- and two-particle density matrices, core density primitives, angular exponents and static fields.
- No periodic Ewald interaction-energy routine exists in libqtaim.
- The B₂⁻ statement about the pair cumulant is unsupported by any saved computation.
1. Classic .wfn and Arbitrary-Width Free-Form Wide-WFN
qtaim_wfn_load_file autodetects and parses three ASCII wavefunction families without external libraries:
- Classic AIMPAC / Gaussian
.wfn: fixed-width records (GAUSSIANheader,CENTRE ASSIGNMENTSandTYPE ASSIGNMENTSin20I3,EXPONENTSin5D14.7, and per-orbitalMOblocks in5D15.8, accepting bothEand FortranDexponents). - Arbitrary-width
Wide-WFN(.wwfnor headerWIDE WFN): replaces fixedI3/I5integer columns—which print***once or —with free-form whitespace-delimited 64-bit counts, full 17-digit IEEE-754ES24.16coordinates, exponents, and coefficients (qtaim_wfn_write_wide_wfn), and Keith primitive types throughishells (1..84). QTAIM-WFX-3.0(.wfx): a 100% backward-compatible XML-tag superset of Todd Keith's AIMAll.wfxspecification andDIRAC'sPGA-WFX-2.0exporter (legacy.wfxreaders ignore unknown<Tag>…</Tag>blocks cleanly while reading standard ground-state orbitals and<EDF>cores).
2. Canonical Keith 1..84 Primitive Types (), Native Spherical Shells, & Guard
In .wfn, Wide-WFN, and .wfx files, unnormalized Cartesian primitives absorb primitive normalization factors directly into <Molecular Orbital Primitive Coefficients>. Notice the critical convention change at (h shells): types 1..35 () place pure axial powers first, whereas Todd Keith's AIMAll specification switches at h = 36..56 to reverse-lexicographic order:
| Shell | ℓ | Count | Type IDs | Canonical (ℓx, ℓy, ℓz) ordering rule |
|---|---|---|---|---|
s |
0 | 1 | 1 |
(0,0,0) |
p |
1 | 3 | 2..4 |
(1,0,0), (0,1,0), (0,0,1) |
d |
2 | 6 | 5..10 |
Axis-first: (2,0,0), (0,2,0), (0,0,2), (1,1,0), (1,0,1), (0,1,1) |
f |
3 | 10 | 11..20 |
Axis-first: (3,0,0), (0,3,0), (0,0,3), (2,1,0), (2,0,1), (0,2,1), (1,2,0), (1,0,2), (0,1,2), (1,1,1) |
g |
4 | 15 | 21..35 |
Axis-first: (4,0,0)..(0,0,4), (3,1,0)..(0,1,3), (2,2,0)..(0,2,2), (2,1,1), (1,2,1), (1,1,2) |
h |
5 | 21 | 36..56 |
Reverse-lex switch: ℓx = 0..5, ℓy = 0..(5−ℓx), ℓz = 5−ℓx−ℓy, i.e. (0,0,5), (0,1,4), …, (5,0,0) |
i |
6 | 28 | 57..84 |
Reverse-lex continuation: ℓx = 0..6, ℓy = 0..(6−ℓx), ℓz = 6−ℓx−ℓy, i.e. (0,0,6), (0,1,5), …, (6,0,0) |
ℓ ≥ 7 |
≥ 7 | (ℓ+1)(ℓ+2)/2 | > 84 |
Explicit <Primitive Exponents Lx Ly Lz> integer block |
When a quantum-chemistry calculation uses contracted Spherical Harmonics (5d, 7f, 9g, 11h, 13i), QTAIM-WFX-3.0 preserves the exact contracted spherical basis in <Native Spherical Shells> alongside the unfolded Cartesian primitive representation. Upon loading any .wfn or .wfx file, qtaim_wfn_load_file evaluates the analytic primitive overlap matrix and verifies orbital orthonormality ; if a third-party exporter wrote lexicographic Cartesian d/f coefficients against Keith type labels (), the loader tests known third-party shell permutations and repairs the coefficient ordering automatically when .
3. Multireference KS/KR-SA-GASSCF(8), Z-Vector Relaxed RDMs, & Transition Couplings
Single-determinant natural occupations cannot represent state-averaged generalized-active-space wavefunctions, conical intersections, or analytic orbital-response properties. Both libqtaim and DIRAC's pga_wfx_export.F90 therefore emit and consume:
<Extended MO Count>&<Extended MO Primitive Coefficients>: the complete orthonormal inactive + active + virtual orbital or Kramers-pair basis required by response and derivative-coupling matrices.<GAS Subspace Specification>&<State Ensemble Metadata>: up to generalized active subspaces with cumulative min/max electron occupation bounds, root count , symmetry irreps, ensemble weights , and state energies .<State Specific 1-RDMs>(CI_UNRELAXEDandZVEC_RELAXED): stores both the unrelaxed CI expectation 1-RDM and the Lagrange-multiplier orbital-response Z-vector relaxed 1-RDM needed for analytic energy gradients and relaxed atomic dipoles.<Transition 1-RDMs>,<Nonadiabatic Derivative Couplings>, &<Active 2-RDMs>/<Cumulant Modes>: state-interaction transition densities (Excitation Atom by Atom, Moving-Surface Laser Control), nonadiabatic couplings , and correlated chemist active 2-RDMs decomposed viaqtaim_wfn_set_active_2rdminto spectral cumulant modes for 3D punctured-MaxwellIQA. In homonuclear radical-anion dissociation such as under 8-orbital valenceKS/KR-SA-GASSCF(8), state averaging preserves the cylindrical symmetry of the doubly degenerate state alongside , enforces symmetric charge sharing (), and uses the active 2-RDM cumulant to cancel the spurious classical fractional-charge repulsion at dissociation.- Direct in-memory host execution vs disk
.wfxinterchange:DIRAC(**PROPERTIES .QTAIM),Dalton(**AIM .QTAIM),OpenMolcas(&RASSCF KRQTaimand&RASSI QTAIM),PySCF(pyscf.qtaim), andCP2K(&DFT &PRINT &QTAIM) linkQTAIM.cdirectly in-process viaqtaim_wfn_create_raw_primswhile retaining identicalQTAIM-WFX-3.0disk export.
4. Relativistic 4c/X2C Quaternion Spinors, External Fields, & Non-BO Species
4c Dirac & X2C Quaternion Blocks
<Relativistic Hamiltonian> (4C_DC, 4C_DCB, 4C_DCG, X2C, c_au), Visscher–Dyall Gaussian nuclear charge exponents, separate small-component kinetic-balance primitives, and real four-component quaternion spinor coefficients (Q0, Q1, Q2, Q3) + <KRDM Block> / <KTDM Block> / <K2RDM Block> with zero complex numbers.
Electromagnetic & Cavity Fields
<External Electromagnetic Fields> records static , magnetic induction , London GIAO phase / gauge origin , laser pulse carrier/CEP/envelope parameters, excluded Aharonov–Bohm flux-line axes and , and quantized cavity modes .
Non-BO Rovibronic Quantum Matter
<Non-BO Quantum Species> stores per-species masses , charges , spins , boson/fermion statistics, nuclear basis primitives, intraspecies 1-RDMs , and electron–nuclear correlation 2-RDMs for rovibronic HD, H₂, and muonic molecules.
5. <EDF>/ECP/PAW/Muffin-Tin Core Restoration & 14-Bravais Monkhorst–Pack Solids
Heavy-element pseudopotentials omit inner-shell orbitals and would otherwise create hollow valence density minima instead of nuclear attractors. QTAIM-WFX-3.0 supports both AIMAll's <Number of EDF Primitives> / <EDF Primitive Centers, Types, Exponents, Coefficients> Gaussian core electron density functions (evaluated directly inside libqtaim's density, gradient, Hessian, and Maxwell-field kernels) and <Pseudopotential and Core Reconstruction> blocks for semilocal ECPs, PAW_AUGMENTATION radial projectors, and all-electron MUFFIN_TIN_SPHERE grids.
Finally, <Periodic Lattice and Reciprocal Grid> extends QTAIM and 3D Ewald-regularized IQA across polymers (), surfaces/interfaces (), and bulk crystals () across all 14 Bravais lattices (cP, cI, cF, hP, hR, tP, tI, oP, oC, oI, oF, mP, mC, aP) and 230 space groups, storing primitive lattice vectors , Monkhorst–Pack meshes and irreducible -weights, Bloch crystal-orbital coefficients or plane-wave reciprocal -vectors, and Ewald splitting parameters .
Provenance tags indicate whether the primary text ([read]) or bibliographic record ([record]) was checked directly during preparation.
- R. F. W. Bader, Atoms in Molecules: A Quantum Theory (Oxford University Press, 1990) [read]; T. A. Keith and R. F. W. Bader, J. Chem. Phys. 99, 3669 (1993) [record].
- T. Saue et al., J. Chem. Phys. 152, 204104 (2020) [read]; L. Visscher and K. G. Dyall, At. Data Nucl. Data Tables 67, 207 (1997) [record].
- H. B. Schlegel and M. J. Frisch, Int. J. Quantum Chem. 54, 83 (1995) [record]; H. J. Monkhorst and J. D. Pack, Phys. Rev. B 13, 5188 (1976) [record].