stk.AtomInfo

class stk.AtomInfo(atom, building_block_atom, building_block, building_block_id)[source]

Bases: object

Holds additional info about ConstructedMolecule atoms.

Parameters:
  • atom (Atom) – The atom about which information is held.

  • building_block_atom (Atom | None) – The building block atom from which this atom originates. Can be None, if the atom was not part of the building block, but was added by the construction process instead.

  • building_block (Molecule | None) – The building block from which the atom originates. Can be None, if the atom 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 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 atom was not part of a building block, but was added by the construction process instead.

Methods

get_atom

Get the atom about which information is held.

get_building_block

Get the building block from which the atom originates.

get_building_block_atom

Get the original atom held by the building block.

get_building_block_id

Get the id of the atom's building block.

get_atom()[source]

Get the atom about which information is held.

Returns:

The atom.

Return type:

Atom

get_building_block()[source]

Get the building block from which the atom originates.

Returns:

The building block or None if the atom was not originally found in a building block, but was added by the construction process instead.

Return type:

Molecule | None

get_building_block_atom()[source]

Get the original atom held by the building block.

Returns:

The building block atom or None if the atom was not originally found in a building block, but was added by the construction process instead.

Return type:

Atom | None

get_building_block_id()[source]

Get the id of the atom’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:

The unique building block id or None if the atom was not originally found in a building block, but was added by the construction process instead.

Return type:

int | None