spinspg 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- spinspg-0.1.2/.github/workflows/deploy.yml +45 -0
- spinspg-0.1.2/.github/workflows/testing.yml +65 -0
- spinspg-0.1.2/.gitignore +156 -0
- spinspg-0.1.2/.pre-commit-config.yaml +34 -0
- spinspg-0.1.2/.readthedocs.yaml +13 -0
- spinspg-0.1.2/LICENSE +28 -0
- spinspg-0.1.2/MANIFEST.in +1 -0
- spinspg-0.1.2/PKG-INFO +139 -0
- spinspg-0.1.2/README.md +86 -0
- spinspg-0.1.2/docs/api/api.md +27 -0
- spinspg-0.1.2/docs/changelog.md +13 -0
- spinspg-0.1.2/docs/conf.py +105 -0
- spinspg-0.1.2/docs/development.md +34 -0
- spinspg-0.1.2/docs/genindex.rst +2 -0
- spinspg-0.1.2/docs/index.md +15 -0
- spinspg-0.1.2/examples/symmetry_search.py +43 -0
- spinspg-0.1.2/pyproject.toml +125 -0
- spinspg-0.1.2/scripts/generate_automorphisms.py +195 -0
- spinspg-0.1.2/scripts/generate_spin_point_group_table.py +521 -0
- spinspg-0.1.2/setup.cfg +4 -0
- spinspg-0.1.2/setup.py +4 -0
- spinspg-0.1.2/src/spinspg/__init__.py +11 -0
- spinspg-0.1.2/src/spinspg/automorphisms.json +1 -0
- spinspg-0.1.2/src/spinspg/core.py +71 -0
- spinspg-0.1.2/src/spinspg/group.py +304 -0
- spinspg-0.1.2/src/spinspg/permutation.py +68 -0
- spinspg-0.1.2/src/spinspg/pointgroup.py +1744 -0
- spinspg-0.1.2/src/spinspg/spin.py +161 -0
- spinspg-0.1.2/src/spinspg/utils.py +24 -0
- spinspg-0.1.2/src/spinspg.egg-info/PKG-INFO +139 -0
- spinspg-0.1.2/src/spinspg.egg-info/SOURCES.txt +38 -0
- spinspg-0.1.2/src/spinspg.egg-info/dependency_links.txt +1 -0
- spinspg-0.1.2/src/spinspg.egg-info/not-zip-safe +1 -0
- spinspg-0.1.2/src/spinspg.egg-info/requires.txt +25 -0
- spinspg-0.1.2/src/spinspg.egg-info/top_level.txt +1 -0
- spinspg-0.1.2/tests/conftest.py +390 -0
- spinspg-0.1.2/tests/test_group.py +211 -0
- spinspg-0.1.2/tests/test_permutation.py +19 -0
- spinspg-0.1.2/tests/test_pointgroup.py +215 -0
- spinspg-0.1.2/tests/test_spin.py +129 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: deploy
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, rc]
|
|
6
|
+
tags:
|
|
7
|
+
- "v[0-9]+.[0-9]+.[0-9]+"
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
deploy-pypi:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
# GitHub environment
|
|
14
|
+
environment:
|
|
15
|
+
name: release
|
|
16
|
+
url: https://pypi.org/project/spinspg/
|
|
17
|
+
permissions:
|
|
18
|
+
id-token: write
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v3
|
|
22
|
+
with:
|
|
23
|
+
fetch-depth: 0
|
|
24
|
+
|
|
25
|
+
- uses: actions/setup-python@v4
|
|
26
|
+
with:
|
|
27
|
+
python-version: "3.10"
|
|
28
|
+
|
|
29
|
+
- name: Build
|
|
30
|
+
run: |
|
|
31
|
+
python -m pip install --upgrade pip
|
|
32
|
+
python -m pip install setuptools setuptools_scm wheel
|
|
33
|
+
python setup.py sdist bdist_wheel
|
|
34
|
+
|
|
35
|
+
# Github Actions are added as Trusted Publisher for PyPI
|
|
36
|
+
- name: Publish package to TestPyPI
|
|
37
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
38
|
+
with:
|
|
39
|
+
repository-url: https://test.pypi.org/legacy/
|
|
40
|
+
verbose: true
|
|
41
|
+
|
|
42
|
+
- name: Publish package to PyPI
|
|
43
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
44
|
+
with:
|
|
45
|
+
verbose: true
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
name: testing
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, develop]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main, develop]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
tests:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ["3.8", "3.9", "3.10", "3.11"]
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v3
|
|
18
|
+
with:
|
|
19
|
+
fetch-depth: 0
|
|
20
|
+
|
|
21
|
+
- uses: actions/setup-python@v4
|
|
22
|
+
with:
|
|
23
|
+
python-version: ${{ matrix.python-version }}
|
|
24
|
+
|
|
25
|
+
# https://github.com/actions/cache/blob/main/examples.md#python---pip
|
|
26
|
+
- uses: actions/cache@v3
|
|
27
|
+
with:
|
|
28
|
+
path: ~/.cache/pip
|
|
29
|
+
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/setup.py') }}
|
|
30
|
+
restore-keys: |
|
|
31
|
+
${{ runner.os }}-${{ matrix.python-version }}-pip-
|
|
32
|
+
|
|
33
|
+
- name: Install
|
|
34
|
+
run: |
|
|
35
|
+
python -m pip install --upgrade pip
|
|
36
|
+
python -m pip install -e .[dev]
|
|
37
|
+
|
|
38
|
+
- name: Test with pytest
|
|
39
|
+
run: |
|
|
40
|
+
python -m pytest -v tests/
|
|
41
|
+
|
|
42
|
+
docs:
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
|
|
45
|
+
steps:
|
|
46
|
+
- uses: actions/checkout@v3
|
|
47
|
+
with:
|
|
48
|
+
fetch-depth: 0
|
|
49
|
+
|
|
50
|
+
- uses: actions/setup-python@v4
|
|
51
|
+
with:
|
|
52
|
+
python-version: "3.10"
|
|
53
|
+
|
|
54
|
+
- name: Install dependencies
|
|
55
|
+
run: |
|
|
56
|
+
sudo apt-get install -y pandoc
|
|
57
|
+
|
|
58
|
+
- name: Install
|
|
59
|
+
run: |
|
|
60
|
+
python -m pip install --upgrade pip
|
|
61
|
+
pip install -e .[dev,docs]
|
|
62
|
+
|
|
63
|
+
- name: Build
|
|
64
|
+
run: |
|
|
65
|
+
sphinx-build docs docs_build
|
spinspg-0.1.2/.gitignore
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
pip-wheel-metadata/
|
|
24
|
+
share/python-wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
|
|
40
|
+
# Unit test / coverage reports
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.nox/
|
|
44
|
+
.coverage
|
|
45
|
+
.coverage.*
|
|
46
|
+
.cache
|
|
47
|
+
nosetests.xml
|
|
48
|
+
coverage.xml
|
|
49
|
+
*.cover
|
|
50
|
+
*.py,cover
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
target/
|
|
76
|
+
|
|
77
|
+
# Jupyter Notebook
|
|
78
|
+
.ipynb_checkpoints
|
|
79
|
+
|
|
80
|
+
# IPython
|
|
81
|
+
profile_default/
|
|
82
|
+
ipython_config.py
|
|
83
|
+
|
|
84
|
+
# pyenv
|
|
85
|
+
.python-version
|
|
86
|
+
|
|
87
|
+
# pipenv
|
|
88
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
89
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
90
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
91
|
+
# install all needed dependencies.
|
|
92
|
+
#Pipfile.lock
|
|
93
|
+
|
|
94
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
95
|
+
__pypackages__/
|
|
96
|
+
|
|
97
|
+
# Celery stuff
|
|
98
|
+
celerybeat-schedule
|
|
99
|
+
celerybeat.pid
|
|
100
|
+
|
|
101
|
+
# SageMath parsed files
|
|
102
|
+
*.sage.py
|
|
103
|
+
|
|
104
|
+
# Environments
|
|
105
|
+
.env
|
|
106
|
+
.venv
|
|
107
|
+
env/
|
|
108
|
+
venv/
|
|
109
|
+
ENV/
|
|
110
|
+
env.bak/
|
|
111
|
+
venv.bak/
|
|
112
|
+
|
|
113
|
+
# Spyder project settings
|
|
114
|
+
.spyderproject
|
|
115
|
+
.spyproject
|
|
116
|
+
|
|
117
|
+
# Rope project settings
|
|
118
|
+
.ropeproject
|
|
119
|
+
|
|
120
|
+
# mkdocs documentation
|
|
121
|
+
/site
|
|
122
|
+
|
|
123
|
+
# mypy
|
|
124
|
+
.mypy_cache/
|
|
125
|
+
.dmypy.json
|
|
126
|
+
dmypy.json
|
|
127
|
+
|
|
128
|
+
# Pyre type checker
|
|
129
|
+
.pyre/
|
|
130
|
+
|
|
131
|
+
## Core latex/pdflatex auxiliary files:
|
|
132
|
+
*.aux
|
|
133
|
+
*.lof
|
|
134
|
+
*.log
|
|
135
|
+
*.lot
|
|
136
|
+
*.fls
|
|
137
|
+
*.out
|
|
138
|
+
*.toc
|
|
139
|
+
*.fmt
|
|
140
|
+
*.fot
|
|
141
|
+
*.cb
|
|
142
|
+
*.cb2
|
|
143
|
+
.*.lb
|
|
144
|
+
*.bbl
|
|
145
|
+
*.blg
|
|
146
|
+
*.fdb_latexmk
|
|
147
|
+
*.pdf
|
|
148
|
+
*.synctex.gz
|
|
149
|
+
|
|
150
|
+
docs_build/
|
|
151
|
+
.vscode/
|
|
152
|
+
|
|
153
|
+
# Temporal file
|
|
154
|
+
spin_point_group_table.tex
|
|
155
|
+
|
|
156
|
+
.DS_Store
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
default_language_version:
|
|
2
|
+
python: python3
|
|
3
|
+
|
|
4
|
+
repos:
|
|
5
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
6
|
+
rev: v4.4.0
|
|
7
|
+
hooks:
|
|
8
|
+
- id: check-added-large-files
|
|
9
|
+
- id: check-yaml
|
|
10
|
+
- id: check-json
|
|
11
|
+
- id: debug-statements
|
|
12
|
+
- id: end-of-file-fixer
|
|
13
|
+
# formatter
|
|
14
|
+
- repo: https://github.com/psf/black
|
|
15
|
+
rev: 22.12.0
|
|
16
|
+
hooks:
|
|
17
|
+
- id: black
|
|
18
|
+
# linter
|
|
19
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
20
|
+
rev: v0.0.272
|
|
21
|
+
hooks:
|
|
22
|
+
- id: ruff
|
|
23
|
+
args: [ --fix, --exit-non-zero-on-fix ]
|
|
24
|
+
# type annotation
|
|
25
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
26
|
+
rev: v0.991
|
|
27
|
+
hooks:
|
|
28
|
+
- id: mypy
|
|
29
|
+
exclude: ^docs/
|
|
30
|
+
# Notebook
|
|
31
|
+
- repo: https://github.com/nbQA-dev/nbQA
|
|
32
|
+
rev: 1.6.1
|
|
33
|
+
hooks:
|
|
34
|
+
- id: nbqa-black
|
spinspg-0.1.2/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022, Kohei Shinohara
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
include src/spinspg/automorphisms.json
|
spinspg-0.1.2/PKG-INFO
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: spinspg
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: Python package for detecting spin space group on top of spglib
|
|
5
|
+
Author-email: Kohei Shinohara <kshinohara0508@gmail.com>
|
|
6
|
+
License: BSD 3-Clause License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2022, Kohei Shinohara
|
|
9
|
+
|
|
10
|
+
Redistribution and use in source and binary forms, with or without
|
|
11
|
+
modification, are permitted provided that the following conditions are met:
|
|
12
|
+
|
|
13
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
14
|
+
list of conditions and the following disclaimer.
|
|
15
|
+
|
|
16
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
17
|
+
this list of conditions and the following disclaimer in the documentation
|
|
18
|
+
and/or other materials provided with the distribution.
|
|
19
|
+
|
|
20
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
21
|
+
contributors may be used to endorse or promote products derived from
|
|
22
|
+
this software without specific prior written permission.
|
|
23
|
+
|
|
24
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
25
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
26
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
27
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
28
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
29
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
30
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
31
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
32
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
33
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
34
|
+
|
|
35
|
+
Project-URL: homepage, https://github.com/spglib/spinspg
|
|
36
|
+
Project-URL: repository, https://github.com/spglib/spinspg
|
|
37
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
38
|
+
Classifier: Intended Audience :: Science/Research
|
|
39
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
40
|
+
Classifier: Operating System :: OS Independent
|
|
41
|
+
Classifier: Programming Language :: Python
|
|
42
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
43
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
44
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
45
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
46
|
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
47
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
48
|
+
Requires-Python: >=3.8.0
|
|
49
|
+
Description-Content-Type: text/markdown
|
|
50
|
+
Provides-Extra: dev
|
|
51
|
+
Provides-Extra: docs
|
|
52
|
+
License-File: LICENSE
|
|
53
|
+
|
|
54
|
+
# spinspg
|
|
55
|
+
[](https://github.com/spglib/spinspg/actions/workflows/testing.yml)
|
|
56
|
+
[](https://opensource.org/licenses/BSD-3-Clause)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
Python package for detecting spin space group on top of spglib
|
|
60
|
+
|
|
61
|
+
- Document(latest): <https://spinspg.readthedocs.io/en/latest/>
|
|
62
|
+
- GitHub: <https://github.com/spglib/spinspg>
|
|
63
|
+
|
|
64
|
+
## Features
|
|
65
|
+
|
|
66
|
+
- Find spin symmetry operations from spin arrangements
|
|
67
|
+
|
|
68
|
+
## Usage
|
|
69
|
+
|
|
70
|
+
```python
|
|
71
|
+
import numpy as np
|
|
72
|
+
from spinspg import get_spin_symmetry
|
|
73
|
+
|
|
74
|
+
# Antiferromagnetic rutile structure
|
|
75
|
+
a = 4.87
|
|
76
|
+
c = 3.31
|
|
77
|
+
x_4f = 0.695169
|
|
78
|
+
lattice = np.diag([a, a, c])
|
|
79
|
+
positions = np.array([ # Fractional coordinates
|
|
80
|
+
[0, 0, 0], # Mn(2a)
|
|
81
|
+
[0.5, 0.5, 0.5], # Mn(2a)
|
|
82
|
+
[x_4f, x_4f, 0], # F(4f)
|
|
83
|
+
[-x_4f, -x_4f, 0], # F(4f)
|
|
84
|
+
[-x_4f + 0.5, x_4f + 0.5, 0.5], # F(4f)
|
|
85
|
+
[x_4f + 0.5, -x_4f + 0.5, 0.5], # F(4f)
|
|
86
|
+
])
|
|
87
|
+
numbers = np.array([0, 0, 1, 1, 1, 1])
|
|
88
|
+
magmoms = np.array([ # In Cartesian coordinates
|
|
89
|
+
[0, 0, 2.5],
|
|
90
|
+
[0, 0, -2.5],
|
|
91
|
+
[0, 0, 0],
|
|
92
|
+
[0, 0, 0],
|
|
93
|
+
[0, 0, 0],
|
|
94
|
+
[0, 0, 0],
|
|
95
|
+
])
|
|
96
|
+
|
|
97
|
+
# Find spin symmetry operations
|
|
98
|
+
sog, rotations, translations, spin_rotations = get_spin_symmetry(lattice, positions, numbers, magmoms)
|
|
99
|
+
|
|
100
|
+
print(f"Spin-only group: {sog}") # COLLINEAR(axis=[0. 0. 1.])
|
|
101
|
+
|
|
102
|
+
# Some operations have nontrivial spin rotations
|
|
103
|
+
idx = 2
|
|
104
|
+
print(f"Rotation ({idx})\n{rotations[idx]}")
|
|
105
|
+
print(f"Translation ({idx})\n{translations[idx]}")
|
|
106
|
+
print(f"Spin rotation ({idx})\n{spin_rotations[idx]}") # -> diag([1, 1, -1])
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
See [API documents](docs/api/api.md) for more details.
|
|
110
|
+
|
|
111
|
+
## Installation
|
|
112
|
+
|
|
113
|
+
```shell
|
|
114
|
+
git clone git@github.com:spglib/spinspg.git
|
|
115
|
+
cd spinspg
|
|
116
|
+
pip install .
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## How to cite spinspg
|
|
120
|
+
|
|
121
|
+
If you use spinspg in your research, please cite [Spglib](https://spglib.readthedocs.io/en/latest/) and the following paper:
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
@misc{spinspg,
|
|
125
|
+
author = {Kohei Shinohara and Atsushi Togo and Hikaru Watanabe and Takuya Nomoto and Isao Tanaka and Ryotaro Arita},
|
|
126
|
+
title = {Algorithm for spin symmetry operation search},
|
|
127
|
+
year = {2023},
|
|
128
|
+
eprint = {arXiv:2307.12228},
|
|
129
|
+
howpublished = {\url{https://arxiv.org/abs/2307.12228}},
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Change log
|
|
134
|
+
|
|
135
|
+
See the [change log](docs/changelog.md) for recent changes.
|
|
136
|
+
|
|
137
|
+
## License
|
|
138
|
+
|
|
139
|
+
Spinspg is distributed under a BSD 3-clause license.
|
spinspg-0.1.2/README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# spinspg
|
|
2
|
+
[](https://github.com/spglib/spinspg/actions/workflows/testing.yml)
|
|
3
|
+
[](https://opensource.org/licenses/BSD-3-Clause)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
Python package for detecting spin space group on top of spglib
|
|
7
|
+
|
|
8
|
+
- Document(latest): <https://spinspg.readthedocs.io/en/latest/>
|
|
9
|
+
- GitHub: <https://github.com/spglib/spinspg>
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
- Find spin symmetry operations from spin arrangements
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```python
|
|
18
|
+
import numpy as np
|
|
19
|
+
from spinspg import get_spin_symmetry
|
|
20
|
+
|
|
21
|
+
# Antiferromagnetic rutile structure
|
|
22
|
+
a = 4.87
|
|
23
|
+
c = 3.31
|
|
24
|
+
x_4f = 0.695169
|
|
25
|
+
lattice = np.diag([a, a, c])
|
|
26
|
+
positions = np.array([ # Fractional coordinates
|
|
27
|
+
[0, 0, 0], # Mn(2a)
|
|
28
|
+
[0.5, 0.5, 0.5], # Mn(2a)
|
|
29
|
+
[x_4f, x_4f, 0], # F(4f)
|
|
30
|
+
[-x_4f, -x_4f, 0], # F(4f)
|
|
31
|
+
[-x_4f + 0.5, x_4f + 0.5, 0.5], # F(4f)
|
|
32
|
+
[x_4f + 0.5, -x_4f + 0.5, 0.5], # F(4f)
|
|
33
|
+
])
|
|
34
|
+
numbers = np.array([0, 0, 1, 1, 1, 1])
|
|
35
|
+
magmoms = np.array([ # In Cartesian coordinates
|
|
36
|
+
[0, 0, 2.5],
|
|
37
|
+
[0, 0, -2.5],
|
|
38
|
+
[0, 0, 0],
|
|
39
|
+
[0, 0, 0],
|
|
40
|
+
[0, 0, 0],
|
|
41
|
+
[0, 0, 0],
|
|
42
|
+
])
|
|
43
|
+
|
|
44
|
+
# Find spin symmetry operations
|
|
45
|
+
sog, rotations, translations, spin_rotations = get_spin_symmetry(lattice, positions, numbers, magmoms)
|
|
46
|
+
|
|
47
|
+
print(f"Spin-only group: {sog}") # COLLINEAR(axis=[0. 0. 1.])
|
|
48
|
+
|
|
49
|
+
# Some operations have nontrivial spin rotations
|
|
50
|
+
idx = 2
|
|
51
|
+
print(f"Rotation ({idx})\n{rotations[idx]}")
|
|
52
|
+
print(f"Translation ({idx})\n{translations[idx]}")
|
|
53
|
+
print(f"Spin rotation ({idx})\n{spin_rotations[idx]}") # -> diag([1, 1, -1])
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
See [API documents](docs/api/api.md) for more details.
|
|
57
|
+
|
|
58
|
+
## Installation
|
|
59
|
+
|
|
60
|
+
```shell
|
|
61
|
+
git clone git@github.com:spglib/spinspg.git
|
|
62
|
+
cd spinspg
|
|
63
|
+
pip install .
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## How to cite spinspg
|
|
67
|
+
|
|
68
|
+
If you use spinspg in your research, please cite [Spglib](https://spglib.readthedocs.io/en/latest/) and the following paper:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
@misc{spinspg,
|
|
72
|
+
author = {Kohei Shinohara and Atsushi Togo and Hikaru Watanabe and Takuya Nomoto and Isao Tanaka and Ryotaro Arita},
|
|
73
|
+
title = {Algorithm for spin symmetry operation search},
|
|
74
|
+
year = {2023},
|
|
75
|
+
eprint = {arXiv:2307.12228},
|
|
76
|
+
howpublished = {\url{https://arxiv.org/abs/2307.12228}},
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Change log
|
|
81
|
+
|
|
82
|
+
See the [change log](docs/changelog.md) for recent changes.
|
|
83
|
+
|
|
84
|
+
## License
|
|
85
|
+
|
|
86
|
+
Spinspg is distributed under a BSD 3-clause license.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# API Reference
|
|
2
|
+
|
|
3
|
+
## Core APIs
|
|
4
|
+
|
|
5
|
+
```{eval-rst}
|
|
6
|
+
.. autofunction:: spinspg.get_spin_symmetry
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Spin-only group
|
|
10
|
+
|
|
11
|
+
```{eval-rst}
|
|
12
|
+
.. autoenum:: spinspg.spin.SpinOnlyGroupType
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```{eval-rst}
|
|
16
|
+
.. autoclass:: spinspg.spin.SpinOnlyGroup
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Nontrivial spin point group
|
|
20
|
+
|
|
21
|
+
```{eval-rst}
|
|
22
|
+
.. autofunction:: spinspg.pointgroup.get_pointgroup_representative_from_symbol
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
```{eval-rst}
|
|
26
|
+
.. autofunction:: spinspg.pointgroup.get_pointgroup_representative
|
|
27
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
## v0.1.1 (20 Feb. 2023)
|
|
4
|
+
- Fix spin symmetry search and add table of nontrivial spin point-group types [[#2]](https://github.com/spglib/spinspg/pull/2)
|
|
5
|
+
- Tabulate 598 spin point group types
|
|
6
|
+
- Fix eigenvectors for spin-only group search
|
|
7
|
+
- Fix to correctly search complement in nontrivial spin space group search
|
|
8
|
+
- Add note for spin point group and glossary
|
|
9
|
+
|
|
10
|
+
## v0.1.0 (18 Jan. 2023)
|
|
11
|
+
- Add functionality to find spin symmetry operations
|
|
12
|
+
- {func}`spinspg.get_spin_symmetry` returns spin symmetry operations from a given spin arrangement
|
|
13
|
+
- {class}`spinspg.spin.SpinOnlyGroup` represents a spin-only group.
|