Analyze particle clusters in boxes with periodic boundaries
Free software: MIT license
This packages makes it easier to analyze particle clusters in boxes with periodic boundaries. For example, take a look at this simulation box:
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:
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
coordination_number: the number of neighboring particles connected to a given particle
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.
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
First release on PyPI.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for pbcluster-0.2.1-py2.py3-none-any.whl