# rmgpy.molecule.Atom¶

class rmgpy.molecule.Atom(element=None, radicalElectrons=0, charge=0, label='', lonePairs=-100, coords=<???>, id=-1)

An atom. The attributes are:

Attribute Type Description
atomType AtomType The atom type
element Element The chemical element the atom represents
radicalElectrons short The number of radical electrons
charge short The formal charge of the atom
label str A string label that can be used to tag individual atoms
coords numpy array The (x,y,z) coordinates in Angstrom
lonePairs short The number of lone electron pairs
id int Number assignment for atom tracking purposes

Additionally, the mass, number, and symbol attributes of the atom’s element can be read (but not written) directly from the atom object, e.g. atom.symbol instead of atom.element.symbol.

applyAction(self, action)

Update the atom pattern as a result of applying action, a tuple containing the name of the reaction recipe action along with any required parameters. The available actions can be found here.

atomType

atomType: rmgpy.molecule.atomtype.AtomType

charge

charge: ‘short’

connectivity1

connectivity1: ‘short’

connectivity2

connectivity2: ‘short’

connectivity3

connectivity3: ‘short’

coords

coords: numpy.ndarray

copy(self) → Vertex

Generate a deep copy of the current atom. Modifying the attributes of the copy will not affect the original.

decrementLonePairs(self)

Update the lone electron pairs pattern as a result of applying a LOSE_PAIR action.

decrementRadical(self)

Update the atom pattern as a result of applying a LOSE_RADICAL action, where radical specifies the number of radical electrons to remove.

edges

edges: dict

element

element: rmgpy.molecule.element.Element

equivalent(self, Vertex other) → bool

Return True if other is indistinguishable from this atom, or False otherwise. If other is an Atom object, then all attributes except label and ‘ID’ must match exactly. If other is an GroupAtom object, then the atom must match any of the combinations in the atom pattern.

getAtomConnectivityValue(self)
getBondOrdersForAtom(self)

This helper function is to help calculate total bond orders for an input atom.

Some special consideration for the order B bond. For atoms having three B bonds, the order for each is 4/3.0, while for atoms having other than three B bonds, the order for each is 3/2.0

getDescriptor(self)
id

id: ‘int’

ignore

ignore: ‘bool’

incrementLonePairs(self)

Update the lone electron pairs pattern as a result of applying a GAIN_PAIR action.

incrementRadical(self)

isCarbon(self) → bool

Return True if the atom represents a carbon atom or False if not.

isHydrogen(self) → bool

Return True if the atom represents a hydrogen atom or False if not.

isNitrogen(self)

Return True if the atom represents a nitrogen atom or False if not.

isNonHydrogen(self) → bool

Return True if the atom does not represent a hydrogen atom or False if it does.

isOxygen(self) → bool

Return True if the atom represents an oxygen atom or False if not.

isSilicon(self)

Return True if the atom represents an silicon atom or False if not.

isSpecificCaseOf(self, Vertex other) → bool

Return True if self is a specific case of other, or False otherwise. If other is an Atom object, then this is the same as the equivalent() method. If other is an GroupAtom object, then the atom must match or be more specific than any of the combinations in the atom pattern.

isSulfur(self) → bool

Return True if the atom represents an sulfur atom or False if not.

label

label: str

lonePairs

lonePairs: ‘short’

mapping

mapping: rmgpy.molecule.graph.Vertex

radicalElectrons

resetConnectivityValues(self)

Reset the cached structure information for this vertex.

setLonePairs(self, int lonePairs)

Set the number of lone electron pairs.

setSpinMultiplicity(self, int spinMultiplicity)

Set the spin multiplicity.

sortingLabel

sortingLabel: ‘short’

terminal

terminal: ‘bool’

updateCharge(self)

Update self.charge, according to the valence, and the number and types of bonds, radicals, and lone pairs.