orthonym.rules.fused_pin_offer#

Note

Internal API. Names and behaviour may change between releases.

The fusion name of a molecule when the older fused-heterocycle namer’s name is known not to be the PIN and the bridged fused PIN builder names the same molecule better.

fused_rings.name_fused_heterocycle is asked first for every fused ring system. It builds fusion descriptors from the two components of the system and, for a skeleton that has a retained name, spells the descriptor instead: ‘benzo[d]pyrimidine’ for quinazoline, ‘pyrazino[2,3-d]pyrimidine’ for pteridine, ‘4H-cyclohexa[b]pyran’ for 4H-1-benzopyran.

“Retained names for heterocycles (also called trivial names) with the maximum

number of noncumulative double bonds (called mancude ring systems) used for parent components and as attached components are given in Table 2.8” (the Blue Book), and Table 2.8 gives ‘(9) quinazoline (PIN)’ (:11553). The namer records such a spelling as a non-PIN fragment (fused_rings._record_non_pin_spelling), as it does a hydro name that puts a ketone on a saturated position of a hydro core without the added hydrogen ,:24766;,:24689), so the name it ships is labelled below the PIN and the default tier declines the molecule. The builder (bridged_fused_pin.build_fused) names the same molecules from the PIN parents (‘1,4-dihydroquinazolin-2-amine’, SUBSTITUENT GROUPS MODIFIED BY THE PREFIXES ‘HYDRO’ OR ‘DEHYDRO’,:16870) but is only tried when the older namer declines (bridged_fused.name_fused_carbocycle_pin), so for these molecules it never ran.

This module offers the builder’s name beside the older namer’s, as two candidates for one molecule (the contributor guide a project rule). The older name stays unless ALL of these hold:

  • the older name carries a recorded non-PIN part (known_non_pin: the name-scoped records and the non-PIN vocabulary, the test that labels a shipped name below the PIN);

  • the builder names the molecule, and its name carries no recorded non-PIN part (an offer that is labelled below the PIN as well gains no tier);

  • OPSIN reads the builder’s name back to the molecule’s full standard InChI (constitution, stereo, charge, isotopes), the check that gives a name the ‘verified’ of its tier, AND to the same canonical SMILES (the InChI does not see a bond-shift partner, see _reads_back);

  • the offered naming covers the whole ring system (the check the caller applies to the older name).

The label of the name that ships is still decided downstream (the namer’s own validity gate and the independent spelling check), so a builder name that fails the spelling check ships as systematic_verified, the label the older name had. A molecule the builder declines, or without a JVM, keeps the older name.

orthonym.rules.fused_pin_offer.known_non_pin(prov, name)#

True when the label logic would lower name below the PIN for a reason that is NAME-scoped: a recorded non-PIN fragment or label it contains, or non-PIN vocabulary. The whole-call flags (a breadth producer’s ring prefix, the PIN tier’s promotion re-run) and the uncertified PIN names are left out, as in the namer’s own _known_non_pin: they lower every name of the call equally, so they cannot separate the two candidates.

orthonym.rules.fused_pin_offer.name_fused_with_pin_offer(mol, covers_ring_system)#

fused_rings.name_fused_heterocycle(mol), or the bridged fused PIN builder’s tuple for the same molecule when it is a verified, PIN-form replacement of a name that carries a recorded non-PIN part (see the module doc). Both are the complex-ring tuple (name, ring_atoms, atom_to_locant, substituents_included), or None.

covers_ring_system(mol, atom_to_locant) is the caller’s coverage check of a fused core (composer._fused_core_covers_ring_system), applied to the offered tuple.