Gromacs

Compiling QMMM

    Table of contents
    1. 1. Mopac 7
    2. 2. GAMESS-UK
    3. 3. Gaussian03

    From version 3.3 onwards, GROMACS supports QM/MM.

    To activate the QM/MM interfaces to a quantum chemistry program, configure GROMACS with the

    --with-qmmm-<QM PROGRAM NAME>
    

    To compile GROMACS, you will also need the source code for Mopac7, Gaussian0x and/or GAMESS-UK. As these codes are owned by their respective copyright holders, we cannot distribute them here. You have to obtain them yourself therefore. Here is where you can find them:

    Gaussian

    Gamess-UK

    MOPAC7

    In addition, you need the following bits of code to link mdrun to these QM packages (from http://wwwuser.gwdg.de/~ggroenh/qmmm.html)

    Mopac 7

    Compile all mopac files, except mopac.f, moldat.f and deriv.f (these are replaced by gmxmop.f):

    f77 -O2 -c *.f
    

    Then, collect the objects (*.o) into a library:

    ar rcv libmopac.a *.o
    ranlib libmopac.a
    

    If you are using Linux, simply download libmopac.a instead. Note, for SGI, download this gmxmop.f instead. I don't know why, but the way common blocks are handled seems a bit different on this architecture.

    Then, configure GROMACS with:

    LIBS=-lmopac
    LDFLAGS=-L(location of libmopac.a)
    ./configure --with-qmmm-mopac
    

    GAMESS-UK

    Add the files to the GAMESS-UK/m4 subdir, update the Makefile to match the configuration on your computer system and compile the code.

    Then, configure GROMACS with:

    LDFLAGS=-L(location of libgamess.a)
    LIBS='-lgamess -lg2c -lm'
    ./configure --with-qmmm-gamess
    

    Gaussian03

    To run GROMACS with Gaussian, a few modifications are required in links 301, 510, 701 and 9999. Because we cannot distribute source code which is part of Gaussian, we have made available a set of instructions to build these yourself, which is allowed as long as you have a legal version of the Gaussian source code. Binary distributions won't work until Gaussian has included the required modifications.

    Gaussian provides a convenient way of building and using modified links. You should make a new subdirectory, say modlinks, in which you make directories for each of the links you want to modify. Then, extract from the Gaussian source tree the functions that need modification into these directories and build an alternative executable by linking you objects with the original Gaussian objects. With

    %subst lxxx /home/user/modlinks/lxxx
    

    in the input file, Gaussian will use your modified lxxx.exe instead of the original.

    GROMACS requires gradients on the point charges, and thus modifications are required to l701.exe. Also, to make these gradients available for GROMACS, l9999, which controls the output of Gaussian are essential. In addition, a small modification should be made to l301, to exclude point charge - point charge interactions. Finally, link 510, which performs the MCSCF, has to be altered if you are interested in excited state dynamics.

    After creating a subdirectory for these links in the modlinks directory, i.e.:

    ~/modlinks/l301
    ~/modlinks/l510
    ~/modlinks/l701
    ~/modlinks/l9999
    

    the modified executables have to be built. Therefore, a Makefile is required in each lxxx subdirectory. See, for example, the l301.make Makefile.

    With the Gaussian utility gau-fsplit, you can extract the subroutines that have to be changed, e.g.:

    gau-fsplit -e d1e $GAUSS_DIR/l701.F
    

    To find the Fortran source file that contains the function you need, you can use the grep command:

    grep -i d1e $GAUSS_DIR/*.F
    

    An overview of which functions have to be modified and how can be be found here: roadmap.pdf. After the modified links have been created, and GROMACS has been configured with --with-qmmm-gaussian, the $DEVEL_DIR environment has to be set to the path of the modlinks subdirectory. GROMACS is now ready for doing QM/MM with Gaussian.

    Page last modified 18:12, 7 Jul 2011 by JLemkul?