173 |
|
pos[j] = oldPos[i*3 + j] + dt*(vel[j] + eta*rj[j]); |
174 |
|
|
175 |
|
atoms[i]->setPos( pos ); |
176 |
– |
|
176 |
|
} |
177 |
< |
|
177 |
> |
|
178 |
> |
if (nConstrained){ |
179 |
> |
constrainA(); |
180 |
> |
} |
181 |
|
} |
182 |
|
|
183 |
|
|
289 |
|
dAtom->setJ( ji ); |
290 |
|
} |
291 |
|
} |
292 |
< |
|
293 |
< |
if (fabs(prevChi - chi) <= chiTolerance && fabs(preEta -eta) <= etaTolerance) |
292 |
> |
|
293 |
> |
if (nConstrained){ |
294 |
> |
constrainB(); |
295 |
> |
} |
296 |
> |
|
297 |
> |
if (fabs(prevChi - chi) <= |
298 |
> |
chiTolerance && fabs(preEta -eta) <= etaTolerance) |
299 |
|
break; |
300 |
|
} |
301 |
|
|
414 |
|
cout.precision(8); |
415 |
|
|
416 |
|
|
417 |
< |
cout << info->getTime() << "\t" |
418 |
< |
<< chi << "\t" |
419 |
< |
<< eta << "\t" |
420 |
< |
<< U << "\t" |
421 |
< |
<< TS << "\t" |
422 |
< |
<< PV << "\t" |
423 |
< |
<< extra << "\t" |
424 |
< |
<< U+TS+PV+extra << endl; |
417 |
> |
// cout << info->getTime() << "\t" |
418 |
> |
// << chi << "\t" |
419 |
> |
// << eta << "\t" |
420 |
> |
// << U << "\t" |
421 |
> |
// << TS << "\t" |
422 |
> |
// << PV << "\t" |
423 |
> |
// << extra << "\t" |
424 |
> |
// << U+TS+PV+extra << endl; |
425 |
|
|
426 |
|
conservedQuantity = U+TS+PV+extra; |
427 |
|
return conservedQuantity; |