Bond Info

class BondInfo(bond, building_block, building_block_id)[source]

Bases: object

Holds additional info about ConstructedMolecule bonds.

Methods

get_bond()

Get the bond about which information is held.

get_building_block()

Get the building block from which the bond originates.

get_building_block_id()

Get the id of the bond's building block.

__init__(bond, building_block, building_block_id)[source]

Initialize an BondInfo instance.

Parameters:
  • bond (Bond) – The bond about which information is held.

  • building_block (Molecule or NoneType) – The building block from which the bond originates. Can be None, if the bond was not part of a building block, but was added by the construction process instead.

  • building_block_id (int or NoneType) – A unique id for each Molecule placed during the construction of the ConstructedMolecule. As a single Molecule can be placed multiple times during construction, the building_block_id allows the user to distinguish between each placement. Can be None, if the bond was not part of a building block, but was added by the construction process instead.

get_bond()[source]

Get the bond about which information is held.

Returns:

The bond.

Return type:

Bond

get_building_block()[source]

Get the building block from which the bond originates.

Returns:

  • Molecule – The building block.

  • None (NoneType) – If the bond was not originally found in a building block, but was added by the construction process instead.

get_building_block_id()[source]

Get the id of the bond’s building block.

A unique id for each Molecule placed during the construction of the ConstructedMolecule. As a single Molecule can be placed multiple times during construction, the building block id allows the user to distinguish between each placement.

Returns:

  • int – The id.

  • None (NoneType) – If the bond was not originally found in a building block, but was added by the construction process instead.