Skip to main content

Collective atomic modulation analysis with irreducible space-group representation

Project description

spgrep-modulation

testing pre-commit.ci status codecov License PyPI - Python Version PyPI version PyPI Downloads

Collective atomic modulation analysis with irreducible space-group representation

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 modulation python=3.10 pip
conda activate modulation
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


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.6.tar.gz (167.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spgrep_modulation-0.2.6-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

Details for the file spgrep_modulation-0.2.6.tar.gz.

File metadata

  • Download URL: spgrep_modulation-0.2.6.tar.gz
  • Upload date:
  • Size: 167.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for spgrep_modulation-0.2.6.tar.gz
Algorithm Hash digest
SHA256 2222caddbc4b55a52403e06f2990a97eacebc59d41c0e40528b15b7e9e8d1f8e
MD5 56d4e9529a4af4faea62e8e9580f38f5
BLAKE2b-256 1b1dcf958875d43ea2bb2ed26691a44c88a2831cca7818b5d213fa35076da0c5

See more details on using hashes here.

File details

Details for the file spgrep_modulation-0.2.6-py3-none-any.whl.

File metadata

File hashes

Hashes for spgrep_modulation-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 78418b684dfbfd24336c40fd92c94135aa46fc8833d5174e66ec24b4e592b28d
MD5 bb0eec5b4d67c3abdc636e5ca59ed1f4
BLAKE2b-256 7229a122850a9e55bec5908c68a84f37631543765f8f79835a1677ae428423b5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page