Debian Codegraph @

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

raw
1 Index: Make.depends
2 ===================================================================
3 RCS file: /namd/cvsroot/namd2/Make.depends,v
4 retrieving revision 1.128
5 diff -u -p -r1.128 Make.depends
6 --- Make.depends 27 Oct 2009 18:52:28 -0000 1.128
7 +++ Make.depends 18 Nov 2009 04:00:59 -0000
8 @@ -1497,6 +1497,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 @@ -2657,6 +2658,17 @@ obj/GlobalMasterServer.o: \
17 src/GlobalMasterServer.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.1261
38 diff -u -p -r1.1261 Makefile
39 --- Makefile 11 Nov 2009 05:19:01 -0000 1.1261
40 +++ Makefile 18 Nov 2009 04:00:59 -0000
41 @@ -133,6 +133,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 @@ -309,7 +310,7 @@ CHARMLIB = $(CHARM)/lib
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)
54 +CXXBASEFLAGS = $(COPTI)$(CHARMINC) $(COPTI)$(SRCDIR) $(COPTI)$(INCDIR) $(DPMTA) $(DPME) $(COPTI)$(PLUGININCDIR) $(COPTD)STATIC_PLUGIN $(TCL) $(FFT) $(CUDA) $(MEMOPT) $(CCS) $(APBS) $(RELEASE) $(EXTRADEFINES) $(TRACEOBJDEF)
55 CXXFLAGS = $(CXXBASEFLAGS) $(CXXOPTS)
56 CXXTHREADFLAGS = $(CXXBASEFLAGS) $(CXXTHREADOPTS)
57 CXXSIMPARAMFLAGS = $(CXXBASEFLAGS) $(CXXSIMPARAMOPTS)
58 @@ -351,6 +352,7 @@ namd2: $(INCDIR) $(DSTDIR) $(OBJS) $(LIB
59 $(TCLLIB) \
60 $(FFTLIB) \
61 $(PLUGINLIB) \
62 + $(APBSLIB) \
63 $(CHARMOPTS) \
64 -lm -o namd2
65
66 Index: config
67 ===================================================================
68 RCS file: /namd/cvsroot/namd2/config,v
69 retrieving revision 1.55
70 diff -u -p -r1.55 config
71 --- config 12 Nov 2009 22:51:36 -0000 1.55
72 +++ config 18 Nov 2009 04:00:59 -0000
73 @@ -28,6 +28,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 @@ -96,6 +97,7 @@ begin:
82 set use_fftw = 1
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 @@ -120,6 +122,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 @@ -230,6 +240,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 @@ -363,6 +380,8 @@ begin:
119
120 if ( $use_memopt ) echo 'MEMOPT=-DMEM_OPT_VERSION' >> Make.config
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.1081
131 diff -u -p -r1.1081 ComputeMgr.C
132 --- src/ComputeMgr.C 20 Jul 2009 20:51:39 -0000 1.1081
133 +++ src/ComputeMgr.C 18 Nov 2009 04:01:01 -0000
134 @@ -74,6 +74,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 @@ -632,6 +635,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.1294
159 diff -u -p -r1.1294 SimParameters.C
160 --- src/SimParameters.C 12 Nov 2009 20:28:16 -0000 1.1294
161 +++ src/SimParameters.C 18 Nov 2009 04:01:01 -0000
162 @@ -1169,6 +1169,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 @@ -3369,8 +3376,14 @@ void SimParameters::print_config(ParseOp
177 // Global forces configuration
178
179 globalForcesOn = ( tclForcesOn || freeEnergyOn || miscForcesOn ||
180 - (IMDon) || SMDOn || TMDOn || colvarsOn );
181 + (IMDon) || SMDOn || TMDOn || colvarsOn ||
182 + apbsForcesOn );
183
184 + if (apbsForcesOn) {
185 + iout << iINFO << "APBS SOLVATION FORCES ACTIVE\n";
186 + iout << iINFO << " APBS PQR FILE: " << apbsPQRFile << "\n";
187 + iout << endi;
188 + }
189
190 if (tclForcesOn)
191 {
192 Index: src/SimParameters.h
193 ===================================================================
194 RCS file: /namd/cvsroot/namd2/src/SimParameters.h,v
195 retrieving revision 1.1158
196 diff -u -p -r1.1158 SimParameters.h
197 --- src/SimParameters.h 11 Nov 2009 20:36:45 -0000 1.1158
198 +++ src/SimParameters.h 18 Nov 2009 04:01:02 -0000
199 @@ -345,6 +345,9 @@ public:
200 Bool miscForcesOn; // Using misc forces?
201 Bool colvarsOn; // Using the colvars module?
202
203 + Bool apbsForcesOn; // Using APBS to compute solvation forces?
204 + char apbsPQRFile[128]; // path to PQR file for charges and radii.
205 +
206 Bool fixedAtomsOn; // Are there fixed atoms?
207 Bool fixedAtomsForces; // Calculate forces anyway?
208