基于不可约空间群表示的集体原子调制分析
项目描述
spgrep-modulation
基于不可约空间群表示的集体原子调制分析
- Github: https://github.com/phonopy/spgrep-modulation
- 文档: https://phonopy.github.io/spgrep-modulation
- 文档(开发): https://phonopy.github.io/spgrep-modulation/develop/
- PyPI: https://pypi.ac.cn/project/spgrep-modulation
功能
- 计算由声子本征模形成的表示矩阵和不可约表示
- 计算空间群不可约表示的各向同性子群的自动计算
- 在选定的各向同性子群的序参量方向上生成调制结构
用法
from pathlib import Path
import phonopy
from phonopy.structure.symmetry import Symmetry
from spgrep_modulation.modulation import Modulation
# Load Phonopy object
path = Path(__file__).resolve().parent.parent / "tests" / "phonopy_mp-2998.yaml.xz"
ph = phonopy.load(path)
# Prepare Modulation class
qpoint = [0.5, 0, 0] # X point
md = Modulation.with_supercell_and_symmetry_search(
dynamical_matrix=ph.dynamical_matrix,
supercell_matrix=[2, 2, 2],
qpoint=qpoint,
factor=ph.unit_conversion_factor,
)
# Degenerated imaginary mode
frequency_index = 0
print(f"Frequency (THz): {md.eigvals_to_frequencies(md.eigenspaces[frequency_index][0]):.2f}")
# -> Frequency (THz): -4.88
print(f"Irrep shape: {md.eigenspaces[frequency_index][2].shape}")
# -> Irrep shape: (16, 2, 2)
# Modulated cells corresponding to one-dimensional order-parameter directions of isotropy subgroup
cells = md.get_high_symmetry_modulated_supercells(frequency_index)
for cell in cells:
symmetry = Symmetry(cell)
print(f"{symmetry.dataset['international']} (No. {symmetry.dataset['number']})")
# -> Pmma (No. 51) and Cmcm (No. 63)
安装
pip install spgrep-modulation
conda create -n spgrep python=3.10 pip
conda activate spgrep
git clone git@github.com:lan496/spgrep-modulation.git
cd spgrep-modulation
pip install -e .
# pip install -e ".[dev,docs,vis]"
# pre-commit install
许可证
spgrep-modulation是在BSD 3-clause许可证下发布的。
开发
文档
sphinx-autobuild docs docs_build
# open localhost:8000 in your browser
致谢
一些测试文件tests/phonopy_mp-*.yaml.xz
是从phonondb根据CC BY 4.0改编的。
项目详情
下载文件
下载您平台对应的文件。如果您不确定该选择哪个,请了解更多关于 安装包 的信息。
源分发
spgrep_modulation-0.2.5.tar.gz (166.5 kB 查看哈希值)