RDF descriptors
The radial distribution function (RDF) descriptor summarises the distribution of pairwise distances in a conformer. sci-form rdf samples a radial grid and smooths each pair distance with a Gaussian.
flowchart LR
A[Elements + coordinates] --> B[All atom pairs]
B --> C[Pair distances]
C --> D[Gaussian smoothing beta]
D --> E[Weighted RDF curves]
E --> F[Unweighted, mass, EN, charge]
Formula
For a grid radius
The grid is the midpoint rule
The output carries four curves:
| Field | Weight |
|---|---|
rdf_unweighted | 1 |
rdf_mass | atomic mass |
rdf_electronegativity | Pauling electronegativity |
rdf_charge | per-atom charge |
n_pairs is
Charges
--charges supplies per-atom charges (length must equal the atom count). When omitted, Gasteiger charges are derived from the geometry. Elements without Gasteiger parameters are an error.
Example
bash
$ sci-form rdf "[8,1,1]" "$WATER" --n-points 3
{
"radii": [2.0, 6.0, 10.0],
"rdf_unweighted": [1.142211742551103e-12, 0.0, 0.0],
"rdf_mass": [1.1605602319834438e-12, 0.0, 0.0],
"rdf_electronegativity": [5.528304833947339e-12, 0.0, 0.0],
"rdf_charge": [4.8110740318794345e-14, 0.0, 0.0],
"beta": 100.0,
"n_pairs": 3
}With only three grid points the O-H distances near 1 Å fall between samples, so the values are tiny; use the default 128 points for a useful curve.
Validation and limits
- At least two atoms are required.
betaandr_maxmust be finite and > 0;n_pointsmust be ≥ 2.- The charge array must match the atom count and be finite.
- The Python wrapper now routes through
compute_rdf_checked, so coordinate mismatches and invalidbeta/r_max/n_pointsraiseValueErrorinstead of silently returning empty or truncated descriptors. - The descriptor is a smoothed pair-distance histogram, not a density-normalized experimental
. It is not periodic and does not apply a finite-size correction. - No external RDF gate is in-tree; compare only within the same
beta,r_maxand weighting scheme.
Surfaces
| Surface | Entry point |
|---|---|
| CLI | sci-form rdf "<elements>" "<coords>" [--charges JSON] [--beta 100] [--r-max 12] [--n-points 128] |
| Rust | ml::rdf_descriptors::compute_rdf, compute_rdf_checked |
| Python | compute_rdf(elements, coords, charges, beta, r_max, n_points) |
| WASM | compute_rdf(elements_json, coords_json, charges_json, beta, r_max, n_points) |