rmgpy.molecule.Bond

class rmgpy.molecule.Bond(atom1, atom2, order=1)

A chemical bond. The attributes are:

Attribute Type Description
order float The bond type
applyAction(self, action)

Update the bond 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

Generate a deep copy of the current bond. Modifying the attributes of the copy will not affect the original.

decrementOrder(self)

Update the bond as a result of applying a CHANGE_BOND action to decrease the order by one.

equivalent(self, Edge other) → bool

Return True if other is indistinguishable from this bond, or False otherwise. other can be either a Bond or a GroupBond object.

getOrderNum(self) → float

returns the bond order as a number

getOrderStr(self) → str

returns a string 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.

incrementOrder(self)

Update the bond as a result of applying a CHANGE_BOND action to increase the order by one.

isBenzene(self) → bool

Return True if the bond represents a benzene bond or False if not.

isDouble(self) → bool

Return True if the bond represents a double bond or False if not.

isOrder(self, float otherOrder) → bool

Return True if the bond represents a single bond or False if not. This compares floats that takes into account floating point error

NOTE: we can replace the absolute value relation with math.isclose when we swtich to python 3.5+

isSingle(self) → bool

Return True if the bond represents a single bond or False if not.

isSpecificCaseOf(self, Edge other) → bool

Return True if self is a specific case of other, or False otherwise. other can be either a Bond or a GroupBond object.

isTriple(self) → bool

Return True if the bond represents a triple bond or False if not.

order

order: ‘float’

setOrderNum(self, float newOrder)

change the bond order with a number

setOrderStr(self, str newOrder)

set the bond order using a valid bond-order character

vertex1

vertex1: rmgpy.molecule.graph.Vertex

vertex2

vertex2: rmgpy.molecule.graph.Vertex

Bond types

The bond type simply indicates the order of a chemical bond. We define the following bond types:

Bond type Description
S a single bond
D a double bond
T a triple bond
B a benzene bond