orthonym.rules.ester_seniority#

Note

Internal API. Names and behaviour may change between releases.

Which ester of a polyester is the one its functional-class name is built on.

“Polyester names formed by using substitutive nomenclature, and/or multiplicative nomenclature, and

functional class nomenclature” (the Blue Book): “When required, seniority of rings, ring systems, and chains; number and location of substituents; and alphanumerical order is applied in forming the alcoholic component of a functional class ester name (see through “. The examples fix the order of the criteria:

  • the acid component: ‘phenyl 3-(benzoyloxy)benzoate (PIN) [not 3-(phenoxycarbonyl)phenyl benzoate; the substituted benzoic acid is senior to the unsubstituted one; see ]’ (more substituents); ‘4-[(3-ethoxy-3-oxopropanoyl)oxy] phenyl methyl butanedioate (PIN) (not ethyl 4-[(4-methoxy-4-oxobutanoyl)oxy]phenyl propanedioate; butanedioic acid is preferred to propanedioic acid’ (the longer chain), with “Systems composed of rings and chains” (a ring is senior to a chain);

  • then the alcohol component: ‘2-[2-(acetyloxy)ethyl]phenyl acetate (PIN) (not 2-[2-(acetyloxy)phenyl]ethyl acetate; the ring is senior to the chain)’, ‘2-{2-[(acetyloxy)methyl]phenyl}ethyl acetate (PIN) (not 2-{2-[(acetyloxy) ethyl]phenyl}methyl acetate; the ethyl chain is senior to the methyl chain)’. The chain of a substituent group is its longest one, “THE PRINCIPAL SUBSTITUENT CHAIN” (b): “the greater number of skeletal atoms, i.e., the longest chain” (:22632), so the alcohol chain runs through the attachment carbon (‘propan-2-yl’, not ‘ethyl’).

Alphanumerical order decides only what these leave tied; it is the caller’s last criterion. Of two rings the senior is that of “SENIORITY ORDER ONLY FOR RINGS AND RING SYSTEMS” (:19402), (:19408) “The senior ring or ring system: (a) is a heterocycle; (b) has at least one nitrogen atom; (c) has at least one heteroatom (in the absence of nitrogen) that occurs earlier in the following sequence: F > Cl > Br > I > O > S >…; (d) has the greater number of rings; (e) has the greater number of skeletal atoms; (f) has the greater number of heteroatoms of any kind; (g) has the greater number of heteroatoms occurring earlier in the sequence”, then the criteria of that decide between rings (rules.ring_selection.ring_system_score); rings that tie on it go by their substituents: ‘6-[4-(acetyloxy)phenyl]pyridin-3-yl acetate (PIN) (not 4-[5-(acetyloxy)pyridin-2-yl]phenyl acetate; the nitrogenous ring is senior to the carbocyclic ring)’ (:31895). What this does not model: the heteroatoms of a chain and its unsaturation.

orthonym.rules.ester_seniority.ester_seniority_key(mol, ester_match)#

The seniority of one ester of mol as the parent of its functional-class name; the smaller key is the senior ester. ester_match is the ester SMARTS match (carbonyl C, =O, ester O, alkyl C). The key is (acid component, alcohol component), each (ring before chain, longer chain, more substituents).

orthonym.rules.ester_seniority.senior_ester(mol, ester_matches)#

The most senior of ester_matches; the first of those that tie (the atom order of the input). A lactone (its C(=O)-O bond is a ring bond) is no candidate beside an acyclic ester: “Cyclic esters” (the Blue Book) “For these compounds heterocyclic names are preferred IUPAC names”, so it has no alcohol component to be the parent of a functional class name and stays a heterocyclic pseudoketone (1)); the key ranked its ring acid before every chain acid.