rmgpy.molecule.GroupBond¶
- class rmgpy.molecule.GroupBond¶
A bond group. This class is based on the
Bond
class, except that all attributes are lists rather than individual values. The allowed bond types are given here. The attributes are:Attribute
Type
Description
order
list
The allowed bond orders (as character strings)
reg_dim
Boolean
Indicates 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
GroupBond
object. Modifying the attributes of the copy will not affect the original.
- equivalent(other)¶
Returns
True
if other is equivalent to self orFalse
if not, where other can be either anBond
or anGroupBond
object.
- 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
ValueError
if the given vertex is not part of the edge.
- is_benzene(wildcards)¶
Return
True
if the bond represents a benzene bond orFalse
if not. If wildcards isFalse
we return False anytime there is more than one bond order, otherwise we returnTrue
if any of the options are benzene
- is_double(wildcards)¶
Return
True
if the bond represents a double bond orFalse
if not. If wildcards isFalse
we return False anytime there is more than one bond order, otherwise we returnTrue
if any of the options are double.
- is_hydrogen_bond(wildcards)¶
Return
True
if the bond represents a hydrogen bond orFalse
if not. If wildcards isFalse
we return False anytime there is more than one bond order, otherwise we returnTrue
if any of the options are hydrogen bonds.
- is_quadruple(wildcards)¶
Return
True
if the bond represents a quadruple bond orFalse
if not. If wildcards isFalse
we return False anytime there is more than one bond order, otherwise we returnTrue
if any of the options are quadruple.
- is_reaction_bond(wildcards)¶
Return
True
if the bond represents a reaction bond orFalse
if not. If wildcards isFalse
we return False anytime there is more than one bond order, otherwise we returnTrue
if any of the options are reaction bonds.
- is_single(wildcards)¶
Return
True
if the bond represents a single bond orFalse
if not. If wildcards isFalse
we return False anytime there is more than one bond order, otherwise we returnTrue
if 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
True
if other is the same as self or is a more specific case of self. ReturnsFalse
if some of self is not included in other or they are mutually exclusive.
- is_triple(wildcards)¶
Return
True
if the bond represents a triple bond orFalse
if not. If wildcards isFalse
we return False anytime there is more than one bond order, otherwise we returnTrue
if any of the options are triple.
- is_van_der_waals(wildcards)¶
Return
True
if the bond represents a van der Waals bond orFalse
if not. If wildcards isFalse
we return False anytime there is more than one bond order, otherwise we returnTrue
if 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