Skip to main content

Module rings

Module rings 

Source
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.