DOI PyPI Anaconda-Server Badge Binder ReadTheDocs Codecov

The freud library provides users the ability to analyze molecular dynamics and Monte Carlo simulation trajectories for advanced metrics such as the radial distribution function and various order parameters. Its modules work with and return NumPy arrays, and are able to process both 2D and 3D data. Features in freud include computing the radial distribution function, local density, hexagonal order parameter and local bond order parameters, potentials of mean force and torque (PMFTs), Voronoi tessellations, and more.

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

freud Community

If you have a question, please post to the freud-users mailing list. Please report issues and suggest feature enhancements via the Bitbucket issues page.


The documentation is available online at These pages include an installation guide, examples demonstrating many of freud's core modules, API reference, and development guides for adding new features.


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.

Installing freud

Install via conda

conda install -c conda-forge freud

Install via pip

pip install freud-analysis

Compiling freud

Please refer to the installation documentation for help compiling freud from source.

Simple example script

The freud library is called using Python scripts.

Here is a simple example.

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