stk.BondInfo
- class stk.BondInfo(bond, building_block, building_block_id)[source]
Bases:
object
Holds additional info about
ConstructedMolecule
bonds.- Parameters:
bond (Bond) – The bond about which information is held.
building_block (Molecule | None) – 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 | None) – A unique id for each
Molecule
placed during the construction of theConstructedMolecule
. As a singleMolecule
can be placed multiple times during construction, the building_block_id allows the user to distinguish between each placement. Can beNone
, if the bond was not part of a building block, but was added by the construction process instead.
Methods
Get the bond about which information is held.
Get the building block from which the bond originates.
Get the id of the bond's building block.
- get_building_block()[source]
Get the building block from which the bond originates.
- Returns:
The building block or
None
, if the bond was not originally found in a building block, but was added by the construction process instead.- Return type:
Molecule | None
- 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 theConstructedMolecule
. As a singleMolecule
can be placed multiple times during construction, the building block id allows the user to distinguish between each placement.- Returns:
The id, if the bond was not originally found in a building block, but was added by the construction process instead.
- Return type:
int | None