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;
.sciffiles 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.jsoninput_poscar.vasp, for non-POSCAR inputsmagnetic_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
MAGMOMpayload, 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ec12763d669baaae20a30611f56a8ee2265bb4fa87fd45ec2950176c516b14c
|
|
| MD5 |
8a2a8b9b2dfdf9f7ec098124d6977aa3
|
|
| BLAKE2b-256 |
01647607c2922f23ab7d13428b62d8855d09a6d7ae12945d74719d56b0178393
|
Provenance
The following attestation bundles were made for findspingroup-0.13.18.tar.gz:
Publisher:
publish-pypi.yml on LiuQH-lab/FindSpinGroup
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
findspingroup-0.13.18.tar.gz -
Subject digest:
0ec12763d669baaae20a30611f56a8ee2265bb4fa87fd45ec2950176c516b14c - Sigstore transparency entry: 1362323407
- Sigstore integration time:
-
Permalink:
LiuQH-lab/FindSpinGroup@07bff47e20176365d8e5f1e5bc93d52215ca30d4 -
Branch / Tag:
refs/tags/v0.13.18 - Owner: https://github.com/LiuQH-lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@07bff47e20176365d8e5f1e5bc93d52215ca30d4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file findspingroup-0.13.18-py3-none-any.whl.
File metadata
- Download URL: findspingroup-0.13.18-py3-none-any.whl
- Upload date:
- Size: 4.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
015c7ddcc219085c8c81b9071c56a66106c7508458b85199b5e098fe5e7d95f4
|
|
| MD5 |
ed73ffca6814718a08284abf68c12532
|
|
| BLAKE2b-256 |
a766ad0a97875a17697a447cfdc4ff1cdf1780be6e2738a646517cfbb4940ebd
|
Provenance
The following attestation bundles were made for findspingroup-0.13.18-py3-none-any.whl:
Publisher:
publish-pypi.yml on LiuQH-lab/FindSpinGroup
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
findspingroup-0.13.18-py3-none-any.whl -
Subject digest:
015c7ddcc219085c8c81b9071c56a66106c7508458b85199b5e098fe5e7d95f4 - Sigstore transparency entry: 1362323514
- Sigstore integration time:
-
Permalink:
LiuQH-lab/FindSpinGroup@07bff47e20176365d8e5f1e5bc93d52215ca30d4 -
Branch / Tag:
refs/tags/v0.13.18 - Owner: https://github.com/LiuQH-lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@07bff47e20176365d8e5f1e5bc93d52215ca30d4 -
Trigger Event:
push
-
Statement type: