Installation¶
spatula binaries are available on conda-forge and PyPI. You can also compile spatula from source.
Binaries¶
conda-forge package¶
spatula is available on conda-forge for the linux-64, osx-64, osx-arm64 and win-64 architectures. Execute one of the following commands to install spatula:
pixi add spatula
micromamba install spatula
mamba install spatula
PyPI¶
Use uv or pip to install spatula binaries from PyPI into a virtual environment:
uv pip install spatula-analysis
python3 -m pip install spatula-analysis
Compile from source¶
The following are required for building and installing spatula from source:
mamba install -c conda-forge cxx-compiler numpy scipy freud nanobind scikit-build-core cmake
All requirements other than the compiler can also be installed via the Python Package Index
uv pip install numpy scipy freud-analysis nanobind scikit-build-core cmake
The commands below clone and build spatula:
git clone https://github.com/glotzerlab/spatula.git
cd spatula
python -m pip install .
For faster incremental rebuilds during development, run the following command after source changes to reuse the existing build directory:
uv pip install --no-deps --no-build-isolation --force-reinstall -C build-dir=$PWD/build .
When developing code that makes use of the project’s ISPC extensions, or when building from source to maximize performance, users must also install the requisite compiler. This is available from most package managers, or via conda-forge:
mamba install -c conda-forge ispc
brew install ispc
sudo apt-get install ispc
Building Documentation¶
The documentation can also be built locally. The required packages are
furo
sphinx
sphinxcontrib-bibtex
sphinxcontrib-katex
ipython
nbsphinx
sphinx-inline-tabs
These can be installed with python -m pip install sphinx furo sphinxcontrib-bibtex sphinxcontrib-katex ipython nbsphinx sphinx-inline-tabs.
Navigate to docs folder cd docs.
To build documentation in html form run make html.
To view the built documentation open the index.html file in ./docs/build with your preferred browser.