rmgpy.molecule.GroupAtom¶
- class rmgpy.molecule.GroupAtom¶
An atom group. This class is based on the
Atomclass, except that it uses atom types instead of elements, and all attributes are lists rather than individual values. The attributes are:Attribute
Type
Description
atomtype
listThe allowed atom types (as
AtomTypeobjects)radical_electrons
listThe allowed numbers of radical electrons (as short integers)
charge
listThe allowed formal charges (as short integers)
label
strA string label that can be used to tag individual atoms
lone_pairs
listThe number of lone electron pairs
charge
listThe partial charge of the atom
site
listThe allowed adsorption sites
morphology
listThe allowed morphologies
props
dictDictionary for storing additional atom properties
reg_dim_atm
listList of atom types that are free dimensions in tree optimization
reg_dim_u
listList of unpaired electron numbers that are free dimensions in tree optimization
reg_dim_r
listList of inRing values that are free dimensions in tree optimization
reg_dim_site
listList of sites that are free dimensions in tree optimization
reg_dim_morphology
listList of morphologies that are free dimensions in tree optimization
Each list represents a logical OR construct, i.e. an atom will match the group if it matches any item in the list. However, the radical_electrons, and charge attributes are linked such that an atom must match values from the same index in each of these in order to match.
- apply_action(action)¶
Update the atom group 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()¶
Return a deep copy of the
GroupAtomobject. Modifying the attributes of the copy will not affect the original.
- count_bonds(wildcards=False)¶
Returns: list of the number of bonds currently on the :class:GroupAtom
If the argument wildcards is turned off then any bonds with multiple options for bond orders will not be counted
- equivalent(other, strict=True)¶
Returns
Trueif other is equivalent to self orFalseif not, where other can be either anAtomor anGroupAtomobject. When comparing twoGroupAtomobjects, this function respects wildcards, e.g.R!His equivalent toC.
- has_wildcards()¶
Return
Trueif the atom has wildcards in any of the attributes: atomtype, radical electrons, lone pairs, charge, and bond order. Returns ‘’False’’ if no attribute has wildcards.
- is_bonded_to_surface()¶
Return
Trueif the atom is bonded to a surface GroupAtom 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 a surface site orFalseif not.
- is_fluorine()¶
Return
Trueif the atom represents a fluorine atom orFalseif not.
- is_lithium()¶
Return
Trueif the atom represents a bromine atom orFalseif not.
- is_nitrogen()¶
Return
Trueif the atom represents a nitrogen atom orFalseif not.
- is_oxygen()¶
Return
Trueif the atom represents an oxygen atom orFalseif not.
- is_proton()¶
Return
Trueif the atom represents a surface site orFalseif not.
- is_specific_case_of(other)¶
Returns
Trueif self is the same as other or is a more specific case of other. ReturnsFalseif some of self is not included in other or they are mutually exclusive.
- is_sulfur()¶
Return
Trueif the atom represents an sulfur atom orFalseif not.
- is_surface_site()¶
Return
Trueif the atom represents a surface site orFalseif not.
- make_sample_atom()¶
Returns: a class :Atom: object analagous to the GroupAtom
This makes a sample, so it takes the first element when there are multiple options inside of self.atomtype, self.radical_electrons, self.lone_pairs, and self.charge
- reset_connectivity_values()¶
Reset the cached structure information for this vertex.