Defines cages made from building blocks with 3 functional groups.
-
class
FourPlusFour
(vertex_alignments=None, num_processes=1)¶ Bases:
stk.molecular.topology_graphs.cage.base.Cage
Represents a cube cage topology graph.
See
Cage
for more details and examples.-
vertex_data
¶ A class attribute. Holds the data of the vertices which make up the topology graph.
- Type
tuple
ofVertexData
-
edge_data
¶ A class attribute. Holds the data of the edges which make up the topology graph.
- Type
tuple
ofEdgeData
Methods
assign_building_blocks_to_vertices
(self, …)Assign building_blocks to
vertices
.construct
(self, mol)Construct a
ConstructedMolecule
.-
__init__
(self, vertex_alignments=None, num_processes=1)¶ Initialize a
Cage
.- Parameters
vertex_alignments (
dict
, optional) – A mapping from theVertex.id
of aVertex
vertices
to anEdge
connected to it. TheEdge
is used to align the firstFunctionalGroup
of aBuildingBlock
placed on that vertex. Only vertices which need to have their default edge changed need to be present in thedict
. IfNone
then the default edge is used for each vertex. Changing whichEdge
is used will mean that the topology graph represents different structural isomers. The edge is refered to by a number between0
(inclusive) and the number of edges the vertex is connected to (exclusive).num_processes (
int
, optional) – The number of parallel processes to create duringconstruct()
.
-
assign_building_blocks_to_vertices
(self, building_blocks)¶ Assign building_blocks to
vertices
.- Parameters
building_blocks (
list
ofMolecule
) – TheBuildingBlock
andConstructedMolecule
instances which represent the building block molecules used for construction. Only one instance is present per building block molecule, even if multiples of that building block join up to form theConstructedMolecule
.- Returns
Maps the building_blocks, to the
Vertex
objects invertices
they are placed on during construction. Thedict
has the formbuilding_block_vertices = { BuildingBlock(...): [Vertex(...), Vertex(...)], BuildingBlock(...): [ Vertex(...), Vertex(...), Vertex(...), ] ConstructedMolecule(...): [Vertex(...)] }
- Return type
dict
- Raises
ValueError – If there is more than one building with a given number of functional groups.
-
construct
(self, mol)¶ Construct a
ConstructedMolecule
.- Parameters
mol (
ConstructedMolecule
) – TheConstructedMolecule
instance which needs to be constructed.- Returns
None
- Return type
NoneType
-
edge_data
= (EdgeData(0, 1, id=0), EdgeData(0, 2, id=1), EdgeData(0, 4, id=2), EdgeData(1, 3, id=3), EdgeData(1, 5, id=4), EdgeData(2, 6, id=5), EdgeData(2, 3, id=6), EdgeData(3, 7, id=7), EdgeData(4, 6, id=8), EdgeData(4, 5, id=9), EdgeData(5, 7, id=10), EdgeData(6, 7, id=11))
-
num_window_types
= 1¶
-
num_windows
= 6¶
-
vertex_data
= (VertexData(id=0, position=[-1.0, 1.0, -1.0]), VertexData(id=1, position=[-1.0, -1.0, -1.0]), VertexData(id=2, position=[1.0, 1.0, -1.0]), VertexData(id=3, position=[1.0, -1.0, -1.0]), VertexData(id=4, position=[-1.0, 1.0, 1.0]), VertexData(id=5, position=[-1.0, -1.0, 1.0]), VertexData(id=6, position=[1.0, 1.0, 1.0]), VertexData(id=7, position=[1.0, -1.0, 1.0]))
-
-
class
OnePlusOne
(vertex_alignments=None, num_processes=1)¶ Bases:
stk.molecular.topology_graphs.cage.base.Cage
Represents a capsule cage topology graph.
See
Cage
for more details and examples.-
vertex_data
¶ A class attribute. Holds the data of the vertices which make up the topology graph.
- Type
tuple
ofVertexData
-
edge_data
¶ A class attribute. Holds the data of the edges which make up the topology graph.
- Type
tuple
ofEdgeData
Methods
assign_building_blocks_to_vertices
(self, …)Assign building_blocks to
vertices
.construct
(self, mol)Construct a
ConstructedMolecule
.-
__init__
(self, vertex_alignments=None, num_processes=1)¶ Initialize a
Cage
.- Parameters
vertex_alignments (
dict
, optional) – A mapping from theVertex.id
of aVertex
vertices
to anEdge
connected to it. TheEdge
is used to align the firstFunctionalGroup
of aBuildingBlock
placed on that vertex. Only vertices which need to have their default edge changed need to be present in thedict
. IfNone
then the default edge is used for each vertex. Changing whichEdge
is used will mean that the topology graph represents different structural isomers. The edge is refered to by a number between0
(inclusive) and the number of edges the vertex is connected to (exclusive).num_processes (
int
, optional) – The number of parallel processes to create duringconstruct()
.
-
assign_building_blocks_to_vertices
(self, building_blocks)¶ Assign building_blocks to
vertices
.- Parameters
building_blocks (
list
ofMolecule
) – TheBuildingBlock
andConstructedMolecule
instances which represent the building block molecules used for construction. Only one instance is present per building block molecule, even if multiples of that building block join up to form theConstructedMolecule
.- Returns
Maps the building_blocks, to the
Vertex
objects invertices
they are placed on during construction. Thedict
has the formbuilding_block_vertices = { BuildingBlock(...): [Vertex(...), Vertex(...)], BuildingBlock(...): [ Vertex(...), Vertex(...), Vertex(...), ] ConstructedMolecule(...): [Vertex(...)] }
- Return type
dict
- Raises
ValueError – If there is more than one building with a given number of functional groups.
-
construct
(self, mol)¶ Construct a
ConstructedMolecule
.- Parameters
mol (
ConstructedMolecule
) – TheConstructedMolecule
instance which needs to be constructed.- Returns
None
- Return type
NoneType
-
edge_data
= (EdgeData(0, 1, id=0, position=array([0., 1., 0.])), EdgeData(0, 1, id=1, position=array([ 0., -1., 1.])), EdgeData(0, 1, id=2, position=array([ 0., -1., -1.])))
-
num_window_types
= 1¶
-
num_windows
= 3¶
-
vertex_data
= (VertexData(id=0, position=[1.0, 0.0, 0.0]), VertexData(id=1, position=[-1.0, 0.0, 0.0]))
-
-
class
TwoPlusTwo
(vertex_alignments=None, num_processes=1)¶ Bases:
stk.molecular.topology_graphs.cage.base.Cage
Represents a tetrahedron cage topology graph.
See
Cage
for more details and examples.-
vertex_data
¶ A class attribute. Holds the data of the vertices which make up the topology graph.
- Type
tuple
ofVertexData
-
edge_data
¶ A class attribute. Holds the data of the edges which make up the topology graph.
- Type
tuple
ofEdgeData
Methods
assign_building_blocks_to_vertices
(self, …)Assign building_blocks to
vertices
.construct
(self, mol)Construct a
ConstructedMolecule
.-
__init__
(self, vertex_alignments=None, num_processes=1)¶ Initialize a
Cage
.- Parameters
vertex_alignments (
dict
, optional) – A mapping from theVertex.id
of aVertex
vertices
to anEdge
connected to it. TheEdge
is used to align the firstFunctionalGroup
of aBuildingBlock
placed on that vertex. Only vertices which need to have their default edge changed need to be present in thedict
. IfNone
then the default edge is used for each vertex. Changing whichEdge
is used will mean that the topology graph represents different structural isomers. The edge is refered to by a number between0
(inclusive) and the number of edges the vertex is connected to (exclusive).num_processes (
int
, optional) – The number of parallel processes to create duringconstruct()
.
-
assign_building_blocks_to_vertices
(self, building_blocks)¶ Assign building_blocks to
vertices
.- Parameters
building_blocks (
list
ofMolecule
) – TheBuildingBlock
andConstructedMolecule
instances which represent the building block molecules used for construction. Only one instance is present per building block molecule, even if multiples of that building block join up to form theConstructedMolecule
.- Returns
Maps the building_blocks, to the
Vertex
objects invertices
they are placed on during construction. Thedict
has the formbuilding_block_vertices = { BuildingBlock(...): [Vertex(...), Vertex(...)], BuildingBlock(...): [ Vertex(...), Vertex(...), Vertex(...), ] ConstructedMolecule(...): [Vertex(...)] }
- Return type
dict
- Raises
ValueError – If there is more than one building with a given number of functional groups.
-
construct
(self, mol)¶ Construct a
ConstructedMolecule
.- Parameters
mol (
ConstructedMolecule
) – TheConstructedMolecule
instance which needs to be constructed.- Returns
None
- Return type
NoneType
-
edge_data
= (EdgeData(0, 1, id=0), EdgeData(0, 2, id=1), EdgeData(0, 3, id=2), EdgeData(1, 2, id=3), EdgeData(1, 3, id=4), EdgeData(2, 3, id=5))
-
num_window_types
= 1¶
-
num_windows
= 4¶
-
vertex_data
= (VertexData(id=0, position=[1.0, 0.0, -0.7071067811865475]), VertexData(id=1, position=[-1.0, 0.0, -0.7071067811865475]), VertexData(id=2, position=[0.0, 1.0, 0.7071067811865475]), VertexData(id=3, position=[0.0, -1.0, 0.7071067811865475]))
-