Skip to content

SSAGESLabs/hoomd-dlext

Repository files navigation

HOOMD-dlext

Provides access to HOOMD-blue simulation data on CPU or GPU via DLPack This project is primarily designed to enable access to HOOMD-blue for the PySAGES project. HOOMD-blue versions 2, 3, and 4 are supported (support HOOMD-blue v4 has not been thoroughly tested).

Installation

The latest version of hoomd-dlext can be installed via conda:

conda install -c conda-forge hoomd-dlext

Building from source

The following instructions are similar for all HOOMD-blue versions.

For HOOMD-blue v2, follow the Plugins and Components Guide from the HOOMD-blue reference documentation site; and check HOOMD-blue's install requirements. At the moment we only support installations on Linux and Mac. For GPU support, the base HOOMD-blue installation must be built for CUDA GPUs.

Assuming HOOMD-blue is already installed on the system, the plugin can be installed as an external component

First, we obtain a copy of this plugin, for example via git clone.

git clone https://github.com/SSAGESLabs/hoomd-dlext.git
cd hoomd-dlext

We then configure the installation with CMake. It is important, that the python version detected by CMake can successfully import hoomd.

mkdir build && cd build
cmake -S . -B build

And finally we compile the plugin on the target machine

cmake --build build -j8

and install it into the HOOMD-blue installation path (the latter must be writeable for this to work).

cmake --build build -j8 --target install

For a quick and simple test run:

cd ~
python -c "import hoomd; import hoomd.dlext"