Symmetry#

The symmetry module contains crystallographic symmetry functions.

absence(symops, h, k, l)[source]#

Systematic absence of reflections.

Parameters:
symopslist, str

Symmetry operators.

h, k, lint

Miller indices.

Returns:
absentbool

Reflection indication of sytematic extinction.

binary(symop0, symop1)[source]#

Binary operation betwen symmetry operators.

Parameters:
symop0list, str

Symmetry operators.

symop1list, str

Symmetry operators. Must contain either 1 operator or same number of operators as the first.

Returns:
symopslist, str

Binary operations of the second acting on the first operator list.

classification(symops)[source]#

Symmetry operator classification.

Determinant +1

Trace

Type

Order

3

1

1

2

6

6

1

4

4

0

3

3

-1

2

2

Determinant -1

Trace

Type

Order

-3

-1

1

-2

-6

6

-1

-4

4

0

-3

3

1

m

2

Parameters:
symopslist, str

Symmetry operators.

Returns:
rotationlist, str

Rotation type.

klist, int

Order of operation.

wglist, str

Glide or screw vector.

evaluate(operators, coordinates, translate=True)[source]#

Evaluate symmetry operators.

Parameters:
operatorslist, str

Symmetry operators.

coordinates3-list

Coordiantes to transform.

translatebool, optional

Apply translation to rotation operator. The default is True.

Returns:
transformedlist

Transformed coordinates.

evaluate_code(code, coordinates)[source]#

Evaluate code object over coordinates.

Parameters:
codeobject

Code object that can be evaluated.

coordinates3-list

Coordiantes to transform.

Returns:
values2d-array, float

Evaluated coordinates. Last axis has size of 3.

evaluate_disp(operator, displacements)[source]#

Evaluate atomic displacement symmetry operator.

Parameters:
operatorlist, str

Symmetry operator.

displacement6-list

Atomic displacement parameters to transform.

Returns:
transformedlist

Transformed atomic displacement parameters.

evaluate_mag(operator, moments)[source]#

Evaluate magnetic symmetry operator.

Parameters:
operatorlist, str

Magnetic symmetry operator.

moment3-list

Moments to transform.

Returns:
transformedlist

Transformed moments.

evaluate_op(operators, translate=True)[source]#

Compile evaluation code for symmetry operators.

Parameters:
operatorslist, str

Symmetry operators.

translatebool, optional

Apply translation to rotation operator. The default is True.

Returns:
codeobject

Code object that can be evaluated.

generate_mag(operator, symmform, parity)[source]#

Generate magnetic symmetry operator.

Parameters:
operatorlist, str

Symmetry operator.

symmform3-list

Magnetic symmetry form.

parity3-list

Moment parity.

Returns:
mag_symopslist

Magnetic symmetry operator.

inverse(symops)[source]#

Inverse symmetry operators. Removes translation.

Parameters:
symopslist, str

Symmetry operators.

Returns:
inv_symopslist, str

Inverse operators.

laue(symmetry)[source]#

Laue symmetry operators.

Laue

Operators

m-3m

48

m-3

24

6/mmm

24

6/m

12

-3m

12

-3

6

4/mmm

16

4/m

8

mmm

8

2/m

4

-1

2

None

1

Parameters:
symmetrystry

Laue symmetry class. One of '-1', '2/m', 'mmm', '4/m', '4/mmm', '-3', '-3m', '6/m', '6/mmm', 'm-3', or 'm-3m'.

Returns:
opslist, str

Symmetry operators.

laue_id(symops)[source]#

Laue symmetry identifier.

Parameters:
symops1d array, str

Array of symmetry operators.

Returns:
symop_id2-list, int

Laue symmetry identifier. First number is identifies and second is number of symmetry operators.

miller(h, k, l, sym, op)[source]#

Transform Miller indices according to Laue symmetry operators.

Index

Laue

Operators

0

m-3m

48

1

m-3

24

2

6/mmm

24

3

6/m

12

4

-3m

12

5

-3

6

6

4/mmm

16

7

4/m

8

8

mmm

8

9

2/m

4

10

-1

2

11

None

1

Parameters:
h, k, l1d array

Miller indices.

symint

Index corresponding to Laue symmetry class.

opint

Index corresponding to Laue symmetry operator.

operators(invert=False)[source]#

Laue symmetry class and operators.

Laue

Operators

m-3m

48

m-3

24

6/mmm

24

6/m

12

-3m

12

-3

6

4/mmm

16

4/m

8

mmm

8

2/m

4

-1

2

None

1

Parameters:
invertbool, optional

Invert the Laue symmetry operators for reciprocal space. Default is False for real space operators.

Returns:
lauedictioanry

Symmetry operators with Laue class keys.

reverse(symops)[source]#

Reverse symmetry operators. Includes translation.

Parameters:
symopslist, str

Symmetry operators.

Returns:
rev_symopslist, str

Reverse operators.

rotation_operator(val, col)[source]#

Convert values to rotation operator.

Parameters:
valfloat

Value of rotation.

colint

Column of symmetry operator (0, 1, or 2).

Returns:
opstr

Rotation operator.

site(symops, coordinates, A, tol=0.1)[source]#

Site symmetry.

Parameters:
symops1d array, str

Symmetry operators of space group.

coordinates2d array

Factional coordinates.

A2d array, 3x3

Crystal to Cartesian axis coodinate system transformation matrix.

tolint, optional

Distance tolerance. The default is 1e-1.

Returns:
pg1d array, str

Point group.

mult1d array, int

Multiplicity.

sp_pos1d array, str

Special position.

translation_operator(val)[source]#

Convert values to translation operator.

Parameters:
valfloat

Value of translation.

Returns:
opstr

Translation operator.

unique(data)[source]#

Unique values, their indices in the original array, and the indices of the unique array to reconstruct the original array

Parameters:
data1d-array

Array with values of either string or integer type.

Returns:
uni, 1d-array

Unique values.

ind1d-array, int

Indices of unique values in the original.

inv1d-array, int

Indices of the unique array that reconstructs the original.