WHIM descriptors
WHIM (Weighted Holistic Invariant Molecular) descriptors summarise the size, shape and mass distribution of a conformer through the moments of its atom-weighted covariance matrix. They are invariant to translation and rotation.
flowchart LR
A[Elements + coordinates + weighting] --> B[Weighted centroid]
B --> C[Weighted covariance]
C --> D[Eigenvalues lambda]
D --> E[nu, gamma, eta]
E --> F[Total spread, anisotropy, directional, kurtosis]
Definitions
With atom weights
The eigenvalues lambda values (eigenvalues is the same array). The derived descriptors are
where
A planar molecule has one zero eigenvalue; the corresponding
Example
$ sci-form whim "[8,1,1]" "$WATER"
{
"eigenvalues": [0.06416193779850124, 0.034186202920713456, 0.0],
"lambda": [0.06416193779850124, 0.034186202920713456, 0.0],
"nu": [0.6523960425615413, 0.3476039574384588, 0.0],
"gamma": [0.0, -2.462116930662336, 0.0],
"eta": [8.936011904761907, 7.062019780254124, 0.0],
"total_spread": 0.09834814071921469,
"anisotropy": 1.0,
"directional": 0.0,
"kurtosis": 15.99803168501603
}Weighting schemes
| Scheme | Weight |
|---|---|
unit | 1 for every atom |
mass | standard atomic mass (fallback 1.5·Z for unlisted elements) |
volume | approximate van der Waals volume (fallback 20 ų) |
electronegativity | Pauling electronegativity (fallback per element table) |
polarizability | atomic polarizability (fallback per element table) |
The fallbacks are documented approximations; use the explicit schemes for elements with real parameters when comparing across molecules.
Validation and limits
- Empty geometries, coordinate mismatches and non-finite coordinates are rejected by
compute_whim_checked. - Internal invariants: eigenvalues are non-negative and sorted descending;
nusums to one for a non-degenerate covariance; planar systems have one zero eigenvalue. - No external WHIM gate is in-tree. The descriptor is a shape summary, not a quantum observable; compare only within the same weighting scheme.
- The Jacobi eigensolver is deterministic for a given input.
Surfaces
| Surface | Entry point |
|---|---|
| CLI | sci-form whim "<elements>" "<coords>" [--weighting mass] |
| Rust | ml::whim::compute_whim, compute_whim_checked |
| Python | compute_whim(elements, coords, weighting="mass") |
| WASM | compute_whim(elements_json, coords_json, weighting) |