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.general_tier_ring_prefix(mol, frag_atoms, attach_idx, wider)#
The ring-yl prefix a general tier (
complete,best-effort) gives a ring the strict cascade declined.The default tier names such a ring in its promotion re-run with the strict producer above, and the name is a certified PIN (‘adamantan-2-yl’, the retained ‘adamantane’). A general tier called the wider producer (
wider, the call with the composition switch) and labelled the name, which is the same string, as a prefix only a general tier builds (record_general_ring_prefix): the name came outpin_unverifiedwhere the default tier givespin_verified. The strict producer is asked first; the wider producer, and the label, are for a ring it declines.
- orthonym.assembly.strict_ring_prefix.ring_prefix_after_chokepoint(mol, frag_atoms, attach_idx, mancude, wider)#
The ring-yl prefix of a ring-bearing fragment the ring chokepoint declined (Step 1c of the substituent namer).
mancudeis the chokepoint’s breadth switch as the caller set it (best-effort only),widerthe call with the composition switch. Where the switch was off the default tier’s promotion producer is asked first (pin_tier_ring_prefix). The strict producer is then asked at every wider tier (valid, complete, best-effort), as a general-tier ring is incomposer(general_tier_ring_prefix). A fused parent keeps its ring-bearing branch (‘4-methylpiperazin-1-yl’, ‘4-methoxyoxan-4-yl’) that way: with no name for the branch the fused assembly fails closed and the von Baeyer name wins, where “Five-membered ring requirement” (the Blue Book, :23710) prefers the fusion name when it is allowed. The strict name is the PIN by construction (module docstring), so it carries no general-tier label; the wider producer is not asked a second time.
- 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.strict_acyl_branch_name(mol, fset, attach_idx)#
The acyl prefix of a ring-bearing branch attached through an acyclic carbonyl carbon (‘benzoyl’, ‘3-(trifluoromethyl)benzoyl’, ‘phenylcarbamoyl’, ‘phenoxycarbonyl’), built by the book’s acyl writer (
acyl_prefix.ring_acyl_branch_prefix): names the acyl group of a ring acid by its acid name (‘benzoyl’ from the retained ‘benzoic acid’,, substitution allowed), (method (1), :32922) an amide branch ‘(R)carbamoyl’. Its ring part is named by the side-group namer, at the PIN tier through this module’s strict producer, so a part a breadth producer had to build is still recorded and labels the name. None when the branch holds an instance of the principal characteristic group, is charged or has another attachment.
- orthonym.assembly.strict_ring_prefix.acyl_branch_head(mol, frag_atoms, attach_idx)#
The head of a branch (
attach_idxwhen it is in the branch, else the one branch atom bonded to it) when it is an acyclic, uncharged carbon bearing =O: an acyl branch (‘benzoyl’, ‘phenylcarbamoyl’); else None.
- orthonym.assembly.strict_ring_prefix.acyl_carbonyl_atoms(mol, sub_infos)#
The carbonyl carbon and =O of every acyl branch of a ring parent (
sub_infosofextract_ring_substituents). The branch’s acyl prefix (‘benzoyl’) cites its carbonyl, so the ketone match that spans the ring atom and that carbon is not cited a second time as an ‘oxo’ of the ring (‘2-benzoyl-2-oxocyclohexane-1-carboxylic acid’ for ‘2-benzoylcyclohexane-1-carboxylic acid’).
- orthonym.assembly.strict_ring_prefix.ketone_or_book_acyl_group(mol, start_idx, ring_atoms)#
benzene_acid_suffixes.identify_chalcogen_acyl_group(-C(=S)-R,, then any other ketone-acyl branch -C(=O)-R of a benzene ring by the book’s acyl writer (acyl_prefix.ring_acyl_branch_prefix): the acyl name of the acid R-COOH, a substituted ‘benzoyl’,: ‘4-[3-(trifluoromethyl)benzoyl]benzoic acid’), ‘<ring>-carbonyl’ (‘naphthalene-2-carbonyl’). None when the branch holds an instance of the principal characteristic group (the multiplicative name is the PIN then: ‘4,4’-carbonyldibenzoic acid (PIN; multiplicative name)’, not ‘4-(4-carboxybenzoyl)benzoic acid’, the Blue Book) or the writer has no name.
- 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.
- 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).
- orthonym.assembly.strict_ring_prefix.chalcogen_rooted_acyl(mol, acyl_c)#
True when the acyl carbon
acyl_c(an Atom) also carries a single-bonded chalcogen: -NH-CO-O-R or -NH-CO-S-R is the carbamate prefix (‘[(methylsulfanyl)carbonyl]amino’, the Blue Book;n_acyl_amido.acylated_n_group), never an amido prefix (‘(methylsulfanyl)methanamido’).
- orthonym.assembly.strict_ring_prefix.acid_is_principal(mol)#
True when the principal characteristic group of
molranks above the amides (an acid, anhydride, ester or acid halide,: an amide of the molecule is then a prefix.