Square Planar

class SquarePlanar(metals, ligands, reaction_factory=None, num_processes=1, optimizer=<stk.molecular.topology_graphs.topology_graph.optimizers.null.NullOptimizer object>)[source]

Bases: stk.molecular.topology_graphs.metal_complex.metal_complex.MetalComplex

Represents a square planar metal complex topology graph.

Metal building blocks with at least four functional groups are required for this topology graph.

Ligand building blocks with one functional group are required for this topology graph.

When using a dict for initialization, a BuildingBlock needs to be assigned to each of the following numbers:

metals: (0, )
ligands: (0, 1, 2, 3)

See MetalComplex for more details and examples.

Methods

clone()

Return a clone.

construct()

Construct a ConstructedMolecule.

get_building_blocks()

Yield the building blocks.

get_num_building_block(building_block)

Get the number of times building_block is present.

with_building_blocks(building_block_map)

Return a clone holding different building blocks.

__init__(metals, ligands, reaction_factory=None, num_processes=1, optimizer=<stk.molecular.topology_graphs.topology_graph.optimizers.null.NullOptimizer object>)

Initialize a MetalComplex.

Parameters
  • metals (dict or BuildingBlock or tuple) –

    Can be a dict which maps the BuildingBlock instances to the indices of the vertices in _metal_vertex_prototypes it should be placed on.

    If each BuildingBlock has a different number of functional groups, they can be supplied together in a tuple.

    Can also be a BuildingBlock instance, which should be placed on all _metal_vertex_prototypes on the topology graph.

  • ligands (dict or BuildingBlock or tuple) –

    Can be a dict which maps the BuildingBlock instances to the indices of the vertices in _ligand_vertex_prototypes it should be placed on.

    If each BuildingBlock has a different number of functional groups, they can be supplied together in a tuple.

    Can also be a BuildingBlock instance, which should be placed on all _ligand_vertex_prototypes on the topology graph.

  • reaction_factory (ReactionFactory, optional) – The reaction factory to use for creating bonds between building blocks. By default, a DativeReactionFactory is used, which produces only dative bonds in any reactions done by this topology construction.

  • num_processes (int, optional) – The number of parallel processes to create during construct().

  • optimizer (Optimizer, optional) – Used to optimize the structure of the constructed molecule.

clone()

Return a clone.

Returns

The clone. Has the same type as the original topology graph.

Return type

TopologyGraph

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

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

Returns

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

Return type

int

with_building_blocks(building_block_map)

Return a clone holding different building blocks.

Parameters

building_block_map (dict) – 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. Has the same type as the original topology graph.

Return type

TopologyGraph