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

radical_electrons

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

lone_pairs

short

The number of lone electron pairs

id

int

Number assignment for atom tracking purposes

bonds

dict

Dictionary of bond objects with keys being neighboring atoms

props

dict

Dictionary for storing additional atom properties

mass

int

atomic mass of element (read only)

number

int

atomic number of element (read only)

symbol

str

atomic symbol of element (read only)

site

str

type of adsorption site

morphology

str

morphology of the adsorption site

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.

apply_action(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.

copy()

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

decrement_lone_pairs()

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

decrement_radical()

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

equivalent(other, strict)

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. If strict is False, then only the element is compared and electrons are ignored.

get_total_bond_order()

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

increment_lone_pairs()

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

increment_radical()

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

is_bonded_to_halogen()

Return True if the atom is bonded to at least one halogen (F, Cl, Br, or I) False if it is not

is_bonded_to_surface()

Return True if the atom is bonded to a surface atom X False if it is not

is_bromine()

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

is_carbon()

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

is_chlorine()

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

is_fluorine()

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

is_halogen()

Return True if the atom represents a halogen atom (F, Cl, Br, I) False if it does.

is_hydrogen()

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

is_iodine()

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

is_nitrogen()

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

is_non_hydrogen()

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

is_nos()

Return True if the atom represent either nitrogen, sulfur, or oxygen False if it does not.

is_oxygen()

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

is_phosphorus()

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

is_silicon()

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

is_specific_case_of(other)

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.

is_sulfur()

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

is_surface_site()

Return True if the atom represents a surface site or False if not.

reset_connectivity_values()

Reset the cached structure information for this vertex.

set_lone_pairs(lone_pairs)

Set the number of lone electron pairs.

sorting_key

Returns a sorting key for comparing Atom objects. Read-only

update_charge()

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