Convert POSCAR to Spin Space Group (SSG) with magnetic moments
Project description
POS2SSG
Convert POSCAR to Spin Space Group (SSG) with magnetic moments.
POS2SSG is a Python package that analyzes crystal structures and generates magnetic configurations corresponding to specific spin space groups (SSG). It is designed to work with VASP POSCAR files and can automatically identify magnetic atoms and generate appropriate magnetic moments based on spin space group symmetry.
Features
- Automatic SSG Detection: Find possible spin space groups for a given crystal structure
- Magnetic Moment Generation: Generate magnetic moments based on SSG symmetry
- Multiple Magnetic Atom Support: Handle structures with multiple types of magnetic atoms
- Custom Magnetic Configuration: Specify custom magnetic atoms and moments
- VASP Integration: Works seamlessly with VASP POSCAR files
- Flexible Output: Generate SPOSCAR files with magnetic moments
Dependencies
- Python >= 3.8
- numpy >= 1.20.0
- scipy >= 1.7.0
- pymatgen >= 2022.0.0
- spglib >= 1.16.0
- irssg >= 1.0.1
Installation
Install from PyPI (recommended):
pip install pos2ssg
Install from source (editable for development):
cd POS2SSG
pip install -e .
Usage
Command Line Interface
# Find possible SSG numbers for a structure
pos2ssg -c POSCAR
# Find SSG numbers with specific Ik value
pos2ssg -c POSCAR -Ik 2
# Generate SPOSCAR for specific SSG
pos2ssg -c POSCAR -ssg 43.2.4.1.P
# Use custom magnetic atoms and moments
pos2ssg -c POSCAR -ssg 43.2.4.1.P --magatom Fe Cu --magmom 2.5 1.8
# Specify output file
pos2ssg -c POSCAR -ssg 43.2.4.1.P --output my_structure.vasp
# Enable verbose output
pos2ssg -c POSCAR -ssg 43.2.4.1.P --verbose
# Adjust tolerance for symmetry analysis
pos2ssg -c POSCAR -ssg 43.2.4.1.P --tolerance 1e-3
Command Line Options
-c, --poscar: Input POSCAR file (default: POSCAR)-Ik: Filter by specific Ik value-ssg: Target spin space group number (e.g., 43.2.4.1.P)--tolerance: Tolerance for symmetry analysis (default: 1e-2)--magatom: List of magnetic atom types (e.g., Fe Cu)--magmom: List of magnetic moments (e.g., 3.0 2.0)--output, -o: Output file name (default: SPOSCAR)--verbose, -v: Enable verbose output
Basic Usage
# Find all possible SSG numbers
pos2ssg -c POSCAR
# Find SSG numbers for Ik=2
pos2ssg -c POSCAR -Ik 2
Generate Magnetic Structure
# Generate SPOSCAR for SSG 43.2.4.1.P
pos2ssg -c POSCAR -ssg 43.2.4.1.P
# Use custom magnetic moments
pos2ssg -c POSCAR -ssg 43.2.4.1.P --magatom Fe Cu --magmom 2.5 1.8
# Save to custom file
pos2ssg -c POSCAR -ssg 43.2.4.1.P --output magnetic_structure.vasp
Output
The program generates a SPOSCAR file containing:
- The original crystal structure
- Magnetic moments for all magnetic atoms
- Proper symmetry operations for the target SSG
Theory
POS2SSG is based on the theory of spin space groups, which describe the symmetry of magnetic crystals. The program:
- Analyzes the crystal structure to determine the space group
- Identifies magnetic atoms and their Wyckoff positions
- Applies spin space group symmetry operations to generate magnetic moments
- Ensures the magnetic configuration is consistent with the target SSG
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
For questions and support, please open an issue on GitHub or contact the development team.
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 pos2ssg-1.0.1.tar.gz.
File metadata
- Download URL: pos2ssg-1.0.1.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab3c10c6f96c2c1df397c27860f42ce3e376800114f533e1f082e93b27e310f1
|
|
| MD5 |
192bc366d025d110c5821b09c32741b4
|
|
| BLAKE2b-256 |
d17724fa3a6c07328833d15d5328c6ec736fc54b78ad38b089e9379dbf3c5449
|
File details
Details for the file pos2ssg-1.0.1-py3-none-any.whl.
File metadata
- Download URL: pos2ssg-1.0.1-py3-none-any.whl
- Upload date:
- Size: 17.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
857e906cebdf6380cbfaefeebfb3631bfcad604a57ffeb15d47e30a9a48e6e5a
|
|
| MD5 |
90313ec636fc69a85f64e655c787152f
|
|
| BLAKE2b-256 |
b50f042caf417e67541ac4ac352ee9e950ab13d31f73763df1af7c9eaf56d202
|