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

atom1

Atom

An Atom object connecting to the bond

atom2

Atom

An Atom object connecting to the bond

apply_action(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.

decrement_order(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.

get_bde(self)

estimate the bond dissociation energy in J/mol of the bond based on the order of the bond and the atoms involved in the bond

get_bond_string(self) unicode

Represent the bond object as a string (eg. ‘C#N’). The returned string is independent of the atom ordering, with the atom labels in alphabetical order (i.e. ‘C-H’ is possible but not ‘H-C’) :return: str

get_order_num(self) float

returns the bond order as a number

get_order_str(self) unicode

returns a string representing the bond order

get_other_vertex(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.

increment_order(self)

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

is_benzene(self) bool

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

is_double(self) bool

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

is_hydrogen_bond(self)

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

is_order(self, float other_order) bool

Return True if the bond is of order other_order 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+

is_quadruple(self) bool

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

is_single(self) bool

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

is_specific_case_of(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.

is_triple(self) bool

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

is_van_der_waals(self) bool

Return True if the bond represents a van der Waals bond or False if not.

order

‘float’

Type:

order

set_order_num(self, float new_order)

change the bond order with a number

set_order_str(self, unicode new_order)

set the bond order using a valid bond-order character

sorting_key

Returns a sorting key for comparing Bond objects. Read-only

vertex1

rmgpy.molecule.graph.Vertex

Type:

vertex1

vertex2

rmgpy.molecule.graph.Vertex

Type:

vertex2

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