Shapes¶
Shapes are classified into molecules by determining the nearest shape with a matching number of vertices.
Shape submodule
-
class
scine_molassembler.shapes.
Shape
¶ Enumeration of recognizable polyhedral shapes
>>> all_shapes = Shape.__members__.values() # Full list of shapes >>> Shape.SquareAntiprism in all_shapes True >>> Shape.__members__["TrigonalPrism"] # String lookup Shape.TrigonalPrism >>> str(Shape.TrigonalPrism) # displayable string "trigonal prism"
Members:
Line
Bent
EquilateralTriangle
VacantTetrahedron
T
Tetrahedron
Square
Seesaw
TrigonalPyramid
SquarePyramid
TrigonalBipyramid
Pentagon
Octahedron
TrigonalPrism
PentagonalPyramid
Hexagon
PentagonalBipyramid
CappedOctahedron
CappedTrigonalPrism
SquareAntiprism
Cube
TrigonalDodecahedron
HexagonalBipyramid
TricappedTrigonalPrism
CappedSquareAntiprism
HeptagonalBipyramid
BicappedSquareAntiprism
EdgeContractedIcosahedron
Icosahedron
Cuboctahedron
-
Bent
= Shape.Bent¶
-
BicappedSquareAntiprism
= Shape.BicappedSquareAntiprism¶
-
CappedOctahedron
= Shape.CappedOctahedron¶
-
CappedSquareAntiprism
= Shape.CappedSquareAntiprism¶
-
CappedTrigonalPrism
= Shape.CappedTrigonalPrism¶
-
Cube
= Shape.Cube¶
-
Cuboctahedron
= Shape.Cuboctahedron¶
-
EdgeContractedIcosahedron
= Shape.EdgeContractedIcosahedron¶
-
EquilateralTriangle
= Shape.EquilateralTriangle¶
-
HeptagonalBipyramid
= Shape.HeptagonalBipyramid¶
-
Hexagon
= Shape.Hexagon¶
-
HexagonalBipyramid
= Shape.HexagonalBipyramid¶
-
Icosahedron
= Shape.Icosahedron¶
-
Line
= Shape.Line¶
-
Octahedron
= Shape.Octahedron¶
-
Pentagon
= Shape.Pentagon¶
-
PentagonalBipyramid
= Shape.PentagonalBipyramid¶
-
PentagonalPyramid
= Shape.PentagonalPyramid¶
-
Seesaw
= Shape.Seesaw¶
-
Square
= Shape.Square¶
-
SquareAntiprism
= Shape.SquareAntiprism¶
-
SquarePyramid
= Shape.SquarePyramid¶
-
T
= Shape.T¶
-
Tetrahedron
= Shape.Tetrahedron¶
-
TricappedTrigonalPrism
= Shape.TricappedTrigonalPrism¶
-
TrigonalBipyramid
= Shape.TrigonalBipyramid¶
-
TrigonalDodecahedron
= Shape.TrigonalDodecahedron¶
-
TrigonalPrism
= Shape.TrigonalPrism¶
-
TrigonalPyramid
= Shape.TrigonalPyramid¶
-
VacantTetrahedron
= Shape.VacantTetrahedron¶
-
property
name
¶ handle) -> str
- Type
(self
-
-
scine_molassembler.shapes.
coordinates
(shape: scine_molassembler.shapes.Shape) → numpy.ndarray[float64[3, n]]¶ Idealized spherical coordinates of the shape
-
scine_molassembler.shapes.
name_from_str
(name_str: str) → scine_molassembler.shapes.Shape¶ Fetch a shape name from its string representation
>>> s = Shape.CappedSquareAntiprism >>> str(s) "capped square antiprism" >>> name_from_str(str(s)) Shape.CappedSquareAntiprism
-
scine_molassembler.shapes.
size
(shape: scine_molassembler.shapes.Shape) → int¶ Number of vertices of a shape. Does not include a centroid.
>>> size(Shape.Line) 2 >>> size(Shape.Octahedron) 6 >>> size(Shape.Cuboctahedron) 12