Postprocessing
A Python package to compute static and dynamic correlation functions from simulations of interacting particles, such as molecular dynamics or Monte Carlo simulations. Based on atooms.
Quick start
Postprocessing works on trajectories. 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.
From Python
As an example, we compute the structure factor S(k) from the file data/trajectory.xyz.
from atooms.trajectory import Trajectory
import atooms.postprocessing as pp
with Trajectory('data/trajectory.xyz') as t:
cf = pp.StructureFactor(t)
cf.compute()
cf.plot()
The wave-vectors and values of the correlation function are accessible as cf.grid and cf.values, respectively. If you also want to write the results of the calculation in a file, just use do() instead of compute(). You will find the results in data/trajectory.xyz.pp.sk. Check out the documentation section below for more information.
From the command line
The same calculation can be done from the command line
pp.py sk data/trajectory.xyz
Features
Available correlation and distribution functions
- Real space
- radial distribution function
- pair distribution function
- mean square displacement
- velocity auto-correlation function
- self and collective overlap functions
- four-point dynamic susceptibility of the self overlap
- non-Gaussian parameter
- bond-angle distribution
- self and distinct van Hove correlation function
- Fourier space
- Molecular correlations
- rotational correlation functions
- orientational angle distribution function
- Most real and Fourier space correlation functions admit a center-of-mass variant suitable for the molecules' centers of mass.
Most time-dependent single-particle correlation functions admit a cage-relative variant (through the cage_relative argument), useful to remove so-called Mermin-Wagner fluctuations in two-dimensional systems.
Documentation
Check out the tutorial for more examples and the public API for full details.
Org-mode and jupyter notebooks are available under docs/. You can run the tutorial interactively on Binder.
Installation
Install with pip
pip install atooms-pp
Or from source
git clone https://framagit.org/atooms/postprocessing.git
cd postprocessing
pip install .
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/
Thanks to Romain Simon and Giacomo Tonet for their contributions.
Release files for atooms-pp 4.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| atooms_pp-4.4.0.tar.gz | 91.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| atooms_pp-4.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 185.7 kB
Release files / atooms_pp-4.4.0.tar.gz
| Download URL | atooms_pp-4.4.0.tar.gz |
|---|---|
| Size | 91.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0b55631ee0517ab45b7a9b7a8b5905f6b912d340cb3b85802e82cf5b7edad109
|
|
BLAKE2b-256 checksum How to use checksums |
46b10f299a64fd968813a84a8ca80287cd9a623a01a8e9d57700f84bdd080fa8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Release files / atooms_pp-4.4.0-py3-none-any.whl
| Download URL | atooms_pp-4.4.0-py3-none-any.whl |
|---|---|
| Size | 93.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aa9ffec3dd6f676c067f6a9832e9a14779fb3e7a6b0a5ef082a7a78267976918
|
|
BLAKE2b-256 checksum How to use checksums |
bad6e57156ff40a749398b840a7f386bbe740aabcf22ad7d08425570533ed7dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|