# | Line 11 | Line 11 | |
---|---|---|
11 | #include "simError.h" | |
12 | ||
13 | ||
14 | < | Integrator::Integrator( SimInfo *theInfo, ForceFields* the_ff ){ |
14 | > | template<typename T> Integrator<T>::Integrator( SimInfo *theInfo, ForceFields* the_ff ) { |
15 | ||
16 | info = theInfo; | |
17 | myFF = the_ff; | |
# | Line 41 | Line 41 | Integrator::Integrator( SimInfo *theInfo, ForceFields* | |
41 | checkConstraints(); | |
42 | } | |
43 | ||
44 | < | Integrator::~Integrator() { |
44 | > | template<typename T> Integrator<T>::~Integrator() { |
45 | ||
46 | if( nConstrained ){ | |
47 | delete[] constrainedA; | |
# | Line 54 | Line 54 | Integrator::~Integrator() { | |
54 | ||
55 | } | |
56 | ||
57 | < | void Integrator::checkConstraints( void ){ |
57 | > | template<typename T> void Integrator<T>::checkConstraints( void ){ |
58 | ||
59 | ||
60 | isConstrained = 0; | |
# | Line 72 | Line 72 | void Integrator::checkConstraints( void ){ | |
72 | for(int j=0; j<molecules[i].getNBonds(); j++){ | |
73 | ||
74 | constrained = theArray[j]->is_constrained(); | |
75 | < | |
75 | > | |
76 | if(constrained){ | |
77 | < | |
77 | > | |
78 | dummy_plug = theArray[j]->get_constraint(); | |
79 | temp_con[nConstrained].set_a( dummy_plug->get_a() ); | |
80 | temp_con[nConstrained].set_b( dummy_plug->get_b() ); | |
# | Line 82 | Line 82 | void Integrator::checkConstraints( void ){ | |
82 | ||
83 | nConstrained++; | |
84 | constrained = 0; | |
85 | < | } |
85 | > | } |
86 | } | |
87 | ||
88 | theArray = (SRI**) molecules[i].getMyBends(); | |
# | Line 155 | Line 155 | void Integrator::checkConstraints( void ){ | |
155 | } | |
156 | ||
157 | ||
158 | < | void Integrator::integrate( void ){ |
158 | > | template<typename T> void Integrator<T>::integrate( void ){ |
159 | ||
160 | int i, j; // loop counters | |
161 | ||
# | Line 167 | Line 167 | void Integrator::integrate( void ){ | |
167 | double currSample; | |
168 | double currThermal; | |
169 | double currStatus; | |
170 | – | double currTime; |
170 | ||
171 | int calcPot, calcStress; | |
172 | int isError; | |
173 | ||
175 | – | |
176 | – | |
174 | tStats = new Thermo( info ); | |
175 | statOut = new StatWriter( info ); | |
176 | dumpOut = new DumpWriter( info ); | |
# | Line 186 | Line 183 | void Integrator::integrate( void ){ | |
183 | ||
184 | // initialize the forces before the first step | |
185 | ||
186 | < | myFF->doForces(1,1); |
187 | < | |
186 | > | calcForce(1, 1); |
187 | > | // myFF->doForces(1,1); |
188 | > | |
189 | if( info->setTemp ){ | |
190 | ||
191 | < | tStats->velocitize(); |
191 | > | thermalize(); |
192 | } | |
193 | ||
196 | – | dumpOut->writeDump( 0.0 ); |
197 | – | statOut->writeStat( 0.0 ); |
198 | – | |
194 | calcPot = 0; | |
195 | calcStress = 0; | |
196 | < | currSample = sampleTime; |
197 | < | currThermal = thermalTime; |
198 | < | currStatus = statusTime; |
204 | < | currTime = 0.0;; |
196 | > | currSample = sampleTime + info->getTime(); |
197 | > | currThermal = thermalTime+ info->getTime(); |
198 | > | currStatus = statusTime + info->getTime(); |
199 | ||
200 | + | dumpOut->writeDump( info->getTime() ); |
201 | + | statOut->writeStat( info->getTime() ); |
202 | ||
203 | readyCheck(); | |
204 | ||
# | Line 212 | Line 208 | void Integrator::integrate( void ){ | |
208 | MPIcheckPoint(); | |
209 | #endif // is_mpi | |
210 | ||
211 | + | while( info->getTime() < runTime ){ |
212 | ||
213 | < | pos = Atom::getPosArray(); |
217 | < | vel = Atom::getVelArray(); |
218 | < | frc = Atom::getFrcArray(); |
219 | < | trq = Atom::getTrqArray(); |
220 | < | Amat = Atom::getAmatArray(); |
221 | < | |
222 | < | while( currTime < runTime ){ |
223 | < | |
224 | < | if( (currTime+dt) >= currStatus ){ |
213 | > | if( (info->getTime()+dt) >= currStatus ){ |
214 | calcPot = 1; | |
215 | calcStress = 1; | |
216 | } | |
217 | ||
218 | integrateStep( calcPot, calcStress ); | |
219 | ||
220 | < | currTime += dt; |
220 | > | info->incrTime(dt); |
221 | ||
222 | if( info->setTemp ){ | |
223 | < | if( currTime >= currThermal ){ |
224 | < | tStats->velocitize(); |
223 | > | if( info->getTime() >= currThermal ){ |
224 | > | thermalize(); |
225 | currThermal += thermalTime; | |
226 | } | |
227 | } | |
228 | ||
229 | < | if( currTime >= currSample ){ |
230 | < | dumpOut->writeDump( currTime ); |
229 | > | if( info->getTime() >= currSample ){ |
230 | > | dumpOut->writeDump( info->getTime() ); |
231 | currSample += sampleTime; | |
232 | } | |
233 | ||
234 | < | if( currTime >= currStatus ){ |
235 | < | statOut->writeStat( currTime ); |
234 | > | if( info->getTime() >= currStatus ){ |
235 | > | statOut->writeStat( info->getTime() ); |
236 | calcPot = 0; | |
237 | calcStress = 0; | |
238 | currStatus += statusTime; | |
# | Line 257 | Line 246 | void Integrator::integrate( void ){ | |
246 | ||
247 | } | |
248 | ||
249 | < | dumpOut->writeFinal(currTime); |
249 | > | dumpOut->writeFinal(info->getTime()); |
250 | ||
251 | delete dumpOut; | |
252 | delete statOut; | |
253 | } | |
254 | ||
255 | < | void Integrator::integrateStep( int calcPot, int calcStress ){ |
255 | > | template<typename T> void Integrator<T>::integrateStep( int calcPot, int calcStress ){ |
256 | ||
257 | ||
258 | ||
# | Line 273 | Line 262 | void Integrator::integrateStep( int calcPot, int calcS | |
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); |
274 | > | calcForce(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 | ||
296 | < | void Integrator::moveA( void ){ |
296 | > | template<typename T> void Integrator<T>::moveA( void ){ |
297 | ||
298 | < | int i,j,k; |
291 | < | int atomIndex, aMatIndex; |
298 | > | int i, j; |
299 | DirectionalAtom* dAtom; | |
300 | < | double Tb[3]; |
301 | < | double ji[3]; |
300 | > | double Tb[3], ji[3]; |
301 | > | double A[3][3], I[3][3]; |
302 | double angle; | |
303 | + | double vel[3], pos[3], frc[3]; |
304 | + | double mass; |
305 | ||
306 | + | for( i=0; i<nAtoms; i++ ){ |
307 | ||
308 | + | atoms[i]->getVel( vel ); |
309 | + | atoms[i]->getPos( pos ); |
310 | + | atoms[i]->getFrc( frc ); |
311 | ||
312 | < | for( i=0; i<nAtoms; i++ ){ |
300 | < | atomIndex = i * 3; |
301 | < | aMatIndex = i * 9; |
312 | > | mass = atoms[i]->getMass(); |
313 | ||
314 | < | // velocity half step |
315 | < | for( j=atomIndex; j<(atomIndex+3); j++ ) |
316 | < | vel[j] += ( dt2 * frc[j] / atoms[i]->getMass() ) * eConvert; |
314 | > | for (j=0; j < 3; j++) { |
315 | > | // velocity half step |
316 | > | vel[j] += ( dt2 * frc[j] / mass ) * eConvert; |
317 | > | // position whole step |
318 | > | pos[j] += dt * vel[j]; |
319 | > | } |
320 | ||
321 | < | // position whole step |
322 | < | for( j=atomIndex; j<(atomIndex+3); j++ ) pos[j] += dt * vel[j]; |
323 | < | |
321 | > | atoms[i]->setVel( vel ); |
322 | > | atoms[i]->setPos( pos ); |
323 | > | |
324 | if( atoms[i]->isDirectional() ){ | |
325 | ||
326 | dAtom = (DirectionalAtom *)atoms[i]; | |
327 | ||
328 | // get and convert the torque to body frame | |
329 | ||
330 | < | Tb[0] = dAtom->getTx(); |
317 | < | Tb[1] = dAtom->getTy(); |
318 | < | Tb[2] = dAtom->getTz(); |
319 | < | |
330 | > | dAtom->getTrq( Tb ); |
331 | dAtom->lab2Body( Tb ); | |
332 | < | |
332 | > | |
333 | // get the angular momentum, and propagate a half step | |
334 | + | |
335 | + | dAtom->getJ( ji ); |
336 | + | |
337 | + | for (j=0; j < 3; j++) |
338 | + | ji[j] += (dt2 * Tb[j]) * eConvert; |
339 | ||
324 | – | ji[0] = dAtom->getJx() + ( dt2 * Tb[0] ) * eConvert; |
325 | – | ji[1] = dAtom->getJy() + ( dt2 * Tb[1] ) * eConvert; |
326 | – | ji[2] = dAtom->getJz() + ( dt2 * Tb[2] ) * eConvert; |
327 | – | |
340 | // use the angular velocities to propagate the rotation matrix a | |
341 | // full time step | |
342 | < | |
342 | > | |
343 | > | dAtom->getA(A); |
344 | > | dAtom->getI(I); |
345 | > | |
346 | // rotate about the x-axis | |
347 | < | angle = dt2 * ji[0] / dAtom->getIxx(); |
348 | < | this->rotate( 1, 2, angle, ji, &Amat[aMatIndex] ); |
349 | < | |
347 | > | angle = dt2 * ji[0] / I[0][0]; |
348 | > | this->rotate( 1, 2, angle, ji, A ); |
349 | > | |
350 | // rotate about the y-axis | |
351 | < | angle = dt2 * ji[1] / dAtom->getIyy(); |
352 | < | this->rotate( 2, 0, angle, ji, &Amat[aMatIndex] ); |
351 | > | angle = dt2 * ji[1] / I[1][1]; |
352 | > | this->rotate( 2, 0, angle, ji, A ); |
353 | ||
354 | // rotate about the z-axis | |
355 | < | angle = dt * ji[2] / dAtom->getIzz(); |
356 | < | this->rotate( 0, 1, angle, ji, &Amat[aMatIndex] ); |
355 | > | angle = dt * ji[2] / I[2][2]; |
356 | > | this->rotate( 0, 1, angle, ji, A); |
357 | ||
358 | // rotate about the y-axis | |
359 | < | angle = dt2 * ji[1] / dAtom->getIyy(); |
360 | < | this->rotate( 2, 0, angle, ji, &Amat[aMatIndex] ); |
359 | > | angle = dt2 * ji[1] / I[1][1]; |
360 | > | this->rotate( 2, 0, angle, ji, A ); |
361 | ||
362 | // rotate about the x-axis | |
363 | < | angle = dt2 * ji[0] / dAtom->getIxx(); |
364 | < | this->rotate( 1, 2, angle, ji, &Amat[aMatIndex] ); |
363 | > | angle = dt2 * ji[0] / I[0][0]; |
364 | > | this->rotate( 1, 2, angle, ji, A ); |
365 | ||
366 | < | dAtom->setJx( ji[0] ); |
367 | < | dAtom->setJy( ji[1] ); |
368 | < | dAtom->setJz( ji[2] ); |
369 | < | } |
370 | < | |
366 | > | |
367 | > | dAtom->setJ( ji ); |
368 | > | dAtom->setA( A ); |
369 | > | |
370 | > | } |
371 | } | |
372 | } | |
373 | ||
374 | ||
375 | < | void Integrator::moveB( void ){ |
376 | < | int i,j,k; |
362 | < | int atomIndex; |
375 | > | template<typename T> void Integrator<T>::moveB( void ){ |
376 | > | int i, j; |
377 | DirectionalAtom* dAtom; | |
378 | < | double Tb[3]; |
379 | < | double ji[3]; |
378 | > | double Tb[3], ji[3]; |
379 | > | double vel[3], frc[3]; |
380 | > | double mass; |
381 | ||
382 | for( i=0; i<nAtoms; i++ ){ | |
383 | < | atomIndex = i * 3; |
383 | > | |
384 | > | atoms[i]->getVel( vel ); |
385 | > | atoms[i]->getFrc( frc ); |
386 | ||
387 | < | // velocity half step |
371 | < | for( j=atomIndex; j<(atomIndex+3); j++ ) |
372 | < | vel[j] += ( dt2 * frc[j] / atoms[i]->getMass() ) * eConvert; |
387 | > | mass = atoms[i]->getMass(); |
388 | ||
389 | + | // velocity half step |
390 | + | for (j=0; j < 3; j++) |
391 | + | vel[j] += ( dt2 * frc[j] / mass ) * eConvert; |
392 | + | |
393 | + | atoms[i]->setVel( vel ); |
394 | + | |
395 | if( atoms[i]->isDirectional() ){ | |
396 | < | |
396 | > | |
397 | dAtom = (DirectionalAtom *)atoms[i]; | |
398 | < | |
399 | < | // get and convert the torque to body frame |
400 | < | |
401 | < | Tb[0] = dAtom->getTx(); |
381 | < | Tb[1] = dAtom->getTy(); |
382 | < | Tb[2] = dAtom->getTz(); |
383 | < | |
398 | > | |
399 | > | // get and convert the torque to body frame |
400 | > | |
401 | > | dAtom->getTrq( Tb ); |
402 | dAtom->lab2Body( Tb ); | |
403 | + | |
404 | + | // get the angular momentum, and propagate a half step |
405 | + | |
406 | + | dAtom->getJ( ji ); |
407 | + | |
408 | + | for (j=0; j < 3; j++) |
409 | + | ji[j] += (dt2 * Tb[j]) * eConvert; |
410 | ||
411 | < | // get the angular momentum, and complete the angular momentum |
412 | < | // half step |
388 | < | |
389 | < | ji[0] = dAtom->getJx() + ( dt2 * Tb[0] ) * eConvert; |
390 | < | ji[1] = dAtom->getJy() + ( dt2 * Tb[1] ) * eConvert; |
391 | < | ji[2] = dAtom->getJz() + ( dt2 * Tb[2] ) * eConvert; |
392 | < | |
393 | < | dAtom->setJx( ji[0] ); |
394 | < | dAtom->setJy( ji[1] ); |
395 | < | dAtom->setJz( ji[2] ); |
411 | > | |
412 | > | dAtom->setJ( ji ); |
413 | } | |
414 | } | |
398 | – | |
415 | } | |
416 | ||
417 | < | void Integrator::preMove( void ){ |
418 | < | int i; |
417 | > | template<typename T> void Integrator<T>::preMove( void ){ |
418 | > | int i, j; |
419 | > | double pos[3]; |
420 | ||
421 | if( nConstrained ){ | |
422 | ||
423 | < | for(i=0; i<(nAtoms*3); i++) oldPos[i] = pos[i]; |
424 | < | } |
425 | < | } |
423 | > | for(i=0; i < nAtoms; i++) { |
424 | > | |
425 | > | atoms[i]->getPos( pos ); |
426 | ||
427 | < | void Integrator::constrainA(){ |
427 | > | for (j = 0; j < 3; j++) { |
428 | > | oldPos[3*i + j] = pos[j]; |
429 | > | } |
430 | ||
431 | + | } |
432 | + | } |
433 | + | } |
434 | + | |
435 | + | template<typename T> void Integrator<T>::constrainA(){ |
436 | + | |
437 | int i,j,k; | |
438 | int done; | |
439 | + | double posA[3], posB[3]; |
440 | + | double velA[3], velB[3]; |
441 | double pab[3]; | |
442 | double rab[3]; | |
443 | int a, b, ax, ay, az, bx, by, bz; | |
# | Line 422 | Line 449 | void Integrator::constrainA(){ | |
449 | double gab; | |
450 | int iteration; | |
451 | ||
452 | < | |
426 | < | |
427 | < | for( i=0; i<nAtoms; i++){ |
428 | < | |
452 | > | for( i=0; i<nAtoms; i++){ |
453 | moving[i] = 0; | |
454 | moved[i] = 1; | |
455 | } | |
# | Line 449 | Line 473 | void Integrator::constrainA(){ | |
473 | bz = (b*3) + 2; | |
474 | ||
475 | if( moved[a] || moved[b] ){ | |
476 | < | |
477 | < | pab[0] = pos[ax] - pos[bx]; |
478 | < | pab[1] = pos[ay] - pos[by]; |
479 | < | pab[2] = pos[az] - pos[bz]; |
480 | < | |
476 | > | |
477 | > | atoms[a]->getPos( posA ); |
478 | > | atoms[b]->getPos( posB ); |
479 | > | |
480 | > | for (j = 0; j < 3; j++ ) |
481 | > | pab[j] = posA[j] - posB[j]; |
482 | > | |
483 | //periodic boundary condition | |
484 | ||
485 | info->wrapVector( pab ); | |
# | Line 498 | Line 524 | void Integrator::constrainA(){ | |
524 | dy = rab[1] * gab; | |
525 | dz = rab[2] * gab; | |
526 | ||
527 | < | pos[ax] += rma * dx; |
528 | < | pos[ay] += rma * dy; |
529 | < | pos[az] += rma * dz; |
527 | > | posA[0] += rma * dx; |
528 | > | posA[1] += rma * dy; |
529 | > | posA[2] += rma * dz; |
530 | ||
531 | < | pos[bx] -= rmb * dx; |
506 | < | pos[by] -= rmb * dy; |
507 | < | pos[bz] -= rmb * dz; |
531 | > | atoms[a]->setPos( posA ); |
532 | ||
533 | + | posB[0] -= rmb * dx; |
534 | + | posB[1] -= rmb * dy; |
535 | + | posB[2] -= rmb * dz; |
536 | + | |
537 | + | atoms[b]->setPos( posB ); |
538 | + | |
539 | dx = dx / dt; | |
540 | dy = dy / dt; | |
541 | dz = dz / dt; | |
542 | ||
543 | < | vel[ax] += rma * dx; |
514 | < | vel[ay] += rma * dy; |
515 | < | vel[az] += rma * dz; |
543 | > | atoms[a]->getVel( velA ); |
544 | ||
545 | < | vel[bx] -= rmb * dx; |
546 | < | vel[by] -= rmb * dy; |
547 | < | vel[bz] -= rmb * dz; |
545 | > | velA[0] += rma * dx; |
546 | > | velA[1] += rma * dy; |
547 | > | velA[2] += rma * dz; |
548 | ||
549 | + | atoms[a]->setVel( velA ); |
550 | + | |
551 | + | atoms[b]->getVel( velB ); |
552 | + | |
553 | + | velB[0] -= rmb * dx; |
554 | + | velB[1] -= rmb * dy; |
555 | + | velB[2] -= rmb * dz; |
556 | + | |
557 | + | atoms[b]->setVel( velB ); |
558 | + | |
559 | moving[a] = 1; | |
560 | moving[b] = 1; | |
561 | done = 0; | |
# | Line 545 | Line 583 | void Integrator::constrainA(){ | |
583 | ||
584 | } | |
585 | ||
586 | < | void Integrator::constrainB( void ){ |
586 | > | template<typename T> void Integrator<T>::constrainB( void ){ |
587 | ||
588 | int i,j,k; | |
589 | int done; | |
590 | + | double posA[3], posB[3]; |
591 | + | double velA[3], velB[3]; |
592 | double vxab, vyab, vzab; | |
593 | double rab[3]; | |
594 | int a, b, ax, ay, az, bx, by, bz; | |
# | Line 584 | Line 624 | void Integrator::constrainB( void ){ | |
624 | bz = (b*3) + 2; | |
625 | ||
626 | if( moved[a] || moved[b] ){ | |
587 | – | |
588 | – | vxab = vel[ax] - vel[bx]; |
589 | – | vyab = vel[ay] - vel[by]; |
590 | – | vzab = vel[az] - vel[bz]; |
627 | ||
628 | < | rab[0] = pos[ax] - pos[bx]; |
629 | < | rab[1] = pos[ay] - pos[by]; |
630 | < | rab[2] = pos[az] - pos[bz]; |
631 | < | |
628 | > | atoms[a]->getVel( velA ); |
629 | > | atoms[b]->getVel( velB ); |
630 | > | |
631 | > | vxab = velA[0] - velB[0]; |
632 | > | vyab = velA[1] - velB[1]; |
633 | > | vzab = velA[2] - velB[2]; |
634 | > | |
635 | > | atoms[a]->getPos( posA ); |
636 | > | atoms[b]->getPos( posB ); |
637 | > | |
638 | > | for (j = 0; j < 3; j++) |
639 | > | rab[j] = posA[j] - posB[j]; |
640 | > | |
641 | info->wrapVector( rab ); | |
642 | ||
643 | rma = 1.0 / atoms[a]->getMass(); | |
# | Line 607 | Line 652 | void Integrator::constrainB( void ){ | |
652 | dx = rab[0] * gab; | |
653 | dy = rab[1] * gab; | |
654 | dz = rab[2] * gab; | |
655 | < | |
656 | < | vel[ax] += rma * dx; |
657 | < | vel[ay] += rma * dy; |
658 | < | vel[az] += rma * dz; |
655 | > | |
656 | > | velA[0] += rma * dx; |
657 | > | velA[1] += rma * dy; |
658 | > | velA[2] += rma * dz; |
659 | ||
660 | < | vel[bx] -= rmb * dx; |
661 | < | vel[by] -= rmb * dy; |
662 | < | vel[bz] -= rmb * dz; |
660 | > | atoms[a]->setVel( velA ); |
661 | > | |
662 | > | velB[0] -= rmb * dx; |
663 | > | velB[1] -= rmb * dy; |
664 | > | velB[2] -= rmb * dz; |
665 | > | |
666 | > | atoms[b]->setVel( velB ); |
667 | ||
668 | moving[a] = 1; | |
669 | moving[b] = 1; | |
# | Line 630 | Line 679 | void Integrator::constrainB( void ){ | |
679 | ||
680 | iteration++; | |
681 | } | |
682 | < | |
682 | > | |
683 | if( !done ){ | |
684 | ||
685 | ||
# | Line 643 | Line 692 | void Integrator::constrainB( void ){ | |
692 | ||
693 | } | |
694 | ||
695 | + | template<typename T> void Integrator<T>::rotate( int axes1, int axes2, double angle, double ji[3], |
696 | + | double A[3][3] ){ |
697 | ||
647 | – | |
648 | – | |
649 | – | |
650 | – | |
651 | – | |
652 | – | void Integrator::rotate( int axes1, int axes2, double angle, double ji[3], |
653 | – | double A[9] ){ |
654 | – | |
698 | int i,j,k; | |
699 | double sinAngle; | |
700 | double cosAngle; | |
# | Line 666 | Line 709 | void Integrator::rotate( int axes1, int axes2, double | |
709 | ||
710 | for(i=0; i<3; i++){ | |
711 | for(j=0; j<3; j++){ | |
712 | < | tempA[j][i] = A[3*i + j]; |
712 | > | tempA[j][i] = A[i][j]; |
713 | } | |
714 | } | |
715 | ||
# | Line 723 | Line 766 | void Integrator::rotate( int axes1, int axes2, double | |
766 | ||
767 | for(i=0; i<3; i++){ | |
768 | for(j=0; j<3; j++){ | |
769 | < | A[3*j + i] = 0.0; |
769 | > | A[j][i] = 0.0; |
770 | for(k=0; k<3; k++){ | |
771 | < | A[3*j + i] += tempA[i][k] * rot[j][k]; |
771 | > | A[j][i] += tempA[i][k] * rot[j][k]; |
772 | } | |
773 | } | |
774 | } | |
775 | } | |
776 | + | |
777 | + | template<typename T> void Integrator<T>::calcForce( int calcPot, int calcStress ){ |
778 | + | myFF->doForces(calcPot,calcStress); |
779 | + | |
780 | + | } |
781 | + | |
782 | + | template<typename T> void Integrator<T>::thermalize(){ |
783 | + | tStats->velocitize(); |
784 | + | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |