Layer Group API¶
Symmetry analysis and classification tables for the 80 layer groups. Shared
types such as moyopy.Cell, moyopy.Operations,
moyopy.UnimodularTransformation, and
moyopy.PointGroup are documented on the
API Reference hub.
Symmetry datasets¶
Run a symmetry analysis on a moyopy.Cell treated as a layer (slab)
and inspect the result.
moyopy.MoyoLayerDataset
¶
MoyoLayerDataset(cell: Cell, *, symprec: float = 0.0001, angle_tolerance: float | None = None, setting: LayerSetting | None = None, rotate_basis: bool = True)
A dataset containing layer-group symmetry information of the input crystal structure (a 2D-periodic system whose third basis vector is the aperiodic stacking direction).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cell
|
Cell
|
Input crystal structure. The third basis vector |
required |
symprec
|
float
|
Symmetry search tolerance in the unit of cell.basis. |
0.0001
|
angle_tolerance
|
float | None
|
Symmetry search tolerance in the unit of radians. |
None
|
setting
|
LayerSetting | None
|
Preference for the Hall setting of the layer group. |
None
|
rotate_basis
|
bool
|
Whether to rotate the basis vectors of the input cell to those of the standardized cell. |
True
|
angle_tolerance
property
¶
angle_tolerance: float | None
Actually used angle_tolerance in the symmetry search.
mapping_std_prim
property
¶
Mapping sites in the input cell to those in the primitive standardized layer cell.
orbits
property
¶
The i-th atom in the input cell is equivalent to the orbits[i]-th atom in the
input cell.
prim_std_linear
property
¶
Linear part of transformation from the input cell to the primitive standardized layer cell.
prim_std_origin_shift
property
¶
Origin shift of transformation from the input cell to the primitive standardized layer cell.
site_symmetry_symbols
property
¶
Site symmetry symbols for each site in the input cell.
The orientation of the site symmetry is w.r.t. the standardized cell.
std_cell
property
¶
std_cell: Cell
Conventional standardized layer cell.
The input cell is related to the standardized cell by
(std_linear, std_origin_shift) and std_rotation_matrix::
std_cell.basis.T = std_rotation_matrix @ cell.basis.T @ std_linear
x_std = np.linalg.inv(std_linear) @ (x_input - std_origin_shift)
std_linear
property
¶
Linear part of transformation from the input cell to the standardized layer cell.
std_origin_shift
property
¶
Origin shift of transformation from the input cell to the standardized layer cell.
std_rotation_matrix
property
¶
Rigid rotation (orthogonal matrix) applied to the lattice basis.
Crystallographic data¶
Layer-group settings, classification tables, and helpers to fetch operations by layer-group number.
moyopy.LayerSetting
¶
Preference for the Hall setting of a layer group.
hall_number
classmethod
¶
hall_number(hall_number: int) -> LayerSetting
Specific layer Hall number from 1 to 116.
spglib
classmethod
¶
spglib() -> LayerSetting
The setting with the smallest layer Hall number for each layer group.
standard
classmethod
¶
standard() -> LayerSetting
BCS / ITE standard setting per de la Flor et al., Acta Cryst. A77, 559-571 (2021).
moyopy.LayerCentering
¶
Centering of a layer-group conventional cell. Only P (primitive) and
C (rectangular-centered) occur for layer groups.
lattice_points
property
¶
Unique lattice points (in fractional coordinates) of the conventional cell.
The third (c) component is always zero because layer-group centerings
are purely in-plane.
linear
property
¶
Transformation matrix from the primitive cell to the conventional cell.
The aperiodic axis c is left untouched.
moyopy.LayerHallSymbolEntry
¶
LayerHallSymbolEntry(hall_number: int)
An entry containing layer-group information for a specified layer hall_number.
moyopy.LayerGroupType
¶
LayerGroupType(number: int)
Layer-group type information.
arithmetic_number
property
¶
arithmetic_number: int
Number for layer arithmetic crystal classes (1 - 43).
bravais_class
property
¶
bravais_class: str
Bravais class for the layer group's 2D lattice (one of "mp",
"op", "oc", "tp", "hp").
geometric_crystal_class
property
¶
geometric_crystal_class: str
Geometric crystal class. Cubic classes never occur for layer groups.
See https://github.com/spglib/moyo/blob/main/moyo/src/data/classification.rs for string values.
moyopy.LayerArithmeticCrystalClass
¶
LayerArithmeticCrystalClass(arithmetic_number: int)
Layer arithmetic crystal class information.
arithmetic_number
property
¶
arithmetic_number: int
Number for layer arithmetic crystal classes (1 - 43).
bravais_class
property
¶
bravais_class: str
Bravais class for the layer group's 2D lattice (one of "mp",
"op", "oc", "tp", "hp").
geometric_crystal_class
property
¶
geometric_crystal_class: str
Geometric crystal class. Cubic classes never occur for layer groups.
moyopy.operations_from_layer_number
¶
operations_from_layer_number(number: int, *, setting: LayerSetting | None = None, primitive: bool = False) -> Operations