orthonym.rules.phane_pin.skeleton#

Note

Internal API. Names and behaviour may change between releases.

The simplified skeleton of a phane,.

the Blue Book, each line read with sed -n:

  • (:14847): the skeleton is named by the number of its nodes, superatoms included, and the term ‘phane’; every ring or ring system of the skeleton is one superatom and every other skeletal atom is one node.

  • (:14902) allows a mancude ring or ring system, a bridged fused ring system, a saturated monocycle, a von Baeyer hydrocarbon and a spiro alkane as the parent of an amplificant; (a)(2) (:14910) disallows “spiro ring systems with at least one fused ring system or polycycloalkane ring system”.

The nodes are those of validation.spelling.cyclophane: the rings of up to eight atoms that share an atom form one node, every other atom is one node. A skeleton is read from the structure only.

class orthonym.rules.phane_pin.skeleton.SkeletonKind(*values)#

Bases: Enum

CYCLE = 'cycle'#
PATH = 'path'#
BICYCLO = 'bicyclo'#
SPIRO = 'spiro'#
class orthonym.rules.phane_pin.skeleton.Amplificant(k: 'int', atoms: 'FrozenSet[int]', hydride: 'AmplificantHydride')#

Bases: object

k: int#
atoms: FrozenSet[int]#
hydride: AmplificantHydride#
class orthonym.rules.phane_pin.skeleton.PhaneSkeleton(mol, kind, nodes, adj, edge, amplificants, other)#

Bases: object

nodes follow the walk of the skeleton; adj[node] are its neighbours; edge[(u, v)] is (atom of u, atom of v, bond type) of the bond between the nodes, for both orders; other are the atoms outside the skeleton (substituents and groups of a suffix).

mol: Mol#
kind: SkeletonKind#
nodes: Tuple[Tuple[str, int], ...]#
adj: Dict[Tuple[str, int], Tuple[Tuple[str, int], ...]]#
edge: Dict[Tuple[Tuple[str, int], Tuple[str, int]], Tuple[int, int, BondType]]#
amplificants: Tuple[Amplificant, ...]#
other: FrozenSet[int]#
node_of(atom)#

The node of a skeletal atom (an amplificant for a ring atom), None for an atom outside the skeleton.

orthonym.rules.phane_pin.skeleton.chain_atom_ok(atom)#

An acyclic skeletal atom a phane name can express: carbon, or a heteroatom with a nondetachable ‘a’ prefix,:15192) in its standard valence and without a charge. lists Al, Ga, In and Tl, which have no ‘a’ prefix in the replacement table: they are not built.

orthonym.rules.phane_pin.skeleton.perceive_cyclic(mol)#

The skeleton of mol when its simplified graph is one simple cycle (a monocyclic phane skeleton), a bicycle of two cycles that share a path (von Baeyer, or two cycles that share an acyclic atom (monospiro,; else None. None as well when a node is not an allowed amplificant, an amplificant is attached twice to one atom or by a multiple bond, or an acyclic skeletal atom is not one a phane name expresses.

orthonym.rules.phane_pin.skeleton.bridges_between(adj, start, other)#

The interior nodes of the bridges that leave start and reach other, each listed from start; None when a bridge does not reach other (a ring on a bridgehead, a chain that branches).

orthonym.rules.phane_pin.skeleton.bicyclo_bridges(adj, core)#

The two bridgeheads (the nodes of degree three) and the interior nodes of the three bridges between them, each listed from the first bridgehead; None when the graph is not a bicycle (a ring joined to another by a chain, two rings on a bridgehead).

orthonym.rules.phane_pin.skeleton.spiro_rings(adj, spiro)#

The two rings of a monospiro graph without the spiro node, each as its nodes in order from one end (both ends are bonded to the spiro node); None when the graph is not two rings on one node.