symmetr.symmetry module

class symmetr.symmetry.Symmetry(R, has_T, Rs=None, permutations=None)[source]

Bases: object

__dict__ = mappingproxy({'__module__': 'symmetr.symmetry', '__firstlineno__': 13, '__init__': <function Symmetry.__init__>, 'get_R': <function Symmetry.get_R>, 'convert': <function Symmetry.convert>, 'def_custom_R': <function Symmetry.def_custom_R>, 'copy': <function Symmetry.copy>, '__str__': <function Symmetry.__str__>, '__eq__': <function Symmetry.__eq__>, 'eq_numeric': <function Symmetry.eq_numeric>, '__mul__': <function Symmetry.__mul__>, 'pprint': <function Symmetry.pprint>, 'inv': <function Symmetry.inv>, '__static_attributes__': ('R', 'Rs', 'custom_Rs', 'has_T', 'permutations'), '__dict__': <attribute '__dict__' of 'Symmetry' objects>, '__weakref__': <attribute '__weakref__' of 'Symmetry' objects>, '__doc__': None, '__hash__': None, '__annotations__': {}})
__eq__(other)[source]

Return self==value.

__firstlineno__ = 13
__hash__ = None
__init__(R, has_T, Rs=None, permutations=None)[source]
__module__ = 'symmetr.symmetry'
__mul__(other)[source]
__static_attributes__ = ('R', 'Rs', 'custom_Rs', 'has_T', 'permutations')
__str__()[source]

Return str(self).

convert(T, in_place=False)[source]

Converts the symmetry operation to a different coordinate system.

Parameters:

T (matrix) – Coordinate transformation matrix. If it is set, the symmetry operation will be transformed by this matrix. Symmetry operations are given in basis A. T transforms from A to B, ie Tx_A = x_B.

Doesn’t return anything, the symmetry itself is modified.

copy()[source]
def_custom_R(name, R_c)[source]
eq_numeric(other, prec=0.0001)[source]
get_R(op=None)[source]
inv()[source]
pprint()[source]
symmetr.symmetry.convert_op(sym, op_type)[source]

Transforms operator component by a symmetry operation.

Parameters:
  • sym – The symmetry operation.

  • op_type – Determines the operator type and operator component to be transformed. [operator type,component index(0,1 or 2)]

Returns:

A list of tuples. For example [(0,1),(1,-1)].

First component means operator index. Second component means sign. The tuples are to be summed up. The example means: op_x-op_y

Return type:

out

symmetr.symmetry.create_I()[source]
symmetr.symmetry.create_P()[source]

Note this doesn’t contain any permutations, so it’s not always correct!

symmetr.symmetry.create_T()[source]
symmetr.symmetry.findsym2sym(sym_findsym)[source]
symmetr.symmetry.matsym2sym(sym)[source]
symmetr.symmetry.optype_to_basic(op)[source]
symmetr.symmetry.sym2R(sym)[source]
symmetr.symmetry.sym2Rs(sym)[source]
symmetr.symmetry.sym2trans(sym)[source]