Collective atomic modulation analysis with irreducible space-group representation
Project description
spgrep-modulation
Collective atomic modulation analysis with irreducible space-group representation
- Github: https://github.com/phonopy/spgrep-modulation
- Document: https://phonopy.github.io/spgrep-modulation
- Document (develop): https://phonopy.github.io/spgrep-modulation/develop/
- PyPI: https://pypi.org/project/spgrep-modulation
Features
- Calculate representation matrices and irreps formed by phonon eigenmodes
- Calculate isotropy subgroups of irreps of space groups on the fly
- Generate modulated structures in selected order-parameter directions of isotropy subgroups
Usage
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)
Installation
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
License
spgrep-modulation is released under a BSD 3-clause license.
Development
Document
sphinx-autobuild docs docs_build
# open localhost:8000 in your browser
Acknowledgements
Some test files tests/phonopy_mp-*.yaml.xz
are adapted from phonondb under CC BY 4.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
spgrep_modulation-0.2.5.tar.gz
(166.5 kB
view details)
Built Distribution
File details
Details for the file spgrep_modulation-0.2.5.tar.gz
.
File metadata
- Download URL: spgrep_modulation-0.2.5.tar.gz
- Upload date:
- Size: 166.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0917bc48b3cd53919a45a0bee1d25fcd01980530dee8ac51936831889a0c2a9d |
|
MD5 | 491872fa89ae39d18134cfbaa66a982a |
|
BLAKE2b-256 | aa6e2b289a9fd404f207ced3d4a34b48770b5655771201b87ab1fd7a022546bc |
File details
Details for the file spgrep_modulation-0.2.5-py3-none-any.whl
.
File metadata
- Download URL: spgrep_modulation-0.2.5-py3-none-any.whl
- Upload date:
- Size: 20.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5569e25a32163bfe11bc0b30309eab723b0ee5607afed839fd16974ec15453a |
|
MD5 | 6adb9d58d4a0686a0455997f94c75f21 |
|
BLAKE2b-256 | 87803a22bb9ef5fc5be03849e229821c808e1a301226dd7f5b74cb9339687d44 |