rmgpy.molecule.GroupBond

class rmgpy.molecule.GroupBond(atom1, atom2, order=None)

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)

Each list represents a logical OR construct, i.e. a bond will match the group if it matches any item in the list.

applyAction(self, list 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(self) → Edge

Return a deep copy of the GroupBond object. Modifying the attributes of the copy will not affect the original.

equivalent(self, Edge other) → bool

Returns True if other is equivalent to self or False if not, where other can be either an Bond or an GroupBond object.

getOrderNum(self) → list

returns the bond order as a list of numbers

getOrderStr(self) → list

returns a list of strings representing the bond order

getOtherVertex(self, Vertex 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.

isBenzene(self, bool wildcards=False) → bool

Return True if the bond represents a benzene bond or False if not. If wildcards is False we return False anytime there is more than one bond order, otherwise we return True if any of the options are benzene

isDouble(self, bool wildcards=False) → bool

Return True if the bond represents a double bond or False if not. If wildcards is False we return False anytime there is more than one bond order, otherwise we return True if any of the options are double.

isSingle(self, bool wildcards=False) → bool

Return True if the bond represents a single bond or False if not. If wildcards is False we return False anytime there is more than one bond order, otherwise we return True 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+

isSpecificCaseOf(self, Edge other) → bool

Returns True if other is the same as self or is a more specific case of self. Returns False if some of self is not included in other or they are mutually exclusive.

isTriple(self, bool wildcards=False) → bool

Return True if the bond represents a triple bond or False if not. If wildcards is False we return False anytime there is more than one bond order, otherwise we return True if any of the options are triple.

makeBond(self, Molecule molecule, Atom atom1, Atom atom2)

Creates a :class: Bond between atom1 and atom2 analogous to self

The intended input arguments should be class :Atom: not class :GroupAtom: Args:

System Message: ERROR/3 (docstring of rmgpy.molecule.GroupBond.makeBond, line 5)

Unexpected indentation.
atom1: First :class: Atom the bond connects atom2: Second :class: Atom the bond connects
order

order: list

setOrderNum(self, list newOrder)

change the bond order with a list of numbers

setOrderStr(self, list newOrder)

set the bond order using a valid bond-order character list

vertex1

vertex1: rmgpy.molecule.graph.Vertex

vertex2

vertex2: rmgpy.molecule.graph.Vertex