orthonym.validation.spelling.indicated_hydrogen#

Note

Internal API. Names and behaviour may change between releases.

How many indicated hydrogens each ring system of a structure needs, and how many a name cites.

The rule (the Blue Book):

  • (:8318-:8320): “After the maximum number of noncumulative double bonds has been assigned…, any ring atom with a bonding number of three or higher connected to adjacent ring atoms by single bonds only, and carrying one or more hydrogen atoms, is designated by indicated hydrogen”; for fused systems:14551.

  • (:3721): “In general nomenclature, indicated hydrogen may be omitted… However, in a preferred IUPAC name a locant and the symbol ‘H’ must be cited”; (:14607),

    (:24639): in preferred IUPAC names all indicated hydrogen is cited.

  • (:10152) spiro, / (:14245,:14640) bridged fused, (:15593) ring assemblies: the whole skeleton is made mancude first, one indicated-hydrogen group in front of the name of that system; saturated spiro components keep their saturation; a bridge keeps the saturation of its own name.

*: a heteroatom cited with lambda-n has bonding number n. *, (:3725,:24687): added indicated hydrogen n(mH) after a suffix locant

is not the parent’s indicated hydrogen and does not replace it.

Structure side: the RDKit graph. For the atoms of a mancude ring system that can carry a ring double bond (bonding number >= 3 and at least one bond left after the ring bonds), k = capable atoms - 2 x (maximum matching of ring bonds among them). Name side: the front nH- groups. Validated on the 3,243 Blue Book PIN rows (agreement 99.3 %, every disagreement explained: listing rows that print a ring component without its hydrogen, charged rings, two-name rows).

orthonym.validation.spelling.indicated_hydrogen.max_matching(nodes, adj)#

Number of edges of a maximum-cardinality matching (Edmonds’ blossom algorithm).

orthonym.validation.spelling.indicated_hydrogen.ring_systems(mol)#

Connected components of ring atoms joined by ring bonds.

orthonym.validation.spelling.indicated_hydrogen.ring_adj(mol, atoms)#
orthonym.validation.spelling.indicated_hydrogen.blocks(atoms, adj)#

Biconnected components of the ring graph, as atom sets (iterative, no recursion limit).

orthonym.validation.spelling.indicated_hydrogen.kekule_ring_double(mol, atoms)#

Number of endocyclic double bonds (Kekule form) inside the atom set.

A structure without a Kekule form raises (RDKit’s KekulizeException): counting its aromatic bonds as single would read a mancude ring as saturated.:func:analyse reads a sanitized structure, which always has one; elsewhere the error reaches orthonym.validation.pin_spelling.check_pin_spelling(), which logs it and lets the check abstain (strict=True re-raises).

orthonym.validation.spelling.indicated_hydrogen.front_ih_groups(name)#
orthonym.validation.spelling.indicated_hydrogen.added_ih_groups(name)#
orthonym.validation.spelling.indicated_hydrogen.analyse(smiles, name)#

verdict ‘OMISSION’ (fewer front groups than a ring system needs), ‘extra_front_ih’ (more front groups than ring systems that need one), ‘unresolved’ (a bridged system the reader cannot place) or ‘ok’; with the requirement per ring skeleton (reqd) and the front and added groups read from the name.