httk.atomistic.symmetry.magnetic

Finding the magnetic symmetry of a full structure with collinear moments.

This is the magnetic counterpart of recognize_asu(): the one place that runs a symmetry search, here spglib’s magnetic search, and turns its tolerant floating-point answer into an exact SymopsStructure. The listed sites are one representative per orbit, snapped exactly onto their site-stabilizer’s fixed subspace so that SymopsStructure’s exact, dedup-collapsing expansion regenerates the input cell — same sites, species, and per-site moments — within the tolerance.

Only collinear moments aligned with z are handled. spglib’s collinear magnetic search takes a scalar per site; a non-collinear moment (any x or y component beyond the tolerance) is a different problem and is rejected rather than silently projected.

Moments are handed to spglib as vectors, invoking its axial (non-collinear) magnetic search, so the dataset is already the axial magnetic space group that SymopsStructure expands with: the operations are used exactly as returned and the BNS number identifies that same group. spglib’s collinear scalar search reports a different, larger spin-decoupled group (an index-2 supergroup for a simple antiferromagnet) whose BNS number would not match the operations that actually keep an axial moment invariant, so it is deliberately not used.

Nothing else in the package searches for magnetic symmetry: the mCIF writer and a plain UnitcellStructure stay detection-free, and this is the single bridge across which a tolerance is spent.

Functions

find_magnetic_symmetry(structure[, tolerance])

Find the magnetic symmetry of a collinear structure and return it as symops.

Module Contents

httk.atomistic.symmetry.magnetic.find_magnetic_symmetry(structure, tolerance=0.001)[source]

Find the magnetic symmetry of a collinear structure and return it as symops.

Runs spglib’s magnetic-symmetry search on the full cell, then rebuilds the result as a SymopsStructure carrying, in the input cell:

  • every magnetic symmetry operation spglib found, each with its +1/-1 time-reversal flag;

  • one representative site per orbit, snapped exactly onto its site-stabilizer’s fixed subspace so expansion regenerates the orbit and collapses the repeats;

  • the representatives’ Cartesian moments, carried through unchanged;

  • the Belov–Neronova–Smirnova number of the magnetic space group.

Expanding the returned structure back to a full cell reproduces structure — same sites, species, and per-site moments — to within tolerance and up to reordering.

Only collinear moments along z are accepted: every site must have x and y moment components no larger than tolerance. The moments must be CartesianSiteMoments.

Parameters:
Returns:

The magnetic symmetry as listed representatives plus operations.

Raises:
  • ImportError – If the optional spglib dependency is unavailable.

  • ValueError – If the structure is not fully periodic, carries no Cartesian moments, has a non-collinear moment, or spglib finds no magnetic dataset.

Return type:

httk.atomistic.models.structure.symops.SymopsStructure