orthonym.rules.bridged_fused_pin.selection#

Note

Internal API. Names and behaviour may change between releases.

Which fused ring system of a bridged fused ring system is the one that is bridged.

“Selection of bridges” (the Blue Book): “Bridges are selected so that a

recommended fused ring system as described in through is the parent fused ring system that is bridged.” (:14259) ranks the choices: (a) “contain the maximum number of rings” (:14261), (b) “include the maximum number of skeletal atoms” (:14271), (c) “have the fewer heteroatoms in the fused ring system before bridging” (:14279), (d) the most senior ring system (:14289), (e) “have the minimum number of polyvalent bridges”,…, (h) “have the maximum number of divalent bridges”. This module applies (a)-(c) over every fused residual and (d)-(h) as far as slice S1 needs them (one parent, divalent bridges); build applies (i) and (j) (:14395), which need the numbering and the double bonds.

A split whose best-ranked competitor is a residual this module cannot name, or a bridge that is not divalent (three attachments, or a double bond to the fused ring system, as in a ‘metheno’ bridge), is declined: the von Baeyer name stays the fallback.

orthonym.rules.bridged_fused_pin.selection.S1_PARENT_SKELETONS: Dict[str, str] = {'C1CCC2CC3CCCCC3CC2C1': 'anthracene', 'C1CCC2CCCCC2C1': 'naphthalene'}#

the fused parents slice S1 names retained names), by skeleton SMILES

orthonym.rules.bridged_fused_pin.selection.MAX_BRIDGE_ATOMS = 4#

at most this many atoms in one bridge, and at most two bridges (slice S1 scope)

orthonym.rules.bridged_fused_pin.selection.MAX_SYSTEM_ATOMS = 22#

the largest ring system that can hold an anthracene and two four-atom bridges

class orthonym.rules.bridged_fused_pin.selection.Split(residual, bridges, bridgeheads, parent, n_double, unsaturated)#

Bases: object

One way to read a ring system as a fused parent plus divalent bridges.

bridges[i] lists the atoms of bridge i in chain order; its first atom is bonded to bridgeheads[i][0] and its last atom to bridgeheads[i][1] (a one-atom bridge is bonded to both). n_double is the number of noncumulative double bonds the input has in the parent ring system (j)). unsaturated holds the ring-system atoms that carry a ring double bond in the input.

residual: FrozenSet[int]#
bridges: Tuple[Tuple[int, ...], ...]#
bridgeheads: Tuple[Tuple[int, int], ...]#
parent: str | None#
n_double: int#
unsaturated: FrozenSet[int]#
orthonym.rules.bridged_fused_pin.selection.ring_systems(mol)#

The sets of ring atoms connected through ring bonds, largest first.

orthonym.rules.bridged_fused_pin.selection.ring_system(mol)#

The largest ring system.

orthonym.rules.bridged_fused_pin.selection.cycle_rank(mol, atoms)#

The number of rings of a connected atom set (bonds - atoms + 1).

orthonym.rules.bridged_fused_pin.selection.fused_rings(mol, atoms)#

The rings of atoms when they form an ortho- or ortho- and peri-fused ring system, the Blue Book: “Two rings that have only two atoms and one bond in common are said to be ortho-fused”), else None: one connected graph, every atom in a ring, as many smallest rings as the cycle rank (a bridged graph has more), every pair of rings sharing at most one atom or exactly one bond, the rings connected through shared bonds, and no bond in three rings (a ring closed across a bond common to two rings is a bridge, (d):14030).

orthonym.rules.bridged_fused_pin.selection.ring_unsaturation(mol, system)#

The ring-system atoms that carry a double bond to another ring-system atom on a Kekule structure. The set does not depend on which Kekule structure RDKit picks (every carbon of an aromatic ring carries one in each); None when the input cannot be kekulized or has a ring triple bond.

orthonym.rules.bridged_fused_pin.selection.best_splits(mol, system)#

The splits that tie on (a)-(h), all nameable by slice S1, or None.

One divalent bridge leaves one ring more than two bridges or one polyvalent bridge, so (a) is settled by the first stage that finds a fused residual: stage 1 tries one bridge atom set, stage 2 two sets together with the one-set competitors that have three attachments. Within a stage fewer bridge atoms leave more skeletal atoms (b), so sizes are tried from the smallest up and the first size with a fused residual decides. None when the system is itself a fused ring system:14241 applies “When a polycyclic ring system cannot be named completely as a fused ring system”), when no split is found, or when a best-ranked split is one slice S1 cannot name.