The `freud`

library enables advanced analysis of particle simulations, particularly those utilizing periodic boundary conditions.
This collection of Jupyter notebooks provides examples of how the different modules of `freud`

can be used for different types of analysis.
These notebooks may be launched interactively on Binder or downloaded and run on your own system.

Run locally:

```
git clone https://github.com/glotzerlab/freud-examples.git
cd freud-examples
jupyter notebook # or "jupyter lab"
```

See Notebook Basics and Running Code for tutorials on using Jupyter itself.

The recommended method for installing `freud`

is using conda (`conda install -c conda-forge freud`

) or pip (`pip install freud-analysis`

).
Refer to the Installation Guide for instructions to install from source.

Some of these notebooks also have a number of additional dependencies. In particular, all of these notebooks involve making plots with either Matplotlib or Bokeh, so you will also need to install those to run these notebooks locally. Note that because Bokeh uses Javascript, if you are running these notebooks using JupyterLab you will need to execute an additional command for installation:

```
jupyter labextension install jupyterlab_bokeh
```

If you have any issues with installing or seek more information about `freud`

, please refer to the `freud`

documentation.

There are a few critical concepts, algorithms, and data structures that are central to all of `freud`

.
In order to familiarize yourself with these before delving too deep into the workings of specific `freud`

modules, we recommend looking through certain notebooks first.
**In this cell and the next one, each freud module is linked to the documentation for more information, while the links in the list point to Jupyter notebooks demonstrating the classes in those modules.**

`freud.box`

: The box module defines the Box object used throughout`freud`

to represent periodic simulation boxes. Since all analysis methods involve some representation of particles in a box of some sort, it is useful to understand boxes and periodicity before attempting to use the rest of`freud`

.`freud.locality`

: The locality module enables`NeighborQuery`

and`NeighborList`

calculations, which provide information on which particles are near to other particles in a system. These are described in the Reference documentation. Additional classes are demonstrated below.- PeriodicBuffer: Replicate periodic systems for long-range analyses.
- Voronoi: Compute Voronoi diagrams.

These notebooks go into greater detail, showing the full functionality of each module in `freud`

.

`freud.cluster`

- Cluster: Cluster neighboring points.

`freud.density`

- CorrelationFunction: Long Range Orientational Order: Calculation complex-valued correlation functions.
- Gaussian Density: Interpolate particle densities onto a regular grid.
- Local Density: Estimate system density near specific points.
- RDF: Compute the radial distribution function $g(r)$.

`freud.diffraction`

- DiffractionPattern: Compute a 2D image of the static structure factor $S(\vec{k})$.
- StaticStructureFactor: Compute the 1D static structure factor $S(k)$.

`freud.environment`

- AngularSeparation: Find relative angles of nearby particles.
- BondOrder: Computing Bond Order Diagrams: Compute bond orientational order diagrams.
- LocalDescriptors: Calculate spherical harmonics for nearest-neighbors.
- EnvironmentCluster: Clustering Particles' Local Environments: Cluster various particle motifs.

`freud.interface`

- Interface: Find interfaces between particles.

`freud.order`

- Hexatic: Calculate the hexatic (or $k$-atic) order parameter $\psi_k$.
- Nematic Order Parameter: Calculate the nematic order parameter.
- Steinhardt Order Parameters: Calculate the $q_l$ and $w_l$ Steinhardt order parameters (and some variants).

`freud.pmft`

- PMFT in 2D: Compute the potential of mean force for 2D systems.
- PMFT in 3D: Compute the potential of mean force for 3D systems.