Molecular representations (rmgpy.molecule)

The rmgpy.molecule subpackage contains classes and functions for working with molecular representations, particularly using chemical graph theory.

Graphs

Class Description
Vertex A generic vertex (node) in a graph
Edge A generic edge (arc) in a graph
Graph A generic graph data type

Graph isomorphism

Class Description
VF2 Graph isomorphism using the VF2 algorithm

Elements and atom types

Class/Function Description
Element A model of a chemical element
getElement() Return the Element object for a given atomic number or symbol
AtomType A model of an atom type: an element and local bond structure
getAtomType() Return the AtomType object for a given atom in a molecule

Molecules

Class Description
Atom An atom in a molecule
Bond A bond in a molecule
Molecule A molecular structure represented using a chemical graph

Functional groups

Class Description
GroupAtom An atom in a functional group
GroupBond A bond in a functional group
Group A functional group structure represented using a chemical graph

Molecule Utilities

Class Description
rmgpy.molecule.resonance Resonance structure generation methods
rmgpy.molecule.kekulize Kekule structure generation
rmgpy.molecule.pathfinder Resonance path enumeration
rmgpy.molecule.converter Molecule object converter (RDKit/OpenBabel)
rmgpy.molecule.translator Molecule string representation translator

Adjacency lists

Function Description
fromAdjacencyList() Convert an adjacency list to a set of atoms and bonds
toAdjacencyList() Convert a set of atoms and bonds to an adjacency list

Symmetry numbers

Class Description
calculateAtomSymmetryNumber() Calculate the atom-centered symmetry number for an atom in a molecule
calculateBondSymmetryNumber() Calculate the bond-centered symmetry number for a bond in a molecule
calculateAxisSymmetryNumber() Calculate the axis-centered symmetry number for a double bond axis in a molecule
calculateCyclicSymmetryNumber() Calculate the ring-centered symmetry number for a ring in a molecule
calculateSymmetryNumber() Calculate the total internal + external symmetry number for a molecule

Molecule and reaction drawing

Class Description
MoleculeDrawer Draw the skeletal formula of a molecule
ReactionDrawer Draw a chemical reaction