Skip to main content

Analyze particle clusters in boxes with periodic boundaries

Project description

PBCluster

https://img.shields.io/pypi/v/pbcluster.svg https://img.shields.io/travis/benlindsay/pbcluster.svg Documentation Status https://codecov.io/gh/benlindsay/pbcluster/branch/master/graph/badge.svg

This packages makes it easier to analyze particle clusters in boxes with periodic boundaries. For example, take a look at this simulation box:

Particle cluster split across box faces

All these particles belong to a single cluster, but because particles jump to the other side of the box when the cross one of the box faces (like in the classic Asteroids game), the cluster appears split into 2 clusters plus a lone particle. This jumping/wrapping behavior is often called a Periodic Boundary Condition (PBC). Typical clustering packages make it difficult or impossible to account for PBCs, and might classify these particles as belonging to 3 separate clusters. PBCluster handles periodic boundary conditions, and allows you to calculate several particle and cluster properties. Here are some available properties:

Cluster Properties

  • n_particles: number of particles in a cluster
  • minimum_node_cuts: the number of particles you’d need to remove to break all paths through connected particles from any face to its opposing face.
  • rg: the radius of gyration of a cluster
  • asphericity: a measure of the elongation of the cluster

Particle Properties

  • coordination_number: the number of neighboring particles connected to a given particle

Bond Properties

  • bonds_df: a dataframe of particle-particle “bonds” (neighbors within the cutoff distance of each other
  • bond_durations_df: a dataframe with data about how long particle pairs were in contact

You can install this with pip install pbcluster. For more details check out the Installation page of the docs.

For an example showing how to use PBCluster, check out the Example page of the docs.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.1.0 (2019-04-28)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pbcluster, version 0.2.1
Filename, size File type Python version Upload date Hashes
Filename, size pbcluster-0.2.1-py2.py3-none-any.whl (14.7 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size pbcluster-0.2.1.tar.gz (778.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page