orthonym.rules.prefix_stereo#
Note
Internal API. Names and behaviour may change between releases.
The input’s stereo composed on a stereo-free name with each descriptor at the front of the part it relates to.
NAMING OF STEREOISOMERS (the Blue Book),:44643: “In preferred IUPAC names, stereodescriptors are
placed immediately at the front of the part of the name to which they relate…. When they relate to substituent
groups, they are cited at the front of the corresponding prefix. They are preceded by a numerical or letter locant
to describe the position of the stereogenic unit when such locants are present”. The composer of the best-effort
tier (namer._try_compose_input_stereo) cites every descriptor at the front of the complete name, in OPSIN’s
numbering of the stereo-free name; a double bond or a centre of a substituent then carries the substituent’s own
locant at the front of the name, where it is read on the parent ((1Z)-4-[(2-aminophenyl)...methyl]pyridazine),
and the name does not read back. Here each stereo unit is placed on its own: at the front of the name or at the
front of an enclosed prefix (4-[(Z)-(2-aminophenyl)...methyl]pyridazine), with the locant OPSIN gives its atom
in the stereo-free name or with none, and a place is kept only when OPSIN reads the name with that one descriptor
to the input with only that unit’s stereo. The units then go into one name, one block per place, the enclosing
marks around each block are derived again,:7446: a descriptor block nests,:7478), and the
name must read back to the input as an exact isomeric match and pass the enclosing-marks spelling check. The name
is recorded as non-PIN: the caller labels it below the PIN. Nothing is guessed: a unit no place reads back leaves
the name to the caller’s decline.
- orthonym.rules.prefix_stereo.place_stereo_by_scope(flat_name, smiles)#
flat_namewith the stereo ofsmilesplaced unit by unit (see the module docstring), or None. The name is recorded as a non-PIN fragment.
- orthonym.rules.prefix_stereo.scoped_over_front(composed, flat_name, smiles, in_key)#
composed(the front composition ofnamer._try_compose_input_stereo), or the name ofplaced_in_prefixes()in its place when that name reads back toin_keytoo andcomposeddoes.
- orthonym.rules.prefix_stereo.placed_in_prefixes(flat_name, smiles)#
flat_namewith the stereo ofsmilesplaced unit by unit, when that places a descriptor at the front of an enclosed prefix; None when every descriptor stands at the front of the name (the caller’s front composition, byte for byte the same places) or when no place is found.The front composition (
namer._try_compose_input_stereo) numbers the stereo-free name with OPSIN’s labels, which give every substituent atom its own locant: a double bond inside a substituent was cited at the front with the substituent’s locant (‘(1E)-4-{…[(…-5-ylidene)methyl]phenoxy}butanoic acid’, C-1 of ‘methyl’). OPSIN reads it back, because a front descriptor that finds no bond in the parent is tried on every group of the name (StereochemistryHandler.assignStereoBond), so no read-back sees it; (the Blue Book): “When they relate to substituent groups, they are cited at the front of the corresponding prefix”.
- orthonym.rules.prefix_stereo.place_pair_by_scope(flat_name, smiles, labelled, swapped)#
(name, twin)for the CIP dialect judge (validation.cip_dialect):labelledis the input labelled with the letters OPSIN reads right (the record’s, with the letter of each unit ofswapped–('a', atom)or('b', bond)– changed to the other one). The places are found exactly as:func:place_stereo_by_scope finds them, with those letters, and the name with them (the twin) must read back to the input; the name returned first cites the same places and locants with the record’s letter at the units ofswapped. None when a unit has no place or the twin does not read back.
- orthonym.rules.prefix_stereo.composed_reads_back(composed, smiles, in_key)#
OPSIN reads
composedtoin_key, with the input’s protonation site and radical graph.