| 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; | 
| 94 | 
  | 
 | 
| 95 | 
  | 
void SimInfo::setBoxM( double theBox[3][3] ){ | 
| 96 | 
  | 
   | 
| 97 | 
< | 
  int i, j, status; | 
| 98 | 
< | 
  double smallestBoxL, maxCutoff; | 
| 97 | 
> | 
  int i, j; | 
| 98 | 
  | 
  double FortranHmat[9]; // to preserve compatibility with Fortran the | 
| 99 | 
  | 
                         // ordering in the array is as follows: | 
| 100 | 
  | 
                         // [ 0 3 6 ] | 
| 301 | 
  | 
void SimInfo::calcBoxL( void ){ | 
| 302 | 
  | 
 | 
| 303 | 
  | 
  double dx, dy, dz, dsq; | 
| 305 | 
– | 
  int i; | 
| 304 | 
  | 
 | 
| 305 | 
  | 
  // boxVol = Determinant of Hmat | 
| 306 | 
  | 
 | 
| 370 | 
  | 
 | 
| 371 | 
  | 
void SimInfo::wrapVector( double thePos[3] ){ | 
| 372 | 
  | 
 | 
| 373 | 
< | 
  int i, j, k; | 
| 373 | 
> | 
  int i; | 
| 374 | 
  | 
  double scaled[3]; | 
| 375 | 
  | 
 | 
| 376 | 
  | 
  if( !orthoRhombic ){ | 
| 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 | 
  | 
 | 
| 515 | 
  | 
 | 
| 516 | 
  | 
void SimInfo::setRcut( double theRcut ){ | 
| 517 | 
  | 
 | 
| 520 | 
– | 
  if( !haveOrigRcut ){ | 
| 521 | 
– | 
    haveOrigRcut = 1; | 
| 522 | 
– | 
    origRcut = theRcut; | 
| 523 | 
– | 
  } | 
| 524 | 
– | 
 | 
| 518 | 
  | 
  rCut = theRcut; | 
| 519 | 
  | 
  checkCutOffs(); | 
| 520 | 
  | 
} | 
| 521 | 
  | 
 | 
| 522 | 
+ | 
void SimInfo::setDefaultRcut( double theRcut ){ | 
| 523 | 
+ | 
 | 
| 524 | 
+ | 
  haveOrigRcut = 1; | 
| 525 | 
+ | 
  origRcut = theRcut; | 
| 526 | 
+ | 
  rCut = theRcut; | 
| 527 | 
+ | 
} | 
| 528 | 
+ | 
 | 
| 529 | 
  | 
void SimInfo::setEcr( double theEcr ){ | 
| 530 | 
  | 
 | 
| 531 | 
– | 
  if( !haveOrigEcr ){ | 
| 532 | 
– | 
    haveOrigEcr = 1; | 
| 533 | 
– | 
    origEcr = theEcr; | 
| 534 | 
– | 
  } | 
| 535 | 
– | 
 | 
| 531 | 
  | 
  ecr = theEcr; | 
| 532 | 
  | 
  checkCutOffs(); | 
| 533 | 
  | 
} | 
| 534 | 
  | 
 | 
| 535 | 
+ | 
void SimInfo::setDefaultEcr( double theEcr ){ | 
| 536 | 
+ | 
 | 
| 537 | 
+ | 
  haveOrigEcr = 1; | 
| 538 | 
+ | 
  origEcr = theEcr; | 
| 539 | 
+ | 
   | 
| 540 | 
+ | 
  ecr = theEcr; | 
| 541 | 
+ | 
} | 
| 542 | 
+ | 
 | 
| 543 | 
  | 
void SimInfo::setEcr( double theEcr, double theEst ){ | 
| 544 | 
  | 
 | 
| 545 | 
  | 
  est = theEst; | 
| 546 | 
  | 
  setEcr( theEcr ); | 
| 547 | 
  | 
} | 
| 548 | 
  | 
 | 
| 549 | 
+ | 
void SimInfo::setDefaultEcr( double theEcr, double theEst ){ | 
| 550 | 
  | 
 | 
| 551 | 
+ | 
  est = theEst; | 
| 552 | 
+ | 
  setDefaultEcr( theEcr ); | 
| 553 | 
+ | 
} | 
| 554 | 
+ | 
 | 
| 555 | 
+ | 
 | 
| 556 | 
  | 
void SimInfo::checkCutOffs( void ){ | 
| 557 | 
  | 
 | 
| 558 | 
  | 
  int cutChanged = 0; |