493 |
|
void SimInfo::checkCutOffs( void ){ |
494 |
|
|
495 |
|
int cutChanged = 0; |
496 |
< |
|
497 |
< |
|
498 |
< |
|
496 |
> |
|
497 |
|
if( boxIsInit ){ |
498 |
|
|
499 |
|
//we need to check cutOffs against the box |
500 |
< |
|
500 |
> |
|
501 |
|
if(( maxCutoff > rCut )&&(usePBC)){ |
502 |
|
if( rCut < origRcut ){ |
503 |
|
rCut = origRcut; |
505 |
|
|
506 |
|
sprintf( painCave.errMsg, |
507 |
|
"New Box size is setting the long range cutoff radius " |
508 |
< |
"to %lf\n", |
509 |
< |
rCut ); |
508 |
> |
"to %lf at time %lf\n", |
509 |
> |
rCut, currentTime ); |
510 |
|
painCave.isFatal = 0; |
511 |
|
simError(); |
512 |
|
} |
513 |
|
} |
514 |
< |
|
514 |
> |
|
515 |
|
if( maxCutoff > ecr ){ |
516 |
|
if( ecr < origEcr ){ |
517 |
|
ecr = origEcr; |
519 |
|
|
520 |
|
sprintf( painCave.errMsg, |
521 |
|
"New Box size is setting the electrostaticCutoffRadius " |
522 |
< |
"to %lf\n", |
523 |
< |
ecr ); |
522 |
> |
"to %lf at time %lf\n", |
523 |
> |
ecr, currentTime ); |
524 |
|
painCave.isFatal = 0; |
525 |
|
simError(); |
526 |
|
} |
527 |
|
} |
528 |
< |
|
529 |
< |
|
528 |
> |
|
529 |
> |
|
530 |
|
if ((rCut > maxCutoff)&&(usePBC)) { |
531 |
|
sprintf( painCave.errMsg, |
532 |
|
"New Box size is setting the long range cutoff radius " |
533 |
< |
"to %lf\n", |
534 |
< |
maxCutoff ); |
533 |
> |
"to %lf at time %lf\n", |
534 |
> |
maxCutoff, currentTime ); |
535 |
|
painCave.isFatal = 0; |
536 |
|
simError(); |
537 |
|
rCut = maxCutoff; |
538 |
|
} |
539 |
< |
|
539 |
> |
|
540 |
|
if( ecr > maxCutoff){ |
541 |
|
sprintf( painCave.errMsg, |
542 |
|
"New Box size is setting the electrostaticCutoffRadius " |
543 |
< |
"to %lf\n", |
544 |
< |
maxCutoff ); |
543 |
> |
"to %lf at time %lf\n", |
544 |
> |
maxCutoff, currentTime ); |
545 |
|
painCave.isFatal = 0; |
546 |
|
simError(); |
547 |
|
ecr = maxCutoff; |
548 |
|
} |
549 |
|
|
552 |
– |
|
550 |
|
if( (oldEcr != ecr) || ( oldRcut != rCut ) ) cutChanged = 1; |
551 |
< |
|
551 |
> |
|
552 |
|
// rlist is the 1.0 plus max( rcut, ecr ) |
553 |
|
|
554 |
|
( rCut > ecr )? rList = rCut + 1.0: rList = ecr + 1.0; |
560 |
|
|
561 |
|
oldEcr = ecr; |
562 |
|
oldRcut = rCut; |
563 |
< |
|
563 |
> |
|
564 |
|
} else { |
565 |
|
// initialize this stuff before using it, OK? |
566 |
< |
sprintf( painCave.errMsg, |
567 |
< |
"Trying to check cutoffs without a box. Be smarter.\n" ); |
568 |
< |
painCave.isFatal = 1; |
569 |
< |
simError(); |
566 |
> |
sprintf( painCave.errMsg, |
567 |
> |
"Trying to check cutoffs without a box. Be smarter.\n" ); |
568 |
> |
painCave.isFatal = 1; |
569 |
> |
simError(); |
570 |
|
} |
571 |
< |
|
571 |
> |
|
572 |
|
} |
573 |
|
|
574 |
|
void SimInfo::addProperty(GenericData* prop){ |