A library for analysis of coordination polyhedra from molecular dynamics trajectories
Project description
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.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file polyhedral_analysis-0.6.0.tar.gz.
File metadata
- Download URL: polyhedral_analysis-0.6.0.tar.gz
- Upload date:
- Size: 45.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28402a1db5b3d9d096dbef5f52436520b55831df58be652c5592a96a476a78a9
|
|
| MD5 |
fb1eeedf945deffcca6461852b77f71f
|
|
| BLAKE2b-256 |
fd610caf2b1b69b681c7d35bd680169b3a2a4585100e2423c01e77baa3c7151f
|
Provenance
The following attestation bundles were made for polyhedral_analysis-0.6.0.tar.gz:
Publisher:
publish.yml on bjmorgan/polyhedral-analysis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
polyhedral_analysis-0.6.0.tar.gz -
Subject digest:
28402a1db5b3d9d096dbef5f52436520b55831df58be652c5592a96a476a78a9 - Sigstore transparency entry: 1009331160
- Sigstore integration time:
-
Permalink:
bjmorgan/polyhedral-analysis@f790d96868e3e80b950f06f73b15b498a3c958f8 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/bjmorgan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f790d96868e3e80b950f06f73b15b498a3c958f8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file polyhedral_analysis-0.6.0-py3-none-any.whl.
File metadata
- Download URL: polyhedral_analysis-0.6.0-py3-none-any.whl
- Upload date:
- Size: 35.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cc4f273a608259aa33bf763ee0c5d2fe71bb28312726920a2c8fa1a208641a0
|
|
| MD5 |
9129d902f2a93cd4d24d7e63ca2b3474
|
|
| BLAKE2b-256 |
baf9463b8eaf6ed4984846528f694590cafcfc9a67f29a7fce40939e8ceb00c5
|
Provenance
The following attestation bundles were made for polyhedral_analysis-0.6.0-py3-none-any.whl:
Publisher:
publish.yml on bjmorgan/polyhedral-analysis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
polyhedral_analysis-0.6.0-py3-none-any.whl -
Subject digest:
5cc4f273a608259aa33bf763ee0c5d2fe71bb28312726920a2c8fa1a208641a0 - Sigstore transparency entry: 1009331164
- Sigstore integration time:
-
Permalink:
bjmorgan/polyhedral-analysis@f790d96868e3e80b950f06f73b15b498a3c958f8 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/bjmorgan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f790d96868e3e80b950f06f73b15b498a3c958f8 -
Trigger Event:
release
-
Statement type: