| 419 | 
  | 
        velocity.accumulator.push_back( new VectorAccumulator() ); | 
| 420 | 
  | 
      data_[VELOCITY] = velocity; | 
| 421 | 
  | 
      outputMap_["VELOCITY"] = VELOCITY; | 
| 422 | 
+ | 
 | 
| 423 | 
+ | 
      OutputData angularVelocity; | 
| 424 | 
+ | 
      angularVelocity.units = "angstroms^2/fs"; | 
| 425 | 
+ | 
      angularVelocity.title =  "AngularVelocity";   | 
| 426 | 
+ | 
      angularVelocity.dataType = "Vector3d"; | 
| 427 | 
+ | 
      angularVelocity.accumulator.reserve(nBins_); | 
| 428 | 
+ | 
      for (int i = 0; i < nBins_; i++)  | 
| 429 | 
+ | 
        angularVelocity.accumulator.push_back( new VectorAccumulator() ); | 
| 430 | 
+ | 
      data_[ANGULARVELOCITY] = angularVelocity; | 
| 431 | 
+ | 
      outputMap_["ANGULARVELOCITY"] = ANGULARVELOCITY; | 
| 432 | 
  | 
 | 
| 433 | 
  | 
      OutputData density; | 
| 434 | 
  | 
      density.units =  "g cm^-3"; | 
| 1620 | 
  | 
                    //vel = (*sdi)->getVel(); | 
| 1621 | 
  | 
                    rPos = (*sdi)->getPos() - coordinateOrigin_; | 
| 1622 | 
  | 
                    vel = ((*sdi)->getVel() - vh - cross(omegah, rPos)) * h  | 
| 1623 | 
< | 
                      + ah + cross(bh, rPos);                    | 
| 1623 | 
> | 
                      + ah + cross(bh, rPos);      | 
| 1624 | 
> | 
                    cerr << "setting vel to " << vel << "\n"; | 
| 1625 | 
  | 
                    (*sdi)->setVel(vel); | 
| 1626 | 
  | 
                    if (rnemdFluxType_ == rnemdFullKE) { | 
| 1627 | 
  | 
                      if ((*sdi)->isDirectional()) { | 
| 1718 | 
  | 
    if (!doRNEMD_) return; | 
| 1719 | 
  | 
    trialCount_++; | 
| 1720 | 
  | 
 | 
| 1721 | 
+ | 
    cerr << "trialCount = " << trialCount_ << "\n"; | 
| 1722 | 
  | 
    // object evaluator: | 
| 1723 | 
  | 
    evaluator_.loadScriptString(rnemdObjectSelection_); | 
| 1724 | 
  | 
    seleMan_.setSelectionSet(evaluator_.evaluate()); | 
| 1763 | 
  | 
  void RNEMD::collectData() { | 
| 1764 | 
  | 
    if (!doRNEMD_) return; | 
| 1765 | 
  | 
    Snapshot* currentSnap_ = info_->getSnapshotManager()->getCurrentSnapshot(); | 
| 1766 | 
< | 
 | 
| 1766 | 
> | 
     | 
| 1767 | 
> | 
    cerr << "collecting data\n"; | 
| 1768 | 
  | 
    // collectData can be called more frequently than the doRNEMD, so use the  | 
| 1769 | 
  | 
    // computed area from the last exchange time: | 
| 1770 | 
< | 
 | 
| 1771 | 
< | 
    areaAccumulator_->add(getDividingArea()); | 
| 1770 | 
> | 
    RealType area = getDividingArea(); | 
| 1771 | 
> | 
    areaAccumulator_->add(area); | 
| 1772 | 
  | 
    Mat3x3d hmat = currentSnap_->getHmat(); | 
| 1773 | 
  | 
    seleMan_.setSelectionSet(evaluator_.evaluate()); | 
| 1774 | 
  | 
 | 
| 1827 | 
  | 
      Vector3d rPos = sd->getPos() - coordinateOrigin_; | 
| 1828 | 
  | 
      Vector3d aVel = cross(rPos, vel); | 
| 1829 | 
  | 
       | 
| 1830 | 
< | 
      if (binNo < nBins_)  { | 
| 1830 | 
> | 
      if (binNo >= 0 && binNo < nBins_)  { | 
| 1831 | 
  | 
        binCount[binNo]++; | 
| 1832 | 
  | 
        binMass[binNo] += mass; | 
| 1833 | 
  | 
        binPx[binNo] += mass*vel.x(); | 
| 1927 | 
  | 
            case VELOCITY: | 
| 1928 | 
  | 
              dynamic_cast<VectorAccumulator *>(data_[j].accumulator[i])->add(vel); | 
| 1929 | 
  | 
              break; | 
| 1930 | 
< | 
            case ANGULARVELOCITY: | 
| 1930 | 
> | 
            case ANGULARVELOCITY:   | 
| 1931 | 
  | 
              dynamic_cast<VectorAccumulator *>(data_[j].accumulator[i])->add(aVel); | 
| 1932 | 
  | 
              break; | 
| 1933 | 
  | 
            case DENSITY: | 
| 2082 | 
  | 
          if (outputMask_[i]) { | 
| 2083 | 
  | 
            if (data_[i].dataType == "RealType") | 
| 2084 | 
  | 
              writeReal(i,j); | 
| 2085 | 
< | 
            else if (data_[i].dataType == "Vector3d") | 
| 2085 | 
> | 
            else if (data_[i].dataType == "Vector3d")  | 
| 2086 | 
  | 
              writeVector(i,j); | 
| 2087 | 
  | 
            else { | 
| 2088 | 
  | 
              sprintf( painCave.errMsg, | 
| 2139 | 
  | 
    RealType s; | 
| 2140 | 
  | 
    int count; | 
| 2141 | 
  | 
     | 
| 2142 | 
< | 
    count = dynamic_cast<Accumulator *>(data_[index].accumulator[bin])->count(); | 
| 2142 | 
> | 
    count = data_[index].accumulator[bin]->count(); | 
| 2143 | 
  | 
    if (count == 0) return; | 
| 2144 | 
  | 
     | 
| 2145 | 
  | 
    dynamic_cast<Accumulator *>(data_[index].accumulator[bin])->getAverage(s); | 
| 2162 | 
  | 
    Vector3d s; | 
| 2163 | 
  | 
    int count; | 
| 2164 | 
  | 
     | 
| 2165 | 
< | 
    count = dynamic_cast<Accumulator *>(data_[index].accumulator[bin])->count(); | 
| 2165 | 
> | 
    count = data_[index].accumulator[bin]->count(); | 
| 2166 | 
> | 
 | 
| 2167 | 
  | 
    if (count == 0) return; | 
| 2168 | 
  | 
 | 
| 2169 | 
  | 
    dynamic_cast<VectorAccumulator*>(data_[index].accumulator[bin])->getAverage(s); | 
| 2187 | 
  | 
    RealType s; | 
| 2188 | 
  | 
    int count; | 
| 2189 | 
  | 
     | 
| 2190 | 
< | 
    count = dynamic_cast<Accumulator *>(data_[index].accumulator[bin])->count(); | 
| 2190 | 
> | 
    count = data_[index].accumulator[bin]->count(); | 
| 2191 | 
  | 
    if (count == 0) return; | 
| 2192 | 
  | 
     | 
| 2193 | 
  | 
    dynamic_cast<Accumulator *>(data_[index].accumulator[bin])->getStdDev(s); | 
| 2210 | 
  | 
    Vector3d s; | 
| 2211 | 
  | 
    int count; | 
| 2212 | 
  | 
     | 
| 2213 | 
< | 
    count = dynamic_cast<Accumulator *>(data_[index].accumulator[bin])->count(); | 
| 2213 | 
> | 
    count = data_[index].accumulator[bin]->count(); | 
| 2214 | 
  | 
    if (count == 0) return; | 
| 2215 | 
  | 
 | 
| 2216 | 
  | 
    dynamic_cast<VectorAccumulator*>(data_[index].accumulator[bin])->getStdDev(s); |