# rmgpy.molecule.AtomType¶

class rmgpy.molecule.AtomType

A class for internal representation of atom types. Using unique objects rather than strings allows us to use fast pointer comparisons instead of slow string comparisons, as well as store extra metadata. In particular, we store metadata describing the atom type’s hierarchy with regard to other atom types, and the atom types that can result when various actions involving this atom type are taken. The attributes are:

System Message: ERROR/3 (docstring of rmgpy.molecule.AtomType, line 23)

Malformed table. Text in column margin in table line 16.

=================== =================== ====================================
Attribute           Type                Description
=================== =================== ====================================
label             str             A unique label for the atom type
generic           list            The atom types that are more generic than this one
specific          list            The atom types that are more specific than this one
incrementBond     list            The atom type(s) that result when an adjacent bond's order is incremented
decrementBond     list            The atom type(s) that result when an adjacent bond's order is decremented
formBond          list            The atom type(s) that result when a new single bond is formed to this atom type
breakBond         list            The atom type(s) that result when an existing single bond to this atom type is broken
incrementRadical  list            The atom type(s) that result when the number of radical electrons is incremented
decrementRadical  list            The atom type(s) that result when the number of radical electrons is decremented
incrementLonePair list            The atom type(s) that result when the number of lone electron pairs is incremented
decrementLonePair list            The atom type(s) that result when the number of lone electron pairs is decremented

The following features are what are required in a given atomtype. Any int in the list is acceptable.
An empty list is a wildcard
'single'            ''list''            The total number of single bonds on the atom
'allDouble'         ''list''            The total number of double bonds on the atom
'rDouble'           ''list''            The number of double bonds to any non-oxygen, nonsulfur
'oDouble'           ''list''            The number of double bonds to oxygen
'sDouble'           ''list''            The number of double bonds to sulfur
'triple'            ''list''            The total number of triple bonds on the atom
'benzene'           ''list''            The total number of benzene bonds on the atom
'lonePairs'         ''list''            The number of lone pairs on the atom
=================== =================== ====================================

equivalent()

Returns True if two atom types atomType1 and atomType2 are equivalent or False otherwise. This function respects wildcards, e.g. R!H is equivalent to C.

getFeatures()

Returns a list of the features that are checked to determine atomtype

isSpecificCaseOf()

Returns True if atom type atomType1 is a specific case of atom type atomType2 or False otherwise.

rmgpy.molecule.getAtomType()

Determine the appropriate atom type for an Atom object atom with local bond structure bonds, a dict containing atom-bond pairs.

The atom type of an atom describes the atom itself and (often) something about the local bond structure around that atom. This is a useful semantic tool for accelerating graph isomorphism queries, and a useful shorthand when specifying molecular substructure patterns via an RMG-style adjacency list.

We define the following basic atom types:

Atom type Description
General atom types
R any atom with any local bond structure
R!H any non-hydrogen atom with any local bond structure
Carbon atom types
C carbon atom with any local bond structure
Cs carbon atom with four single bonds
Cd carbon atom with one double bond (to carbon) and two single bonds
Cdd carbon atom with two double bonds
Ct carbon atom with one triple bond and one single bond
CO carbon atom with one double bond (to oxygen) and two single bonds
Cb carbon atom with two benzene bonds and one single bond
Cbf carbon atom with three benzene bonds
Hydrogen atom types
H hydrogen atom with one single bond
Oxygen atom types
O oxygen atom with any local bond structure
Os oxygen atom with two single bonds
Od oxygen atom with one double bond
Oa oxygen atom with no bonds
Silicon atom types
Si silicon atom with any local bond structure
Sis silicon atom with four single bonds
Sid silicon atom with one double bond (to carbon) and two single bonds
Sidd silicon atom with two double bonds
Sit silicon atom with one triple bond and one single bond
SiO silicon atom with one double bond (to oxygen) and two single bonds
Sib silicon atom with two benzene bonds and one single bond
Sibf silicon atom with three benzene bonds
Sulfur atom types
S sulfur atom with any local bond structure
Ss sulfur atom with two single bonds
Sd sulfur atom with one double bond
Sa sulfur atom with no bonds