Hi all

I am trying to compile gromacs with mopac but I'm experience some problems using libmopac.a. I have a x86_64 processor and I'm trying with gromacs-4.5.5. I've followed the instructions at the website (i.e. to compile libmopac.a, I've used the alternte dcart.f and gmxmop.f) but I didn't succeed. I've also seen that this topic have some times appeared in the mailing list but the trick proposed didn't work for me.

Here you have the steps with different scenarios I've gone through:

**A: Compilation of libmopac.a with fortran compiler then gromacs installation**

[ in mopac fortran folder]
javier@mopac/fortran/folder> $FC -O2 -c *.f (where FC=gfortran or ifort)
javier@mopac/fortran/folder> ar rcv libmopac.a *.o;ranlib libmopac.a
javier@mopac/fortran/folder> cp libmopac.a ~/lib/

[in gromacs folder]
javier@gromacs/folder> ./configure --prefix /home/cerezo/Programas/gromacs-4.5.5_with_mopac/ --with-qmmm-mopac --without-qmmm-gaussian --disable-threads --disable-shared LDFLAGS="-L/home/cerezo/lib" CPPFLAGS="-DUSE_MOPAC" LIBS="-lmopac"
javier@gromacs/folder> make -j 4

Then I get lots of "undefined reference" errors:
cc -O3 -fomit-frame-pointer -finline-functions -Wall -Wno-unused -msse2 -funroll-all-loops -std=gnu99 -fexcess-precision=fast -o tpbconv tpbconv.o -L/home/cerezo/lib ./.libs/libgmxpreprocess.a /home/cerezo/Programas/src/GROMACS_vX/gromacs-4.5.5/src/mdlib/.libs/libmd.a ../mdlib/.libs/libmd.a -lfftw3f /home/cerezo/Programas/src/GROMACS_vX/gromacs-4.5.5/src/gmxlib/.libs/libgmx.a ../gmxlib/.libs/libgmx.a -ldl -lnsl -lm -lmopac /bin/bash ../../libtool --tag=CC --mode=link cc -O3 -fomit-frame-pointer -finline-functions -Wall -Wno-unused -msse2 -funroll-all-loops -std=gnu99 -fexcess-precision=fast -L/home/cerezo/lib -o g_protonate g_protonate.o libgmxpreprocess.la ../mdlib/libmd.la ../gmxlib/libgmx.la -lnsl -lm -lmopac /bin/bash ../../libtool --tag=CC --mode=link cc -O3 -fomit-frame-pointer -finline-functions -Wall -Wno-unused -msse2 -funroll-all-loops -std=gnu99 -fexcess-precision=fast -L/home/cerezo/lib -o g_luck g_luck.o libgmxpreprocess.la ../mdlib/libmd.la ../gmxlib/libgmx.la -lnsl -lm -lmopac
/home/cerezo/lib/libmopac.a(gmxmop.o): In function `donhco_':
gmxmop.f:(.text+0x23e): undefined reference to `for_f90_index'
gmxmop.f:(.text+0x26c): undefined reference to `for_f90_index'
gmxmop.f:(.text+0x298): undefined reference to `for_f90_index'
...
/home/cerezo/lib/libmopac.a(gmxmop.o): In function `deriv_':
gmxmop.f:(.text+0x792): undefined reference to `for_f90_index'
gmxmop.f:(.text+0x7c0): undefined reference to `for_f90_index'
gmxmop.f:(.text+0x7e1): undefined reference to `for_f90_index'
/home/javier/lib/libmopac.a(timer.o)(.text+0x11d): In function `timer_':
: undefined reference to `for_write_seq_fmt'
... (an so on for each mopac object)

Where I think these refer to internal intel fortran functions (compilation with ifort, analogous errors come with gfortran internal functions). So probably I'm missing something to include this function at gromacs compilation time

---

**B: Compilation of libmopac.a with f2c+gcc then gromacs installation**
javier@mopac/fortran/folder>  f2c *.f
javier@mopac/fortran/folder> gcc -O2 -c *.c
javier@mopac/fortran/folder> ar rcv libmopac.a *.o;ranlib libmopac.a
javier@mopac/fortran/folder> cp libmopac.a ~/lib

[in gromacs folder]
javier@gromacs/folder> ./configure --prefix /home/cerezo/Programas/gromacs-4.5.5_with_mopac/ --with-qmmm-mopac --without-qmmm-gaussian --disable-threads --disable-shared LDFLAGS="-L/home/cerezo/lib" CPPFLAGS="-DUSE_MOPAC" LIBS="-lmopac"
javier@gromacs/folder> make -j 4

This time I also get "undefined reference errors", but related to f2c funtions: +timout.c0x105:)(:. textundefined+ 0x3c8reference) :to undefined` do_fioreference'
totimer.c :`(do_fio.'text

In this case, do I need to include the f2c.h file somewhere in the gromacs qmmm interface code?

Could someone point me out where I'm mistaking and what should I do to complete the installation?

Thanks

Javier


--
Javier CEREZO BASTIDA
PhD Student
Physical Chemistry
Universidad de Murcia
Murcia (Spain)

--
gmx-users mailing list    gmx-users@gromacs.org
http://lists.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
Please don't post (un)subscribe requests to the list. Use the www interface or send it to gmx-users-requ...@gromacs.org.
Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

Reply via email to