Project

General

Profile

Bug #1899

Unable to compile QMMM (MOPAC)

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

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
build system
Target version:
-
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

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

http://www.gromacs.org/Documentation/Installation_Instructions_4.5/compiling_QMMM - specifically I'm trying to use the instructions as follows roughly translating them to the -D[...]=... syntax of http://www.gromacs.org/Documentation/Installation_Instructions_5.0#cmake-advanced-options

""""
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
"""

This proceeds through cmake without any issue but fails in make with the error that follows.
cmake .. -DCMAKE_LIBRARY_PATH=/home/tduser/apps/gromacs-5.0.5/lib -DGMX_QMMM_PROGRAM=MOPAC -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON

This proceeds through cmake but says the argument LDFLAGS was disregarded.
cmake .. -DLDFLAGS=/home/tduser/apps/gromacs-5.0.5/lib -DGMX_QMMM_PROGRAM=MOPAC -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON

cmake .. -DGMX_QMMM_PROGRAM=MOPAC -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=O

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

Linking CXX executable ../../bin/template
../../lib/libgromacs.so.0.0.0: undefined reference to `domop_'
../../lib/libgromacs.so.0.0.0: 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

History

#1 Updated by Mark Abraham over 3 years ago

  • Description updated (diff)

You can't use LDFLAGS with CMake - see http://stackoverflow.com/questions/6077414/cmake-how-to-set-the-ldflags-in-cmakelists-txt

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 3 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 3 years ago

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

#4 Updated by Mark Abraham 10 months ago

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

Also available in: Atom PDF