基于spglib检测自旋空间群的Python包
项目描述
spinspg
基于spglib检测自旋空间群的Python包
特性
- 从自旋排列中找到自旋对称操作
用法
import numpy as np
from spinspg import get_spin_symmetry
# Antiferromagnetic rutile structure
a = 4.87
c = 3.31
x_4f = 0.695169
lattice = np.diag([a, a, c])
positions = np.array([ # Fractional coordinates
[0, 0, 0], # Mn(2a)
[0.5, 0.5, 0.5], # Mn(2a)
[x_4f, x_4f, 0], # F(4f)
[-x_4f, -x_4f, 0], # F(4f)
[-x_4f + 0.5, x_4f + 0.5, 0.5], # F(4f)
[x_4f + 0.5, -x_4f + 0.5, 0.5], # F(4f)
])
numbers = np.array([0, 0, 1, 1, 1, 1])
magmoms = np.array([ # In Cartesian coordinates
[0, 0, 2.5],
[0, 0, -2.5],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
])
# Find spin symmetry operations
sog, rotations, translations, spin_rotations = get_spin_symmetry(lattice, positions, numbers, magmoms)
print(f"Spin-only group: {sog}") # COLLINEAR(axis=[0. 0. 1.])
# Some operations have nontrivial spin rotations
idx = 2
print(f"Rotation ({idx})\n{rotations[idx]}")
print(f"Translation ({idx})\n{translations[idx]}")
print(f"Spin rotation ({idx})\n{spin_rotations[idx]}") # -> diag([1, 1, -1])
有关更多详细信息,请参阅API文档。
安装
git clone git@github.com:spglib/spinspg.git
cd spinspg
pip install .
如何引用spinspg
如果您在研究中使用了spinspg,请引用Spglib和以下论文
@misc{spinspg,
author = {Kohei Shinohara and Atsushi Togo and Hikaru Watanabe and Takuya Nomoto and Isao Tanaka and Ryotaro Arita},
title = {Algorithm for spin symmetry operation search},
year = {2023},
eprint = {arXiv:2307.12228},
howpublished = {\url{https://arxiv.org/abs/2307.12228}},
}
变更日志
有关最近更改,请参阅变更日志。
许可协议
Spinspg在BSD 3-clause许可协议下分发。
项目详情
下载文件
下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。
源代码分发
spinspg-0.1.2.tar.gz (37.3 kB 查看哈希值)
构建分发包
spinspg-0.1.2-py3-none-any.whl (23.8 kB 查看哈希值)
关闭
spinspg-0.1.2.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | fcb3855c60cad3a7961102af8747b24b0b29a322b3c0620c34371a383647eece |
|
MD5 | ff44721bd3cbbba80554f6ef18729c77 |
|
BLAKE2b-256 | f7982ab14d7e08ece2988392a7b7dad81b716b650bb94e394be6cb07ff89e595 |
关闭
spinspg-0.1.2-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | d67c67ee772950669a5e92e6030acf1c418769c8aa659670915b0e2d35af996b |
|
MD5 | e557feff48c618a63243258008911e67 |
|
BLAKE2b-256 | 50abc82374d4617d7e523398ce6ad54f6f3bc01df51b5434cf57d29d1a03e612 |