bond

A module containing the Bond class.

Summary

Classes:

Bond

A class to represent a bond in a molecular topology.

Reference

class Bond(
index1: PositiveInt,
index2: PositiveInt,
equilibrium_distance: PositiveReal | None = None,
bond_type: PositiveInt | None = None,
is_linker: bool = False,
is_shake: bool = False,
comment: str | None = None,
)[source]

Bases: object

A class to represent a bond in a molecular topology.

Parameters:
  • index1 (PositiveInt) – The index of the first atom in the bond.

  • index2 (PositiveInt) – The index of the second atom in the bond.

  • equilibrium_distance (PositiveReal, optional) – The equilibrium distance of the bond, by default None.

  • bond_type (PositiveInt, optional) – The type of the bond, by default None.

  • is_linker (bool, optional) – A flag to indicate if the bond is a linker, by default False.

  • is_shake (bool, optional) – A flag to indicate if the bond is a shake bond, by default False.

  • comment (str, optional) – A comment for the bond, by default None.

__eq__(value: object) bool[source]

Compare the bond with another bond.

Parameters:

value (object) – The bond to compare.

Returns:

True if the bonds are equal, False otherwise.

Return type:

bool

copy() Bond[source]

A method to create a copy of the bond.

Returns:

A copy of the bond.

Return type:

Bond