How can I install Gromacs in a desired path?

Dear Gromacs Users,

I have Gromacs version 2022 on my computer. I want to install the 2024 version along with the 2022 version. How can I install it on a different path? The default path is /usr/local/gromacs/bin/GMXRC but I want to have the newer version in this path: /usr/local/gromacs-2024/bin/GMXRC.

Thanks

Hi!

Please see the install guide:

GROMACS is installed in the directory to which CMAKE_INSTALL_PREFIX points. It may not be the source directory or the build directory. You require write permissions to this directory. Thus, without super-user privileges, CMAKE_INSTALL_PREFIX will have to be within your home directory. Even if you do have super-user privileges, you should use them only for the installation phase, and never for configuring, building, or running GROMACS!

So, in your case, you should add -DCMAKE_INSTALL_PREFIX=/usr/local/gromacs-2024/ flag when calling cmake.

Dear!

Thanks a lot for your help.