# rmgpy.molecule.Atom¶

class rmgpy.molecule.Atom

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()

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.

copy()

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

decrementLonePairs()

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

decrementRadical()

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

equivalent()

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

getBondOrdersForAtom()

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

incrementLonePairs()

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

incrementRadical()

isCarbon()

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

isHydrogen()

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

isNitrogen()

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

isNonHydrogen()

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

isOxygen()

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

isSilicon()

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

isSpecificCaseOf()

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()

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

resetConnectivityValues()

Reset the cached structure information for this vertex.

setLonePairs()

Set the number of lone electron pairs.

setSpinMultiplicity()

Set the spin multiplicity.

updateCharge()

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