Skip to content

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 c must be the aperiodic stacking direction and perpendicular to a, b; a, b must lie in the xy-plane.

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.

hall_number property

hall_number: int

Layer Hall symbol number (1 - 116).

mapping_std_prim property

mapping_std_prim: list[int]

Mapping sites in the input cell to those in the primitive standardized layer cell.

number property

number: int

Layer group number (1 - 80).

operations property

operations: Operations

Layer-group operations in the input cell.

orbits property

orbits: list[int]

The i-th atom in the input cell is equivalent to the orbits[i]-th atom in the input cell.

pearson_symbol property

pearson_symbol: str

Pearson symbol for the standardized layer cell.

prim_std_cell property

prim_std_cell: Cell

Primitive standardized layer cell.

prim_std_linear property

prim_std_linear: list[list[float]]

Linear part of transformation from the input cell to the primitive standardized layer cell.

prim_std_origin_shift property

prim_std_origin_shift: list[float]

Origin shift of transformation from the input cell to the primitive standardized layer cell.

site_symmetry_symbols property

site_symmetry_symbols: list[str]

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

std_linear: list[list[float]]

Linear part of transformation from the input cell to the standardized layer cell.

std_origin_shift property

std_origin_shift: list[float]

Origin shift of transformation from the input cell to the standardized layer cell.

std_rotation_matrix property

std_rotation_matrix: list[list[float]]

Rigid rotation (orthogonal matrix) applied to the lattice basis.

symprec property

symprec: float

Actually used symprec in the symmetry search.

wyckoffs property

wyckoffs: list[str]

Wyckoff letters for each site in the input cell.

as_dict

as_dict() -> dict[str, Any]

Convert an object to a dictionary.

deserialize_json classmethod

deserialize_json(json_str: str) -> Self

Deserialize an object from a JSON string.

from_dict classmethod

from_dict(obj: dict[str, Any]) -> Self

Create an object from a dictionary.

serialize_json

serialize_json() -> str

Serialize an object to a JSON string.

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.

as_dict

as_dict() -> dict[str, Any]

Convert an object to a dictionary

hall_number classmethod

hall_number(hall_number: int) -> LayerSetting

Specific layer Hall number from 1 to 116.

serialize_json

serialize_json() -> str

Serialize an object to a JSON string

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

lattice_points: list[list[float]]

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

linear: list[list[int]]

Transformation matrix from the primitive cell to the conventional cell. The aperiodic axis c is left untouched.

order property

order: int

Order of the centering.

as_dict

as_dict() -> dict[str, Any]

Convert an object to a dictionary

serialize_json

serialize_json() -> str

Serialize an object to a JSON string

moyopy.LayerHallSymbolEntry

LayerHallSymbolEntry(hall_number: int)

An entry containing layer-group information for a specified layer hall_number.

arithmetic_number property

arithmetic_number: int

Number for layer arithmetic crystal classes (1 - 43).

centering property

centering: LayerCentering

Layer centering.

hall_number property

hall_number: int

Sequential number for layer-group Hall settings (1 - 116).

hall_symbol property

hall_symbol: str

Layer Hall symbol with lowercase p/c lattice prefix.

hm_full property

hm_full: str

Hermann-Mauguin symbol in full notation.

hm_short property

hm_short: str

Hermann-Mauguin symbol in short notation.

number property

number: int

Layer-group number (1 - 80).

setting property

setting: str

Setting code (paper Table 5 axis/origin labels: "", "a", "b", "b-ac", "c", "c1", "c2", "c3", "1", "2").

as_dict

as_dict() -> dict[str, Any]

Convert an object to a dictionary

serialize_json

serialize_json() -> str

Serialize an object to a JSON string

moyopy.LayerGroupType

LayerGroupType(number: int)

Layer-group type information.

arithmetic_number property

arithmetic_number: int

Number for layer arithmetic crystal classes (1 - 43).

arithmetic_symbol property

arithmetic_symbol: str

Symbol for the layer arithmetic crystal class.

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.

hm_full property

hm_full: str

Hermann-Mauguin symbol in full notation.

hm_short property

hm_short: str

Hermann-Mauguin symbol in short notation.

lattice_system property

lattice_system: str

Lattice system (one of "Oblique", "Rectangular", "Square", "Hexagonal").

number property

number: int

Layer-group number (1 - 80).

as_dict

as_dict() -> dict[str, Any]

Convert an object to a dictionary

serialize_json

serialize_json() -> str

Serialize an object to a JSON string

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.

lattice_system property

lattice_system: str

Lattice system (one of "Oblique", "Rectangular", "Square", "Hexagonal").

symbol property

symbol: str

Symbol for the layer arithmetic crystal class (e.g. "p1", "c2/m11").

as_dict

as_dict() -> dict[str, Any]

Convert an object to a dictionary

serialize_json

serialize_json() -> str

Serialize an object to a JSON string

moyopy.operations_from_layer_number

operations_from_layer_number(number: int, *, setting: LayerSetting | None = None, primitive: bool = False) -> Operations