chemistry_tools.pubchem.bond

Attention

This package has the following additional requirements:

cawdrey>=0.1.7
mathematical>=0.1.13
pillow>=7.0.0
pyparsing>=2.4.6
tabulate>=0.8.9

These can be installed as follows:

python -m pip install chemistry-tools[pubchem]

Represents a bond between atoms in a Compound.

Classes:

Bond(aid1, aid2[, order, style])

Class to represent a bond between two atoms in a Compound.

BondType(value)

Enumeration of possible bond types.

Functions:

parse_bonds(bonds_dict[, coords_dict])

Parse bonds from the given dictionary.

class Bond(aid1, aid2, order=<BondType.SINGLE: 1>, style=None)[source]

Bases: object

Class to represent a bond between two atoms in a Compound.

Parameters
  • aid1 (int) – ID of the begin atom of this bond

  • aid2 (int) – ID of the end atom of this bond

  • order (Union[int, BondType]) – Bond order. Default <BondType.SINGLE: 1>.

  • style – Bond style annotation. Default None.

Methods:

__eq__(other)

Return self == other.

__repr__()

Return a string representation of the Bond.

to_dict()

Return a dictionary containing bond data.

__eq__(other)[source]

Return self == other.

Return type

bool

__repr__()[source]

Return a string representation of the Bond.

Return type

str

to_dict()[source]

Return a dictionary containing bond data.

Return type

Dict[str, Any]

enum BondType(value)[source]

Bases: enum_tools.custom_enums.IntEnum

Enumeration of possible bond types.

Member Type

int

Valid values are as follows:

SINGLE = <BondType.SINGLE: 1>
DOUBLE = <BondType.DOUBLE: 2>
TRIPLE = <BondType.TRIPLE: 3>
QUADRUPLE = <BondType.QUADRUPLE: 4>
DATIVE = <BondType.DATIVE: 5>
COMPLEX = <BondType.COMPLEX: 6>
IONIC = <BondType.IONIC: 7>
UNKNOWN = <BondType.UNKNOWN: 255>
parse_bonds(bonds_dict, coords_dict=None)[source]

Parse bonds from the given dictionary.

Parameters
Return type

Dict[FrozenSet[int], Bond]