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.

Source Distribution

pbcluster-0.2.1.tar.gz (778.9 kB view details)

Uploaded Source

Built Distribution

pbcluster-0.2.1-py2.py3-none-any.whl (14.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pbcluster-0.2.1.tar.gz.

File metadata

  • Download URL: pbcluster-0.2.1.tar.gz
  • Upload date:
  • Size: 778.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.3

File hashes

Hashes for pbcluster-0.2.1.tar.gz
Algorithm Hash digest
SHA256 ea72d07dd760a03cc1f16c0efe6043f529c6102f044ea9dd4b0511c4f884a900
MD5 560ffef3002203d2da92e850c0004041
BLAKE2b-256 e85f88133ca08c21e7876e2aa468eaab7e499f19b1ba9d67e51c5651fc7cd6e3

See more details on using hashes here.

File details

Details for the file pbcluster-0.2.1-py2.py3-none-any.whl.

File metadata

  • Download URL: pbcluster-0.2.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.3

File hashes

Hashes for pbcluster-0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d83dcdc1d2087bbb58845377bfad98bb12904a9d7ab75c9e2f42529c053da5fa
MD5 a11c414bad82f35aa1b984faf28bcaec
BLAKE2b-256 aa8df861ec5d0c3432c1153bda72c5bce17cbec43dfb4280b615525d99e89207

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page