symmetr.noso_new module

class symmetr.noso_new.NosoSymFinder(prec=1e-05, moment_zero=0.001, debug=0)[source]

Bases: object

This class contains the functions that are used for finding the non-relativistic symmetries. They are grouped together in a class just so that all have access to the prec and debug parameters.

prec: General precision parameter used throughout to determine if two floats are the same moment_zero: A precision parameter that is used to determine if a magnetic moment is zero. Can be used to ignore small moments. debug: Debug 0 means no debug output, 1 means standard debug output, 2 means detailed debug.

__dict__ = mappingproxy({'__module__': 'symmetr.noso_new', '__firstlineno__': 90, '__doc__': '\nThis class contains the functions that are used for finding the non-relativistic symmetries. They are grouped\ntogether in a class just so that all have access to the prec and debug parameters.\n\nprec: General precision parameter used throughout to determine if two floats are the same\nmoment_zero: A precision parameter that is used to determine if a magnetic moment is zero. Can be used to ignore\nsmall moments.\ndebug: Debug 0 means no debug output, 1 means standard debug output, 2 means detailed debug.\n', '__init__': <function NosoSymFinder.__init__>, 'get_i_chain': <function NosoSymFinder.get_i_chain>, 'get_i_chain_nr': <function NosoSymFinder.get_i_chain_nr>, 'get_permutation_chains': <function NosoSymFinder.get_permutation_chains>, 'get_AB_rotations': <function NosoSymFinder.get_AB_rotations>, 'get_rotations_overlap': <function NosoSymFinder.get_rotations_overlap>, 'get_rotations_overlap_multi': <function NosoSymFinder.get_rotations_overlap_multi>, 'remove_repeated': <function NosoSymFinder.remove_repeated>, 'merge_rotations': <function NosoSymFinder.merge_rotations>, 'get_chain_rotations': <function NosoSymFinder.get_chain_rotations>, 'get_mchain': <function NosoSymFinder.get_mchain>, 'get_permutations_rotations': <function NosoSymFinder.get_permutations_rotations>, 'find_noso_syms': <function NosoSymFinder.find_noso_syms>, '__static_attributes__': ('debug', 'moment_zero', 'prec'), '__dict__': <attribute '__dict__' of 'NosoSymFinder' objects>, '__weakref__': <attribute '__weakref__' of 'NosoSymFinder' objects>, '__annotations__': {}})
__firstlineno__ = 90
__init__(prec=1e-05, moment_zero=0.001, debug=0)[source]
__module__ = 'symmetr.noso_new'
__static_attributes__ = ('debug', 'moment_zero', 'prec')
find_noso_syms(syms, mags, n_discretize=4)[source]

Determinese the non-relativistic symmetry operations of a magnetic system.

If the system contains continuous spin-rotation symmetry, we discretize it. This is not a perfect solution but should be fine in most cases. This only concerns collinear systems.

Parameters:
  • syms ([class Symmetry]) – List of the non-magnetic symmetry operations of the system. Must be in some cartesian basis

  • mags ([np.array]) – List of the magnetic moments of the system. Must be in some cartesian basis.

Returns:

List of the non-relativistic symmetries.

Return type:

noso_syms

get_AB_rotations(A, B, theta)[source]

Finds all rotations that transform A to B by a given angle theta.

get_chain_rotations(mchain, hasT=False)[source]

Finds spin rotations for a given chain of magnetic moments.

get_i_chain(perm, chain)[source]
get_i_chain_nr(perm, start)[source]
get_mchain(chain, moments)[source]
get_permutation_chains(perm)[source]

Get all permutation chains for given permutation.

get_permutations_rotations(chains, mags, hasT=False)[source]

Finds spin rotations for a give permutation, which is represented by the chains.

get_rotations_overlap(r1, r2)[source]

Finds an overlap between two rotation types.

get_rotations_overlap_multi(r1, r2)[source]

Finds an overlap between two lists of rotations. That is it finds all overlaps between r1i and r2j where r1i are rotations from r1 and r2j rotations from r2.

merge_rotations(rots)[source]

Takes a list of rotations, where each element is a list of rotations and find a common overlap.

remove_repeated(rots)[source]
class symmetr.noso_new.RotationType(typ, axis=None, angle=None)[source]

Bases: object

Class that is used to represent the various rotations types. typ:

para: Arbitrary rotation around a given axis anti-para: 180 degree rotation around any axis perpendicular to the given axis single: a rotation given by axis and angle non-mag: completely arbitrary rotation identity: Identity matrix, i.e. zero angle rotation

__dict__ = mappingproxy({'__module__': 'symmetr.noso_new', '__firstlineno__': 20, '__doc__': '\nClass that is used to represent the various rotations types.\ntyp:\n    para: Arbitrary rotation around a given axis\n    anti-para: 180 degree rotation around any axis perpendicular to the given axis\n    single: a rotation given by axis and angle\n    non-mag: completely arbitrary rotation\n    identity: Identity matrix, i.e. zero angle rotation\n', '__init__': <function RotationType.__init__>, '__repr__': <function RotationType.__repr__>, 'eq': <function RotationType.eq>, '__static_attributes__': ('angle', 'axis', 'typ'), '__dict__': <attribute '__dict__' of 'RotationType' objects>, '__weakref__': <attribute '__weakref__' of 'RotationType' objects>, '__annotations__': {}})
__firstlineno__ = 20
__init__(typ, axis=None, angle=None)[source]
__module__ = 'symmetr.noso_new'
__repr__()[source]

Return repr(self).

__static_attributes__ = ('angle', 'axis', 'typ')
eq(other, prec)[source]