polyhedral-analysis
polyhedral-analysis is a Python module for analysing coordination polyhedra in crystal structures and molecular dynamics trajectories. Built on top of pymatgen, it works with any structure that pymatgen can read.
Features
- Coordination polyhedron construction from distance cutoffs, nearest neighbours, or closest-centre assignment
- Continuous symmetry measures (CSM) against reference geometries (tetrahedron, octahedron, cube, etc.)
- Best-fit geometry identification across all reference polyhedra for a given coordination number
- Bond lengths, angles, volumes, and edge connectivity graphs
- Corner-, edge-, and face-sharing neighbour analysis
- Off-centre displacement and radial distortion parameters
- Vertex vector orientation analysis with orientation distribution plotting
- Trajectory analysis for tracking polyhedral distortions over molecular dynamics runs
Installation
pip install polyhedral-analysis
Requirements
- Python 3.11+
- numpy
- pymatgen >= 2024.7.18
- scipy
- bsym
Quick start
from pymatgen.io.vasp import Poscar
from polyhedral_analysis.configuration import Configuration
from polyhedral_analysis.polyhedra_recipe import PolyhedraRecipe
# Define a recipe for octahedral coordination
recipe = PolyhedraRecipe(
method='distance cutoff',
coordination_cutoff=3.0,
central_atoms='Ti',
vertex_atoms=['O', 'F'],
)
# Load a structure and build polyhedra
structure = Poscar.from_file('POSCAR').structure
config = Configuration(structure=structure, recipes=[recipe])
# Inspect a polyhedron
poly = config.polyhedra[0]
print(poly.coordination_number) # 6
print(poly.best_fit_geometry) # {'geometry': 'Octahedron', 'symmetry_measure': ...}
print(poly.volume) # polyhedral volume
print(poly.coordination_distances()) # list of bond lengths
Documentation
Full documentation — including a getting started guide, core concepts, and guides for recipes, symmetry measures, neighbour analysis, and trajectory analysis — is available at polyhedral-analysis.readthedocs.io.
Metadata
Release files for polyhedral-analysis 0.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| polyhedral_analysis-0.6.1.tar.gz | 49.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| polyhedral_analysis-0.6.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 84.9 kB
Release files / polyhedral_analysis-0.6.1.tar.gz
| Download URL | polyhedral_analysis-0.6.1.tar.gz |
|---|---|
| Size | 49.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6f9727aa4bc8b6aed25783addef00fed313c946091bd3064b82c08001055a14f
|
|
BLAKE2b-256 checksum How to use checksums |
d6ef492d3cd2e160cdf18336dd3d321f4a182fb875bfb4ec804fd0801928367e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 7, 2026.
Transparency logRelease files / polyhedral_analysis-0.6.1-py3-none-any.whl
| Download URL | polyhedral_analysis-0.6.1-py3-none-any.whl |
|---|---|
| Size | 35.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
afa75512f1723004d77f5e4d1d47391cd55381a78b4fe8d1772eae3fdbdb0e63
|
|
BLAKE2b-256 checksum How to use checksums |
ea892f2209b5f50bd1aa4e31db97bae9f7129dcc4ccae9608de1922abbe7f0d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 7, 2026.
Transparency log