Expand description
Practical SSSR and ring-interior normals for depiction.
Layout backends own coordinates. This module only supplies drawing helpers: which bonds sit in small rings, and unit normals toward the ring centroid so Kekulé offsets stay short and inside (not the acyclic extend-onto-singles path). Python host draw stack removed; this module is SoT.
Structs§
- Ring
- One ring as an ordered atom cycle (atom indices).
Constants§
- AROMATIC_
CIRCLE_ FRAC - Fraction of ring inradius (min centroid→edge distance) for aromatic circles.
Functions§
- apply_
ring_ interiors - Fill [
BondIn::interior] for ring bonds from SSSR normals. - aromatic_
ring_ circles - Centroids + radii for SSSR rings whose every bond is aromatic-encoded.
- bond_
interior_ normals - Unit normals for ring bonds pointing toward the owning (smallest) ring centroid.
- find_
relevant_ rings_ from_ adj - Relevant Rings: every distinct smallest cycle through each bond.
- find_
sssr - Practical SSSR for depiction: unique shortest cycles through each bond.
- find_
sssr_ from_ adj - Practical SSSR from adjacency + undirected bonds.
- kekule_
paint_ orders - Paint-only bond orders: assign alternating 2/1 around fully aromatic rings.