Expand description
Ring-center spoke detection and rigid placement (CX m:).
The SMILES dummy * is dropped from the spoke graph so it is not an
extra CoordGen vertex. The first real bond is placed at a 120° chain angle
to the stem (ethyl zigzag), not collinear with the centroid. A silent dummy
sits at the centroid; the painted stem runs from there to the substituent
(one bond past the ring).
Structs§
- Spoke
Comp - One ring-center substituent after dropping the dummy from the spoke graph.
Constants§
- CHAIN_
BOND_ OFFSET - 120° chain bond at the attachment carbon (turn of π/3 off the stem).
Functions§
- ang_
diff - bisector_
angles - Outward angles of ring-bond perpendicular bisectors (centroid → midpoint).
- detect_
ring_ spokes - Detect CX
m:groups whose endpoints lie on a ring (fusion allowed). - first_
spoke_ neighbor - First substituent neighbor of
attachinspoke_atoms(not dummy). - greedy_
spoke_ angle - Greedy bisector slot, then 1-D refine (rigid rotation around the centroid).
- kink_
turn - Interior direction change at
balonga → b → c(0 = collinear). - place_
spoke - Rotate/translate
localsoattachsits atcentroid + L·u(θ). - point_
segment_ dist - ring_
exit_ along_ ray - Distance from the ring centroid along
angleto the ring perimeter. - spoke_
angle_ energy - Energy of a stem angle: hard no-cross of ring atoms, soft snap to a bisector.
- spoke_
stem_ len - Stem length: ring perimeter along the ray, plus one house bond — not from the centroid (too close) and not an extra bond past the ring (too far).