symphon
A simple wrapper of the phonopy irreps module for finding irreducible representations of phonon modes in ABINIT's anaddb output.
Features
- Automatic high-symmetry analysis: Analyzes all high-symmetry k-points (GM, X, M, R, etc.) automatically
- Dual-label display at Gamma: Shows both Mulliken (T1u, Eg, etc.) and BCS (GM4-, GM5+, etc.) notation side-by-side
- Spectroscopic activity: Identifies IR- and Raman-active modes at Γ point
- Multiple input formats: Supports both anaddb PHBST NetCDF files and phonopy params/YAML files
- Dual backend support:
phonopybackend: Γ-point analysis with IR/Raman activity (used automatically at Gamma)irrepbackend: Non-Gamma point analysis using theirreppackage (used automatically for other points)
- CLI and Python API: Flexible usage through command-line tools or Python functions
- Complete symmetry information: Reports both space group and point group for the crystal
Installation
Basic Installation
Install from PyPI:
pip install symphon
Optional Dependencies
For non-Gamma phonons (k-points other than Γ), install with the irrep backend:
pip install "symphon[irrep]"
For ABINIT support (reading PHBST NetCDF files), install with the abipy optional dependency:
pip install "symphon[abipy]"
To install all optional dependencies:
pip install "symphon[irrep,abipy]"
Documentation
- Usage Guide: Complete API and CLI reference with examples for all features
- Irreducible Representation Labeling Guide: Mathematical foundations, Mulliken notation, and tutorial for non-Gamma phonons (e.g., X and M points in BaTiO3)
- IR and Raman Activity Methodology: Scientific guide to the group-theoretical method used to identify spectroscopic activity, with TmFeO3 case study
Quick Start
Python API
from symphon import print_irreps_phonopy
# Analyze any q-point (backend auto-selected)
print_irreps_phonopy("phonopy_params.yaml", qpoint=[0, 0, 0]) # Gamma
print_irreps_phonopy("phonopy_params.yaml", qpoint=[0.5, 0.5, 0]) # M point
Command Line
Unified CLI (symphon)
All functionality is available through the unified symphon CLI:
# Phonon irreps from phonopy (auto-discovers all high-symmetry k-points)
symphon phonopy-irreps --params phonopy_params.yaml
# One explicit primitive reciprocal q-point with little-group operations
symphon phonopy-irreps --params phonopy_params.yaml --qpoint 0 0.5 0 --show-little-group
# Phonon irreps from anaddb (auto-discovers high-symmetry q-points)
symphon anaddb-irreps --phbst run_PHBST.nc
# With chiral transition analysis
symphon phonopy-irreps --params phonopy_params.yaml --chiral
# Find chiral phase transitions from space groups
symphon find-chiral-transition --sg 136
# Magnetic chirality analysis
symphon magnetic-chiral --structure POSCAR --qpoint 0 0 0.5 --mag-sites 0,1
symphon abstract-magnetic --spg 221 --qpoint 0 0 0
symphon msg 18.16
phonopy-irreps (Auto-discovery mode)
# Analyze all high-symmetry k-points automatically
symphon phonopy-irreps --params phonopy_params.yaml
# Output shows all high-symmetry points:
# - GM point: dual labels (Mulliken + BCS) + IR/Raman activity
# - Other points (M, R, X, etc.): BCS labels
phonopy-irreps (Single q-point little group)
# Analyze one primitive reciprocal q-point and print little-group operations
symphon phonopy-irreps --params phonopy_params.yaml --qpoint 0 0.5 0 --show-little-group
The little-group report lists the symmetry operations that preserve the selected q-point modulo a reciprocal lattice vector and prints characters for each degenerate phonon block.
anaddb-irreps (Auto-discovery or manual mode)
# Auto-discover all high-symmetry q-points (using standalone command)
anaddb-irreps --phbst run_PHBST.nc
# Or using unified CLI
symphon anaddb-irreps --phbst run_PHBST.nc
# Or analyze specific q-point (0-based index)
symphon anaddb-irreps --phbst run_PHBST.nc --q-index 0
Output Examples
Automatic high-symmetry analysis (phonopy-irreps)
When you run symphon phonopy-irreps --params phonopy_params.yaml, it automatically:
- Discovers all high-symmetry k-points from the space group
- Shows dual labels (Mulliken + BCS) at Gamma point with IR/Raman activity
- Shows BCS labels for other high-symmetry points
Space group: Pm-3m
Found 4 high-symmetry points:
GM: k=(0.0, 0.0, 0.0)
M: k=(0.5, 0.5, 0.0)
R: k=(0.5, 0.5, 0.5)
X: k=(0.0, 0.5, 0.0)
# GM point (k=(0.0, 0.0, 0.0))
============================================================
q-point: [0.0000, 0.0000, 0.0000]
Space group: Pm-3m
Point group: m-3m
# qx qy qz band freq(THz) freq(cm-1) label(M) label(BCS) IR Raman
0.0000 0.0000 0.0000 0 -6.0487 -201.76 T1u GM4- Y .
0.0000 0.0000 0.0000 9 8.5335 284.65 T2u GM5- . .
# X point (k=(0.0, 0.5, 0.0))
============================================================
q-point: [0.0000, 0.5000, 0.0000]
Space group: Pm-3m
Point group: m-3m
# qx qy qz band freq(THz) freq(cm-1) label
0.0000 0.5000 0.0000 0 -4.8804 -162.79 X5+
0.0000 0.5000 0.0000 2 3.3171 110.65 X5-
Examples
See examples/MoS2_1T/ for a complete working example with MoS2 1T structure using anaddb output.
See docs/irreps_guide.md for BaTiO3 examples demonstrating both Gamma and non-Gamma point analysis.
Technical Notes
K-point Coordinate Systems
The irrep backend requires careful handling of k-point coordinates:
irreptablespackage: Provides k-points in reference unit cell coordinatesirreppackage: Expects k-points in primitive unit cell coordinates
For certain space groups, a coordinate transformation is required. Currently implemented:
- Pnma (space group 62): Cyclic permutation
k_prim = (k_z, k_x, k_y)- Transformation matrix:
[[0,0,1], [1,0,0], [0,1,0]] - Verified with TmFeO3 structure (all 8 high-symmetry points work correctly)
- Transformation matrix:
Symmetry Precision
The symprec parameter controls tolerance for symmetry detection and atom mapping:
- Default:
1e-5(standard phonopy default) - Both phonopy and irrep backends now use the same
symprecvalue consistently - For low-symmetry or distorted structures, increase
symprec(e.g.,1e-2or1e-3)
License
BSD-2-clause
Metadata
Release files for symphon 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| symphon-0.4.0.tar.gz | 89.7 kB | Without provenance | Details for symphon-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| symphon-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for symphon-0.4.0-py3-none-any.whl |
Total release size: 170.9 kB
Release files / symphon-0.4.0.tar.gz
| Download URL | symphon-0.4.0.tar.gz |
|---|---|
| Size | 89.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b0f1cf208dcffc0fa5af375d0eba0efed231fa1ff6386170f17b108fa8e2f7e0
|
|
BLAKE2b-256 checksum How to use checksums |
7ce7e79c339f975e13ae9988af725be82b40ae43baac347c1922e98ce5335e64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|
Release files / symphon-0.4.0-py3-none-any.whl
| Download URL | symphon-0.4.0-py3-none-any.whl |
|---|---|
| Size | 81.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cab0c9aadf803f159d15d985b5b0722c354f545ab01b00bb62e97123bf253c9c
|
|
BLAKE2b-256 checksum How to use checksums |
4c86b4c7effb9ed4985ae0279e7184b103d6a1940b16a07d7698d633bbb00b5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|
Security for symphon 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.