Debian Codegraph @

contrib/iapbs/modules/NAMD/patches/namd2-apbs-20120215.patch

raw
1 Index: Make.depends
2 ===================================================================
3 RCS file: /namd/cvsroot/namd2/Make.depends,v
4 retrieving revision 1.148
5 diff -u -p -r1.148 Make.depends
6 --- Make.depends 19 Jan 2012 21:50:05 -0000 1.148
7 +++ Make.depends 15 Feb 2012 19:58:39 -0000
8 @@ -1848,6 +1848,7 @@ obj/ComputeMgr.o: \
9 src/GlobalMasterEasy.h \
10 src/GlobalMasterMisc.h \
11 src/GlobalMasterFreeEnergy.h \
12 + src/GlobalMasterAPBS.h \
13 src/GlobalMasterColvars.h \
14 src/colvarmodule.h \
15 src/colvartypes.h \
16 @@ -3206,6 +3207,17 @@ obj/GlobalMasterServer.o: \
17 src/InfoStream.h \
18 src/Debug.h
19 $(CXX) $(CXXFLAGS) $(COPTO)obj/GlobalMasterServer.o $(COPTC) src/GlobalMasterServer.C
20 +obj/GlobalMasterAPBS.o: \
21 + src/GlobalMasterAPBS.C \
22 + src/NamdTypes.h \
23 + src/Vector.h \
24 + src/common.h \
25 + src/ResizeArray.h \
26 + src/ResizeArrayRaw.h \
27 + src/GlobalMaster.h \
28 + src/GlobalMasterAPBS.h \
29 + src/Debug.h
30 + $(CXX) $(CXXFLAGS) $(COPTO)obj/GlobalMasterAPBS.o $(COPTC) src/GlobalMasterAPBS.C
31 obj/GlobalMasterTest.o: \
32 src/GlobalMasterTest.C \
33 src/NamdTypes.h \
34 Index: Makefile
35 ===================================================================
36 RCS file: /namd/cvsroot/namd2/Makefile,v
37 retrieving revision 1.1310
38 diff -u -p -r1.1310 Makefile
39 --- Makefile 21 Jan 2012 21:24:52 -0000 1.1310
40 +++ Makefile 15 Feb 2012 19:58:39 -0000
41 @@ -158,6 +158,7 @@ OBJS = \
42 $(DSTDIR)/FreeEnergyVector.o \
43 $(DSTDIR)/GlobalMaster.o \
44 $(DSTDIR)/GlobalMasterServer.o \
45 + $(DSTDIR)/GlobalMasterAPBS.o \
46 $(DSTDIR)/GlobalMasterTest.o \
47 $(DSTDIR)/GlobalMasterIMD.o \
48 $(DSTDIR)/GlobalMasterTcl.o \
49 @@ -352,7 +353,7 @@ CHARM_MODULES = -module NeighborLB -modu
50 LIBS = $(CUDAOBJS) $(PLUGINLIB) $(DPMTALIBS) $(DPMELIBS) $(TCLDLL)
51
52 # CXX is platform dependent
53 -CXXBASEFLAGS = $(COPTI)$(CHARMINC) $(COPTI)$(SRCDIR) $(COPTI)$(INCDIR) $(DPMTA) $(DPME) $(COPTI)$(PLUGININCDIR) $(COPTD)STATIC_PLUGIN $(TCL) $(FFT) $(CUDA) $(MEMOPT) $(CCS) $(RELEASE) $(EXTRADEFINES) $(TRACEOBJDEF) $(EXTRAINCS) $(MSA)
54 +CXXBASEFLAGS = $(COPTI)$(CHARMINC) $(COPTI)$(SRCDIR) $(COPTI)$(INCDIR) $(DPMTA) $(DPME) $(COPTI)$(PLUGININCDIR) $(COPTD)STATIC_PLUGIN $(TCL) $(FFT) $(CUDA) $(MEMOPT) $(CCS) $(APBS) $(RELEASE) $(EXTRADEFINES) $(TRACEOBJDEF) $(EXTRAINCS) $(MSA)
55 CXXFLAGS = $(CXXBASEFLAGS) $(CXXOPTS)
56 CXXTHREADFLAGS = $(CXXBASEFLAGS) $(CXXTHREADOPTS)
57 CXXSIMPARAMFLAGS = $(CXXBASEFLAGS) $(CXXSIMPARAMOPTS)
58 @@ -394,6 +395,7 @@ namd2: $(MKINCDIR) $(MKDSTDIR) $(OBJS) $
59 $(TCLLIB) \
60 $(FFTLIB) \
61 $(PLUGINLIB) \
62 + $(APBSLIB) \
63 $(CHARMOPTS) \
64 $(EXTRALINKLIBS) \
65 -lm -o namd2
66 Index: config
67 ===================================================================
68 RCS file: /namd/cvsroot/namd2/config,v
69 retrieving revision 1.74
70 diff -u -p -r1.74 config
71 --- config 12 Jul 2011 18:23:08 -0000 1.74
72 +++ config 15 Feb 2012 19:58:39 -0000
73 @@ -29,6 +29,7 @@ syntax:
74 echo ' --arch-suffix <suffix for NAMD platform printed at startup>'
75 echo ' (the following are experimental features)'
76 echo ' --without-memopt (default) --with-memopt'
77 + echo ' --without-apbs (default) --with-apbs'
78 echo ' --without-cuda (default) --with-cuda'
79 echo ' (do NOT use CUDA-enabled Charm++, NAMD does not need it)'
80 echo ' --cuda-prefix <directory containing CUDA bin, lib, and include>'
81 @@ -101,6 +102,7 @@ begin:
82 set use_fftw3 = 0
83 set use_cuda = 0
84 set use_memopt = 0
85 + set use_apbs = 0
86
87 if ($#argv < 1) then
88 set PRINT_ARCH_LIST
89 @@ -125,6 +127,14 @@ begin:
90 endif
91
92 if ($#argv < 1) goto syntax
93 + if ( $1 == apbs ) then
94 + set use_apbs = 1
95 + shift
96 + else
97 + set use_apbs = 0
98 + endif
99 +
100 + if ($#argv < 1) goto syntax
101 if ( $1 == plugins ) then
102 echo 'The "plugins" flag is not needed; plugins are built automatically.'
103 shift
104 @@ -241,6 +251,13 @@ begin:
105 set use_memopt = 1
106 breaksw
107
108 + case --with-apbs:
109 + set use_apbs = 1
110 + breaksw
111 + case --without-apbs:
112 + set use_apbs = 0
113 + breaksw
114 +
115 case --charm-base:
116 shift
117 if ( ! -d $1 ) then
118 @@ -405,6 +422,8 @@ begin:
119 if ( $CHARM_ARCH =~ *-smp* ) set threaded = 1
120 if ( $CHARM_ARCH =~ *multicore-* ) set threaded = 1
121
122 + if ( $use_apbs ) echo 'include .rootdir/arch/$(NAMD_ARCH).apbs' >> Make.config
123 +
124 if ( $use_tcl ) then
125 if ( $?TCL_PREFIX ) then
126 echo "TCLDIR = $TCL_PREFIX" >> Make.config
127 Index: src/ComputeMgr.C
128 ===================================================================
129 RCS file: /namd/cvsroot/namd2/src/ComputeMgr.C,v
130 retrieving revision 1.1107
131 diff -u -p -r1.1107 ComputeMgr.C
132 --- src/ComputeMgr.C 30 Aug 2011 14:54:24 -0000 1.1107
133 +++ src/ComputeMgr.C 15 Feb 2012 19:58:41 -0000
134 @@ -82,6 +82,9 @@
135 #include "GlobalMasterEasy.h"
136 #include "GlobalMasterMisc.h"
137 #include "GlobalMasterFreeEnergy.h"
138 +#ifdef NAMD_APBS
139 +#include "GlobalMasterAPBS.h"
140 +#endif NAMD_APBS
141 #include "GlobalMasterColvars.h"
142
143 ComputeMgr::ComputeMgr()
144 @@ -771,6 +774,10 @@ ComputeMgr::createComputes(ComputeMap *m
145 masterServerObject->addClient(new GlobalMasterFreeEnergy());
146 if ( simParams->colvarsOn )
147 masterServerObject->addClient(new GlobalMasterColvars());
148 +#ifdef NAMD_APBS
149 + if ( simParams->apbsForcesOn )
150 + masterServerObject->addClient(new GlobalMasterAPBS);
151 +#endif NAMD_APBS
152
153 }
154
155 Index: src/SimParameters.C
156 ===================================================================
157 RCS file: /namd/cvsroot/namd2/src/SimParameters.C,v
158 retrieving revision 1.1377
159 diff -u -p -r1.1377 SimParameters.C
160 --- src/SimParameters.C 6 Feb 2012 23:03:50 -0000 1.1377
161 +++ src/SimParameters.C 15 Feb 2012 19:58:42 -0000
162 @@ -1431,6 +1431,13 @@ void SimParameters::config_parser_constr
163 "Configuration file for constant forces", PARSE_STRING);
164 opts.require("constantforce", "consForceScaling",
165 "Scaling factor for constant forces", &consForceScaling, 1.0);
166 +
167 + //// APBS solvation forces
168 + opts.optionalB("main", "apbsForces", "Apply APBS solvation forces?",
169 + &apbsForcesOn, FALSE);
170 + opts.require("apbsForces", "apbsPQRFile", "Path to PQR file", apbsPQRFile);
171 + opts.require("apbsForces", "apbsForcesConfig",
172 + "Configuration file for APBS solvation forces", PARSE_MULTIPLES);
173
174 //// Collective variables
175 opts.optionalB("main", "colvars", "Is the colvars module enabled?",
176 @@ -4206,9 +4213,15 @@ void SimParameters::print_config(ParseOp
177 // Global forces configuration
178
179 globalForcesOn = ( tclForcesOn || freeEnergyOn || miscForcesOn ||
180 - (IMDon) || SMDOn || TMDOn || colvarsOn || symmetryOn );
181 -
182 + (IMDon) || SMDOn || TMDOn || colvarsOn || symmetryOn ||
183 + apbsForcesOn );
184
185 + if (apbsForcesOn) {
186 + iout << iINFO << "APBS SOLVATION FORCES ACTIVE\n";
187 + iout << iINFO << " APBS PQR FILE: " << apbsPQRFile << "\n";
188 + iout << endi;
189 + }
190 +
191 if (tclForcesOn)
192 {
193 iout << iINFO << "TCL GLOBAL FORCES ACTIVE\n";
194 Index: src/SimParameters.h
195 ===================================================================
196 RCS file: /namd/cvsroot/namd2/src/SimParameters.h,v
197 retrieving revision 1.1200
198 diff -u -p -r1.1200 SimParameters.h
199 --- src/SimParameters.h 6 Feb 2012 23:03:51 -0000 1.1200
200 +++ src/SimParameters.h 15 Feb 2012 19:58:42 -0000
201 @@ -414,6 +414,9 @@ public:
202 Bool miscForcesOn; // Using misc forces?
203 Bool colvarsOn; // Using the colvars module?
204
205 + Bool apbsForcesOn; // Using APBS to compute solvation forces?
206 + char apbsPQRFile[128]; // path to PQR file for charges and radii.
207 +
208 Bool fixedAtomsOn; // Are there fixed atoms?
209 Bool fixedAtomsForces; // Calculate forces anyway?
210