Bug #1899

Unable to compile QMMM (MOPAC)

Added by Bill Shipman over 4 years ago. Updated over 4 years ago.

build system
Target version:
Affected version - extra info:
Affected version:


I'm not really sure if I am providing improper argument to cmake / make. I'm using the instructions for Gromacs 4.5 which are geared towards the configure tool rather than cmake. I'm roughly composing the arguments based on the prior instructions from 4.5 along with the advanced options for 5.0. Am I using the wrong documentation or is there something I'm missing? I'm - specifically I'm trying to use the instructions as follows roughly translating them to the -D[...]=... syntax of

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:

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

This proceeds through cmake without any issue but fails in make with the error that follows.

This proceeds through cmake but says the argument LDFLAGS was disregarded.


All attempts to run any variation of the three cmake commands noted above produce this error:

Linking CXX executable ../../bin/template
../../lib/ undefined reference to `domop_'
../../lib/ undefined reference to `domldt_'
collect2: error: ld returned 1 exit status
share/template/CMakeFiles/template.dir/build.make:88: recipe for target 'bin/template' failed
make[2]: *** [bin/template] Error 1
CMakeFiles/Makefile2:1343: recipe for target 'share/template/CMakeFiles/template.dir/all' failed
make[1]: *** [share/template/CMakeFiles/template.dir/all] Error 2
Makefile:146: recipe for target 'all' failed
make: *** [all] Error 2

Related issues

Related to GROMACS - Task #2706: Rework classic QM/MM interfaceAccepted


#1 Updated by Mark Abraham over 4 years ago

  • Description updated (diff)

You can't use LDFLAGS with CMake - see

I am unaware of any maintenance done on the QM/MM feature in GROMACS since 4.6 onward, so I expect the code as well as the build system is broken until someone proves otherwise. I would strongly advise using the GROMACS version that Gerrit Groenhof uses in his publications, and thus to build with configure. If you have issues, please ask on gmx-users, where he sometimes responds.

#2 Updated by Bill Shipman over 4 years ago

Mark, thanks for the feedback! I'm an admin not a user and was simply ask to make it work. I'll see what I can do with the cmake flags but it appears that you don't expect QMMM to work on more recent versions of GROMACS. Thanks, I'll advise my users!

#3 Updated by Mark Abraham over 4 years ago

  • Status changed from New to Closed
  • Target version deleted (5.x)

#4 Updated by Mark Abraham almost 2 years ago

  • Related to Task #2706: Rework classic QM/MM interface added

Also available in: Atom PDF