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
shortThe number of radical electrons
charge
shortThe formal charge of the atom
label
strA string label that can be used to tag individual atoms
coords
numpy arrayThe (x,y,z) coordinates in Angstrom
lone_pairs
shortThe number of lone electron pairs
id
intNumber assignment for atom tracking purposes
bonds
dictDictionary of bond objects with keys being neighboring atoms
props
dictDictionary for storing additional atom properties
mass
intatomic mass of element (read only)
number
intatomic number of element (read only)
symbol
stratomic symbol of element (read only)
site
strtype of adsorption site
morphology
strmorphology of the adsorption site
Additionally, the
mass,number, andsymbolattributes of the atom’s element can be read (but not written) directly from the atom object, e.g.atom.symbolinstead 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=True)¶
Return
Trueif other is indistinguishable from this atom, orFalseotherwise. If other is anAtomobject, then all attributes except label and ‘ID’ must match exactly. If other is anGroupAtomobject, then the atom must match any of the combinations in the atom pattern. IfstrictisFalse, 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
Trueif the atom is bonded to at least one halogen (F, Cl, Br, or I)Falseif it is not
- is_bonded_to_surface()¶
Return
Trueif the atom is bonded to a surface atom XFalseif it is not
- is_bromine()¶
Return
Trueif the atom represents a bromine atom orFalseif not.
- is_carbon()¶
Return
Trueif the atom represents a carbon atom orFalseif not.
- is_chlorine()¶
Return
Trueif the atom represents a chlorine atom orFalseif not.
- is_electron()¶
Return
Trueif the atom represents an electron orFalseif not.
- is_fluorine()¶
Return
Trueif the atom represents a fluorine atom orFalseif not.
- is_halogen()¶
Return
Trueif the atom represents a halogen atom (F, Cl, Br, I)Falseif it does.
- is_hydrogen()¶
Return
Trueif the atom represents a hydrogen atom orFalseif not.
- is_iodine()¶
Return
Trueif the atom represents an iodine atom orFalseif not.
- is_lithium()¶
Return
Trueif the atom represents a hydrogen atom orFalseif not.
- is_nitrogen()¶
Return
Trueif the atom represents a nitrogen atom orFalseif not.
- is_non_hydrogen()¶
Return
Trueif the atom does not represent a hydrogen atom orFalseif it does.
- is_nos()¶
Return
Trueif the atom represent either nitrogen, sulfur, or oxygenFalseif it does not.
- is_oxygen()¶
Return
Trueif the atom represents an oxygen atom orFalseif not.
- is_phosphorus()¶
Return
Trueif the atom represents a phosphorus atom orFalseif not.
- is_proton()¶
Return
Trueif the atom represents a proton orFalseif not.
- is_silicon()¶
Return
Trueif the atom represents a silicon atom orFalseif not.
- is_specific_case_of(other)¶
Return
Trueif self is a specific case of other, orFalseotherwise. If other is anAtomobject, then this is the same as theequivalent()method. If other is anGroupAtomobject, then the atom must match or be more specific than any of the combinations in the atom pattern.
- is_sulfur()¶
Return
Trueif the atom represents a sulfur atom orFalseif not.
- is_surface_site()¶
Return
Trueif the atom represents a surface site orFalseif 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.