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)

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

applyAction()

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()

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

getOrderNum()

returns the bond order as a list of numbers

getOrderStr()

returns a list of strings representing the bond order

getOtherVertex()

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()

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()

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()

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()

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()

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()

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
setOrderNum()

change the bond order with a list of numbers

setOrderStr()

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