API Reference#
Core APIs#
- spinspg.get_spin_symmetry(lattice, positions, numbers, magmoms, symprec=1e-05, mag_symprec=None, angle_tolerance=-1.0, backend='spglib')[source]#
Return spin symmetry operations of a given spin arrangement.
See Spglib’s document for how to specify the spin arrangement by
lattice,positions,numbers, andmagmomsin details. With the returned spin symmetry operations, thei-th spin symmetry operation maps point coordinatesxtorotations[i] @ x + translations[i]and magnetic momentmtospin_rotations[i] @ m.
- Parameters:
lattice (array, (3, 3)) –
lattice[i, :]is thei-th basis vector of a latticepositions (array, (num_sites, 3)) –
positions[i, :]is a fractional coordinates of thei-th site w.r.t.lattice.numbers (array[int], (num_sites, )) –
numbers[i]specifies a specie at thei-th site.magmoms (array, (num_sites, 3)) –
magmoms[i, :]is a magnetic moments at thei-th site in Cartesian coordinates.symprec (float, default=1e-5) – See symprec.
mag_symprec (float | None) – See mag_symprec.
angle_tolerance (float, default=-1) – See angle_tolerance.
- Returns:
spin_only_group (
spin.SpinOnlyGroup) – Spin-only group, which preserve the given spin arrangement with identity spatial operation.rotations (array[int], (num_sym, 3, 3)) – Rotation parts of spin symmetry operations w.r.t.
lattice.translations (array, (num_sym, 3)) – Translation parts of spin symmetry operations w.r.t.
lattice.spin_rotations (array, (num_sym, 3, 3)) – Spin rotation parts of spin symmetry operations in Cartesian coordinates.
Spin-only group#
- class spinspg.spin.SpinOnlyGroup(spin_only_group_type, axis)[source]#
Spin only group.
This class represents one of nonmagnetic, collinear, coplanar, and non-coplanar spin-only groups.
- Variables:
spin_only_group_type (
spin.SpinOnlyGroupType) – Nonmagnetic, collinear, coplanar, or non-coplanaraxis (array or None, (3, )) – For collinear and coplanar, unit vector perpendicular to its rotation axis.
Nontrivial spin point group#
- spinspg.pointgroup.get_pointgroup_representative(prim_rotations)[source]#
Return representative of crystallographic point group.
- Parameters:
prim_rotations (array[int], (order, 3, 3)) – Integer rotation matrices
- Returns:
symbol (str) – Point group type
P (array, (3, 3)) – transformation matrix. Let std_rotations be a representative of a crystallographic point group. The transformation P and mapping mapping satisfy np.linalg.inv(P) @ prim_rotations[mapping[i]] @ P == std_rotations[i]
mapping (list[int])