Skip to main content

Powerful, efficient trajectory analysis in scientific Python.

Project description


DOI PyPI conda-forge ReadTheDocs Binder Codecov GitHub Stars

The freud Python library provides a simple, flexible, powerful set of tools for analyzing trajectories obtained from molecular dynamics or Monte Carlo simulations. High performance, parallelized C++ is used to compute standard tools such as radial distribution functions, correlation functions, and clusters, as well as original analysis methods including potentials of mean force and torque (PMFTs) and local environment matching. The freud library uses NumPy arrays for input and output, enabling integration with the scientific Python ecosystem for many typical materials science workflows.

When using freud to process data for publication, please use this citation.



Install via conda:

conda install -c conda-forge freud

Or via pip:

pip install freud-analysis

freud is also available via containers for Docker or Singularity.

Please refer to the Installation Guide to compile freud from source.


The freud library is called using Python scripts. Many core features are demonstrated in the freud documentation. Additional example Jupyter notebooks can be found in the freud examples repository. These notebooks may be launched interactively on Binder or downloaded and run on your own system. Below is a script that computes the radial distribution function.

import freud

# Create a freud compute object (rdf is the canonical example)
rdf = freud.density.RDF(rmax=5, dr=0.1)

# Load in your data (freud does not provide a data reader)
box_data = np.load("path/to/box_data.npy")
pos_data = np.load("path/to/pos_data.npy")

# Create freud box
box =[0]["Lx"], Ly=box_data[0]["Ly"], is2D=True)

# Compute RDF
rdf.compute(box, pos_data[0], pos_data[0])
# Get bin centers, RDF data
r = rdf.R
y = rdf.RDF

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for freud-analysis, version 1.2.1
Filename, size & hash File type Python version Upload date
freud_analysis-1.2.1-cp27-cp27m-macosx_10_12_x86_64.whl (2.2 MB) View hashes Wheel cp27
freud_analysis-1.2.1-cp27-cp27m-manylinux1_x86_64.whl (15.5 MB) View hashes Wheel cp27
freud_analysis-1.2.1-cp27-cp27mu-manylinux1_x86_64.whl (15.5 MB) View hashes Wheel cp27
freud_analysis-1.2.1-cp34-cp34m-manylinux1_x86_64.whl (15.8 MB) View hashes Wheel cp34
freud_analysis-1.2.1-cp35-cp35m-manylinux1_x86_64.whl (15.9 MB) View hashes Wheel cp35
freud_analysis-1.2.1-cp36-cp36m-manylinux1_x86_64.whl (16.0 MB) View hashes Wheel cp36
freud_analysis-1.2.1-cp37-cp37m-manylinux1_x86_64.whl (16.1 MB) View hashes Wheel cp37
freud-analysis-1.2.1.tar.gz (4.7 MB) View hashes Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page