Symmetry Operations#
- class spacetime.symmetry_operation.SymmetryOperation(matrix=array([[1., 0.], [0., 1.]]), label='', force_permutation=False, matrix_precision=0)[source]#
Bases:
objectSymmetryOperation class.
- property label#
Label of the symmetry transformation.
- Parameters:
None.
- Returns:
label.
- Return type:
(str)
- property matrix#
Matrix associated with the symmetry transformation. The basic class here defines it in a general configurational space. See derived classes SymmetryOperationO3 and SymmetryOperationSO3 for Euclidean 3D space.
- Parameters:
None
- Returns:
matrix.
- Return type:
(numpy.array)
- invert(label='')[source]#
Invert this SymmetryOperation object.
- Parameters:
None
- Returns:
A new SymmetryOperation object corresponding to the inverse matrix.
- similarity_transform(s, label='')[source]#
Generate a symmetry operation by the similarity transform S^{-1} M S.
- Parameters:
s – the symmetry operation or matrix S.
label (
str, optional) – the label to assign to the new SymmetryOperation. Defaults to “”.
- Returns:
The symmetry operation produced by the similarity transform.
- class spacetime.symmetry_operation.SymmetryOperationO3(matrix=array([[1., 0., 0.], [0., 1., 0.], [0., 0., 1.]]), dich_operations={}, label='', force_permutation=False, matrix_precision=1e-14)[source]#
Bases:
SymmetryOperationSpatial O(3) operation with optional independent binary reversal labels. Spatial parity is determined by the sign of the orthogonal matrix determinant.
- invert(label='')[source]#
Invert this SymmetryOperationO3 object.
- Parameters:
None
- Returns:
A new SymmetryOperationO3 object corresponding to the inverse matrix operation.
- property matrix#
Proper or improper rotational matrix associated with the symmetry transformation.
- Parameters:
None
- Returns:
matrix.
- Return type:
(numpy.array)
- property improper#
Improper rotation flag of
SymmetryOperationO3. A read-only property: it is set automatically by the improper rotation matrix definition- Parameters:
None
- Returns:
True | False.
- Return type:
(bool)
- property dich_operations#
A set of dichromatic symmetry reversal operations.
- Parameters:
None
- Returns:
Symmetry-reversal labels, such as {“T”, “C”}.
- Return type:
set
- add_dich_operations(new_dich_operations)[source]#
Add dichromatic symmetry-reversal operations.
- Parameters:
new_dich_operations (set) – Additional reversal labels.
- Raises:
TypeError – If the labels are not strings.
- Returns:
None
- operate_on(pq)[source]#
Return the physical quantity obtained by applying this symmetry operation.
- Parameters:
pq (PhysicalQuantity) – the physical quantity to operate on
- Returns:
the new physical quantity obtained by operating on it with this symmetry operation.
- Return type:
- Raises:
TypeError – If the operand is not a PhysicalQuantity or its dimension
does not match the operation's dimension. –
ValueError – If the operand does not have the dichromatic properties
required by the operation. –
- class spacetime.symmetry_operation.SymmetryOperationSO3(matrix=array([[1., 0., 0.], [0., 1., 0.], [0., 0., 1.]]), dich_operations={}, label='', force_permutation=False)[source]#
Bases:
SymmetryOperationO3SymmetryOperationSO3 class.
- property matrix#
Proper rotational matrix associated with the symmetry transformation.
- Parameters:
None
- Returns:
matrix.
- Return type:
(numpy.array)
- class spacetime.symmetry_operation.LimitingSymmetryOperationO3(axis=[0, 0, 1], dich_operations={})[source]#
Bases:
SymmetryOperationO3Standalone infinitesimal Curie-symmetry operation with an axis and optional reversal labels; it has no finite rotation matrix for group generation.
- property dich_operations#
A set of dichromatic symmetry reversal operations.
- Parameters:
None
- Returns:
Symmetry-reversal labels, such as {“T”, “C”}.
- Return type:
set
- property axis#
Returns: Vector defining an infinite-fold rotation axis.
- property matrix#
Proper or improper rotational matrix associated with the symmetry transformation.
- Parameters:
None
- Returns:
matrix.
- Return type:
(numpy.array)
- class spacetime.symmetry_operation.LimitingSymmetryOperationSO3(axis=[0, 0, 1], dich_operations={})[source]#
Bases:
LimitingSymmetryOperationO3Standalone proper-rotation limiting operation with optional binary reversals; unlike finite group generators, it does not expose a rotation matrix.
- property dich_operations#
A set of dichromatic symmetry reversal operations.
- Parameters:
None
- Returns:
Symmetry-reversal labels, such as {“T”, “C”}.
- Return type:
set