GROMACS on Colab

GROMACS version: 2021.4
GROMACS modification: Yes/No
Here post your question : I would like to know how to run MD simulation using GROMACS on Google Colab? For how many timesteps or time can i run the simulation on Colab? Kindly help me with the steps to do so. Thank you.

I’ve managed to install in and run the latest Gromacs version in Google Drive. Although didn’t figure out how to make gmx command work. So far all source commands appear ineffective Maybe it’s something with python api, maybe with source implementation in VM or Google Drive-related issues. So I just put all required files into /bin folder of Gromacs installation and execute ./gmx mdrun etc. lol

Free colab runtime with GPU rarely exceeds 2 hours daily, sometimes it would stop with no checkpoints saved, sometimes it allows to save progress, sometimes it serially copies .cpt files into root folder hahaha.

Here is the minimal requied code to start from:

from google.colab import drive
drive.mount(‘/content/drive’)
pip install cmake --upgrade
!wget https://ftp.gromacs.org/gromacs/gromacs-2024.tar.gz
!tar xfz gromacs-2024.tar.gz
cd /content/gromacs-2024
mkdir build
cd /content/gromacs-2024/build
!cmake … -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_GPU=CUDA -DCMAKE_INSTALL_PREFIX=/content/drive/MyDrive/Gromacs
! make -j 2
! make check
! sudo make install
! chmod 777 /content/drive/MyDrive/Gromacs/bin/gmx
cd /content/drive/MyDrive/Gromacs/bin
! ./gmx…

Maybe it could be elaborated further, since existing recipes from web seem not quite relevant for today.