跳转到主要内容

基于spglib检测自旋空间群的Python包

项目描述

spinspg

testing License

基于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 查看哈希值)

上传时间 Python 3

支持者