Installation two GROMACS versions in the same computer

GROMACS version: 2018 and 2020
GROMACS modification: No
I use this manual to install GROMACS


I want to have on my computer both versions 2018.4 and 2020.2. I had Gromacs 2018.4 on my computer and then I installed 2020.2. Now when I use gmx it shows gromacs 2020.2, so my new GROMACS replace my old GROMACS, but I want them both. What I should do to have both of them. I try to create a virtual environment and install a newer version of GROMACS in a virtual environment, but even when I deactivate my virtual environment newer version of GROMACS replaces my old version. How to switch to an older version?

Thanks in advice.

If you want multiple versions, each has to be installed in a separate location (if you leave CMAKE_INSTALL_PREFIX as its default value when compiling, you’ll just over-write the existing version, so you need to specify this for at least one version). Then source the appropriate GMXRC each time you want to use the different version.

1 Like

Thank you so much @jalemkul I’ve used GROMACS for two years, but still, I need to learn so many new things. You help me a lot and help a lot of other people who use GROMACS by giving a lot of answers. I also started learning GROMACS two years ago with your tutorials, so thanks for all.