Debian Codegraph @

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

raw
1 Index: Make.depends
2 ===================================================================
3 RCS file: /namd/cvsroot/namd2/Make.depends,v
4 retrieving revision 1.115
5 diff -u -p -r1.115 Make.depends
6 --- Make.depends 12 Nov 2007 19:01:41 -0000 1.115
7 +++ Make.depends 6 Dec 2007 19:50:19 -0000
8 @@ -1437,6 +1437,7 @@ obj/ComputeMgr.o: \
9 src/GlobalMasterEasy.h \
10 src/GlobalMasterMisc.h \
11 src/GlobalMasterFreeEnergy.h \
12 + src/GlobalMasterAPBS.h \
13 inc/ComputeMgr.def.h
14 $(CXX) $(CXXFLAGS) $(COPTO)obj/ComputeMgr.o $(COPTC) src/ComputeMgr.C
15 obj/ComputeNonbondedSelf.o: \
16 @@ -2273,6 +2274,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.1229
38 diff -u -p -r1.1229 Makefile
39 --- Makefile 7 Nov 2007 21:36:12 -0000 1.1229
40 +++ Makefile 6 Dec 2007 19:50:19 -0000
41 @@ -118,6 +118,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 @@ -251,7 +252,7 @@ CHARMLIB = $(CHARM)/lib
50 LIBS = $(PLUGINLIB) $(DPMTALIBS) $(DPMELIBS) $(TCLDLL)
51
52 # CXX is platform dependent
53 -CXXBASEFLAGS = $(COPTI)$(CHARMINC) $(COPTI)$(SRCDIR) $(COPTI)$(INCDIR) $(DPMTA) $(DPME) $(COPTI)$(PLUGININCDIR) $(TCL) $(FFT) $(CCS) $(RELEASE) $(MEMOPTDEF) $(TRACEOBJDEF)
54 +CXXBASEFLAGS = $(COPTI)$(CHARMINC) $(COPTI)$(SRCDIR) $(COPTI)$(INCDIR) $(DPMTA) $(DPME) $(COPTI)$(PLUGININCDIR) $(TCL) $(FFT) $(CCS) $(APBS) $(RELEASE) $(MEMOPTDEF) $(TRACEOBJDEF)
55 CXXFLAGS = $(CXXBASEFLAGS) $(CXXOPTS)
56 CXXTHREADFLAGS = $(CXXBASEFLAGS) $(CXXTHREADOPTS)
57 CXXSIMPARAMFLAGS = $(CXXBASEFLAGS) $(CXXSIMPARAMOPTS)
58 @@ -291,6 +292,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.42
70 diff -u -p -r1.42 config
71 --- config 17 Apr 2006 16:54:57 -0000 1.42
72 +++ config 6 Dec 2007 19:50:19 -0000
73 @@ -2,7 +2,7 @@
74 goto begin
75 syntax:
76 echo ''
77 - echo 'Usage: config [debug] [tcl] [fftw] [<build_dir>/]<arch>[.comment] [suffix]'
78 + echo 'Usage: config [debug] [tcl] [fftw] [apbs] [<build_dir>/]<arch>[.comment] [suffix]'
79 echo 'Environment variable NAMD_BUILD_BASE may point to scratch directory.'
80 echo ''
81 echo '<arch>: '
82 @@ -43,6 +43,14 @@ begin:
83 endif
84
85 if ($#argv < 1) goto syntax
86 + if ( $1 == apbs ) then
87 + set use_apbs = 1
88 + shift
89 + else
90 + set use_apbs = 0
91 + endif
92 +
93 + if ($#argv < 1) goto syntax
94 if ( $1 == plugins ) then
95 echo 'The "plugins" flag is not needed; plugins are built automatically.'
96 shift
97 @@ -113,6 +121,7 @@ begin:
98 echo 'include .rootdir/arch/$(NAMD_ARCH)$(NAMD_SUBARCH).base' >> Makearch
99 if ( $use_tcl ) echo 'include .rootdir/arch/$(NAMD_ARCH)$(NAMD_SUBARCH).tcl' >> Makearch
100 if ( $use_fftw ) echo 'include .rootdir/arch/$(NAMD_ARCH)$(NAMD_SUBARCH).fftw' >> Makearch
101 + if ( $use_apbs ) echo 'include .rootdir/arch/$(NAMD_ARCH)$(NAMD_SUBARCH).apbs' >> Makearch
102 if ( $use_debug ) then
103 echo 'CXXOPTS = -g' >> Makearch
104 echo 'CXXTHREADOPTS = -g' >> Makearch
105 Index: src/ComputeMgr.C
106 ===================================================================
107 RCS file: /namd/cvsroot/namd2/src/ComputeMgr.C,v
108 retrieving revision 1.1073
109 diff -u -p -r1.1073 ComputeMgr.C
110 --- src/ComputeMgr.C 12 Nov 2007 17:31:29 -0000 1.1073
111 +++ src/ComputeMgr.C 6 Dec 2007 19:50:21 -0000
112 @@ -71,6 +71,7 @@
113 #include "GlobalMasterEasy.h"
114 #include "GlobalMasterMisc.h"
115 #include "GlobalMasterFreeEnergy.h"
116 +#include "GlobalMasterAPBS.h"
117
118 ComputeMgr::ComputeMgr()
119 {
120 @@ -616,6 +617,8 @@ ComputeMgr::createComputes(ComputeMap *m
121 masterServerObject->addClient(new GlobalMasterMisc());
122 if ( simParams->freeEnergyOn )
123 masterServerObject->addClient(new GlobalMasterFreeEnergy());
124 + if ( simParams->apbsForcesOn )
125 + masterServerObject->addClient(new GlobalMasterAPBS);
126 }
127
128 for (int i=0; i < map->nComputes; i++)
129 Index: src/SimParameters.C
130 ===================================================================
131 RCS file: /namd/cvsroot/namd2/src/SimParameters.C,v
132 retrieving revision 1.1245
133 diff -u -p -r1.1245 SimParameters.C
134 --- src/SimParameters.C 12 Nov 2007 17:31:29 -0000 1.1245
135 +++ src/SimParameters.C 6 Dec 2007 19:50:21 -0000
136 @@ -1065,6 +1065,13 @@ void SimParameters::config_parser_constr
137 "Configuration file for constant forces", PARSE_STRING);
138 opts.require("constantforce", "consForceScaling",
139 "Scaling factor for constant forces", &consForceScaling, 1.0);
140 +
141 + //// APBS solvation forces
142 + opts.optionalB("main", "apbsForces", "Apply APBS solvation forces?",
143 + &apbsForcesOn, FALSE);
144 + opts.require("apbsForces", "apbsPQRFile", "Path to PQR file", apbsPQRFile);
145 + opts.require("apbsForces", "apbsForcesConfig",
146 + "Configuration file for APBS solvation forces", PARSE_MULTIPLES);
147 }
148
149
150 @@ -3073,9 +3080,15 @@ void SimParameters::print_config(ParseOp
151
152 // Global forces configuration
153
154 - globalForcesOn = ( tclForcesOn || freeEnergyOn || miscForcesOn ||
155 + globalForcesOn = ( apbsForcesOn || tclForcesOn || freeEnergyOn || miscForcesOn ||
156 (IMDon) || SMDOn || TMDOn);
157
158 + if (apbsForcesOn) {
159 + iout << iINFO << "APBS SOLVATION FORCES ACTIVE\n";
160 + iout << iINFO << " APBS PQR FILE: " << apbsPQRFile << "\n";
161 + iout << endi;
162 + }
163 +
164 if (tclForcesOn)
165 {
166 iout << iINFO << "TCL GLOBAL FORCES ACTIVE\n";
167 Index: src/SimParameters.h
168 ===================================================================
169 RCS file: /namd/cvsroot/namd2/src/SimParameters.h,v
170 retrieving revision 1.1134
171 diff -u -p -r1.1134 SimParameters.h
172 --- src/SimParameters.h 12 Nov 2007 17:31:29 -0000 1.1134
173 +++ src/SimParameters.h 6 Dec 2007 19:50:21 -0000
174 @@ -302,6 +302,9 @@ public:
175 Bool freeEnergyOn; // Doing free energy perturbation?
176 Bool miscForcesOn; // Using misc forces?
177
178 + Bool apbsForcesOn; // Using APBS to compute solvation forces?
179 + char apbsPQRFile[128]; // path to PQR file for charges and radii.
180 +
181 Bool fixedAtomsOn; // Are there fixed atoms?
182 Bool fixedAtomsForces; // Calculate forces anyway?
183