Gromacs

Quick and Dirty Installation

    Table of contents
    No headers

    Described here is a "fast-track" (and very outdated) method of installing GROMACS.  Instead of using this page, it is highly recommended that you refer to the detailed installation instructions.  The following is designed for a modern quad-core workstation.  Thus, some modification of these commands may be necessary to suit your system.

    Download the following packages

    The last package (GSL) is only necessary for certain kinetics analysis and is optional when compiling GROMACS. If you don't want to install it you have to take away the --with-gsl flag when configuring GROMACS).

    If you want to have grace the plotting program you may also need these:

    Unpack all of these:

    bunzip2 -c openmpi-1.2.8.tar.bz2 | tar xvf -
    tar xzvf fftw-3.1.3.tar.gz
    tar xzvf gromacs-4.0.5.tar.gz
    tar xzvf gsl-1.11.tar.gz
    tar xzvf openmotif-2.3.1-1.tar.gz
    tar xzvf grace-5.1.22.tar.gz
    

    Decide where you want to install the packages, e.g. in your home directory, in this case you don't need root permission. If you have more than one processor you can speed up compilation using the make -j XX flag. Here I've written 4 for the number of CPUs. Here are two versions of all the commands. For csh/tcsh users:

    setenv SOFT $HOME/software
    setenv CPPFLAGS "-I$SOFT/include"
    setenv LDFLAGS "-L$SOFT/lib"
    setenv NCPU 4
    setenv PATH "$PATH":$SOFT/bin
    cd openmpi-1.2.8; ./configure --prefix=$SOFT; make -j $NCPU; make install
    cd ../fftw-3.1.3; ./configure --prefix=$SOFT --enable-float; make -j $NCPU; make install
    cd ../gsl-1.11; ./configure --prefix=$SOFT; make -j $NCPU; make install
    cd ../gromacs-4.0.5; ./configure --prefix=$SOFT --with-gsl; make -j $NCPU; make install
    make distclean; ./configure --prefix=$SOFT --program-suffix=_mpi --enable-mpi --with-gsl; make mdrun -j $NCPU; make install-mdrun
    cd ../openmotif-2.3.1; ./configure --prefix=$SOFT; make -j $NCPU; make install
    cd ../grace-5.1.22; ./configure --prefix=$SOFT; make -j $NCPU; make install; ln -s $SOFT/grace/bin/xmgrace $SOFT/bin/xmgrace
    source $SOFT/bin/GMXRC
    

    If you are using sh or bash use this instead

    export SOFT=$HOME/software
    export CPPFLAGS="-I$SOFT/include"
    export LDFLAGS="-L$SOFT/lib"
    export NCPU=4
    export PATH="$PATH":$SOFT/bin
    cd openmpi-1.2.8; ./configure --prefix=$SOFT && make -j $NCPU && make install
    cd ../fftw-3.1.3; ./configure --prefix=$SOFT --enable-float && make -j $NCPU && make install
    cd ../gsl-1.11; ./configure --prefix=$SOFT && make -j $NCPU && make install
    cd ../gromacs-4.0.5; ./configure --prefix=$SOFT --with-gsl && make -j $NCPU && make install
    make distclean
    ./configure --prefix=$SOFT --program-suffix=_mpi --enable-mpi --with-gsl && make mdrun -j $NCPU && make install-mdrun
    cd ../openmotif-2.3.1; ./configure --prefix=$SOFT && make -j $NCPU && make install
    cd ../grace-5.1.22; ./configure --prefix=$SOFT && make -j $NCPU && make install && ln -s $SOFT/grace/bin/xmgrace $SOFT/bin/xmgrace
    . $SOFT/bin/GMXRC
    

    This should work on Mac and Linux boxes, and the whole procedure takes roughly 30 minutes on a modern laptop. If OpenMotif complains about something during installation, please ignore it. As usual, you are on your own when you run Windows.

    Please test your installation with the happy command:

    luck
    

    Done.

    The test set for verifying your GROMACS intallation is found here.

    Page last modified 04:37, 31 Jan 2011 by JLemkul?