Skip to content

Installation

nanofoams needs Python 3.10 or newer. The only required dependencies are NumPy and SciPy.

$ pip install nanofoams

The development version can be installed straight from GitHub:

$ pip install "git+https://github.com/nicolasvazquez95/nanofoams"

Optional extras

extra installs for
analysis scikit-image measuring surface area with marching cubes (nanofoams.measure)
gpu cupy-cuda12x the cupy backend on NVIDIA GPUs (CUDA 12)
test pytest, scikit-image, ase running the test-suite
docs mkdocs-material, mkdocstrings building this documentation
legacy tqdm, loky re-running the original thesis scripts in legacy/ (tests marked legacy, regenerating the fixtures)
dev test + legacy + ruff + pre-commit development
$ pip install "nanofoams[analysis]"

For a CUDA version other than 12, install the matching CuPy wheel (cupy-cuda11x, ...) instead of the gpu extra. If no CUDA toolkit is installed on the machine, also install the toolkit wheels; see GPU.

Without the legacy extra the tests that re-run the thesis scripts are skipped; nothing else needs it.

From source

$ git clone https://github.com/nicolasvazquez95/nanofoams
$ cd nanofoams
$ pip install -e ".[dev]"
$ pytest