orthonym.assembly.ring_ylidene_stereo#
Note
Internal API. Names and behaviour may change between releases.
E/Z of a double bond that joins a ring atom to a ring atom of a ‘-ylidene’ substituent.
rules.stereochemistry.ring_ylidene_bonds names the bonds and carries the Blue Book rule
, the Blue Book-48279): a stereo double bond with a ring atom at each end is
cited by neither scope of the floor’s name, so the name reads back to the right skeleton with that
bond’s configuration undefined and the full-key gate refuses it. This module is the floor’s use of
that licence: which scope cites the bond, and which bonds the gate can check.
The unit is ONE double bond, so exactly one scope cites it (two descriptors for one bond read back as no structure). Two modes, each a candidate the floor offers beside its existing rungs:
'host'method (a): the scope that holds the bond’s parent-side atom cites it with thatatom’s locant, at the front of its own name (the whole name for the top spine, the host’s prefix for a branch);
'branch'method (b): the branch cites it with the locant of its own ylidene atom, at thefront of its prefix (‘[(5Z)-…-5-ylidene]’).
Only the bonds the standard InChIKey can check are cited (key_visible_ring_ylidene_bonds).
For a bond the key does not encode (a charge-separated or tautomer-normalised drawing, such as a
squaraine dye) a wrong sense and the right one give the same key, so the gate cannot tell them
apart and the descriptor would be unchecked; such a bond is left uncited, as before. For a bond the
key does encode, a wrong locant or a wrong sense changes the key and the full-InChIKey gate
(validation.reconstruct.verify_or_none) refuses the name.
Nothing here runs unless the molecule has such a bond, so every other molecule keeps its
candidates byte for byte. For a molecule that has one, the best-effort ladder (t4_coverage)
runs its existing spellings first, with this rung suspended (ring_ylidene_suspended), and
offers it only to a molecule those leave without a verified name: a named row keeps its name.
- orthonym.assembly.ring_ylidene_stereo.ring_ylidene_suspended()#
Run the floor as it was before the ring=ring rung existed.
- orthonym.assembly.ring_ylidene_stereo.is_suspended()#
- class orthonym.assembly.ring_ylidene_stereo.RingYlidene(mode, bonds)#
Bases:
objectOne rebuild’s citing rule: the scope that cites (
mode) and the indices of the ring=ring bonds it cites (the ones the key can check).- mode: str#
- bonds: FrozenSet[int]#
- orthonym.assembly.ring_ylidene_stereo.key_sees_bond(mol, bond)#
True iff the standard InChIKey of
molchanges when the stereo ofbondis removed, i.e. the key encodes this bond’s configuration and a name that gets it wrong cannot pass a full-key comparison.
- orthonym.assembly.ring_ylidene_stereo.key_visible_ring_ylidene_bonds(mol)#
The ring=ring stereo double bonds of
molwhose configuration the InChIKey encodes.
- orthonym.assembly.ring_ylidene_stereo.ring_ylidene_descriptors(mol, atom_to_locant, spec, attach_bond=None)#
The
(locant, 'E'|'Z')pairs a scope cites for the ring=ring bonds ofspec.atom_to_locantis the numbering of the scope (a spine);attach_bondis the bond that joins the scope, as a branch, to its host (Nonefor the top spine). A bond with exactly one end in the numbering leaves the scope: in'host'mode the scope cites it unless it is its own attachment bond (the host cites that one); in'branch'mode the scope cites only its own attachment bond (the child cites the others).
- orthonym.assembly.ring_ylidene_stereo.scope_block(mol, atom_to_locant, spec, skip_bonds=(), attach_bond=None)#
The descriptor block (‘(2R,5Z)-’) of one scope with its ring=ring double bonds cited as
specsays; ‘’ when the scope has no descriptor.