Debian Codegraph @

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

raw
1 Index: Make.depends
2 ===================================================================
3 RCS file: /namd/cvsroot/namd2/Make.depends,v
4 retrieving revision 1.124
5 diff -u -p -r1.124 Make.depends
6 --- Make.depends 13 Mar 2009 18:25:21 -0000 1.124
7 +++ Make.depends 30 Apr 2009 04:09:24 -0000
8 @@ -1490,6 +1490,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 @@ -2536,6 +2537,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.1251
38 diff -u -p -r1.1251 Makefile
39 --- Makefile 13 Mar 2009 20:30:00 -0000 1.1251
40 +++ Makefile 30 Apr 2009 04:09:24 -0000
41 @@ -131,6 +131,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 @@ -306,7 +307,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 @@ -348,6 +349,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.52
70 diff -u -p -r1.52 config
71 --- config 13 Mar 2009 15:40:27 -0000 1.52
72 +++ config 30 Apr 2009 04:09:24 -0000
73 @@ -30,6 +30,7 @@ syntax:
74 echo ' --without-cuda (default) --with-cuda'
75 echo ' --cuda-prefix <directory containing CUDA bin, lib, and include>'
76 echo ' --without-memopt (default) --with-memopt'
77 + echo ' --without-apbs (default) --with-apbs'
78 echo ''
79 if ( $?PRINT_ARCH_LIST ) then
80 set ARCH_PAT = ''
81 @@ -95,6 +96,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 @@ -119,6 +121,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 @@ -229,6 +239,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 @@ -362,6 +379,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.1078
131 diff -u -p -r1.1078 ComputeMgr.C
132 --- src/ComputeMgr.C 17 Dec 2008 22:26:19 -0000 1.1078
133 +++ src/ComputeMgr.C 30 Apr 2009 04:09:26 -0000
134 @@ -73,6 +73,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 @@ -613,6 +616,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.1275
159 diff -u -p -r1.1275 SimParameters.C
160 --- src/SimParameters.C 23 Apr 2009 17:07:49 -0000 1.1275
161 +++ src/SimParameters.C 30 Apr 2009 04:09:26 -0000
162 @@ -1134,6 +1134,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 @@ -3282,8 +3289,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.1151
196 diff -u -p -r1.1151 SimParameters.h
197 --- src/SimParameters.h 20 Feb 2009 17:28:39 -0000 1.1151
198 +++ src/SimParameters.h 30 Apr 2009 04:09:26 -0000
199 @@ -340,6 +340,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