| 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); | 
| 938 | 
  | 
      }        | 
| 939 | 
  | 
    } | 
| 940 | 
  | 
 | 
| 941 | 
< | 
    // Build the identArray_ | 
| 941 | 
> | 
    // Build the identArray_ and regions_ | 
| 942 | 
  | 
 | 
| 943 | 
  | 
    identArray_.clear(); | 
| 944 | 
< | 
    identArray_.reserve(getNAtoms());     | 
| 945 | 
< | 
    for(mol = beginMolecule(mi); mol != NULL; mol = nextMolecule(mi)) {         | 
| 944 | 
> | 
    identArray_.reserve(getNAtoms());    | 
| 945 | 
> | 
    regions_.clear(); | 
| 946 | 
> | 
    regions_.reserve(getNAtoms()); | 
| 947 | 
> | 
  | 
| 948 | 
> | 
    for(mol = beginMolecule(mi); mol != NULL; mol = nextMolecule(mi)) {       | 
| 949 | 
> | 
      int reg = mol->getRegion();       | 
| 950 | 
  | 
      for(atom = mol->beginAtom(ai); atom != NULL; atom = mol->nextAtom(ai)) { | 
| 951 | 
  | 
        identArray_.push_back(atom->getIdent()); | 
| 952 | 
+ | 
        regions_.push_back(reg); | 
| 953 | 
  | 
      } | 
| 954 | 
  | 
    }     | 
| 955 | 
< | 
     | 
| 955 | 
> | 
        | 
| 956 | 
  | 
    topologyDone_ = true; | 
| 957 | 
  | 
  } | 
| 958 | 
  | 
 |