rmgpy.molecule.Atom¶
- class rmgpy.molecule.Atom¶
An atom. The attributes are:
Attribute
Type
Description
atomtype
The atom type
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
, andsymbol
attributes of the atom’s element can be read (but not written) directly from the atom object, e.g.atom.symbol
instead ofatom.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_charge()¶
Update the atom pattern as a result of applying a LOSE_CHARGE action
- 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, orFalse
otherwise. If other is anAtom
object, then all attributes except label and ‘ID’ must match exactly. If other is anGroupAtom
object, then the atom must match any of the combinations in the atom pattern. Ifstrict
isFalse
, 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_charge()¶
Update the atom pattern as a result of applying a GAIN_CHARGE action
- 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 XFalse
if it is not
- is_bromine()¶
Return
True
if the atom represents a bromine atom orFalse
if not.
- is_carbon()¶
Return
True
if the atom represents a carbon atom orFalse
if not.
- is_chlorine()¶
Return
True
if the atom represents a chlorine atom orFalse
if not.
- is_electron()¶
Return
True
if the atom represents an electron orFalse
if not.
- is_fluorine()¶
Return
True
if the atom represents a fluorine atom orFalse
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 orFalse
if not.
- is_iodine()¶
Return
True
if the atom represents an iodine atom orFalse
if not.
- is_lithium()¶
Return
True
if the atom represents a hydrogen atom orFalse
if not.
- is_nitrogen()¶
Return
True
if the atom represents a nitrogen atom orFalse
if not.
- is_non_hydrogen()¶
Return
True
if the atom does not represent a hydrogen atom orFalse
if it does.
- is_nos()¶
Return
True
if the atom represent either nitrogen, sulfur, or oxygenFalse
if it does not.
- is_oxygen()¶
Return
True
if the atom represents an oxygen atom orFalse
if not.
- is_phosphorus()¶
Return
True
if the atom represents a phosphorus atom orFalse
if not.
- is_proton()¶
Return
True
if the atom represents a proton orFalse
if not.
- is_silicon()¶
Return
True
if the atom represents a silicon atom orFalse
if not.
- is_specific_case_of(other)¶
Return
True
if self is a specific case of other, orFalse
otherwise. If other is anAtom
object, then this is the same as theequivalent()
method. If other is anGroupAtom
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 orFalse
if not.
- is_surface_site()¶
Return
True
if the atom represents a surface site orFalse
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.