1 |
< |
#include <cstdlib> |
2 |
< |
#include <cstring> |
3 |
< |
#include <cmath> |
1 |
> |
#include <stdlib.h> |
2 |
> |
#include <string.h> |
3 |
> |
#include <math.h> |
4 |
|
|
5 |
|
#include <iostream> |
6 |
|
using namespace std; |
408 |
|
|
409 |
|
|
410 |
|
int SimInfo::getNDF(){ |
411 |
< |
int ndf_local, ndf; |
411 |
> |
int ndf_local; |
412 |
|
|
413 |
|
ndf_local = 3 * n_atoms + 3 * n_oriented - n_constraints; |
414 |
|
|
424 |
|
} |
425 |
|
|
426 |
|
int SimInfo::getNDFraw() { |
427 |
< |
int ndfRaw_local, ndfRaw; |
427 |
> |
int ndfRaw_local; |
428 |
|
|
429 |
|
// Raw degrees of freedom that we have to set |
430 |
|
ndfRaw_local = 3 * n_atoms + 3 * n_oriented; |
439 |
|
} |
440 |
|
|
441 |
|
int SimInfo::getNDFtranslational() { |
442 |
< |
int ndfTrans_local, ndfTrans; |
442 |
> |
int ndfTrans_local; |
443 |
|
|
444 |
|
ndfTrans_local = 3 * n_atoms - n_constraints; |
445 |
|
|
514 |
|
|
515 |
|
|
516 |
|
void SimInfo::setRcut( double theRcut ){ |
517 |
– |
|
518 |
– |
if( !haveOrigRcut ){ |
519 |
– |
haveOrigRcut = 1; |
520 |
– |
origRcut = theRcut; |
521 |
– |
} |
517 |
|
|
518 |
|
rCut = theRcut; |
519 |
|
checkCutOffs(); |
520 |
|
} |
521 |
|
|
522 |
< |
void SimInfo::setEcr( double theEcr ){ |
522 |
> |
void SimInfo::setDefaultRcut( double theRcut ){ |
523 |
|
|
524 |
< |
if( !haveOrigEcr ){ |
525 |
< |
haveOrigEcr = 1; |
526 |
< |
origEcr = theEcr; |
527 |
< |
} |
524 |
> |
haveOrigRcut = 1; |
525 |
> |
origRcut = theRcut; |
526 |
> |
rCut = theRcut; |
527 |
> |
|
528 |
> |
( rCut > ecr )? rList = rCut + 1.0: rList = ecr + 1.0; |
529 |
|
|
530 |
+ |
notifyFortranCutOffs( &rCut, &rList, &ecr, &est ); |
531 |
+ |
} |
532 |
+ |
|
533 |
+ |
void SimInfo::setEcr( double theEcr ){ |
534 |
+ |
|
535 |
|
ecr = theEcr; |
536 |
|
checkCutOffs(); |
537 |
|
} |
538 |
|
|
539 |
+ |
void SimInfo::setDefaultEcr( double theEcr ){ |
540 |
+ |
|
541 |
+ |
haveOrigEcr = 1; |
542 |
+ |
origEcr = theEcr; |
543 |
+ |
|
544 |
+ |
( rCut > ecr )? rList = rCut + 1.0: rList = ecr + 1.0; |
545 |
+ |
|
546 |
+ |
ecr = theEcr; |
547 |
+ |
|
548 |
+ |
notifyFortranCutOffs( &rCut, &rList, &ecr, &est ); |
549 |
+ |
} |
550 |
+ |
|
551 |
|
void SimInfo::setEcr( double theEcr, double theEst ){ |
552 |
|
|
553 |
|
est = theEst; |
554 |
|
setEcr( theEcr ); |
555 |
|
} |
556 |
|
|
557 |
+ |
void SimInfo::setDefaultEcr( double theEcr, double theEst ){ |
558 |
|
|
559 |
+ |
est = theEst; |
560 |
+ |
setDefaultEcr( theEcr ); |
561 |
+ |
} |
562 |
+ |
|
563 |
+ |
|
564 |
|
void SimInfo::checkCutOffs( void ){ |
565 |
|
|
566 |
|
int cutChanged = 0; |
627 |
|
( rCut > ecr )? rList = rCut + 1.0: rList = ecr + 1.0; |
628 |
|
|
629 |
|
if( cutChanged ){ |
611 |
– |
|
630 |
|
notifyFortranCutOffs( &rCut, &rList, &ecr, &est ); |
631 |
|
} |
632 |
|
|