orthonym.rules.amide_parent#

Note

Internal API. Names and behaviour may change between releases.

The principal amide of a molecule that holds two carboxamide groups on different chains.

“SENIORITY ORDER FOR CLASSES” (the Blue Book), Table 4.1, has one class of amides: the primary, secondary and

tertiary amide have the one rank, so no amide is the principal group because of the number of hydrogens on its nitrogen. SENIORITY_ORDER lists the three subtypes in a row (primary first), which made the primary amide the parent of ‘CCC(=O)N(C)C(C)C(N)=O’ (‘2-(N-methylpropanamido)propanamide’, a name that cites the better parent as a prefix). Which amide is the parent is a choice between parent structures of the one class, by the criteria in this order:

  1. “The senior parent structure has the maximum number of substituents corresponding to the principal characteristic group (suffix)” (:18875): the parent that holds more carboxamide groups outranks one that holds fewer, whatever the rings are (‘5-(pyridine-4-carboxamido)benzene-1,3-dicarboxamide’: the benzene with two groups outranks the pyridine with one). The groups of one ring system are counted together, as the suffix ‘dicarboxamide’ counts them; a chain holds one (comparable_amide_units does not compare two groups of one chain).

  2. “Systems composed of rings and chains” (:19336) (1) “Within the same class, a ring or ring system has seniority over a chain”. Of two ring carboxamides the one on the senior ring system is the parent: “SENIORITY ORDER ONLY FOR RINGS AND RING SYSTEMS” (:19402), (heterocycle, nitrogen, the senior heteroatom, the number of rings, the skeletal atoms,…) and the criteria of that decide between rings (rules.ring_selection.ring_system_score). Two ring carboxamides that tie on the ring system are compared by (criterion 4), as two acyl chains are.

  3. “The principal chain has the greater number of skeletal atoms” (:20938). The chains are the acyl chains through acyclic carbon atoms, so (skeletal heteroatoms) does not arise.

  4. “If the criteria of through, where applicable, do not effect a choice of a senior parent structure, the following criteria are applied successively until there are no alternatives remaining” (:21016), as far as they can differ between two carbon chains whose first atom is the carbonyl carbon: (a) “the greater number of multiple bonds”, (b) “the greater number of double bonds”, (j) “the lower locant(s) for endings or prefixes that express changes in the level of hydrogenation, i.e., for ‘ene’ and ‘yne’ endings” ; “lower locants are assigned first to the endings as a set without regard to type and then to ‘ene’ endings”), (k) “one or more isotopically modified atoms”:.1 the greater number of modified atoms,.2 the greater number of nuclides of higher atomic number,.3 of higher mass number,.4 the lowest locants,.5 the lower locants for the nuclides of higher atomic number,.6 for those of higher mass number). Criteria (c) to (g) and (i) need a heteroatom, a ring or a free valence and (h) ties (the carbonyl carbon is C-1 of every chain). (l) “The senior ring, ring system, or principal chain has one or more stereogenic centers [criterion (l) in ]” (:21529) is read as its rules and examples show it. “‘cis/trans’ Isomerism, the ‘E/Z’ convention”: “When there is a choice between parent structures that differ only by ‘Z’ and ‘E’ configurations, the senior parent structure contains the greater number of double bonds with ‘Z’ configuration” ((Z)-cyclooctene over (E)-cyclooctene, (2Z)- over (2E)-2-methylbut-2-enoic acid, (4Z)- over (4E)-hex-4-enenitrile); the rule for chirality centres begins “When there is a choice between parent structures differing only by the configurations of the chirality centers” (:21541). Every example compares parents of one constitution, so (l) does not make a stereogenic chain senior to a non-stereogenic one of another constitution (ruling of the lead, 2026-11-05); example (5) is of a kind with them: “3-[5-(3-amino-2-methyl-3-oxopropyl)-2-methylphenyl]-N-methylpropanamide (PIN) [not 2-methyl-3-{4- methyl-3-[3-(methylamino)-3-oxopropyl]phenyl}propanamide; the locant set ‘N,3’ in the PIN is lower than ‘2,3’]” compares two propanamide parents of one constitution by their prefixes, as the examples of (l) compare parents that differ in configuration only. It is no key here: two chains that tie up to (k) and differ in configuration only tie. The reading is a ruling, not the book’s own words (“the senior ring, ring system, or principal chain has one or more stereogenic centers”), so a name whose parent chose over a chain that (l) read literally would make senior (two chains that tie up to (k), the one that leaves junior holds a stereogenic centre or double bond and the parent holds none) is labelled below the PIN (stereo_criterion_could_differ()).

  5. “CRITERIA RELATED TO NUMBER AND LOCATION OF SUBSTITUENT GROUPS” (:21596): “the senior parent structure that has the maximum number of substituents cited as prefixes (other than ‘hydro/dehydro’)” (:21604; example (4), the N-substituents counted: ‘N,N,2-trimethyl-3-{…}propanamide (PIN)’), then “the lower locant or set of locants for substituents cited as prefixes” (:21698), whose example (1) reads the locant ‘N’ as lower than a numeral (‘the locant set N,2 in the PIN is lower than 2,5’; “Lowest set of locants” (:3189): “Italic capital and lower-case letter locants are lower than Greek letter locants, which, in turn, are lower than numerals”). The two criteria rank the amides of two ring systems that tie in the same way: ‘N-(4-carbamoylphenyl)benzamide’ (the locant N) is the PIN of ‘c1ccc(cc1)C(=O)Nc1ccc(cc1)C(N)=O’, not ‘4-benzamidobenzamide’ (the locant 4), and ‘4-benzamido-N-methylbenzamide’ (two prefixes) is the PIN of its N-methyl derivative, not ‘N-[4-(methylcarbamoyl)phenyl]- benzamide’ (one). A ring cites its prefixes at the locants of its numbering (_monocycle_prefix_locants, for a monocycle; the number of prefixes and of N terms alone decide for any other ring system). The groups of the ring system that are carboxamides count as the suffix, every other substituent as a prefix.

  6. Two amides that tie on all of those (tied_amide_parents: the same number of prefixes at the same locants, and not a symmetric copy of one another) are told apart by the names of their prefixes, which the key of the structures does not carry: “the lower locant set for substituent groups in order of citation in the name” (:21791) and “the name that is earlier in alphanumerical order” (:22234), rules.amide_tie_names (the decomposition engine applies it to the amide splits, decomposition.amide_ties).

senior_carboxamide_group re-selects the principal group among the amide subtypes by those criteria. A key that ties keeps the head of SENIORITY_ORDER (the choice stays as it was where the rules above do not decide). Molecules whose amide groups lie on one chain (a diamide) are not touched: the suffix ‘diamide’ counts them together.

orthonym.rules.amide_parent.CARBOXAMIDE_CLASSES = ('primary_amide', 'secondary_amide', 'tertiary_amide')#

the amide subtypes of the one class, class of amides), in the order of SENIORITY_ORDER

orthonym.rules.amide_parent.is_lone_ring(mol, system)#

True when the ring system system is one ring (not fused, spiro or bridged).

orthonym.rules.amide_parent.amide_parent_key(mol, carbonyl_c, labels=None, carbonyls=None)#

The rank of the amide whose carbonyl carbon is carbonyl_c as a parent structure: the smaller is the senior.

(-groups, 0, score of the ring system, terms) for the amide of a ring carboxamide, where groups is the number of carboxamide groups on its ring system, the maximum number of principal characteristic groups, comes before the seniority of the rings: the benzene of ‘benzene-1,3-dicarboxamide’ outranks a pyridine with one), then (1) and between the ring systems, then (see the module docstring); else (-1, 1) and the key of the best acyl chain by the criteria of the module docstring (a chain holds one amide group of the comparison). The chain runs through acyclic carbon atoms only. labels is:func:_label_map of mol where the caller has it; carbonyls are the carbonyl carbons of the amides that can be parents (comparable_amide_units()), found from mol when the caller has not got them.

orthonym.rules.amide_parent.comparable_amide_units(mol, functional_groups=None)#

[(subtype, match),...]: the carboxamide groups of mol that are candidate parent structures of one choice, or None when mol has no choice to make or the choice is not one between parents: fewer than two amides, two amide groups on one chain (one diamide, not two parents) or a nitrogen acylated twice (an imide: which acyl group is the parent is not asked here).

orthonym.rules.amide_parent.senior_carboxamide_group(mol, functional_groups, head)#

head (the principal group of SENIORITY_ORDER) or, when it is a carboxamide and the molecule holds amide groups on chains of their own, the amide group (its subtype and its match) whose chain is the senior parent structure (see the module docstring). The matches of the answer are those of the senior rank only: a junior amide of the same subtype is cited inside the name of the N-substituent that holds it, not as a second suffix. Unchanged when the amides tie, lie on one chain, or when a nitrogen is acylated twice.

orthonym.rules.amide_parent.parent_amide_is_junior(mol, parent_carbonyls)#

True when the amide that a name would take as its parent is strictly junior (amide_parent_key()) to another carboxamide of the molecule: the name would cite the senior amide as a prefix, which is not the PIN. parent_carbonyls holds the carbonyl carbons of the amides the name may take as its parent (the best of them is the parent). False when it holds none, when no other amide exists, when the amides are not a choice between parents (comparable_amide_units()), and when the keys tie or the choice cannot be decided.

orthonym.rules.amide_parent.tied_amide_parents(mol, parent_atoms)#

[(carbonyl carbon, is the name's own),...], one amide for each class of atoms that the symmetry of the molecule maps onto each other, when the amide that a name takes as its parent ranks equal (amide_parent_key()) with another carboxamide of the molecule that is not a symmetric copy of it; None otherwise. The Blue Book then decides between the parents by “the lower locant set for substituent groups in order of citation in the name” (:21791) and “the name that is earlier in alphanumerical order” (:22234), criteria of the names that the key of the structures does not carry (rules.amide_tie_names).

parent_atoms are the atoms of the part of the molecule that the name takes its parent from, as for parent_amide_is_junior(): the best amide inside them is the parent. None where that function is False for want of a choice (fewer than two amides, one chain, an imide), where the parent is strictly senior or junior, and where the parent holds no carboxamide.

orthonym.rules.amide_parent.stereo_criterion_could_differ(mol, parent_carbonyls)#

True when the amide that a name takes as its parent (the best of parent_carbonyls, the carbonyl carbons) was chosen over a chain that criterion (l) of read literally would make senior: another carboxamide chain that ties with the parent up to criterion (k) (_KEY_THROUGH_CRITERION_K) and holds a stereogenic centre or double bond, the parent’s holding none. “The senior ring, ring system, or principal chain has one or more stereogenic centers [criterion (l) in ]” (the Blue Book) is read here as its examples show it (the module docstring), so picked the parent; the two readings differ for exactly this molecule, and the name is not shown to be the preferred one. A centre or double bond counts when the drawing gives its configuration: the criterion compares the parents of names that cite the descriptors (“When there is a choice between parent structures differing only by the configurations of the chirality centers”,:21541), and a centre the input leaves open is cited by no name, so the plain alanyl chain of the rows keeps their label. False for ring amides, where the key is no chain’s, and where the choice cannot be decided.

orthonym.rules.amide_parent.spelled_outside_n_substituents(mol, amide_atoms, prefixes)#

prefixes without those whose atoms all lie in an N-substituent of the amide amide_atoms: the name of the N-substituent (‘N-(1-amino-1-oxopropan-2-yl)’) spells the groups it holds, so a prefix of the parent for one of them (‘carbamoyl’) would cite the same group a second time.