How to Install GROMACS 2024.3 on Linux, and Windows

GROMACS is a widely used molecular dynamics simulation software, vital for research in computational chemistry and biology. This guide provides step-by-step instructions to install the latest GROMACS version (2024.3) on different operating systems. For users facing installation challenges, we also introduce Singularity, a containerization alternative.
Installation on Linux:
Install Dependencies:
sudo apt update sudo apt install cmake gcc g++ build-essential libfftw3-dev |
Compile and Install:
Activate GROMACS:
Add the following to your ~/.bashrc by running below command:
| source /usr/local/gromacs/bin/GMXRC |
Verify installation through below command:
| gmx --version |
If installation issues persist, consider using Singularity containerization technology as a fallback (see below).
Installation on Windows using WSL
Set Up WSL
The easiest way to install WSL is through the Microsoft Store:
- Open Microsoft Store.
- Search for Ubuntu.
- Install your preferred version (e.g., Ubuntu 22.04.5 LTS).
Update and upgrade Ubuntu:
| sudo apt update && sudo apt upgrade -y |
Install GROMACS in WSL: Follow the same steps as in the Linux installation above.
Run GROMACS: Launch GROMACS from the WSL terminal like you would on Linux.
Why WSL?
Installing WSL makes it easy to run Linux applications without setting up a dual boot or virtual machine. It's an ideal solution for Windows users exploring computational research tools.
Using Singularity as a Backup Plan
If installing GROMACS directly is not feasible, you can use Singularity to run prebuilt containers. ScientiFlow maintains a GROMACS 2024.3 container for simplified usage.
Install Singularity
To install Singularity directly on your Linux environment or WSL enabled Windows, you might refer to official documentation of Singularity for the installation steps.
If you are encountering error or finding it difficult to install it from the official website, you can download the singularity_install.sh script from our Github:
Make it executable and run it with:
Pull the GROMACS container:
| singularity pull gromacs.sif docker://scientiflow/gromacs:2024.3 |
Execute commands within the container:
| singularity exec gromacs.sif gmx --version |
