orthonym.assembly.strict_ring_prefix#
Note
Internal API. Names and behaviour may change between releases.
Strict decorated ring-yl prefixes for the PIN tier’s promotion re-run (PB lane R).
The default (PIN) tier names a molecule once with the strict producers (the first run). Only when
that run finds no name does Orthonym._name_with_pin_promotion name it again with the
best-effort ring-substituent producers admitted (rules.pin_vocabulary.promote_at_pin_tier),
and a name built that way is labelled pin_unverified: “a name in PIN form that only a breadth
producer built”. pin_tier_ring_prefix puts one producer in front of that promotion: the
existing recursive decoration composer (substituent_enumerator._recursive_fragment_substituent_name)
restricted by a policy to the classes whose name is the PIN by construction. A name every piece of
which comes from this producer or from the strict namer is not flagged (metrics.provenance.
record_breadth_promotion is called only by promote_at_pin_tier when a breadth piece is kept),
so it keeps pin_verified.
Where it runs. Only inside the re-run (assembly.memo.pin_promotion_var set, no breadth context):
a molecule the first run names returns before the re-run, so its name is untouched. In the first run,
and in every best-effort / complete / aromatic-general / strict-twin run, pin_tier_ring_prefix
makes the same promote_at_pin_tier call as before (it returns None at once outside the re-run).
What it admits (the Blue Book, “ NUMBERING”:3219, items (b) indicated hydrogen, (c) free valence
(cyclohex-3-en-1-yl (preferred prefix):3268), (e) hydro/ene, (f) prefixes, (g) the prefix cited first):
stema monocycle named by the PIN stem tables (_monocycle_core_tail);booka monocycle named byrules.monocycle_forms:8482,:15800);terminalan all-carbon monocycle with ene/yne locants (a ring with heteroatoms would be an ‘a’-replacement spelling and is refused);polya fused core named byrules.fused_forms/ the retained-name catalogues when a fusion name exists:23708), or a von Baeyer core when none does and no bridged fused name is preferred to it:23831; no ring multiple bond: (c):3256 before (e):3289,bicyclo[2.2.2]oct-5-en-2-yl (preferred prefix):17293);azinea six-membered azine with ring ketones / N-H / a saturated free-valence atom: added hydrogen:24695,pyridin-1(2H)-yl (preferred prefix)) and hydro prefixes at the saturated positions:24766).
What it declines (the breadth path then runs as before and the name stays pin_unverified):
a carbohydrate ring:52681), a ring assembly:15542), a fragment that holds an
instance of the molecule’s principal characteristic group, a ring skeleton repeated outside the
fragment when the molecule has no principal group (the parent is then chosen by /, not
here), a fragment whose ring system is the parent ring (no functional parent: parent_ring_outside;
an amine: amine_parent_ok,:26247), a ring nitrogen on a urea / carbamate carbon
(acylated_ring_nitrogen: piperidine-1-carboxamide (PIN):32685), a sugar ring of unspecified
configuration, an exocyclic =O/=S on the ring unless a group of a class senior to ketones sits outside the
fragment, Table 4.1:18182-:18189: cyclic esters and amides are class 16), a charged core,
an attachment that is not a single bond, a ring heteroatom of nonstandard bonding number (S(=O)(=O),
P(=O): the lambda convention,, is not written here), an aromatic ring atom with an exocyclic
double bond (the stem tables carry no hydro prefixes: 2-oxo-1H-imidazol-3-yl for 2-oxo-2,3-dihydro-
1H-imidazol-3-yl,:24862), a name carrying non-PIN vocabulary.
- orthonym.assembly.strict_ring_prefix.pin_tier_ring_prefix(mol, frag_atoms, attach_idx, breadth)#
The promoted prefix of a ring-bearing fragment the strict cascade declined, or None.
breadthis the zero-argument breadth producer the caller has always offered topromote_at_pin_tier. Outside the promotion re-run this is exactly that one call (plus a second call that records this module’s producer as a promotion site, so thatpromotion_could_changepreviews it: both return None at once).
- orthonym.assembly.strict_ring_prefix.strict_ring_substituent_name(mol, frag_atoms, attach_idx)#
The decorated ring-yl name of a ring-rooted fragment when it is the PIN by construction, else None.
- orthonym.assembly.strict_ring_prefix.single_attachment(mol, frag_set, attach_idx)#
True when the attach atom has exactly one neighbour outside the fragment, by a single bond (a
-ylprefix; a double bond would be an-ylidene, a second bond a-diyl).
- orthonym.assembly.strict_ring_prefix.charged_core(mol, core)#
True when a core atom is charged or a radical ium/ide names are not built here).
- orthonym.assembly.strict_ring_prefix.carbohydrate_core(mol, core)#
True when the core holds a pyranose / furanose pattern. “Carbohydrates” (the Blue Book): carbohydrate names are the PINs, the systematic oxane name is not (:53767).
- orthonym.assembly.strict_ring_prefix.unspecified_carbohydrate(mol)#
True when the molecule has a pyranose / furanose ring with a stereocentre left unspecified. The Blue Book names carbohydrates by their configuration ff.) and no rule read for this producer makes the systematic oxane name of a sugar of unknown configuration the PIN, so no prefix of such a molecule is promoted (the molecule stays with the first run).
- orthonym.assembly.strict_ring_prefix.principal_group(mol)#
(class, instances)of the molecule’s principal characteristic group,(None, )if none.
- orthonym.assembly.strict_ring_prefix.principal_group_in_fragment(pg_matches, frag_set, attach_idx)#
True when an instance of the principal group has an atom in the fragment other than the attach atom: the fragment could be the parent, not a substituent. An instance that touches the fragment only at the attach atom (the acetyl of
1-(...cyclohexenyl)ethan-1-one) does not count.
- orthonym.assembly.strict_ring_prefix.skeleton_twin(mol, frag_set, attach_idx)#
True when the fragment’s ring system has the skeleton of a ring system outside the fragment.
Called when the molecule has no principal group: the parent is then the senior ring or ring system ,:19420 ff.) and, for equal skeletons,; the substituent namer does not decide that (
4-chloro-7-[(3-chloro-4-nitroquinolin-7-yl)sulfanyl]-3-nitroquinolineis not the PIN, BB3-chloro-7-[(4-chloro-3-nitroquinolin-7-yl)sulfanyl]-4-nitroquinoline:22088).
- orthonym.assembly.strict_ring_prefix.functional_group_classes(mol)#
The functional-group classes the molecule has, None when perception fails.
- orthonym.assembly.strict_ring_prefix.parent_ring_outside(mol, frag_set)#
For a molecule with no functional parent: True when a ring system outside the fragment is strictly senior, “… (a) to (g)”, the Blue Book ff.) to every ring system the fragment holds. The parent is then the senior ring system of the molecule: ring before chain), so a fragment that is senior or tied cannot be a prefix of it; the ring-system score is the one the namer’s own parent choice uses (
rules.ring_selection.ring_system_score).
- orthonym.assembly.strict_ring_prefix.amine_parent_ok(mol, frag_set, attach_idx, pg, pg_matches)#
When the fragment hangs on the nitrogen of the principal amine, True only when another ring system bonded to that nitrogen is strictly senior to the fragment’s. “Selection of the principal chain or senior ring system in secondary and tertiary amines” (the Blue Book): the amine is named on “a principal chain and a senior ring system (see “, the ring before the chain, and
ranks the rings (
N-(furan-2-yl)-1H-pyrrol-2-amine). A fragment that is the senior ringis the parent, not a prefix; the name that cites it as a prefix names the junior ring as the parent (
N-(benzimidazol-5-yl)-N,1-dimethylpiperidin-4-aminefor a benzimidazole beside a piperidine).
- orthonym.assembly.strict_ring_prefix.tied_amine_parent(mol, pg, pg_matches)#
True when two ring systems bonded to the principal amine nitrogen tie on the ring-system score: the parent is then chosen by “the senior parent structure that has the lower locant or set of locants for substituents cited as prefixes”, the Blue Book), which the re-run’s ring selection does not compare (’…-N-(4-methoxypyridin-3-yl)pyridin-3-amine’ with locants {N,N,6} where the other pyridine gives {N,N,4}); such a molecule keeps the first run’s result.
- orthonym.assembly.strict_ring_prefix.n_yl_without_added_hydrogen(mol, attach_idx, core_tail)#
True when the free valence sits on a ring nitrogen and the tail is a hydro form that cites neither indicated hydrogen nor added hydrogen: a ring nitrogen with no hydrogen in the mancude parent takes ‘added indicated hydrogen’, the Blue Book “When no hydrogen atoms are present… it is necessary to use ‘added indicated hydrogen’”;,:24687 “preferred over the use of nondetachable hydro prefixes… for preferred IUPAC names”): ‘3,4-dihydroquinolin-1(2H)-yl (PIN)’ (:7467), ‘hexahydropyrrolo[1,2-a]pyrazin-2(1H)-yl’, not ‘1,2,3,4-tetrahydroquinolin-1-yl’ or ‘octahydropyrrolo[1,2-a]pyrazin-2-yl’. (‘2,3-dihydro-1H-isoindol-2-yl (preferred prefix)’,:17380, cites its indicated hydrogen.)
- orthonym.assembly.strict_ring_prefix.acylated_ring_nitrogen(mol, frag_set, attach_idx)#
True when the attach atom is a ring nitrogen bonded to a carbonyl-type carbon that carries a further heteroatom (a urea, carbamate or thiocarbamate carbon). The ring is then the parent of a carboxamide or carboxylate (
piperidine-1-carboxamide (PIN), the Blue Book), not a prefix offormamide.
- orthonym.assembly.strict_ring_prefix.hypervalent_core(mol, core)#
True when a ring atom has a bonding number other than its standard one (a ring sulfone, a phosphine oxide): the name needs the lambda convention, the Blue Book).
- orthonym.assembly.strict_ring_prefix.aromatic_with_exocyclic_double_bond(mol, core)#
True when an aromatic ring atom carries an exocyclic double bond (a ring ketone or thione of an azole): its name needs hydro prefixes and indicated hydrogen, which the stem tables do not carry.
- orthonym.assembly.strict_ring_prefix.ring_has_multiple_bond(mol, core)#
- orthonym.assembly.strict_ring_prefix.ortho_fused_pair(mol, core)#
True when two rings of the core, each of five or more members, share exactly one bond: a bridged fused name exists and is preferred to the von Baeyer name, the Blue Book;
hexadecahydro-1H-8,12-methanobenzo[13]annulene (PIN)againsttricyclo[12.3.1.0^5,10]octadecane,:23875).
- orthonym.assembly.strict_ring_prefix.cage_core_ok(mol, core)#
A von Baeyer core is admitted only with no ring multiple bond and no bridged fused name.
- orthonym.assembly.strict_ring_prefix.oxo_class_ok(mol, frag_set, core)#
(the Blue Book;:18182 class 9 and:18184 class 11 name cyclic esters and amides as heterocycles ‘see 16’,:18189 class 16 ketones): a ring-yl with an exocyclic =O/=S/=N on a ring atom is a prefix
oxoonly when a group of a class senior to class 16 sits outside the fragment (an acyclic acid, carboxylate, ester, amide, nitrile, aldehyde). Otherwise the ring ketone competes for the parent and decides, which this producer does not.
- orthonym.assembly.strict_ring_prefix.poly_branch(mol, core, attach_idx, carriers, core_tail)#
Which polycyclic core numberer produced
core_tail(‘pah’, ‘fhet’, ‘fform’, ‘cage’), or None. The composer reports only the winning tail; the numberers are tried in its order.
- orthonym.assembly.strict_ring_prefix.core_automorphisms(mol, core, attach_idx)#
The automorphisms of the ring core that fix the attach atom and keep each atom’s element, charge, hydrogen count, aromaticity and number of exocyclic double bonds (an automorphism then keeps every locant set of the core name: indicated hydrogen, hydro, ene, oxo positions).
- class orthonym.assembly.strict_ring_prefix.StrictRingPolicy(frag_set)#
Bases:
objectAdmission and numbering rules of
_recursive_fragment_substituent_namefor this producer.- admit_core(kind, mol, core, attach_idx, carriers, core_tail)#
- renumber(mol, core, attach_idx, pos, named)#
posresolved by (g) (the Blue Book, “lowest locants for the substituent cited first as a prefix in the name”) among the numberings that tie on (a)-(f), or None when the tie cannot be resolved by it (the descriptors of a stereocentre would take their locants from the input atom order).