Opening Molecular Dynamics to Any Lab with a Browser: Benchmarking Source-Compiled GROMACS on Google Colab
Published in Chemistry, Physics, and Mathematics
Static protein structures show where atoms settle at equilibrium, yet drug binding, ion permeation, and allosteric signaling happen while a molecule moves.
Atomistic molecular dynamics follows those motions across tens of thousands to millions of atoms, at a computing cost that has long separated laboratories with local clusters from everyone else.
Cloud notebooks narrowed part of that gap by attaching modern GPUs and cloud storage directly to a browser tab. Having a GPU attached to a session and actually putting force calculations onto it turn out to be different things, because standard Linux software packages are built for broad processor compatibility and leave GPU acceleration turned off.
Running GROMACS on Google Colab makes that trap expensive. Installing the default Ubuntu package with a single command deploys a processor-only build. Launching it on a paid A100 GPU session leaves the accelerator idle while the session still bills at full GPU rates.
Twenty-six times faster from a source build
In our study in Journal of Computer-Aided Molecular Design, we compared that default package against GROMACS compiled from source across Google Colab's GPU, TPU, and CPU runtimes, testing a membrane-embedded peptide alongside standard benchmark systems reaching 12.5 million atoms.
Compiling GROMACS with GPU support inside the notebook took up to 26 minutes and unlocked the attached hardware. Throughput on the membrane system jumped 26-fold to roughly 350 ns/day on the A100 and L4 GPUs and 16-fold to 155 ns/day on the T4, finishing 100 nanoseconds in 6.8 hours on A100 or L4.
When a midrange L4 matches an A100
Reading the wall-time breakdown inside the GROMACS log files explained three results that hardware spec sheets alone would miss. On our membrane system, the midrange L4 matched the flagship A100 at 41% of the cost. Colab pairs both GPUs with just 6 processor cores, so the processor spent most of every step computing bonded forces while the GPU finished early and waited.
Only when we scaled up to 12.5 million atoms did the bottleneck shift onto the GPU, allowing the high-bandwidth A100 to pull 2.4 times ahead of the L4 despite the L4 advertising higher peak single-precision compute.
Two subtler traps surfaced in the same logs. Pairing a single GPU with external MPI software instead of GROMACS's built-in threading cut speed by more than four-fifths because default process binding crowded every thread onto a single core. Meanwhile, GROMACS cannot use Tensor Processing Units at all, yet Colab's TPU runtime comes attached to a 96-thread server processor that reached 110 ns/day as a pure CPU node.
Keeping cloud workflows alive as platforms change
On shared cloud hardware, assigned processors and throughput vary between sessions, cached builds break when Colab attaches an older processor generation, and 24-hour session caps make Colab a practical partner to dedicated clusters rather than a replacement for multi-microsecond campaigns.
Cloud software images shift underneath published scripts too. When Colab recently updated its default CUDA toolkit, the GROMACS version from our benchmark runs stopped linking out of the box. Our maintained notebook in the repository therefore builds a current GROMACS release alongside a fast prebuilt conda option, writing regular checkpoints to Google Drive so interrupted runs resume automatically where they stopped.
Opening biomolecular simulation to any lab with a browser!
When the two of us began running membrane transporter simulations as medical students, browser-based cloud runtimes were what let us test structural ideas without an on-premises cluster. All notebooks, membrane input files, benchmark logs, and restart scripts from this study are openly available on GitHub so any lab or classroom can test its own system before spending compute credits on an idle GPU.
Paper: Journal of Computer-Aided Molecular Design (Springer Nature): https://doi.org/10.1007/s10822-026-00988-y
(free full-text SharedIt access: https://rdcu.be/ptoSzBNEzxha)
Code, Maintained GROMACS v2026.3 Notebook & Benchmark Logs (GitHub): https://github.com/karagol-taner/Molecular-Dynamics-on-AWS-and-Cloud-Computing
Cloud MD & Bioinformatics Software Catalog: https://www.karagolresearch.com/tools