| 385 |
|
|
| 386 |
|
return ndfRaw; |
| 387 |
|
} |
| 388 |
< |
|
| 388 |
> |
|
| 389 |
> |
int SimInfo::getNDFtranslational() { |
| 390 |
> |
int ndfTrans_local, ndfTrans; |
| 391 |
> |
|
| 392 |
> |
ndfTrans_local = 3 * n_atoms - n_constraints; |
| 393 |
> |
|
| 394 |
> |
#ifdef IS_MPI |
| 395 |
> |
MPI_Allreduce(&ndfTrans_local,&ndfTrans,1,MPI_INT,MPI_SUM, MPI_COMM_WORLD); |
| 396 |
> |
#else |
| 397 |
> |
ndfTrans = ndfTrans_local; |
| 398 |
> |
#endif |
| 399 |
> |
|
| 400 |
> |
ndfTrans = ndfTrans - 3 - nZconstraints; |
| 401 |
> |
|
| 402 |
> |
return ndfTrans; |
| 403 |
> |
} |
| 404 |
> |
|
| 405 |
|
void SimInfo::refreshSim(){ |
| 406 |
|
|
| 407 |
|
simtype fInfo; |
| 457 |
|
|
| 458 |
|
this->ndf = this->getNDF(); |
| 459 |
|
this->ndfRaw = this->getNDFraw(); |
| 460 |
< |
|
| 460 |
> |
this->ndfTrans = this->getNDFtranslational(); |
| 461 |
|
} |
| 462 |
|
|
| 463 |
|
|
| 516 |
|
|
| 517 |
|
if( maxCutoff > ecr ){ |
| 518 |
|
if( ecr < origEcr ){ |
| 519 |
< |
rCut = origEcr; |
| 519 |
> |
ecr = origEcr; |
| 520 |
|
if (ecr > maxCutoff) ecr = maxCutoff; |
| 521 |
|
|
| 522 |
|
sprintf( painCave.errMsg, |
| 549 |
|
ecr = maxCutoff; |
| 550 |
|
} |
| 551 |
|
|
| 552 |
< |
|
| 553 |
< |
} |
| 538 |
< |
|
| 539 |
< |
|
| 540 |
< |
if( (oldEcr != ecr) || ( oldRcut != rCut ) ) cutChanged = 1; |
| 552 |
> |
|
| 553 |
> |
if( (oldEcr != ecr) || ( oldRcut != rCut ) ) cutChanged = 1; |
| 554 |
|
|
| 555 |
< |
// rlist is the 1.0 plus max( rcut, ecr ) |
| 543 |
< |
|
| 544 |
< |
( rCut > ecr )? rList = rCut + 1.0: rList = ecr + 1.0; |
| 545 |
< |
|
| 546 |
< |
if( cutChanged ){ |
| 555 |
> |
// rlist is the 1.0 plus max( rcut, ecr ) |
| 556 |
|
|
| 557 |
< |
notifyFortranCutOffs( &rCut, &rList, &ecr, &est ); |
| 557 |
> |
( rCut > ecr )? rList = rCut + 1.0: rList = ecr + 1.0; |
| 558 |
> |
|
| 559 |
> |
if( cutChanged ){ |
| 560 |
> |
|
| 561 |
> |
notifyFortranCutOffs( &rCut, &rList, &ecr, &est ); |
| 562 |
> |
} |
| 563 |
> |
|
| 564 |
> |
oldEcr = ecr; |
| 565 |
> |
oldRcut = rCut; |
| 566 |
> |
|
| 567 |
> |
} else { |
| 568 |
> |
// initialize this stuff before using it, OK? |
| 569 |
> |
sprintf( painCave.errMsg, |
| 570 |
> |
"Trying to check cutoffs without a box. Be smarter.\n" ); |
| 571 |
> |
painCave.isFatal = 1; |
| 572 |
> |
simError(); |
| 573 |
|
} |
| 574 |
|
|
| 551 |
– |
oldEcr = ecr; |
| 552 |
– |
oldRcut = rCut; |
| 575 |
|
} |
| 576 |
|
|
| 577 |
|
void SimInfo::addProperty(GenericData* prop){ |