| 35 | 
  | 
 *                                                                       | 
| 36 | 
  | 
 * [1]  Meineke, et al., J. Comp. Chem. 26, 252-271 (2005).              | 
| 37 | 
  | 
 * [2]  Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006).           | 
| 38 | 
< | 
 * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008).           | 
| 38 | 
> | 
 * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008).           | 
| 39 | 
  | 
 * [4]  Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010). | 
| 40 | 
  | 
 * [5]  Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). | 
| 41 | 
  | 
 */ | 
| 91 | 
  | 
    for (vector<Component*>::iterator i = components.begin();  | 
| 92 | 
  | 
         i !=components.end(); ++i) { | 
| 93 | 
  | 
      molStamp = (*i)->getMoleculeStamp(); | 
| 94 | 
+ | 
      if ( (*i)->haveRegion() ) {         | 
| 95 | 
+ | 
        molStamp->setRegion( (*i)->getRegion() ); | 
| 96 | 
+ | 
      } else { | 
| 97 | 
+ | 
        // set the region to a disallowed value: | 
| 98 | 
+ | 
        molStamp->setRegion( -1 ); | 
| 99 | 
+ | 
      } | 
| 100 | 
+ | 
 | 
| 101 | 
  | 
      nMolWithSameStamp = (*i)->getNMol(); | 
| 102 | 
  | 
       | 
| 103 | 
  | 
      addMoleculeStamp(molStamp, nMolWithSameStamp); | 
| 275 | 
  | 
    ndf_local -= nConstraints_; | 
| 276 | 
  | 
 | 
| 277 | 
  | 
#ifdef IS_MPI | 
| 278 | 
< | 
    MPI_Allreduce(&ndf_local,&ndf_,1,MPI_INT,MPI_SUM, MPI_COMM_WORLD); | 
| 279 | 
< | 
    MPI_Allreduce(&nfq_local,&nGlobalFluctuatingCharges_,1, MPI_INT, MPI_SUM, MPI_COMM_WORLD); | 
| 278 | 
> | 
    MPI::COMM_WORLD.Allreduce(&ndf_local, &ndf_, 1, MPI::INT,MPI::SUM); | 
| 279 | 
> | 
    MPI::COMM_WORLD.Allreduce(&nfq_local, &nGlobalFluctuatingCharges_, 1, | 
| 280 | 
> | 
                              MPI::INT, MPI::SUM); | 
| 281 | 
  | 
#else | 
| 282 | 
  | 
    ndf_ = ndf_local; | 
| 283 | 
  | 
    nGlobalFluctuatingCharges_ = nfq_local; | 
| 291 | 
  | 
 | 
| 292 | 
  | 
  int SimInfo::getFdf() { | 
| 293 | 
  | 
#ifdef IS_MPI | 
| 294 | 
< | 
    MPI_Allreduce(&fdf_local,&fdf_,1,MPI_INT,MPI_SUM, MPI_COMM_WORLD); | 
| 294 | 
> | 
    MPI::COMM_WORLD.Allreduce(&fdf_local, &fdf_, 1, MPI::INT, MPI::SUM); | 
| 295 | 
  | 
#else | 
| 296 | 
  | 
    fdf_ = fdf_local; | 
| 297 | 
  | 
#endif | 
| 347 | 
  | 
    } | 
| 348 | 
  | 
     | 
| 349 | 
  | 
#ifdef IS_MPI | 
| 350 | 
< | 
    MPI_Allreduce(&ndfRaw_local,&ndfRaw_,1,MPI_INT,MPI_SUM, MPI_COMM_WORLD); | 
| 350 | 
> | 
    MPI::COMM_WORLD.Allreduce(&ndfRaw_local, &ndfRaw_, 1, MPI::INT, MPI::SUM); | 
| 351 | 
  | 
#else | 
| 352 | 
  | 
    ndfRaw_ = ndfRaw_local; | 
| 353 | 
  | 
#endif | 
| 360 | 
  | 
 | 
| 361 | 
  | 
 | 
| 362 | 
  | 
#ifdef IS_MPI | 
| 363 | 
< | 
    MPI_Allreduce(&ndfTrans_local,&ndfTrans_,1,MPI_INT,MPI_SUM, MPI_COMM_WORLD); | 
| 363 | 
> | 
    MPI::COMM_WORLD.Allreduce(&ndfTrans_local, &ndfTrans_, 1,  | 
| 364 | 
> | 
                              MPI::INT, MPI::SUM); | 
| 365 | 
  | 
#else | 
| 366 | 
  | 
    ndfTrans_ = ndfTrans_local; | 
| 367 | 
  | 
#endif | 
| 787 | 
  | 
#endif | 
| 788 | 
  | 
 | 
| 789 | 
  | 
    return atomTypes;         | 
| 790 | 
+ | 
  } | 
| 791 | 
+ | 
 | 
| 792 | 
+ | 
 | 
| 793 | 
+ | 
  int getGlobalCountOfType(AtomType* atype) { | 
| 794 | 
+ | 
    /* | 
| 795 | 
+ | 
    set<AtomType*> atypes = getSimulatedAtomTypes(); | 
| 796 | 
+ | 
    map<AtomType*, int> counts_; | 
| 797 | 
+ | 
 | 
| 798 | 
+ | 
    for(mol = beginMolecule(mi); mol != NULL; mol = nextMolecule(mi)) { | 
| 799 | 
+ | 
      for(atom = mol->beginAtom(ai); atom != NULL; | 
| 800 | 
+ | 
          atom = mol->nextAtom(ai)) { | 
| 801 | 
+ | 
        atom->getAtomType(); | 
| 802 | 
+ | 
      }       | 
| 803 | 
+ | 
    }     | 
| 804 | 
+ | 
    */ | 
| 805 | 
+ | 
    return 0; | 
| 806 | 
  | 
  } | 
| 807 | 
  | 
 | 
| 808 | 
  | 
  void SimInfo::setupSimVariables() { | 
| 948 | 
  | 
      } | 
| 949 | 
  | 
    }     | 
| 950 | 
  | 
     | 
| 926 | 
– | 
    //scan topology  | 
| 927 | 
– | 
 | 
| 928 | 
– | 
    int* excludeList = excludedInteractions_.getPairList(); | 
| 929 | 
– | 
    int* oneTwoList = oneTwoInteractions_.getPairList(); | 
| 930 | 
– | 
    int* oneThreeList = oneThreeInteractions_.getPairList(); | 
| 931 | 
– | 
    int* oneFourList = oneFourInteractions_.getPairList(); | 
| 932 | 
– | 
 | 
| 951 | 
  | 
    topologyDone_ = true; | 
| 952 | 
  | 
  } | 
| 953 | 
  | 
 | 
| 1019 | 
  | 
    | 
| 1020 | 
  | 
   | 
| 1021 | 
  | 
  StuntDouble* SimInfo::getIOIndexToIntegrableObject(int index) { | 
| 1022 | 
< | 
    if (index >= IOIndexToIntegrableObject.size()) { | 
| 1022 | 
> | 
    if (index >= int(IOIndexToIntegrableObject.size())) { | 
| 1023 | 
  | 
      sprintf(painCave.errMsg, | 
| 1024 | 
  | 
              "SimInfo::getIOIndexToIntegrableObject Error: Integrable Object\n" | 
| 1025 | 
  | 
              "\tindex exceeds number of known objects!\n"); | 
| 1037 | 
  | 
  int SimInfo::getNGlobalConstraints() { | 
| 1038 | 
  | 
    int nGlobalConstraints; | 
| 1039 | 
  | 
#ifdef IS_MPI | 
| 1040 | 
< | 
    MPI_Allreduce(&nConstraints_, &nGlobalConstraints, 1, MPI_INT, MPI_SUM, | 
| 1041 | 
< | 
                  MPI_COMM_WORLD);     | 
| 1040 | 
> | 
    MPI::COMM_WORLD.Allreduce(&nConstraints_, &nGlobalConstraints, 1,  | 
| 1041 | 
> | 
                              MPI::INT, MPI::SUM); | 
| 1042 | 
  | 
#else | 
| 1043 | 
  | 
    nGlobalConstraints =  nConstraints_; | 
| 1044 | 
  | 
#endif |