stk.cage.AngledVertex
- class stk.cage.AngledVertex(id, position, use_neighbor_placement=True, aligner_edge=0)[source]
Bases:
_CageVertex- Parameters:
id (int) – The id of the vertex.
position (ndarray) – The position of the vertex.
use_neighbor_placement (bool) – If
True, the position of the vertex will be updated based on the neighboring functional groups.aligner_edge (int) – The edge which is used to align the
BuildingBlockplaced on the vertex. The firstFunctionalGroupis rotated such that it lies exactly on thisEdge. Must be between0and the number of edges the vertex is connected to.
Methods
Return a clone.
Return the aligner edge of the vertex.
Get the cell of the lattice in which the vertex is found.
Get the id.
Get the position.
Initialize a
_CageVertexin the middle of vertices.Map functional groups to edges.
Place building_block on the
Vertex.Trueif the position should be updated based on neighbors.Return a clone with a different aligner_edge.
Get a clone at a certain position.
Get a clone with a scaled position.
Return a clone with a different use_neighbor_placement.
- classmethod init_at_center(id, vertices)
Initialize a
_CageVertexin the middle of vertices.
- clone()
Return a clone.
- Returns:
The clone.
- get_aligner_edge()
Return the aligner edge of the vertex.
- Returns:
The aligner edge.
- Return type:
- get_cell()
Get the cell of the lattice in which the vertex is found.
- Returns:
The cell of the lattice in which the vertex is found.
- Return type:
- map_functional_groups_to_edges(building_block, edges)[source]
Map functional groups to edges.
Each functional group in building_block needs to be assigned to an edge in edges.
- Parameters:
building_block –
BuildingBlockThe building block which is needs to have functional groups assigned to edges.edges – The edges to which the vertex is attached.
- Returns:
A mapping from the id of a functional group in building_block to the id of the edge in edges it is assigned to.
- place_building_block(building_block, edges)[source]
Place building_block on the
Vertex.- Parameters:
building_block – The building block molecule which is to be placed on the vertex.
edges – The edges to which the vertex is attached.
- Returns:
The position matrix of building_block after being placed.
- use_neighbor_placement()
Trueif the position should be updated based on neighbors.- Returns:
Trueif the position of the vertex should be updated based on the positions of functional groups on neighboring vertices.- Return type:
- with_aligner_edge(aligner_edge)
Return a clone with a different aligner_edge.
- with_position(position)
Get a clone at a certain position.
- with_scale(scale)
Get a clone with a scaled position.