Periodic Construction Result
- class PeriodicConstructionResult(construction_state, lattice_size)[source]
Bases:
ConstructionResult
The result of
TopologyGraph.construct()
with periodic info.Methods
Get the atom infos of the constructed molecule.
Get the atoms of the constructed molecule.
Get the bond infos of the constructed molecule.
Get the bonds of the constructed molecule.
Yield the building blocks.
get_num_building_block
(building_block)Get the number of times building_block is present.
Get the periodic cell information of the constructed molecule.
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
ofint
) – The size of the lattice in the x, y and z directions.
- 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.
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:
- get_periodic_info()[source]
Get the periodic cell information of the constructed molecule.
- Returns:
The periodic cell information of the constructed molecule.
- Return type:
- get_position_matrix()
Get the position matrix of the constructed molecule.
- Returns:
The position matrix of the constructed molecule.
- Return type: