orthonym.validation.axis_identity#
Note
Internal API. Names and behaviour may change between releases.
Biaryl stereogenic axes (atropisomers): the configuration the standard InChIKey cannot see.
“Stereogenic axis” (the Blue Book,:44824): “Stereodescriptors ‘M’ and ‘P’ are used in preferred
IUPAC names. The lowest locant on the axis is cited before the stereodescriptor.” “Specification of stereogenic axes” (:49797) gives the PINs ‘(1M)-6,6′-dinitro[1,1′-biphenyl]-2,2′-dicarboxylic acid’ (:49803) and ‘(2P)-2-[2-(hydroxymethyl)naphthalen-1-yl]-3,5-dimethylphenol’ (:49828).
An axis reaches Orthonym only in a CXSMILES string (|wU:..|/|wD:..|, RDKit’s STEREOATROPCW/CCW); RDKit drops
an allene configuration at parse, and a Mol with an atropisomer tag is declined at input (input_mol). The M and P
forms share one standard InChIKey, so a name is checked here atom by atom:
- *
axis_verdict()– ‘n/a’ (the input has no axis: every other molecule), ‘match’ (the name’s read-back has the input’s one axis with the same M/P), ‘omission’ (the name cites no axial descriptor: it names the input without its axis and is not the PIN,:44624), ‘mismatch’ (anything else, fail closed).
*axis_decorated() – the descriptor-free name with the axis cited at the front, kept only on ‘match’.
*axial_locant_twin() – the spelling OPSIN reads: OPSIN main reads ‘(M)-’ and no locant before an axial
descriptor (dan2097/opsin#356); OPSIN 2.9.0 reads no axial descriptor, so there no name gets one.
Labels come from rdCIPLabeler on a fresh parse of a string, never from a renumbered Mol (a renumbering can flip
RDKit’s atropisomer label), and the same labeller reads both sides. OPSIN’s extended SMILES puts the wedge on a bond
that RDKit may read as a Kekule double bond, where it drops it without an error;:func:_read_extended moves the wedge
onto RDKit’s aromatic writing of the same atoms and fails closed when any wedge is lost.
- orthonym.validation.axis_identity.axial_descriptors(name)#
How many axial descriptors (M, P, Ra, Sa) the stereo groups of
namecite.
- orthonym.validation.axis_identity.axial_locant_twin(name)#
namewith the locant of its one axial descriptor left out (‘(1M)-’ -> ‘(M)-‘), the form OPSIN main reads;nameunchanged when it cites no axial descriptor with a locant, or more than one axial descriptor.
- orthonym.validation.axis_identity.axis_verdict(input_smiles, name)#
‘n/a’ | ‘match’ | ‘omission’ | ‘mismatch’ for
nameofinput_smiles(see the module docstring).
- orthonym.validation.axis_identity.record_axis_omission(name)#
Label a name that leaves the input’s axis out: it names the input and is not the PIN “Stereodescriptors used in substitutive nomenclature”, the Blue Book: “In preferred IUPAC names, stereodescriptors, preceded by a locant, must be cited to specify each stereogenic unit”).
- orthonym.validation.axis_identity.key_blind_verdict(input_smiles, opsin_smiles, name)#
The verdict of
validation.key_blind_double_bondswith the axis checked as well: ‘mismatch’ when either says so; an axis left out is labelled here (record_axis_omission()); else the double-bond verdict.
- orthonym.validation.axis_identity.axis_decorated(input_smiles, name)#
namewith the one axis ofinput_smilescited at the front (‘(1M)-[1,1’-binaphthalene]-2,2’-diol’), when OPSIN reads that name (or its:func:axial_locant_twin) back to the input’s InChIKey and axis; else None.The locant is the lowest of the axis atoms’ locants in OPSIN’s numbering of
name; an unprimed locant before its primed one,:3193); a leading group of stereodescriptors takes it in locant order.
- orthonym.validation.axis_identity.caller_axis_decorated(mol, name)#
axis_decorated()for the caller’s own input, whenmol(a producer’s molecule) is that whole input; None otherwise (a nested naming of a part, an input with no axis). The axis and its label are read from the caller’s string, never frommol.
- orthonym.validation.axis_identity.exit_check(engine, name, smiles)#
The axis check of a public exit (
Orthonym._exit_round_trip_check), for the caller’s own string: a name that leaves the axis out ships labelled (record_axis_omission()); a name whose axis is not the input’s is withdrawn. Every other name, and every input with no axis, passes unchanged.