orthonym.perception.fullerene#
Note
Internal API. Names and behaviour may change between releases.
Fullerene cage detection (structural, deterministic, no naming).
A fullerene is a closed cage of 12 pentagons and (n/2 - 10) hexagons in which every cage atom has three cage neighbours (Blue Book, fullerenes). The engine declines them (no fullerene naming), and each used to cost 11-18 s before the decline. This detector reads the cage from the ring graph so the decline is made at once.
Rule (per input molecule; nothing is cached):
Gis the graph of ring bonds.Kis the 3-core ofG(atoms with fewer than three ring-bond neighbours are dropped repeatedly).Every simple 5- and 6-cycle of
Kis listed; an edge in >= 2 of them borders two faces.A connected component of such edges is a cage when it has at least
MIN_CAGE_ATOMSatoms, every atom has exactly three neighbours in it, it has 12 pentagons andV/2 - 10hexagons, and every edge borders exactly two of those faces.
MIN_CAGE_ATOMS is 60. The C20 dodecahedrane cage has the same face count but its carbons
are sp3 and the Blue Book does not treat it as a fullerene; it has a von Baeyer name that
the engine builds, so it must not be matched. Cages of 20 to 58 atoms are not detected.
- orthonym.perception.fullerene.fullerene_cages(mol)#
The atom-index sets of the fullerene cages of
mol(empty list when none).
- orthonym.perception.fullerene.cage_atoms(mol)#
The atoms of the fullerene cages of
mol(empty for every molecule without one). A chain search that enumerates simple paths leaves them out: a cage is a ring system, never part of a chain, and the paths of its 31 rings are too many to list.
- orthonym.perception.fullerene.has_fullerene_cage(mol)#
True when
molcontains a fullerene cage (see the module docstring).
- orthonym.perception.fullerene.MAX_ATTACHED_RING_ATOMS = 5#
the attached ring of a fused addend has 3 to 7 atoms, two of them the cage atoms of the fusion bond
- class orthonym.perception.fullerene.C60Adduct(cage, sp3, ring, locants=())#
Bases:
objectA (C60-Ih)[5,6]fullerene with at most one addend on a [6,6] bond.
cageholds the 60 atoms of the cage;sp3the two cage atoms of the addend’s bond (empty for the bare cage);ringthe atoms of the attached monocycle in order fromsp3[0]tosp3[1](empty when the addend is two exocyclic groups, hydrogen atoms included);locantsevery numbering of the cage that puts the addend’s bond on 1,9 (all 120 for the bare cage), as {atom index: locant}.- cage: FrozenSet[int]#
- sp3: Tuple[int, ...]#
- ring: Tuple[int, ...]#
- locants: Tuple[Dict[int, int], ...] = ()#
- orthonym.perception.fullerene.c60_adduct(mol)#
The
C60Adductreading ofmol, or None whenmolis anything else: one fragment, one fullerene cage that is the C60 skeleton ofdata.fullerene_c60(no heteroatom in it), all atoms neutral without isotope or radical, no stereo layer (this lane reads back no descriptor), no atom outside the cage and the attached ring in the ring system of the cage, and at most one addend: none, or two adjacent cage atoms on a [6,6] bond that carry the two ends of one attached monocycle or two exocyclic groups, every other cage atom carrying no group.“Fullerenes and modified fullerenes ortho fused to organic rings or ring systems”
(the Blue Book): “the fusion bond is always a single bond and the fusion atoms cannot accept an ‘exo’ double bond”; an addend that is not a pair of groups on one [6,6] bond, or a ring system that holds more than the cage and one monocycle, is not read here.