Periodic Construction Result

class PeriodicConstructionResult(construction_state, lattice_size)[source]

Bases: stk.molecular.topology_graphs.topology_graph.construction_result.construction_result.ConstructionResult

The result of TopologyGraph.construct() with periodic info.

Methods

get_atom_infos()

Get the atom infos of the constructed molecule.

get_atoms()

Get the atoms of the constructed molecule.

get_bond_infos()

Get the bond infos of the constructed molecule.

get_bonds()

Get the bonds of the constructed molecule.

get_building_blocks()

Yield the building blocks.

get_num_building_block(building_block)

Get the number of times building_block is present.

get_periodic_info()

Get the periodic cell information of the constructed molecule.

get_position_matrix()

Get the position matrix of the constructed molecule.

__init__(construction_state, lattice_size)[source]

Initialize a ConstructionResult.

Parameters
  • construction_state (ConstructionState) – The state from which the result is initialized.

  • lattice_size (tuple of int) – The size of the lattice in the x, y and z directions.

get_atom_infos()

Get the atom infos of the constructed molecule.

Returns

The atom infos of the constructed molecule.

Return type

tuple of AtomInfo

get_atoms()

Get the atoms of the constructed molecule.

Returns

The atoms of the constructed molecule.

Return type

tuple of Atom

get_bond_infos()

Get the bond infos of the constructed molecule.

Returns

The bond infos of the constructed molecule.

Return type

tuple of BondInfo

get_bonds()

Get the bonds of the constructed molecule.

Returns

The bonds of the constructed molecule.

Return type

tuple of Bond

get_building_blocks()

Yield the building blocks.

Building blocks are yielded in an order based on their position in the constructed molecule. For two topologically equivalent constructed molecules, but with different building blocks, equivalently positioned building blocks will be yielded at the same time.

Yields

BuildingBlock – A building block of the topology graph.

get_num_building_block(building_block)

Get the number of times building_block is present.

Parameters

building_block (BuildingBlock) – The building block whose frequency in the constructed molecule is desired.

Returns

The number of times building_block was used in the construction of the constructed molecule.

Return type

int

get_periodic_info()[source]

Get the periodic cell information of the constructed molecule.

Returns

The periodic cell information of the constructed molecule.

Return type

PeriodicInfo

get_position_matrix()

Get the position matrix of the constructed molecule.

Returns

The position matrix of the constructed molecule.

Return type

numpy.ndarray