Skip to content

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 wi (unit, mass, van der Waals volume, electronegativity or polarizability) and weighted centroid r¯:

r¯=∑iwiri∑iwi,Cab=∑iwi(ria−r¯a)(rib−r¯b)∑iwi.

The eigenvalues λ1≥λ2≥λ3 of C are the WHIM lambda values (eigenvalues is the same array). The derived descriptors are

νi=λi∑jλj,γi=μ3,iλi3/2,ηi=μ4,iλi2,

where μ3,i and μ4,i are the third and fourth weighted moments along principal axis i. The aggregate descriptors are

total spread=∑iλi,anisotropy=1−(3λ1λ2λ3)1/3∑iλi,directional=ν1ν2ν3,kurtosis=∑iηi.

A planar molecule has one zero eigenvalue; the corresponding νi, γi and ηi are zero by construction.

Example ​

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

SchemeWeight
unit1 for every atom
massstandard atomic mass (fallback 1.5·Z for unlisted elements)
volumeapproximate van der Waals volume (fallback 20 ų)
electronegativityPauling electronegativity (fallback per element table)
polarizabilityatomic 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; nu sums 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 ​

SurfaceEntry point
CLIsci-form whim "<elements>" "<coords>" [--weighting mass]
Rustml::whim::compute_whim, compute_whim_checked
Pythoncompute_whim(elements, coords, weighting="mass")
WASMcompute_whim(elements_json, coords_json, weighting)

Released under the MIT License.