MTTSA
Magnetic Transport-related Tensor Symmetry Analyzer — determine magnetic space/point groups from a magnetic POSCAR and list symmetry-allowed transport tensor components.
Install (recommended)
pip install mttsa
This installs a pre-built wheel from PyPI (no local compilation). Requires Python ≥ 3.9.
mttsa path/to/structure.vasp
mttsa --version
Dependencies
Installed automatically: numpy, sympy, spglib.
If spglib fails via pip (common on some platforms), use conda first:
conda install -c conda-forge spglib numpy sympy
pip install mttsa
Slow or blocked PyPI access
Use a mirror, for example:
pip install mttsa -i https://pypi.tuna.tsinghua.edu.cn/simple \
--trusted-host pypi.tuna.tsinghua.edu.cn
If you see SSLCertVerificationError (e.g. campus network proxy), try the mirror
above or install from a downloaded wheel file (see Offline install below).
Development install (from source)
git clone https://github.com/PengJiang08/mttsa.git
cd mttsa
conda create -n mttsa python=3.11 -y
conda activate mttsa
conda install -c conda-forge numpy sympy spglib setuptools wheel -y
pip install -e . --no-build-isolation
--no-build-isolation avoids downloading build tools when the network blocks PyPI.
Offline install
Download mttsa-*.whl from PyPI (or GitHub Releases), then:
pip install /path/to/mttsa-0.1.0-py3-none-any.whl
Ensure numpy, sympy, and spglib are already installed in the same environment.
Usage
mttsa path/to/structure.vasp
mttsa path/to/structure.vasp --symprec 1e-3
mttsa path/to/structure.vasp 1e-3 # positional symprec (legacy)
mttsa path/to/structure.vasp --no-write # print only, no report files
mttsa -h
mttsa --version
Equivalent:
python -m mttsa path/to/structure.vasp
A sample POSCAR is in examples/MnBi2Te4/MnBi2Te4.vasp (monolayer MnBi2Te4).
After pip install mttsa, it is also under share/mttsa/examples/MnBi2Te4/ in
your Python environment prefix.
Outputs next to the input file:
<name>_mttsa_report.txt— text report<name>_mttsa_report.html— HTML with MathJax formulas<name>_mttsa_report.json— machine-readable summary
Programmatic API:
from mttsa import run
data = run("structure.vasp")
Magnetic POSCAR format
Standard VASP header; each atom line has seven fields:
x_frac y_frac z_frac Occupancy Mx My Mz
(Mx, My, Mz) are magnetic moments in the Cartesian spin basis. Selective
dynamics is not supported in this 7-column format.
Catalogued response tensors
Berry curvature, AHC, linear and nonlinear spin Hall (SHC), second-order conductivity (BCD / QMD / IMD channels), CISP, intrinsic NSHE, and SHG (even/odd channels). The report lists allowed/forbidden components under the identified magnetic point group, with independent components and symmetry relations.
For maintainers (PyPI upload)
Before each release:
python scripts/check_release.py
twine check dist/*
twine upload dist/*
Bump version in pyproject.toml and src/mttsa/__init__.py together.
License
MIT — see LICENSE.
Metadata
Release files for mttsa 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mttsa-0.1.0.tar.gz | 1.1 MB | Without provenance | Details for mttsa-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mttsa-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mttsa-0.1.0-py3-none-any.whl |
Total release size: 2.2 MB
Release files / mttsa-0.1.0.tar.gz
| Download URL | mttsa-0.1.0.tar.gz |
|---|---|
| Size | 1.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d39fedd600927d04b0d6e9d7dd64a3fce7c6092d10ef012a26a5412bf8b02139
|
|
BLAKE2b-256 checksum How to use checksums |
24751b93814f05c6d35a930c6241edb508ae10ed575b5dfa5856a46cabaf2c64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Release files / mttsa-0.1.0-py3-none-any.whl
| Download URL | mttsa-0.1.0-py3-none-any.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d17ff940146ae9666aec98869b2bc67659fdae058ef3bb2c5f18f3b521195f8
|
|
BLAKE2b-256 checksum How to use checksums |
516399df570f09baf8c5a70f9070e3e832b1390a68dd21732df2ff0de7a7905b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Security for mttsa 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.