Index: Make.depends =================================================================== RCS file: /namd/cvsroot/namd2/Make.depends,v retrieving revision 1.124 diff -u -p -r1.124 Make.depends --- Make.depends 13 Mar 2009 18:25:21 -0000 1.124 +++ Make.depends 30 Apr 2009 04:09:24 -0000 @@ -1490,6 +1490,7 @@ obj/ComputeMgr.o: \ src/GlobalMasterEasy.h \ src/GlobalMasterMisc.h \ src/GlobalMasterFreeEnergy.h \ + src/GlobalMasterAPBS.h \ src/GlobalMasterColvars.h \ src/colvarmodule.h \ src/colvartypes.h \ @@ -2536,6 +2537,17 @@ obj/GlobalMasterServer.o: \ src/GlobalMasterServer.h \ src/Debug.h $(CXX) $(CXXFLAGS) $(COPTO)obj/GlobalMasterServer.o $(COPTC) src/GlobalMasterServer.C +obj/GlobalMasterAPBS.o: \ + src/GlobalMasterAPBS.C \ + src/NamdTypes.h \ + src/Vector.h \ + src/common.h \ + src/ResizeArray.h \ + src/ResizeArrayRaw.h \ + src/GlobalMaster.h \ + src/GlobalMasterAPBS.h \ + src/Debug.h + $(CXX) $(CXXFLAGS) $(COPTO)obj/GlobalMasterAPBS.o $(COPTC) src/GlobalMasterAPBS.C obj/GlobalMasterTest.o: \ src/GlobalMasterTest.C \ src/NamdTypes.h \ Index: Makefile =================================================================== RCS file: /namd/cvsroot/namd2/Makefile,v retrieving revision 1.1251 diff -u -p -r1.1251 Makefile --- Makefile 13 Mar 2009 20:30:00 -0000 1.1251 +++ Makefile 30 Apr 2009 04:09:24 -0000 @@ -131,6 +131,7 @@ OBJS = \ $(DSTDIR)/FreeEnergyVector.o \ $(DSTDIR)/GlobalMaster.o \ $(DSTDIR)/GlobalMasterServer.o \ + $(DSTDIR)/GlobalMasterAPBS.o \ $(DSTDIR)/GlobalMasterTest.o \ $(DSTDIR)/GlobalMasterIMD.o \ $(DSTDIR)/GlobalMasterTcl.o \ @@ -306,7 +307,7 @@ CHARMLIB = $(CHARM)/lib LIBS = $(CUDAOBJS) $(PLUGINLIB) $(DPMTALIBS) $(DPMELIBS) $(TCLDLL) # CXX is platform dependent -CXXBASEFLAGS = $(COPTI)$(CHARMINC) $(COPTI)$(SRCDIR) $(COPTI)$(INCDIR) $(DPMTA) $(DPME) $(COPTI)$(PLUGININCDIR) $(COPTD)STATIC_PLUGIN $(TCL) $(FFT) $(CUDA) $(MEMOPT) $(CCS) $(RELEASE) $(EXTRADEFINES) $(TRACEOBJDEF) +CXXBASEFLAGS = $(COPTI)$(CHARMINC) $(COPTI)$(SRCDIR) $(COPTI)$(INCDIR) $(DPMTA) $(DPME) $(COPTI)$(PLUGININCDIR) $(COPTD)STATIC_PLUGIN $(TCL) $(FFT) $(CUDA) $(MEMOPT) $(CCS) $(APBS) $(RELEASE) $(EXTRADEFINES) $(TRACEOBJDEF) CXXFLAGS = $(CXXBASEFLAGS) $(CXXOPTS) CXXTHREADFLAGS = $(CXXBASEFLAGS) $(CXXTHREADOPTS) CXXSIMPARAMFLAGS = $(CXXBASEFLAGS) $(CXXSIMPARAMOPTS) @@ -348,6 +349,7 @@ namd2: $(INCDIR) $(DSTDIR) $(OBJS) $(LIB $(TCLLIB) \ $(FFTLIB) \ $(PLUGINLIB) \ + $(APBSLIB) \ $(CHARMOPTS) \ -lm -o namd2 Index: config =================================================================== RCS file: /namd/cvsroot/namd2/config,v retrieving revision 1.52 diff -u -p -r1.52 config --- config 13 Mar 2009 15:40:27 -0000 1.52 +++ config 30 Apr 2009 04:09:24 -0000 @@ -30,6 +30,7 @@ syntax: echo ' --without-cuda (default) --with-cuda' echo ' --cuda-prefix ' echo ' --without-memopt (default) --with-memopt' + echo ' --without-apbs (default) --with-apbs' echo '' if ( $?PRINT_ARCH_LIST ) then set ARCH_PAT = '' @@ -95,6 +96,7 @@ begin: set use_fftw = 1 set use_cuda = 0 set use_memopt = 0 + set use_apbs = 0 if ($#argv < 1) then set PRINT_ARCH_LIST @@ -119,6 +121,14 @@ begin: endif if ($#argv < 1) goto syntax + if ( $1 == apbs ) then + set use_apbs = 1 + shift + else + set use_apbs = 0 + endif + + if ($#argv < 1) goto syntax if ( $1 == plugins ) then echo 'The "plugins" flag is not needed; plugins are built automatically.' shift @@ -229,6 +239,13 @@ begin: set use_memopt = 1 breaksw + case --with-apbs: + set use_apbs = 1 + breaksw + case --without-apbs: + set use_apbs = 0 + breaksw + case --charm-base: shift if ( ! -d $1 ) then @@ -362,6 +379,8 @@ begin: if ( $use_memopt ) echo 'MEMOPT=-DMEM_OPT_VERSION' >> Make.config + if ( $use_apbs ) echo 'include .rootdir/arch/$(NAMD_ARCH).apbs' >> Make.config + if ( $use_tcl ) then if ( $?TCL_PREFIX ) then echo "TCLDIR = $TCL_PREFIX" >> Make.config Index: src/ComputeMgr.C =================================================================== RCS file: /namd/cvsroot/namd2/src/ComputeMgr.C,v retrieving revision 1.1078 diff -u -p -r1.1078 ComputeMgr.C --- src/ComputeMgr.C 17 Dec 2008 22:26:19 -0000 1.1078 +++ src/ComputeMgr.C 30 Apr 2009 04:09:26 -0000 @@ -73,6 +73,9 @@ #include "GlobalMasterEasy.h" #include "GlobalMasterMisc.h" #include "GlobalMasterFreeEnergy.h" +#ifdef NAMD_APBS +#include "GlobalMasterAPBS.h" +#endif NAMD_APBS #include "GlobalMasterColvars.h" ComputeMgr::ComputeMgr() @@ -613,6 +616,10 @@ ComputeMgr::createComputes(ComputeMap *m masterServerObject->addClient(new GlobalMasterFreeEnergy()); if ( simParams->colvarsOn ) masterServerObject->addClient(new GlobalMasterColvars()); +#ifdef NAMD_APBS + if ( simParams->apbsForcesOn ) + masterServerObject->addClient(new GlobalMasterAPBS); +#endif NAMD_APBS } Index: src/SimParameters.C =================================================================== RCS file: /namd/cvsroot/namd2/src/SimParameters.C,v retrieving revision 1.1275 diff -u -p -r1.1275 SimParameters.C --- src/SimParameters.C 23 Apr 2009 17:07:49 -0000 1.1275 +++ src/SimParameters.C 30 Apr 2009 04:09:26 -0000 @@ -1134,6 +1134,13 @@ void SimParameters::config_parser_constr "Configuration file for constant forces", PARSE_STRING); opts.require("constantforce", "consForceScaling", "Scaling factor for constant forces", &consForceScaling, 1.0); + + //// APBS solvation forces + opts.optionalB("main", "apbsForces", "Apply APBS solvation forces?", + &apbsForcesOn, FALSE); + opts.require("apbsForces", "apbsPQRFile", "Path to PQR file", apbsPQRFile); + opts.require("apbsForces", "apbsForcesConfig", + "Configuration file for APBS solvation forces", PARSE_MULTIPLES); //// Collective variables opts.optionalB("main", "colvars", "Is the colvars module enabled?", @@ -3282,8 +3289,14 @@ void SimParameters::print_config(ParseOp // Global forces configuration globalForcesOn = ( tclForcesOn || freeEnergyOn || miscForcesOn || - (IMDon) || SMDOn || TMDOn || colvarsOn ); + (IMDon) || SMDOn || TMDOn || colvarsOn || + apbsForcesOn ); + if (apbsForcesOn) { + iout << iINFO << "APBS SOLVATION FORCES ACTIVE\n"; + iout << iINFO << " APBS PQR FILE: " << apbsPQRFile << "\n"; + iout << endi; + } if (tclForcesOn) { Index: src/SimParameters.h =================================================================== RCS file: /namd/cvsroot/namd2/src/SimParameters.h,v retrieving revision 1.1151 diff -u -p -r1.1151 SimParameters.h --- src/SimParameters.h 20 Feb 2009 17:28:39 -0000 1.1151 +++ src/SimParameters.h 30 Apr 2009 04:09:26 -0000 @@ -340,6 +340,9 @@ public: Bool miscForcesOn; // Using misc forces? Bool colvarsOn; // Using the colvars module? + Bool apbsForcesOn; // Using APBS to compute solvation forces? + char apbsPQRFile[128]; // path to PQR file for charges and radii. + Bool fixedAtomsOn; // Are there fixed atoms? Bool fixedAtomsForces; // Calculate forces anyway?