Skip to main content

Module os

Module os 

Source
Expand description

One-electron integrals by Obara–Saika (OS) recurrence.

All routines here work on primitive Cartesian Gaussians and accumulate their (coefficient-weighted) contribution into a caller-provided output block. Normalization, contraction, and shell bookkeeping live in the integral driver crate. The output block for a shell pair (la, lb) is row-major with shape [n_cart(la), n_cart(lb)], using the Cartesian component order defined in integral_math::am.

§Conventions

A primitive is g(r) = (x-A_x)^{lx}(y-A_y)^{ly}(z-A_z)^{lz} e^{-α|r-A|²} (no normalization). For a pair (α, A), (β, B):

  p = α + β,   P = (αA + βB)/p,   μ = αβ/p,   K_AB = e^{-μ|A-B|²}.

§Buffer sizing (see ARCHITECTURE.md)

Angular momentum is capped at MAX_L. The separable 1D tables use fixed stack arrays sized to the cap (strategy (a): over-allocate to the cap rather than the nightly-gated generic_const_exprs). The nuclear-attraction path uses small heap maps for its auxiliary (triple, m) table; tightening that to stack buffers / const-generic monomorphization is a later optimization.

Structs§

Prim
A single primitive Gaussian: exponent, center, and angular momentum.

Constants§

MAX_L
Maximum supported angular momentum per shell for the one-electron OS engine. Above this, a future Rys engine takes over (see ARCHITECTURE.md).

Functions§

dipole_into
Accumulate scale · ⟨a| (r-O)_k |b⟩ (Cartesian dipole) into the three component blocks out_x, out_y, out_z, with multipole origin o.
kinetic_into
Accumulate scale · ⟨a| -½∇² |b⟩ (kinetic energy) into out.
nuclear_into
Accumulate scale · Σ_C (−Z_C) ⟨a| 1/|r−C| |b⟩ (nuclear attraction) into out, summed over the given point charges charges = [(C, Z)].
overlap_into
Accumulate scale · ⟨a|b⟩ (overlap) into out for the shell pair.

Type Aliases§

Vec3
A 3-vector (atom center or origin), in atomic units (bohr).