GETAWAY descriptors
GETAWAY (GEometry, Topology and Atom-Weight AssemblY) descriptors combine the molecular influence matrix with the molecular graph. They describe how each atom contributes to the overall shape and how that influence decays with topological distance.
flowchart LR
A[Coordinates] --> B[Centered X]
B --> C[Leverages from X X+]
D[Bonds] --> E[Topological distances]
C --> F[HAT and R autocorrelations]
E --> F
F --> G[Totals and information]
Influence matrix and leverages
With the centered coordinate matrix
where leverages, with h_max, h_mean and the Shannon information content
Autocorrelations
For each pair of atoms with topological distance
hat_total and r_total are the corresponding sums over all atom pairs with a finite topological distance of --bonds is omitted the CLI perceives bonds from the geometry.
Example
$ sci-form getaway "[8,1,1]" "$WATER"
{
"leverages": [0.6666666666666666, 0.6666666666666666, 0.6666666666666666],
"hat_autocorrelation": [1.3333333333333333, 0.6666666666666666, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
"r_autocorrelation": [1.3921145418283023, 0.4402183483007572, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
"hat_total": 1.0,
"r_total": 0.9161664450645297,
"h_information": 1.0986122886681096,
"h_max": 0.6666666666666666,
"h_mean": 0.6666666666666666,
"max_lag": 8
}Water is planar; all three atoms lie on the rank-2 influence matrix and share the same leverage. Lags beyond the largest topological distance are zero.
import sci_form
water = [0.0, 0.0, 0.1173, 0.0, 0.7572, -0.4692, 0.0, -0.7572, -0.4692]
d = sci_form.compute_getaway([8, 1, 1], water)
print(d.hat_total, d.leverages)import { compute_getaway } from 'sci-form-wasm';
const water = '[0,0,0.1173,0,0.7572,-0.4692,0,-0.7572,-0.4692]';
const d = JSON.parse(compute_getaway('[8,1,1]', water, '', 8));
console.log(d.hat_total, d.leverages);Validation and limits
- At least two atoms are required; coordinates must be finite and match the element count.
max_lagmust be an integer in1..=10000; the cap prevents an unbounded autocorrelation allocation from a malformed request.- Bond indices must lie in
0..n_atomsand cannot be self-bonds. - Empty geometries, mismatches, self-bonds, out-of-range bonds and invalid
max_lagare rejected bycompute_getaway_checkedin the CLI, Python and WASM surfaces. WASM returns{"error": ...}, never an all-zero descriptor.
All surfaces use the checked core path. Python rejects negative max_lag with ValueError; WASM rejects zero, negative, fractional, NaN and infinite values.
- The descriptor is a shape/topology summary, not an experimental observable. No external GETAWAY gate is in-tree; compare within the same bond perception and
max_lag. - Bond perception is distance-based; supply
--bondsfor unusual valences or non-standard connectivity.
Surfaces
| Surface | Entry point |
|---|---|
| CLI | sci-form getaway "<elements>" "<coords>" [--bonds JSON] [--max-lag 8] |
| Rust | ml::getaway::compute_getaway, compute_getaway_checked |
| Python | compute_getaway(elements, coords, bonds=None, max_lag=8) |
| WASM | compute_getaway(elements_json, coords_json, bonds_json, max_lag) |