orthonym.rules.azole_numbering#

Note

Internal API. Names and behaviour may change between releases.

The numbering of an azole whose indicated hydrogen holds a substituent: the heteroatoms fix it first.

### **** NUMBERING (the Blue Book): “(a) fixed numbering in chains, rings, or ring systems” and “(b) indicated hydrogen for unsubstituted compounds; a higher locant may be needed at another position to accommodate a substituent suffix”. The numbering of a Hantzsch-Widman ring is fixed by its heteroatoms, and the indicated hydrogen takes the lowest locant among the numberings that keep them. **** (:4916), sentence :4918: “Type 1 retained names of parent hydrides described in Chapters and have unlimited substitution by substituent groups cited either as suffixes or prefixes”: the substituent that stands in the place of the indicated hydrogen leaves the parent ‘4H-1,2,4-triazole’ (‘4-methyl-4H-1,2,4-triazole’).

heterocycles.orient_heterocycle_with_substituents made the pyrrole-type atom the start of the numbering whatever the locants of the other heteroatoms were: ‘4-methyl-4H-1,2,4-triazole’ was numbered from its N-substituted nitrogen (heteroatom locants 1,3,4, the methyl cited at 1) and ‘2-methyl-2H-1,2,3-triazole’ as 1,2,5; and the parent name (heterocycles._monocycle_indicated_h_prefix) counted only a nitrogen that still held its hydrogen, so a substituted one lost the ‘H’. The final check withdrew both names. Here every heteroatom of the senior element starts a candidate, the indicated hydrogen is the second key after the heteroatom locants, and the atom that a substituent stands in for is the atom that holds it.

Scope: the molecule that is named is neutral and no cation path consumes its numbering. The neutral producer asks for it (orient_heterocycle_with_substituents(..., mancude_hydrogen=True) from namer’s heterocycle assembly, name_heterocycle(..., substituent_holds_h=True) from composer._assemble_heterocycle_name); the numbering the ions read (ions._ring_iupac_locants, the parent names of azolium_cations) is the one it always was, because a cation’s ‘ium’ and its indicated hydrogen compete for the locants, ### **** the Blue Book; ‘1,4-diphenyl… 1H-1,2,4-triazol-4-ium’,:42460; ‘1H-imidazol-3-ium (PIN)’,:41396) and are placed by the azolium namers, which read the numbering of the bare parent. A ring with a charge keeps it too.

orthonym.rules.azole_numbering.ring_has_charge(mol, ring_atoms)#

True when an atom of the ring carries a formal charge.

orthonym.rules.azole_numbering.numbering_starts(mol, ring_set, heteroatoms, neutral_producer)#

The ring atoms that may be numbered 1: the heteroatoms of the senior element; for a caller that is not the neutral producer, or in a ring with a charge, only those of the best indicated-hydrogen tier (the numbering of the ions).

orthonym.rules.azole_numbering.indicated_locants(mol, ring_set, heteroatoms, loc_map, neutral_producer)#

The locants of the ring atoms that hold the indicated hydrogen, for the second key of the numbering; empty for a caller that is not the neutral producer and in a ring with a charge.

orthonym.rules.azole_numbering.pyrrole_type_atoms(mol, ring_set, oriented, substituent_holds_h)#

The N, P, As and Sb atoms of a mancude ring that hold the indicated hydrogen, or (for the neutral producer) a substituent in its place; in a ring with a charge only an atom that still holds a hydrogen.