| 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 { | 
| 418 | 
  | 
        atomGroups.insert(map<int, set<int> >::value_type(sd->getGlobalIndex(), oneAtomSet));         | 
| 419 | 
  | 
      } | 
| 420 | 
  | 
    }   | 
| 421 | 
+ | 
 | 
| 422 | 
  | 
            | 
| 423 | 
  | 
    for (bond= mol->beginBond(bondIter); bond != NULL;  | 
| 424 | 
  | 
         bond = mol->nextBond(bondIter)) { | 
| 939 | 
  | 
      }        | 
| 940 | 
  | 
    } | 
| 941 | 
  | 
 | 
| 942 | 
< | 
    // Build the identArray_ | 
| 942 | 
> | 
    // Build the identArray_ and regions_ | 
| 943 | 
  | 
 | 
| 944 | 
  | 
    identArray_.clear(); | 
| 945 | 
< | 
    identArray_.reserve(getNAtoms());     | 
| 946 | 
< | 
    for(mol = beginMolecule(mi); mol != NULL; mol = nextMolecule(mi)) {         | 
| 945 | 
> | 
    identArray_.reserve(getNAtoms());    | 
| 946 | 
> | 
    regions_.clear(); | 
| 947 | 
> | 
    regions_.reserve(getNAtoms()); | 
| 948 | 
> | 
  | 
| 949 | 
> | 
    for(mol = beginMolecule(mi); mol != NULL; mol = nextMolecule(mi)) {       | 
| 950 | 
> | 
      int reg = mol->getRegion();       | 
| 951 | 
  | 
      for(atom = mol->beginAtom(ai); atom != NULL; atom = mol->nextAtom(ai)) { | 
| 952 | 
  | 
        identArray_.push_back(atom->getIdent()); | 
| 953 | 
+ | 
        regions_.push_back(reg); | 
| 954 | 
  | 
      } | 
| 955 | 
  | 
    }     | 
| 956 | 
< | 
     | 
| 956 | 
> | 
        | 
| 957 | 
  | 
    topologyDone_ = true; | 
| 958 | 
  | 
  } | 
| 959 | 
  | 
 |