Skip to content

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 X (n×3),

H=X(X⊤X)+X⊤,hii=Hii,

where (X⊤X)+ is the Moore-Penrose pseudo-inverse. Planar molecules make X⊤X singular (rank 2) and linear molecules rank 1; the pseudo-inverse keeps their leverages finite instead of returning all zeros. The leverages are reported as leverages, with h_max, h_mean and the Shannon information content

IH=−∑ipiln⁡pi,pi=hii∑jhjj.

Autocorrelations ​

For each pair of atoms with topological distance dij=k:

HATk=∑dij=khiihjj,Rk=∑dij=khiihjjrij.

hat_total and r_total are the corresponding sums over all atom pairs with a finite topological distance of |Hij| and |Hij|/rij. Topological distances come from a BFS over the bond list; when --bonds is omitted the CLI perceives bonds from the geometry.

Example ​

bash
$ 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.

python
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)
typescript
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_lag must be an integer in 1..=10000; the cap prevents an unbounded autocorrelation allocation from a malformed request.
  • Bond indices must lie in 0..n_atoms and cannot be self-bonds.
  • Empty geometries, mismatches, self-bonds, out-of-range bonds and invalid max_lag are rejected by compute_getaway_checked in 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 --bonds for unusual valences or non-standard connectivity.

Surfaces ​

SurfaceEntry point
CLIsci-form getaway "<elements>" "<coords>" [--bonds JSON] [--max-lag 8]
Rustml::getaway::compute_getaway, compute_getaway_checked
Pythoncompute_getaway(elements, coords, bonds=None, max_lag=8)
WASMcompute_getaway(elements_json, coords_json, bonds_json, max_lag)

Released under the MIT License.