Order-free per-ring cage classification with an exact incremental update. More...
#include <memory>#include <vector>Go to the source code of this file.
Classes | |
| struct | ring::CageAffiliation |
| Per-ring affiliation flags, indexed like the input ring vector. More... | |
| class | ring::AffiliationUpdater |
| Exact incremental affiliation across frames. More... | |
| struct | ring::SeededAtomLabels |
| Per-atom cage flags from seeded (hysteresis) affiliation. More... | |
Namespaces | |
| namespace | ring |
| Topological network criteria functions. | |
Functions | |
| CageAffiliation | ring::cageAffiliation (const std::vector< std::vector< int > > &rings, const std::vector< std::vector< int > > &nList) |
| SeededAtomLabels | ring::seededCageAffiliation (const std::vector< std::vector< int > > &strictRings, const std::vector< std::vector< int > > &strictNList, const std::vector< std::vector< int > > &permissiveRings, const std::vector< std::vector< int > > &permissiveNList) |
| Seeded affiliation over two graphs on the same atoms: the strict graph (typically the mutual k-nearest bonds) supplies seeds, the permissive supergraph (typically the union bonds) supplies completions, and a permissively affiliated atom is accepted only when its bonded component of affiliated atoms contains a seed. | |
Order-free per-ring cage classification with an exact incremental update.
The greedy cage assembly in findHC/findDDC claims rings as it accepts cages, so which rings are tested depends on visiting order. The affiliation predicates here are claim-free restatements of the same geometric conditions, evaluated for every ring independently:
Locality theorem. Let two six-membered rings be adjacent when one contains an atom within one bond-hop of an atom of the other (a symmetric relation, written A(r) for the set adjacent to r). Every quantity the predicates read is confined to a bounded adjacency neighbourhood:
Hence HC affiliation of r is a function of the rings in A(r) and the neighbour rows of their atoms, and DDC affiliation of r is a function of the rings in A(A(r)) and their rows. Between two frames, affiliation can therefore change only for rings whose second adjacency neighbourhood touches an added ring, a removed ring, or an atom whose neighbour row changed. The incremental updater recomputes exactly that closure and carries every other ring's stored answer, so its output equals a full recomputation by construction.
Definition in file cage_affiliation.hpp.