cgexplore.topologies.M4L82

class cgexplore.topologies.M4L82(building_blocks, vertex_alignments=None, vertex_positions=None, reaction_factory=GenericReactionFactory(), num_processes=1, optimizer=<stk._internal.optimizers.null.NullOptimizer object>, scale_multiplier=1.0)[source]

Bases: Cage

Cage topology.

Methods

Attributes

Parameters:
  • building_blocks (Iterable[BuildingBlock] | dict[BuildingBlock, tuple[int, ...]])

  • vertex_alignments (dict[int, int] | None)

  • vertex_positions (dict[int, ndarray] | None)

  • reaction_factory (ReactionFactory)

  • num_processes (int)

  • optimizer (Optimizer)

  • scale_multiplier (float)

clone()

Return a clone.

Returns:

The clone.

Return type:

Self

construct()

Construct a ConstructedMolecule.

Returns:

The data describing the ConstructedMolecule.

Return type:

ConstructionResult

get_building_blocks()

Yield the building blocks.

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

Yields:

A building block of the topology graph.

Return type:

Iterator[BuildingBlock]

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 topology graph is desired.

Returns:

The number of times building_block is present in the topology graph.

Return type:

int

get_vertex_alignments()

Get the vertex alignments.

Returns:

The vertex alignments.

Return type:

dict[int, int]

with_building_blocks(building_block_map)

Return a clone holding different building blocks.

Parameters:

building_block_map (dict[BuildingBlock, BuildingBlock]) – Maps a building block in the current topology graph to the building block which should replace it in the clone. If a building block should be not replaced in the clone, it can be omitted from the map.

Returns:

The clone.

Return type:

Self

paired_wall_1_coord = array([-0.5       , -0.28867513,  0.40824829])
paired_wall_2_coord = array([ 0.5       ,  0.28867513, -0.40824829])
wall_1_shift = array([0.2, 0.2, 0. ])
wall_2_shift = array([0.2, 0.2, 0. ])