build_status Coveralls docs pypi_version black doi

diffsims is an open-source python library for simulating diffraction.

If simulations performed using diffsims form a part of published work please cite the DOI at the top of this page.

diffsims is released under the GPL v3 license.


diffsims requires python 3 and conda - we suggest using the python 3 version of Miniconda and creating a new environment for diffsims using the following commands in the anaconda prompt:

$ conda create -n diffsims
$ conda activate diffsims

The recommended way to install diffsims is then from conda-forge using:

$ conda install -c conda-forge diffsims

Note that diffsims is also available via pip:

$ pip install diffsims


diffsims is a community maintained project. We welcome contributions in the form of bug reports, feature requests, code, documentation, and more. These guidelines describe how best to contribute to.


diffsims can be installed from Anaconda, the Python Package Index (pip), or from source, and supports Python >= 3.6.

We recommend you install it in a conda environment with the Miniconda distribution:

$ conda create --name diffsims-env
$ conda activate diffsims-env

If you prefer a graphical interface to manage packages and environments, install the Anaconda distribution instead.


Anaconda provides the easiest installation. In the Anaconda Prompt, terminal or Command Prompt, install with:

$ conda install diffsims --channel conda-forge

If you at a later time need to update the package:

$ conda update diffsims


To install with pip, run the following in the Anaconda Prompt, terminal or Command Prompt:

$ pip install diffsims

If you at a later time need to update the package:

$ pip install --upgrade diffsims

Install from source

To install diffsims from source, clone the repository from GitHub:

$ git clone https://github.com/pyxem/diffsims.git
$ cd diffsims
$ pip install --editable .


Changes with each release can be viewed on the GitHub release page.