orthonym.rules.isotope_induced#
Note
Internal API. Names and behaviour may change between releases.
The stereocentres a nuclide makes: their descriptors for any name of the decorator (IUPAC 2013,,.
STEREOISOMERIC ISOTOPICALLY SUBSTITUTED COMPOUNDS: “Two types of stereoisomeric isotopically
substituted compounds are possible: (1) those in which the stereoisomerism results from isotopic modification; (2) those whose analogous unmodified compounds are themselves stereoisomers.”… “When they must be inserted into the name at the same place as isotopic descriptors, the stereodescriptors are cited first.” (‘(1R)-(1-2H1)ethan-1-ol (PIN)’,.) NAMING OF STEREOISOMERS: “In preferred IUPAC names, stereodescriptors are placed immediately at the front of the part of the name to which they relate. They are placed at the front of the complete name when related to the parent structure; they are cited in parentheses followed by a hyphen. When they relate to substituent groups, they are cited at the front of the corresponding prefix.” (the Blue Book)
A centre a nuclide makes (a CHD, a carbon beside a CH2D) is no stereocentre of the molecule without its
nuclides, so the skeleton of the decorator carries no descriptor for it, and every candidate of its strategies
reads back without that stereo and fails the full read-back. decorate_isotope_stereo finds the descriptor
for one skeleton spelling and a one-descriptor placement, by trying every locant and configuration of the
centres together; decorate_induced finds it for the name ANY strategy builds: the strategies run on the
molecule with those centres left unspecified, and the name that reads back is completed.
Where a descriptor stands: at the front of the part of the name its centre belongs to. For a centre
of a substituent that is the front of the innermost group that holds the isotope descriptor; for a centre of
the acid of an ester, of an anhydride or of a salt it is the front of the word that holds the isotope
descriptor, not the front of the complete name, which is the front of the first word and the part of the alkyl
group: ‘ethyl (R)-4-nitrobenzene-1-sulfinate (PIN)’ The chirality symbols ‘R/S’,
the Blue Book), ‘methyl (S)-[methyl(phenyl)phosphinate] (PIN)’ Phosphates, phosphonates, and
related compounds,:46022). The first spelling of the descriptor that reads back wins, innermost first. A
descriptor left at the front of a name whose centre is in a later word, or inside marks, is below the PIN: the
validity check of the placement (validation/spelling/checks_placement.py) declines it only when its locant
is higher than the positions of the first word, so it would pass ‘ethyl’ and ‘butyl’ and refuse ‘methyl’.
Every centre is found alone, against the input with the chiral tags of the other induced centres removed
(the name carries no descriptor for those either), so the OPSIN reads one centre costs are scopes x
locants x 2 and not their product; the descriptors then go into their scopes together and the name is read
back whole (canonical SMILES and the full InChIKey with its isotope layer, _isotope_round_trips).
Nothing is returned that does not read back as the input.
- orthonym.rules.isotope_induced.decorate_isotope_stereo(skeleton, keys, original, stripped, n_pos, extra_locants)#
: an isotope-INDUCED stereocentre – a centre that is a stereocentre only because a nuclide breaks a local symmetry (
(1R)-(1-2H1)ethan-1-ol, achiral once the D is collapsed). The skeleton is named from the STRIPPED mol and carries no such descriptor, and the isotope descriptor alone reproduces the constitution but not the stereo, so the full-InChIKey oracle rejects it and the row abstains.Fully oracle-driven (no atom->locant map needed, consistent with the rest of this module):
find the isotope-descriptor placement reproducing the CONSTITUTION (
stereo_blind– e.g.(1-2H1)ethan-1-ol);enumerate stereodescriptor prefixes over (locant-subset x R/S) for the
kinduced centres, cost-capped;accept the first (lowest-locant, deterministic) prefixed candidate whose FULL InChIKey (stereo + isotope) reproduces the original.
: “the stereodescriptors are cited first” – the prefix leads the part of the name its centre belongs to: the winner, found at the front of the complete name, is moved to the front of the word or group that holds the isotope descriptor when that reads back too (
cite_where_it_belongs). Every emission is FULL-oracle gated, so a wrong config/locant fails closed; fails closed (None) when there is no induced centre, no constitution placement, the enumeration would exceed the cap, or nothing round-trips.
- orthonym.rules.isotope_induced.descriptor_spans(name)#
(start, end)of every isotope descriptor inname.
- orthonym.rules.isotope_induced.induced_centres(original)#
The atoms (indices of
original) of the tetrahedral stereocentres the nuclides make: specified inoriginaland not stereogenic once every nuclide is an ordinary atom. Empty when there are none; None when a stereo element of another kind (a double bond) is made by a nuclide too (it takes a descriptor this does not build).
- orthonym.rules.isotope_induced.complete_stereo(base, original, induced, n_pos)#
base– a name oforiginalwithout the stereodescriptors of its induced centres – with those descriptors cited, or None. A scope is tried innermost first, locants ascending,RbeforeS; the first that reads back, for each centre, is taken, and the name is read back whole.
- orthonym.rules.isotope_induced.cite_where_it_belongs(base, original, tokens, front)#
The name
front–basewith the stereodescriptorstokenscited at the front of the complete name, read back asoriginal– with them cited at the front of the part their centre belongs to, when that reads back: the innermost scope of_scopesat which all oftokensread back whole.frontwhen none does; it is then below the PIN if the centre is not in the first word or inside marks.
- orthonym.rules.isotope_induced.decorate_induced(style, namer, original, induced)#
The name of
originalwhen its induced centres have no descriptor in the name the strategies of the decorator build: those strategies onoriginalwith the centres unspecified, thencomplete_stereo().