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 package and command-line program for identifying oriented spin space group symmetry in magnetic crystal structures.
Given a structure with magnetic moments, FindSpinGroup identifies the oriented spin space group (OSSG), reports the corresponding magnetic space group (MSG), classifies the magnetic phase, and can generate symmetry data for first-principles, high-throughput, and web-application workflows.
The project also powers the public web application:
Installation
pip install findspingroup
FindSpinGroup requires Python 3.11 or newer.
For development from a local checkout:
python -m pip install -e ".[dev]"
Quick Start
Run a compact identification from the command line:
fsg path/to/structure.mcif
This prints a short human-readable summary. Use --show for selected fields or
--json for the complete compact JSON payload:
fsg path/to/structure.mcif --show index --show magnetic_phase --show msg_symbol
fsg path/to/structure.mcif --json
Use the Python API when the result will be consumed by another program:
from findspingroup import example_path, find_spin_group_basic
summary = find_spin_group_basic(example_path("0.800_MnTe.mcif"))
print(summary["index"])
print(summary["magnetic_phase"])
print(summary["msg_bns_number"], summary["msg_symbol"])
Expected output:
194.164.1.1.L
AFM(Altermagnet)
63.457 Cmcm
Main Routes
Most users should start with the default CLI command or
find_spin_group_basic(...). This route returns the identified OSSG,
corresponding MSG, magnetic phase, and compact property flags.
Use the full route, fsg --all or find_spin_group(...), when you need the
complete result object, generated artifacts, quasi-2D diagnostics, tensor
analysis, or route-specific audit information.
Use fsg -w when you want input-setting symmetry helper files written into the
current directory. This route is intended for downstream tools that consume
explicit operation files.
The legacy --mode selector is still available for compatibility, but new CLI
usage should prefer the default route, --all, and -w.
Main Outputs
Depending on the route, outputs can include:
- identified OSSG index and symbols;
- corresponding MSG identifiers;
- magnetic-phase and spin-splitting classification;
- SSG and MSG operations in named settings;
- SCIF, POSCAR, KPOINTS, and GSPG text artifacts;
- magnetic-site, tensor, quasi-2D, and ferroelectric-switching diagnostics.
Supported Inputs
FindSpinGroup supports:
- magnetic CIF / mCIF files;
- ordinary CIF files when magnetic information is available in supported tags;
- repo-generated SCIF files;
- POSCAR-like files, including
POSCAR,CONTCAR,.vasp,.poscar, and explicit ordinary filenames without a CIF/SCIF suffix.
Magnetic moments must be present. For POSCAR-like files, the command-line tool
is optimized for VASP working directories and prefers a sibling INCAR MAGMOM
when available. Direct Python calls read only the POSCAR content unless INCAR
reading is explicitly enabled, which keeps scripted calls reproducible.
When no input file is given, the CLI auto-selects from the current directory in
this order: SCIF, mCIF, CIF files with magnetic-moment tags, POSCAR with
sibling INCAR MAGMOM, POSCAR with embedded MAGMOM, .vasp / .poscar
files with embedded MAGMOM, and finally CONTCAR. Automatic discovery does not
scan arbitrary ordinary filenames; pass those POSCAR-like files explicitly.
Quasi-2D Calculations
The default calculation mode is three-dimensional. Quasi-2D analysis is an explicit full-route diagnostic:
fsg --all --calculation-mode quasi2d --vacuum-axis c path/to/slab.mcif
The ordinary 3D symmetry result remains the base result. Quasi-2D data is added only when the quasi-2D calculation mode is requested.
Documentation
The README is only the entry point. Detailed documentation is split into:
- Guide: how to choose a route, run examples, and understand results;
- Reference: exact Python functions, return objects, CLI flags, and output fields;
- Advanced Notes: settings, diagnostics, and validation terminology.
Local source files live under site_docs/ and are
published through Read the Docs.
Development
Run focused tests with:
PYTHONPATH=src python -m pytest
For changes that affect symmetry identification, generated cells, route output, or public fields, use focused local regression tests first and then run the agreed project batch validations.
License
FindSpinGroup is licensed under the Apache License, Version 2.0. See
LICENSE for details.
Project details
Release history Release notifications | RSS feed
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.15.9.tar.gz.
File metadata
- Download URL: findspingroup-0.15.9.tar.gz
- Upload date:
- Size: 5.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
867a04896cae3cdcf96850937f428a1615b77afd46d60e082469ce2ef12844c6
|
|
| MD5 |
65d7ecf34d11c503c12ca0585014f7ac
|
|
| BLAKE2b-256 |
755daaf8b8fa82fc879eda9aa55d98be81d7ad63cedab440f48fbb4adf5b77aa
|
Provenance
The following attestation bundles were made for findspingroup-0.15.9.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.15.9.tar.gz -
Subject digest:
867a04896cae3cdcf96850937f428a1615b77afd46d60e082469ce2ef12844c6 - Sigstore transparency entry: 2115966204
- Sigstore integration time:
-
Permalink:
LiuQH-lab/FindSpinGroup@cba3b00b72ebc5f1a76bda9d46460b4b2ae2cbdb -
Branch / Tag:
refs/tags/v0.15.9 - Owner: https://github.com/LiuQH-lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@cba3b00b72ebc5f1a76bda9d46460b4b2ae2cbdb -
Trigger Event:
push
-
Statement type:
File details
Details for the file findspingroup-0.15.9-py3-none-any.whl.
File metadata
- Download URL: findspingroup-0.15.9-py3-none-any.whl
- Upload date:
- Size: 5.4 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 |
c290a27a78a410bd157f1c7ddfebf195d894669c99a437af32856d4fac013ca0
|
|
| MD5 |
091f9c4df62585837bf5416306ad0cee
|
|
| BLAKE2b-256 |
59d26d252efc75da5d86c468fd203efffc2217a108ca4d25e1d0b9779499936e
|
Provenance
The following attestation bundles were made for findspingroup-0.15.9-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.15.9-py3-none-any.whl -
Subject digest:
c290a27a78a410bd157f1c7ddfebf195d894669c99a437af32856d4fac013ca0 - Sigstore transparency entry: 2115966411
- Sigstore integration time:
-
Permalink:
LiuQH-lab/FindSpinGroup@cba3b00b72ebc5f1a76bda9d46460b4b2ae2cbdb -
Branch / Tag:
refs/tags/v0.15.9 - Owner: https://github.com/LiuQH-lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@cba3b00b72ebc5f1a76bda9d46460b4b2ae2cbdb -
Trigger Event:
push
-
Statement type: