Skip to main content

Post-processing tools for particle simulations

Project description

Postprocessing

pypi version license Binder pipeline coverage report

Post-processing tools to compute static and dynamic correlation functions from simulations of interacting particles, such as molecular dynamics or Monte Carlo simulations.

Quick start

We can now compute correlation functions from trajectories produced by particle simulation codes. Any trajectory format recognized by atooms can be processed, for instance most "xyz" files should work fine. If you use a custom trajectory format, it is easy to add it.

As an example, we compute the structure factor S(k) for the trajectory file trajectory.xyz contained in the data/ folder.

From the command line

https://www-dft.ts.infn.it/~coslovich/anim.gif

pp.py --norigins 0.2 msd data/trajectory.xyz

In the example above, we used 20% of the available time frames to compute the averages using the --norigins flag. Without it, atooms-pp applies an heuristics to determine the number of time frames required to achieve a reasonable data quality. The results of the calculation are stored in the file data/trajectory.xyz.pp.sk.

From Python

The same calculation can be done from Python:

from atooms.trajectory import Trajectory
import atooms.postprocessing as pp

with Trajectory('data/trajectory.xyz') as t:
     p = pp.StructureFactor(t)
     p.do()

Features

Available correlation and distribution functions

  • Real space
    • radial distribution function
    • mean square displacement
    • velocity auto-correlation function
    • self overlap functions
    • collective overlap functions
    • dynamic susceptibility of the self overlap function
    • non-Gaussian parameter
    • bond-angle distribution
  • Fourier space
    • structure factor
    • spectral density
    • self intermediate scattering functions
    • collective intermediate scattering functions
    • four-point dynamic susceptibility

Documentation

Check out the tutorial for more examples and the public API for full details.

The tutorial is also available as

Requirements

  • numpy
  • atooms
  • [optional] argh (only needed when using pp.py)
  • [optional] tqdm (enable progress bars)
  • [optional] argcomplete (enable tab-completion for pp.py)
  • [optional] fortran compiler for more efficient execution

Installation

Install with pip

pip install atooms-pp

If you cannot install the package system-wide, you can still install it in the user space

pip install --user atooms-pp

or cloning the project repo

git clone https://framagit.org/atooms/postprocessing.git
cd postprocessing
pip install --user .

The commands above will install pp.py under ~/.local/bin. Make sure this folder is in your $PATH.

Contributing

Contributions to the project are welcome. If you wish to contribute, check out these guidelines.

Authors

Daniele Coslovich: https://www.units.it/daniele.coslovich/

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

atooms-pp-3.0.1.tar.gz (46.0 kB view hashes)

Uploaded Source

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