27 |
|
|
28 |
|
nAtoms = info->n_atoms; |
29 |
|
|
30 |
– |
std::cerr << "integ nAtoms = " << nAtoms << "\n"; |
31 |
– |
|
30 |
|
// check for constraints |
31 |
|
|
32 |
|
constrainedA = NULL; |
73 |
|
|
74 |
|
constrained = theArray[j]->is_constrained(); |
75 |
|
|
78 |
– |
std::cerr << "Is the folowing bond constrained \n"; |
79 |
– |
theArray[j]->printMe(); |
80 |
– |
|
76 |
|
if(constrained){ |
82 |
– |
|
83 |
– |
std::cerr << "Yes\n"; |
77 |
|
|
78 |
|
dummy_plug = theArray[j]->get_constraint(); |
79 |
|
temp_con[nConstrained].set_a( dummy_plug->get_a() ); |
83 |
|
nConstrained++; |
84 |
|
constrained = 0; |
85 |
|
} |
93 |
– |
else std::cerr << "No.\n"; |
86 |
|
} |
87 |
|
|
88 |
|
theArray = (SRI**) molecules[i].getMyBends(); |
167 |
|
double currSample; |
168 |
|
double currThermal; |
169 |
|
double currStatus; |
178 |
– |
double currTime; |
170 |
|
|
171 |
|
int calcPot, calcStress; |
172 |
|
int isError; |
190 |
|
tStats->velocitize(); |
191 |
|
} |
192 |
|
|
202 |
– |
dumpOut->writeDump( 0.0 ); |
203 |
– |
statOut->writeStat( 0.0 ); |
204 |
– |
|
193 |
|
calcPot = 0; |
194 |
|
calcStress = 0; |
195 |
|
currSample = sampleTime; |
196 |
|
currThermal = thermalTime; |
197 |
|
currStatus = statusTime; |
210 |
– |
currTime = 0.0;; |
198 |
|
|
199 |
+ |
dumpOut->writeDump( info->currTime ); |
200 |
+ |
statOut->writeStat( info->currTime ); |
201 |
|
|
202 |
|
readyCheck(); |
203 |
|
|
207 |
|
MPIcheckPoint(); |
208 |
|
#endif // is_mpi |
209 |
|
|
210 |
< |
while( currTime < runTime ){ |
210 |
> |
while( info->currTime < runTime ){ |
211 |
|
|
212 |
< |
if( (currTime+dt) >= currStatus ){ |
212 |
> |
if( (info->currTime+dt) >= currStatus ){ |
213 |
|
calcPot = 1; |
214 |
|
calcStress = 1; |
215 |
|
} |
216 |
|
|
228 |
– |
std::cerr << currTime << "\n"; |
229 |
– |
|
217 |
|
integrateStep( calcPot, calcStress ); |
218 |
|
|
219 |
< |
currTime += dt; |
219 |
> |
info->currTime += dt; |
220 |
> |
info->setTime(info->currTime); |
221 |
|
|
222 |
|
if( info->setTemp ){ |
223 |
< |
if( currTime >= currThermal ){ |
223 |
> |
if( info->currTime >= currThermal ){ |
224 |
|
tStats->velocitize(); |
225 |
|
currThermal += thermalTime; |
226 |
|
} |
227 |
|
} |
228 |
|
|
229 |
< |
if( currTime >= currSample ){ |
230 |
< |
dumpOut->writeDump( currTime ); |
229 |
> |
if( info->currTime >= currSample ){ |
230 |
> |
dumpOut->writeDump( info->currTime ); |
231 |
|
currSample += sampleTime; |
232 |
|
} |
233 |
|
|
234 |
< |
if( currTime >= currStatus ){ |
235 |
< |
statOut->writeStat( currTime ); |
234 |
> |
if( info->currTime >= currStatus ){ |
235 |
> |
statOut->writeStat( info->currTime ); |
236 |
|
calcPot = 0; |
237 |
|
calcStress = 0; |
238 |
|
currStatus += statusTime; |
246 |
|
|
247 |
|
} |
248 |
|
|
249 |
< |
dumpOut->writeFinal(currTime); |
249 |
> |
dumpOut->writeFinal(info->currTime); |
250 |
|
|
251 |
|
delete dumpOut; |
252 |
|
delete statOut; |
261 |
|
preMove(); |
262 |
|
moveA(); |
263 |
|
if( nConstrained ) constrainA(); |
264 |
+ |
|
265 |
+ |
|
266 |
+ |
#ifdef IS_MPI |
267 |
+ |
strcpy( checkPointMsg, "Succesful moveA\n" ); |
268 |
+ |
MPIcheckPoint(); |
269 |
+ |
#endif // is_mpi |
270 |
+ |
|
271 |
|
|
272 |
|
// calc forces |
273 |
|
|
274 |
|
myFF->doForces(calcPot,calcStress); |
275 |
|
|
276 |
+ |
#ifdef IS_MPI |
277 |
+ |
strcpy( checkPointMsg, "Succesful doForces\n" ); |
278 |
+ |
MPIcheckPoint(); |
279 |
+ |
#endif // is_mpi |
280 |
+ |
|
281 |
+ |
|
282 |
|
// finish the velocity half step |
283 |
|
|
284 |
|
moveB(); |
285 |
|
if( nConstrained ) constrainB(); |
286 |
< |
|
286 |
> |
|
287 |
> |
#ifdef IS_MPI |
288 |
> |
strcpy( checkPointMsg, "Succesful moveB\n" ); |
289 |
> |
MPIcheckPoint(); |
290 |
> |
#endif // is_mpi |
291 |
> |
|
292 |
> |
|
293 |
|
} |
294 |
|
|
295 |
|
|