| 236 |
|
|
| 237 |
|
for( tl=0; tl < n_loops; tl++ ){ |
| 238 |
|
|
| 239 |
– |
if (!strcasecmp( entry_plug->ensemble, "NVT")) |
| 240 |
– |
myES->NoseHooverNVT( dt / 2.0 , tStats->getKinetic() ); |
| 239 |
|
|
| 240 |
|
for( j=0; j<nAtoms; j++ ){ |
| 241 |
|
|
| 334 |
|
} |
| 335 |
|
} |
| 336 |
|
|
| 337 |
+ |
if (!strcasecmp( entry_plug->ensemble, "NVT")) |
| 338 |
+ |
myES->NoseHooverNVT( dt / 2.0 , tStats->getKinetic() ); |
| 339 |
+ |
|
| 340 |
|
// calculate the forces |
| 341 |
|
|
| 342 |
|
myFF->doForces(calcPot, calcStress); |
| 423 |
|
if( !(time % sample_n) ) dump_out->writeDump( time * dt ); |
| 424 |
|
if( !((time+1) % status_n) ) { |
| 425 |
|
calcPot = 1; |
| 426 |
< |
// bitwise masking in case we need it for NPT |
| 426 |
< |
calcStress = (!strcasecmp(entry_plug->ensemble,"NPT")) && 1; |
| 426 |
> |
calcStress = 1; |
| 427 |
|
} |
| 428 |
|
if( !(time % status_n) ){ |
| 429 |
|
e_out->writeStat( time * dt ); |
| 430 |
|
calcPot = 0; |
| 431 |
< |
// bitwise masking in case we need it for NPT |
| 432 |
< |
calcStress = (!strcasecmp(entry_plug->ensemble,"NPT")) && 0; |
| 431 |
> |
if (!strcasecmp(entry_plug->ensemble, "NPT")) calcStress = 1; |
| 432 |
> |
else calcStress = 0; |
| 433 |
|
} |
| 434 |
|
} |
| 435 |
|
} |
| 441 |
|
rot_kE= 0.0; |
| 442 |
|
trans_kE = 0.0; |
| 443 |
|
|
| 444 |
– |
if (!strcasecmp( entry_plug->ensemble, "NVT")) |
| 445 |
– |
myES->NoseHooverNVT( dt / 2.0, tStats->getKinetic() ); |
| 446 |
– |
|
| 444 |
|
for( i=0; i<nAtoms; i++ ){ |
| 445 |
|
|
| 446 |
|
// velocity half step |
| 525 |
|
dAtom->setJz( ji[2] ); |
| 526 |
|
} |
| 527 |
|
} |
| 528 |
+ |
|
| 529 |
+ |
if (!strcasecmp( entry_plug->ensemble, "NVT")) |
| 530 |
+ |
myES->NoseHooverNVT( dt / 2.0, tStats->getKinetic() ); |
| 531 |
|
|
| 532 |
+ |
|
| 533 |
|
// calculate the forces |
| 534 |
|
|
| 535 |
|
myFF->doForces(calcPot,calcStress); |
| 582 |
|
dAtom->setJx( ji[0] ); |
| 583 |
|
dAtom->setJy( ji[1] ); |
| 584 |
|
dAtom->setJz( ji[2] ); |
| 585 |
< |
} |
| 585 |
> |
} |
| 586 |
> |
|
| 587 |
|
} |
| 588 |
|
|
| 589 |
|
if (!strcasecmp( entry_plug->ensemble, "NVT")) |
| 604 |
|
if( !(time % sample_n) ) dump_out->writeDump( time * dt ); |
| 605 |
|
if( !((time+1) % status_n) ) { |
| 606 |
|
calcPot = 1; |
| 607 |
< |
// bitwise masking in case we need it for NPT |
| 606 |
< |
calcStress = (!strcasecmp(entry_plug->ensemble,"NPT")) && 1; |
| 607 |
> |
calcStress = 1; |
| 608 |
|
} |
| 609 |
|
if( !(time % status_n) ){ |
| 610 |
|
e_out->writeStat( time * dt ); |
| 611 |
|
calcPot = 0; |
| 612 |
< |
// bitwise masking in case we need it for NPT |
| 613 |
< |
calcStress = (!strcasecmp(entry_plug->ensemble,"NPT")) && 0; |
| 612 |
> |
if (!strcasecmp(entry_plug->ensemble, "NPT")) calcStress = 1; |
| 613 |
> |
else calcStress = 0; |
| 614 |
|
} |
| 615 |
|
} |
| 616 |
|
} |