orthonym.rules.isotope_locant_map#

Note

Internal API. Names and behaviour may change between releases.

An isotopically substituted compound named from OPSIN’s locants of its unlabelled name (the all-organic program, lane I).

“nuclide descriptors” (the Blue Book): the nuclide symbols, with the locants of the labelled

positions, are enclosed in parentheses and placed before the name, ‘(1,1,1,3,3-2H5)pentan-2-one’, :44208); the symbols are cited in the alphanumerical order of the element, then of the mass number, and an integer locant is repeated once per labelled atom.

rules.isotopes.decorate_isotopic_name searches the offsets of the skeleton name for a descriptor and asks OPSIN which one reproduces the input; on 197 declined PubChem rows that name without their labels it found none. Here the locants come from OPSIN itself: validation.opsin_roundtrip.opsin_atom_locant_map maps each atom of the unlabelled molecule to the locant OPSIN gives it in the skeleton name, so a front descriptor with those locants names the labelled positions, and the name ships only when OPSIN reads it back to the input’s full standard InChIKey, whose isotopic layer holds every label. A labelled atom with no locant in the map (an atom of a substituent that the name numbers on its own, an oxygen of a suffix) declines: the old search stays the only route there.

Called only after the old search finds nothing, so no name it ships changes; the name is recorded as no PIN (record_non_pin_fragment): a front descriptor is not always where the book cites it.

orthonym.rules.isotope_locant_map.locant_map_descriptor(original, skeleton_name)#

The front descriptor of original on skeleton_name (‘(2,2,4-2H3)’), or None.

orthonym.rules.isotope_locant_map.decorate_by_locant_map(original, skeleton_name)#

skeleton_name with the front descriptor of original’s labels, when OPSIN reads it back to the full standard InChIKey of original; else None. One component only (an adduct keeps the old route).