Compilation of DPMTA code in MMTK

Konrad Hinsen
Tue, 13 Oct 1998 14:53:31 +0200

I have had a few reports of problems with the compilation of the
DPMTA multipole code as part of MMTK. These seem to be related to
the DPMTA Makefiles, which I don't really want to analyze. I have
therefore modified MMTK's setup file in such a way that the required
DPMTA source code files are directly compiled and linked to the
MMTK module _forcefield, without a prior creation of libraries for
DPMTA. This new setup file should not create any problems with
compilation. Please try it out.

-- ./Setup ----------------------------------------------------------------

# low-level force field module

_forcefield -I./dpmta/src -I./dpmta/mpole -DWITH_DPMTA \
       _forcefieldmodule.c bonded.c nonbonded.c sparsefc.c \
       ./dpmta/mpole/mpe_fft.c ./dpmta/mpole/mpe_misc.c \
       ./dpmta/mpole/mpe_mpoleC.c ./dpmta/mpole/mpe_allocC.c \
       ./dpmta/mpole/mpe_mpoleLJ.c ./dpmta/mpole/mpe_allocLJ.c \
       ./dpmta/src/dpmta_serial.c ./dpmta/src/dpmta_slvmkcell.c \
       ./dpmta/src/dpmta_slvmcalc.c ./dpmta/src/dpmta_slvpcalc.c \
       ./dpmta/src/dpmta_slvmkil.c ./dpmta/src/dpmta_slvmkhl.c \
       ./dpmta/src/dpmta_slvcompute.c ./dpmta/src/dpmta_slvmacro.c \
       ./dpmta/src/dpmta_slvscale.c ./dpmta/src/dpmta_timer.c \
       ./dpmta/src/dpmta_slvglobals.c ./dpmta/src/dpmta_distmisc.c \

# To compile without DPMTA, use the following line:
#_forcefield _forcefieldmodule.c bonded.c nonbonded.c sparsefc.c -lm

# minimization and dynamics

_trajectory _trajectorymodule.c
_dynamics _dynamicsmodule.c
_minimization _minimizationmodule.c

# Lutz Ehrlich's DCD reader/writer

_DCD  _DCD.c ReadDCD.c

# Lutz Ehrlich's molecular surface module

_surface _surface.c nsc.c -lm

# The minimal subset of LAPACK needed for efficient normal mode
# calculations.
lapack_dsyev lapack_dsyev.c dsyev.c -lm

You also need a modified version of with this new
Setup file:

-- ./ -----------------------------------------------------------
# Compile the MMTK extension modules

import os, string, sys
import compileall

lib = os.path.join(os.path.join(sys.exec_prefix, 'lib'),

if not os.path.exists(''):
    source = os.path.join(os.path.join(lib, 'config'), '')
    if os.path.exists(source):
	os.system('cp ' + source + ' .')
	print "Copy Misc/ from the Python distribution"
	print "to this directory and try again."

os.system("make -f boot")

If there are still compilation problems, please let me know!

Konrad Hinsen                            | E-Mail:
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-
Rue Charles Sadron                       | Fax:  +33-
45071 Orleans Cedex 2                    | Deutsch/Esperanto/English/
France                                   | Nederlands/Francais