Skip to main content

Post-processing tools for particle simulations

Project description

Post processing

Python post processing tools to compute static and dynamic correlation functions from particle simulations

  • Real space: radial distribution function, mean square displacement, time-dependent overlap functions, non-Gaussian parameter
  • Fourier space: structure factor, intermediate scattering functions, four-point dynamic susceptibility

This package relies on atooms <https://gitlab.info-ufr.univ-montp2.fr/atooms/postprocessing.git>__ to read trajectory files.

Quick start

Installation is easy (see Installation <#installation>__ for more details)

::

pip install atooms-pp

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.

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

.. figure:: https://gitlab.info-ufr.univ-montp2.fr/atooms/postprocessing/raw/develop/docs/anim.gif :alt: https://www.coulomb.univ-montp2.fr/perso/daniele.coslovich/anim.gif

https://www.coulomb.univ-montp2.fr/perso/daniele.coslovich/anim.gif

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 data/trajectory.xyz.pp.sk. If the system is a mixture of different types of particles, say A and B, the program will create additional files for partial correlations, named trajectory.xyz.pp.sk.A-A, trajectory.xyz.pp.sk.B-B and trajectory.xyz.pp.sk.A-B.

The same calculation can be done from python:

.. code:: python

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

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

Checkout the tutorial <https://www.coulomb.univ-montp2.fr/perso/daniele.coslovich/pp_notebook/>__ and notebook <https://gitlab.info-ufr.univ-montp2.fr/atooms/postprocessing/raw/develop/docs/tutorial.ipynb>__ for more details.

Requirements

  • numpy <https://pypi.org/project/numpy/>__
  • atooms <https://gitlab.info-ufr.univ-montp2.fr/atooms/postprocessing.git>__
  • [optional] argh <https://pypi.org/project/argh/>__ (only needed when using pp.py)
  • [optional] tqdm <https://pypi.org/project/tqdm/>__ (enable progress bars)
  • [optional] argcomplete <https://pypi.org/project/argcomplete/>__ (enable tab-completion for pp.py)

Installation

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

::

pip install --user atooms-pp

or cloning the project repo

::

git clone https://gitlab.info-ufr.univ-montp2.fr/atooms/postprocessing.git cd postprocessing make user

The commands above will install pp.py under ~/.local/bin. Make sure this folder is in your $PATH. To install system-wide, sudo make install.

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-2.1.0.tar.gz (36.5 kB view details)

Uploaded Source

File details

Details for the file atooms-pp-2.1.0.tar.gz.

File metadata

  • Download URL: atooms-pp-2.1.0.tar.gz
  • Upload date:
  • Size: 36.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.5.2

File hashes

Hashes for atooms-pp-2.1.0.tar.gz
Algorithm Hash digest
SHA256 7190a7edbe9dec4fef6145c6d613079697b4a46a8843c37d0b17890b56cf971a
MD5 978b43e0bff23f0e006f087da28d95c0
BLAKE2b-256 dd76374770ecbc3f3ae3075321de788734bec966cc9572f43c1bcc73a45b3a16

See more details on using hashes here.

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