Installation Instructions 4.5

    Version as of 23:04, 17 Oct 2019

    to this version.

    Return to Version archive.

    View current version

    Full details on how to install GROMACS are provided here. For the impatient, here we give a quick and dirty installation guide as well.

    To remove a GROMACS installation, see Removing Installation.




    GROMACS relies on very few external dependencies, namely:

    • An ANSI C compiler, and possibly Fortran. GROMACS can be compiled entirely in C, which means you should be able to get it running on essentially any UNIX-style computer in the world. However, we also provide the innermost loops in Fortran to improve performance, so we strongly recommend you to use a Fortran compiler if you can - it makes a huge difference! For modern Intel and AMD processors we provide even faster assembly loops though, so for those you can skip Fortran.
    • If you want to run in parallel, you need MPI. If you are running on a supercomputer you probably already have an optimized MPI version installed - consult your documentation or ask your system administrator. See below for information about how to make use of MPI.
    • You need an FFT library to perform Fourier transforms. Gromacs-3.3 and later versions support FFTW-2.1.x, FFTW-3.x (different interface from version 2), Intel Math Kernel library version 6.0 and later, and we also have a slower built-in version of FFTPACK in case you really don't want to install a good (free) library. We currently recommend that you use FFTW since it is the most tested one, and in addition it is also free and faster than the alternatives. Pretty good deal, right? You can find more information about FFTW at FFTW version 3 has a completely new calling interface from version 2, but Gromacs supports both. Starting with Gromacs-3.3 we no longer rely on the FFTW version of parallel transforms, so you don't need to worry about MPI versions of the libraries.


    Using MPI

    Edit section

    You may notice that the above instructions for an MPI installation (so you can run in parallel) recommend only doing make mdrun and make install-mdrun. That's because in GROMACS version 3.x, only mdrun is MPI-aware. In GROMACS 4.x, some of the utility programs are also MPI-aware, but these will only be for compute-intensive utilities (e.g. that diagonalize large matrices, or calculate autocorrelations, etc.). Building and installing the other utilities with configure --enable-mpi is a waste of time, as is attempting to use any resulting MPI-linked-but-unaware utilities with mpirun.


    Test Set

    Edit section

    A test set is available for testing of a GROMACS installation.

    Getting access to GROMACS after installation
    Edit section

    In a normal Unix/Linux/Cygwin/MacOS environment you will need to know the location where GROMACS is installed, e.g.


    . In your shell configuration file (e.g.










    ) you should use a command analogous to

    source /usr/local/gromacs/bin/GMXRC

    near the end of that file.


    then magically determines the type of shell you are using and configures your







    environment variables

    so that GROMACS works as intended. Note that you will then need to re-source your shell configuration file, or open a new shell in order to have the intended effect. If you prefer, you can interactively invoke the


    command as above from your command line, and if you know you might want access to multiple versions of GROMACS in an interchangeable manner, this can be a useful approach.

    At some larger computing facilities, you should consult their documentation and/or staff for instructions on how GROMACS was installed and how you should get access to it and use it.

    Just as with everything else in the UNIX world, you should not do your daily work with GROMACS as root or superuser. It's unnecessary and highly risky. See here for more information.

    Having difficulty?
    Edit section

    If you encounter a problem with installing GROMACS, then there are a number of locations where you can find assistance. It is recommended that you follow these steps to find the solution:

    1. read the installation instructions again, taking note that you have followed each and every step correctly.
    2. search the GROMACS website and users emailing list for information on the error.
    3. search this wiki for information.
    4. search the internet using a search engine such as Google.
    5. post to the GROMACS users emailing list for assistance.
    Specialty Instructions
    Edit section
    Page last modified 20:06, 9 Oct 2009 by JLemkul?