Skip to main content

Spin space group (SSG) symmetry analysis toolkit for magnetic materials. Automatically identifies and classifies SSGs, generating symmetry operations, spin Wyckoff positions, and spin Brillouin zones. Designed for integration with first-principles and high-throughput computational workflows.

Project description

FINDSPINGROUP

findspingroup is a Python toolkit, command-line program, and web application for identifying and inspecting oriented spin space group (OSSG) symmetry in magnetic crystal structures.

It is designed for research workflows involving the interplay between exchange-driven magnetic geometry and spin-orbit coupling, which are described by spin space group (SSG) and magnetic space group (MSG) frameworks, respectively.

Given a magnetic structure, FINDSPINGROUP identifies the OSSG, derives the corresponding MSG, and organizes crystallographic and physical information needed to analyze the material with and without spin-orbit coupling.

Main outputs can include:

  • OSSG information and corresponding MSG information in matched settings;
  • spin Wyckoff positions and Wyckoff splitting from space group (SG) to OSSG and MSG;
  • spin Brillouin zones, high-symmetry k points, and symmetry-allowed spin-polarization components;
  • magnetic-phase classification, including unconventional cases such as altermagnets and spin-orbit magnets;
  • symmetry constraints on anomalous Hall conductivity, nonlinear tensors, and related physical responses;
  • chiral and polar group information with and without spin-orbit coupling;
  • .scif files for downstream spin-group-based tensor analysis and data exchange;
  • magnetic primitive-cell POSCAR files in relevant coordinate conventions;
  • KPOINTS files labeled with symmetry-allowed spin-polarization components.

Installation

pip install findspingroup

Python >= 3.11 is required.

Quick Start

from findspingroup import example_path, find_spin_group

result = find_spin_group(example_path("0.800_MnTe.mcif"))

print(result.index)
print(result.convention_ssg_international_linear)
print(result.magnetic_phase)

Command Line

After installation, the package provides the fsg command.

Print a lightweight summary for a file:

fsg path/to/structure.mcif

Input: a supported magnetic structure file, such as .mcif, .scif, or a POSCAR-like file with embedded MAGMOM. Output: a lightweight JSON summary printed to stdout.

Write input-cell SSG / MSG operations and POSCAR helper files:

fsg -w path/to/structure.mcif

Input: a supported magnetic structure file. Output: files written in the current directory:

  • ssg_symm.json
  • input_poscar.vasp, for non-POSCAR inputs
  • magnetic_primitive_poscar.vasp, when the input cell is not magnetic primitive

Use help to inspect the current command-line options:

fsg --help

Python APIs

Full Analysis

from findspingroup import find_spin_group

result = find_spin_group("path/to/structure.mcif")

print(result.index)
print(result.acc)
print(result.convention_ssg_international_linear)
print(result.magnetic_phase)

find_spin_group(...) returns a MagSymmetryResult object with the full analysis result. See the usage documentation for the main MagSymmetryResult attributes and route-specific outputs.

Lightweight Basic Summary

from findspingroup import find_spin_group_basic

summary = find_spin_group_basic("path/to/structure.mcif")
print(summary["index"])
print(summary["magnetic_phase"])

This route avoids expensive downstream outputs that are not needed for simple identification.

Input-Cell SSG Operations

from findspingroup import find_spin_group_input_ssg

payload = find_spin_group_input_ssg("path/to/structure.mcif")

print(payload["summary"])
print(payload["ssg"]["ops"])
print(payload["msg"]["ops"])

This route returns SSG operations in the input cell setting. If the input cell is not already magnetic primitive, those input-cell operations may be fewer than the full symmetry operations of the magnetic primitive cell. In that case, the payload includes primitive-side identifiers and a warning.

Supported Inputs

findspingroup supports:

  • .cif
  • .mcif
  • repo-generated .scif
  • POSCAR-like files with embedded magnetic moments

Input notes:

  • Magnetic inputs must contain explicit magnetic moments.
  • POSCAR inputs must include an embedded MAGMOM payload, for example a trailing # MAGMOM=... line.
  • The input-SSG POSCAR route does not read INCAR.
  • POSCAR moments are treated as Cartesian.
  • CIF, mCIF, and SCIF moments are converted into the route's Cartesian input-cell frame before operation export.

Tolerances

The main APIs accept the same basic tolerance controls:

find_spin_group(
    "path/to/structure.mcif",
    space_tol=0.02,
    mtol=0.02,
    meigtol=0.00002,
    matrix_tol=0.01,
)

Use tighter tolerances only when the input structure is numerically clean enough to support them.

License

This project is licensed under the Apache License, Version 2.0. See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

findspingroup-0.13.18.tar.gz (4.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

findspingroup-0.13.18-py3-none-any.whl (4.8 MB view details)

Uploaded Python 3

File details

Details for the file findspingroup-0.13.18.tar.gz.

File metadata

  • Download URL: findspingroup-0.13.18.tar.gz
  • Upload date:
  • Size: 4.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for findspingroup-0.13.18.tar.gz
Algorithm Hash digest
SHA256 0ec12763d669baaae20a30611f56a8ee2265bb4fa87fd45ec2950176c516b14c
MD5 8a2a8b9b2dfdf9f7ec098124d6977aa3
BLAKE2b-256 01647607c2922f23ab7d13428b62d8855d09a6d7ae12945d74719d56b0178393

See more details on using hashes here.

Provenance

The following attestation bundles were made for findspingroup-0.13.18.tar.gz:

Publisher: publish-pypi.yml on LiuQH-lab/FindSpinGroup

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file findspingroup-0.13.18-py3-none-any.whl.

File metadata

File hashes

Hashes for findspingroup-0.13.18-py3-none-any.whl
Algorithm Hash digest
SHA256 015c7ddcc219085c8c81b9071c56a66106c7508458b85199b5e098fe5e7d95f4
MD5 ed73ffca6814718a08284abf68c12532
BLAKE2b-256 a766ad0a97875a17697a447cfdc4ff1cdf1780be6e2738a646517cfbb4940ebd

See more details on using hashes here.

Provenance

The following attestation bundles were made for findspingroup-0.13.18-py3-none-any.whl:

Publisher: publish-pypi.yml on LiuQH-lab/FindSpinGroup

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page