| 63 | 
  | 
  useReactionField = 0; | 
| 64 | 
  | 
  useGB = 0; | 
| 65 | 
  | 
  useEAM = 0; | 
| 66 | 
+ | 
  useMolecularCutoffs = 0; | 
| 67 | 
  | 
 | 
| 68 | 
  | 
  excludes = Exclude::Instance(); | 
| 69 | 
  | 
 | 
| 323 | 
  | 
int SimInfo::getNDF(){ | 
| 324 | 
  | 
  int ndf_local; | 
| 325 | 
  | 
 | 
| 326 | 
+ | 
  ndf_local = 0; | 
| 327 | 
+ | 
   | 
| 328 | 
  | 
  for(int i = 0; i < integrableObjects.size(); i++){ | 
| 329 | 
  | 
    ndf_local += 3; | 
| 330 | 
< | 
    if (integrableObjects[i]->isDirectional()) | 
| 331 | 
< | 
      ndf_local += 3; | 
| 330 | 
> | 
    if (integrableObjects[i]->isDirectional()) { | 
| 331 | 
> | 
      if (integrableObjects[i]->isLinear()) | 
| 332 | 
> | 
        ndf_local += 2; | 
| 333 | 
> | 
      else | 
| 334 | 
> | 
        ndf_local += 3; | 
| 335 | 
> | 
    } | 
| 336 | 
  | 
  } | 
| 337 | 
  | 
 | 
| 338 | 
  | 
  // n_constraints is local, so subtract them on each processor: | 
| 357 | 
  | 
  int ndfRaw_local; | 
| 358 | 
  | 
 | 
| 359 | 
  | 
  // Raw degrees of freedom that we have to set | 
| 360 | 
+ | 
  ndfRaw_local = 0; | 
| 361 | 
  | 
 | 
| 362 | 
  | 
  for(int i = 0; i < integrableObjects.size(); i++){ | 
| 363 | 
  | 
    ndfRaw_local += 3; | 
| 364 | 
< | 
    if (integrableObjects[i]->isDirectional()) | 
| 365 | 
< | 
      ndfRaw_local += 3; | 
| 364 | 
> | 
    if (integrableObjects[i]->isDirectional()) { | 
| 365 | 
> | 
       if (integrableObjects[i]->isLinear()) | 
| 366 | 
> | 
        ndfRaw_local += 2; | 
| 367 | 
> | 
      else | 
| 368 | 
> | 
        ndfRaw_local += 3; | 
| 369 | 
> | 
    } | 
| 370 | 
  | 
  } | 
| 371 | 
  | 
     | 
| 372 | 
  | 
#ifdef IS_MPI | 
| 393 | 
  | 
  ndfTrans = ndfTrans - 3 - nZconstraints; | 
| 394 | 
  | 
 | 
| 395 | 
  | 
  return ndfTrans; | 
| 396 | 
+ | 
} | 
| 397 | 
+ | 
 | 
| 398 | 
+ | 
int SimInfo::getTotIntegrableObjects() { | 
| 399 | 
+ | 
  int nObjs_local; | 
| 400 | 
+ | 
  int nObjs; | 
| 401 | 
+ | 
 | 
| 402 | 
+ | 
  nObjs_local =  integrableObjects.size(); | 
| 403 | 
+ | 
 | 
| 404 | 
+ | 
 | 
| 405 | 
+ | 
#ifdef IS_MPI | 
| 406 | 
+ | 
  MPI_Allreduce(&nObjs_local,&nObjs,1,MPI_INT,MPI_SUM, MPI_COMM_WORLD); | 
| 407 | 
+ | 
#else | 
| 408 | 
+ | 
  nObjs = nObjs_local; | 
| 409 | 
+ | 
#endif | 
| 410 | 
+ | 
 | 
| 411 | 
+ | 
 | 
| 412 | 
+ | 
  return nObjs; | 
| 413 | 
  | 
} | 
| 414 | 
  | 
 | 
| 415 | 
  | 
void SimInfo::refreshSim(){ | 
| 437 | 
  | 
  //fInfo.SIM_uses_RF = 0; | 
| 438 | 
  | 
  fInfo.SIM_uses_GB = useGB; | 
| 439 | 
  | 
  fInfo.SIM_uses_EAM = useEAM; | 
| 440 | 
+ | 
  fInfo.SIM_uses_molecular_cutoffs = useMolecularCutoffs; | 
| 441 | 
  | 
 | 
| 442 | 
  | 
  n_exclude = excludes->getSize(); | 
| 443 | 
  | 
  excl = excludes->getFortranArray(); | 
| 512 | 
  | 
               "\tCurrent Value of LJrcut = %G at time %G\n " | 
| 513 | 
  | 
               "\tThis is larger than half of at least one of the\n" | 
| 514 | 
  | 
               "\tperiodic box vectors.  Right now, the Box matrix is:\n" | 
| 515 | 
< | 
               "\n, %G" | 
| 515 | 
> | 
               "\n" | 
| 516 | 
  | 
               "\t[ %G %G %G ]\n" | 
| 517 | 
  | 
               "\t[ %G %G %G ]\n" | 
| 518 | 
  | 
               "\t[ %G %G %G ]\n", | 
| 519 | 
< | 
               rCut, currentTime, maxCutoff, | 
| 519 | 
> | 
               rCut, currentTime, | 
| 520 | 
  | 
               Hmat[0][0], Hmat[0][1], Hmat[0][2], | 
| 521 | 
  | 
               Hmat[1][0], Hmat[1][1], Hmat[1][2], | 
| 522 | 
  | 
               Hmat[2][0], Hmat[2][1], Hmat[2][2]); | 
| 591 | 
  | 
    return NULL;   | 
| 592 | 
  | 
} | 
| 593 | 
  | 
 | 
| 564 | 
– | 
vector<GenericData*> SimInfo::getProperties(){ | 
| 565 | 
– | 
 | 
| 566 | 
– | 
  vector<GenericData*> result; | 
| 567 | 
– | 
  map<string, GenericData*>::iterator i; | 
| 568 | 
– | 
   | 
| 569 | 
– | 
  for(i = properties.begin(); i != properties.end(); i++) | 
| 570 | 
– | 
    result.push_back((*i).second); | 
| 571 | 
– | 
     | 
| 572 | 
– | 
  return result; | 
| 573 | 
– | 
} |