mod graphkey¶
- module graphkey¶
Exact basin identity by canonical contact-graph labelling (nauty). Exact basin identity by canonical contact-graph labelling.
Measured here, no coordinate radius defines basin identity: at 0.7 the run registers 365 basins and solves 55 of 72, at 2.0 it registers 7 and solves 24, and there is no setting in between where basins correspond to anything. The failure is structural, since a single isotropic length cannot separate “the same packing, distorted” from “a different packing”.
The contact graph can. Two minima are the same arrangement exactly when their bond graphs are isomorphic, and a canonical labelling (McKay’s nauty, doi:10.1016/j.jsc.2013.09.003) turns isomorphism into equality of keys: no threshold, no reference structure, no morphology. The graph is built from the structure’s own nearest-neighbour scale, so the key transfers across systems and sizes unchanged.
Functions
- fn contact_key(x: ArrayView1<f64>, cutoff: f64) -> u64¶
Canonical key of the contact graph at
cutofftimes the structure’s own nearest-neighbour distance: the single-species case ofcontact_key_colored.Equal keys mean isomorphic bond networks. Distinct keys mean provably different arrangements, which a distance threshold can never say.
- fn contact_key_colored(x: ArrayView1<f64>, colors: &[u32], pair_cutoff: impl Fn(u32, u32, f64) -> f64) -> u64¶
Canonical key of a vertex-coloured contact graph.
Colours are species: a bond network of one arrangement of two species and the same network with the species swapped are different states, and a colour-blind key would merge them. nauty’s canonical labelling refines the initial partition by colour, so equal keys mean isomorphic bond networks with matching species everywhere. The pair cutoff is a callback on the two species, because contact distances differ by pair in any real system; the scale argument it receives is the structure’s own median nearest-neighbour distance.