rmgpy.molecule.GroupBond¶
- class rmgpy.molecule.GroupBond¶
A bond group. This class is based on the
Bondclass, except that all attributes are lists rather than individual values. The allowed bond types are given here. The attributes are:Attribute
Type
Description
order
listThe allowed bond orders (as character strings)
reg_dim
BooleanIndicates if this is a regularization dimension during tree generation
Each list represents a logical OR construct, i.e. a bond will match the group if it matches any item in the list.
- apply_action(action)¶
Update the bond 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
GroupBondobject. Modifying the attributes of the copy will not affect the original.
- equivalent(other)¶
Returns
Trueif other is equivalent to self orFalseif not, where other can be either anBondor anGroupBondobject.
- get_order_num()¶
returns the bond order as a list of numbers
- get_order_str()¶
returns a list of strings representing the bond order
- get_other_vertex(vertex)¶
Given a vertex that makes up part of the edge, return the other vertex. Raise a
ValueErrorif the given vertex is not part of the edge.
- is_benzene(wildcards=False)¶
Return
Trueif the bond represents a benzene bond orFalseif not. If wildcards isFalsewe return False anytime there is more than one bond order, otherwise we returnTrueif any of the options are benzene
- is_double(wildcards=False)¶
Return
Trueif the bond represents a double bond orFalseif not. If wildcards isFalsewe return False anytime there is more than one bond order, otherwise we returnTrueif any of the options are double.
- is_hydrogen_bond(wildcards=False)¶
Return
Trueif the bond represents a hydrogen bond orFalseif not. If wildcards isFalsewe return False anytime there is more than one bond order, otherwise we returnTrueif any of the options are hydrogen bonds.
- is_quadruple(wildcards=False)¶
Return
Trueif the bond represents a quadruple bond orFalseif not. If wildcards isFalsewe return False anytime there is more than one bond order, otherwise we returnTrueif any of the options are quadruple.
- is_reaction_bond(wildcards=False)¶
Return
Trueif the bond represents a reaction bond orFalseif not. If wildcards isFalsewe return False anytime there is more than one bond order, otherwise we returnTrueif any of the options are reaction bonds.
- is_single(wildcards=False)¶
Return
Trueif the bond represents a single bond orFalseif not. If wildcards isFalsewe return False anytime there is more than one bond order, otherwise we returnTrueif any of the options are single.NOTE: we can replace the absolute value relation with math.isclose when we swtich to python 3.5+
- is_specific_case_of(other)¶
Returns
Trueif other is the same as self or is a more specific case of self. ReturnsFalseif some of self is not included in other or they are mutually exclusive.
- is_triple(wildcards=False)¶
Return
Trueif the bond represents a triple bond orFalseif not. If wildcards isFalsewe return False anytime there is more than one bond order, otherwise we returnTrueif any of the options are triple.
- is_van_der_waals(wildcards=False)¶
Return
Trueif the bond represents a van der Waals bond orFalseif not. If wildcards isFalsewe return False anytime there is more than one bond order, otherwise we returnTrueif any of the options are van der Waals.
- make_bond(molecule, atom1, atom2)¶
Creates a :class: Bond between atom1 and atom2 analogous to self
The intended input arguments should be class :Atom: not class :GroupAtom: :param atom1: First :class: Atom the bond connects :param atom2: Second :class: Atom the bond connects
- set_order_num(new_order)¶
change the bond order with a list of numbers
- set_order_str(new_order)¶
set the bond order using a valid bond-order character list