| 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 | 
  | 
 */ | 
| 47 | 
  | 
 * @version 1.0 | 
| 48 | 
  | 
 */ | 
| 49 | 
  | 
 | 
| 50 | 
+ | 
#ifdef IS_MPI | 
| 51 | 
+ | 
#include <mpi.h> | 
| 52 | 
+ | 
#endif | 
| 53 | 
  | 
#include <algorithm> | 
| 54 | 
  | 
#include <set> | 
| 55 | 
  | 
#include <map> | 
| 64 | 
  | 
#include "io/ForceFieldOptions.hpp" | 
| 65 | 
  | 
#include "brains/ForceField.hpp" | 
| 66 | 
  | 
#include "nonbonded/SwitchingFunction.hpp" | 
| 64 | 
– | 
#ifdef IS_MPI | 
| 65 | 
– | 
#include <mpi.h> | 
| 66 | 
– | 
#endif | 
| 67 | 
  | 
 | 
| 68 | 
  | 
using namespace std; | 
| 69 | 
  | 
namespace OpenMD { | 
| 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); | 
| 372 | 
  | 
 | 
| 373 | 
  | 
  void SimInfo::addInteractionPairs(Molecule* mol) { | 
| 374 | 
  | 
    ForceFieldOptions& options_ = forceField_->getForceFieldOptions(); | 
| 375 | 
+ | 
    vector<Atom*>::iterator atomIter; | 
| 376 | 
  | 
    vector<Bond*>::iterator bondIter; | 
| 377 | 
  | 
    vector<Bend*>::iterator bendIter; | 
| 378 | 
  | 
    vector<Torsion*>::iterator torsionIter; | 
| 379 | 
  | 
    vector<Inversion*>::iterator inversionIter; | 
| 380 | 
+ | 
    Atom* atom; | 
| 381 | 
  | 
    Bond* bond; | 
| 382 | 
  | 
    Bend* bend; | 
| 383 | 
  | 
    Torsion* torsion; | 
| 420 | 
  | 
        atomGroups.insert(map<int, set<int> >::value_type(sd->getGlobalIndex(), oneAtomSet));         | 
| 421 | 
  | 
      } | 
| 422 | 
  | 
    }   | 
| 423 | 
+ | 
 | 
| 424 | 
  | 
            | 
| 425 | 
  | 
    for (bond= mol->beginBond(bondIter); bond != NULL;  | 
| 426 | 
  | 
         bond = mol->nextBond(bondIter)) { | 
| 790 | 
  | 
#endif | 
| 791 | 
  | 
 | 
| 792 | 
  | 
    return atomTypes;         | 
| 793 | 
+ | 
  } | 
| 794 | 
+ | 
 | 
| 795 | 
+ | 
 | 
| 796 | 
+ | 
  int getGlobalCountOfType(AtomType* atype) { | 
| 797 | 
+ | 
    /* | 
| 798 | 
+ | 
    set<AtomType*> atypes = getSimulatedAtomTypes(); | 
| 799 | 
+ | 
    map<AtomType*, int> counts_; | 
| 800 | 
+ | 
 | 
| 801 | 
+ | 
    for(mol = beginMolecule(mi); mol != NULL; mol = nextMolecule(mi)) { | 
| 802 | 
+ | 
      for(atom = mol->beginAtom(ai); atom != NULL; | 
| 803 | 
+ | 
          atom = mol->nextAtom(ai)) { | 
| 804 | 
+ | 
        atom->getAtomType(); | 
| 805 | 
+ | 
      }       | 
| 806 | 
+ | 
    }     | 
| 807 | 
+ | 
    */ | 
| 808 | 
+ | 
    return 0; | 
| 809 | 
  | 
  } | 
| 810 | 
  | 
 | 
| 811 | 
  | 
  void SimInfo::setupSimVariables() { | 
| 941 | 
  | 
      }        | 
| 942 | 
  | 
    } | 
| 943 | 
  | 
 | 
| 944 | 
< | 
    // Build the identArray_ | 
| 944 | 
> | 
    // Build the identArray_ and regions_ | 
| 945 | 
  | 
 | 
| 946 | 
  | 
    identArray_.clear(); | 
| 947 | 
< | 
    identArray_.reserve(getNAtoms());     | 
| 948 | 
< | 
    for(mol = beginMolecule(mi); mol != NULL; mol = nextMolecule(mi)) {         | 
| 947 | 
> | 
    identArray_.reserve(getNAtoms());    | 
| 948 | 
> | 
    regions_.clear(); | 
| 949 | 
> | 
    regions_.reserve(getNAtoms()); | 
| 950 | 
> | 
  | 
| 951 | 
> | 
    for(mol = beginMolecule(mi); mol != NULL; mol = nextMolecule(mi)) {       | 
| 952 | 
> | 
      int reg = mol->getRegion();       | 
| 953 | 
  | 
      for(atom = mol->beginAtom(ai); atom != NULL; atom = mol->nextAtom(ai)) { | 
| 954 | 
  | 
        identArray_.push_back(atom->getIdent()); | 
| 955 | 
+ | 
        regions_.push_back(reg); | 
| 956 | 
  | 
      } | 
| 957 | 
  | 
    }     | 
| 958 | 
< | 
     | 
| 928 | 
< | 
    //scan topology  | 
| 929 | 
< | 
 | 
| 930 | 
< | 
    int* excludeList = excludedInteractions_.getPairList(); | 
| 931 | 
< | 
    int* oneTwoList = oneTwoInteractions_.getPairList(); | 
| 932 | 
< | 
    int* oneThreeList = oneThreeInteractions_.getPairList(); | 
| 933 | 
< | 
    int* oneFourList = oneFourInteractions_.getPairList(); | 
| 934 | 
< | 
 | 
| 958 | 
> | 
        | 
| 959 | 
  | 
    topologyDone_ = true; | 
| 960 | 
  | 
  } | 
| 961 | 
  | 
 | 
| 1027 | 
  | 
    | 
| 1028 | 
  | 
   | 
| 1029 | 
  | 
  StuntDouble* SimInfo::getIOIndexToIntegrableObject(int index) { | 
| 1030 | 
< | 
    if (index >= IOIndexToIntegrableObject.size()) { | 
| 1030 | 
> | 
    if (index >= int(IOIndexToIntegrableObject.size())) { | 
| 1031 | 
  | 
      sprintf(painCave.errMsg, | 
| 1032 | 
  | 
              "SimInfo::getIOIndexToIntegrableObject Error: Integrable Object\n" | 
| 1033 | 
  | 
              "\tindex exceeds number of known objects!\n"); |