stk.ConstructionResult

class stk.ConstructionResult(construction_state)[source]

Bases: object

The result of TopologyGraph.construct().

Initialize a ConstructionResult.

Parameters:

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

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

Get the number of times building_block is present.

get_position_matrix

Get the position matrix of the constructed molecule.

get_atom_infos()[source]

Get the atom infos of the constructed molecule.

Returns:

The atom infos of the constructed molecule.

Return type:

tuple of AtomInfo

get_atoms()[source]

Get the atoms of the constructed molecule.

Returns:

The atoms of the constructed molecule.

Return type:

tuple of Atom

get_bond_infos()[source]

Get the bond infos of the constructed molecule.

Returns:

The bond infos of the constructed molecule.

Return type:

tuple of BondInfo

get_bonds()[source]

Get the bonds of the constructed molecule.

Returns:

The bonds of the constructed molecule.

Return type:

tuple of Bond

get_building_blocks()[source]

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)[source]

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_position_matrix()[source]

Get the position matrix of the constructed molecule.

Returns:

The position matrix of the constructed molecule.

Return type:

numpy.ndarray