Skip to main content

A library for analysis of coordination polyhedra from molecular dynamics trajectories

Project description

polyhedral-analysis

Build Status Coverage Status Documentation Status

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

For more examples, see the example notebooks.

Documentation

API documentation 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

polyhedral_analysis-0.5.0.tar.gz (44.8 kB view details)

Uploaded Source

Built Distribution

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

polyhedral_analysis-0.5.0-py3-none-any.whl (35.1 kB view details)

Uploaded Python 3

File details

Details for the file polyhedral_analysis-0.5.0.tar.gz.

File metadata

  • Download URL: polyhedral_analysis-0.5.0.tar.gz
  • Upload date:
  • Size: 44.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for polyhedral_analysis-0.5.0.tar.gz
Algorithm Hash digest
SHA256 30bba52fe0814755211f0934a8e49730938e9c44162674abf9fe904e2f2aa6c7
MD5 6d9cecab08c14cc64bb0ddb255692400
BLAKE2b-256 36fc7f5bc9e54dbbfcf2f9e53c6b7f8d895fe66dba69254e980b56d73fb5c212

See more details on using hashes here.

Provenance

The following attestation bundles were made for polyhedral_analysis-0.5.0.tar.gz:

Publisher: publish.yml on bjmorgan/polyhedral-analysis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file polyhedral_analysis-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for polyhedral_analysis-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 21c472170bf115038dc0a6f7a036c6cffc5345f073758988a011b3d31f919ebb
MD5 ac052b9783775bf5b1190476d16080ca
BLAKE2b-256 7b4ee3e2e9d6dec99cd035d3652989e9444b636583d1757e1ee576befe1ea788

See more details on using hashes here.

Provenance

The following attestation bundles were made for polyhedral_analysis-0.5.0-py3-none-any.whl:

Publisher: publish.yml on bjmorgan/polyhedral-analysis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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