The tricky part here is to know what is the correct version that you need to install in order to have a proper installation of HOOMD, that's the whole issue. I'm assuming that you can use a terminal in the Colab Environment.
-
First you have to mount your Google account, this is done in the notebook via
from google.colab import drive
drive.mount('/content/drive')
-
Create a directory to save the miniconda installer
$cd drive/MyDrive/
$mkdir src/ && cd src/
-
Downaload the miniconda installer
$wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
-
Install miniconda (in silent mode)
$bash Miniconda3-latest-Linux-x86_64.sh -b -p $HOME/miniconda
-
Source the .bashrc
$eval "$(/root/miniconda/bin/conda shell.bash hook)"
-
Currently I'm using the version 2.9.6, so, in order to have that version installed you need to create a new conda Environment to host that version, and in order to do that I suggest to download the hoomd_env.txt and run the following command
conda create --name hoomd --file hoomd_env.txt
-
That will create a functional conda env with GPU support for HOOMD, the reason for that specific choice of hoomd version is loosely described here. And with this in mind we just need to activa our new conda env
$conda activate hoomd