| 71 | 
  | 
  RNEMD::RNEMD(SimInfo* info) : info_(info), evaluator_(info), seleMan_(info),  | 
| 72 | 
  | 
                                evaluatorA_(info), seleManA_(info),  | 
| 73 | 
  | 
                                commonA_(info), evaluatorB_(info),  | 
| 74 | 
< | 
                                seleManB_(info), commonB_(info), | 
| 74 | 
> | 
                                seleManB_(info), commonB_(info),  | 
| 75 | 
> | 
                                hasData_(false), | 
| 76 | 
  | 
                                usePeriodicBoundaryConditions_(info->getSimParams()->getUsePeriodicBoundaryConditions()) { | 
| 77 | 
  | 
 | 
| 78 | 
  | 
    trialCount_ = 0; | 
| 604 | 
  | 
#ifdef IS_MPI | 
| 605 | 
  | 
    } | 
| 606 | 
  | 
#endif | 
| 607 | 
+ | 
 | 
| 608 | 
+ | 
    // delete all of the objects we created: | 
| 609 | 
+ | 
    delete areaAccumulator_;     | 
| 610 | 
+ | 
    data_.clear(); | 
| 611 | 
  | 
  } | 
| 612 | 
  | 
   | 
| 613 | 
  | 
  void RNEMD::doSwap(SelectionManager& smanA, SelectionManager& smanB) { | 
| 2013 | 
  | 
        } | 
| 2014 | 
  | 
      } | 
| 2015 | 
  | 
    } | 
| 2016 | 
+ | 
    hasData_ = true; | 
| 2017 | 
  | 
  } | 
| 2018 | 
  | 
 | 
| 2019 | 
  | 
  void RNEMD::getStarted() { | 
| 2046 | 
  | 
   | 
| 2047 | 
  | 
  void RNEMD::writeOutputFile() { | 
| 2048 | 
  | 
    if (!doRNEMD_) return; | 
| 2049 | 
+ | 
    if (!hasData_) return; | 
| 2050 | 
  | 
     | 
| 2051 | 
  | 
#ifdef IS_MPI | 
| 2052 | 
  | 
    // If we're the root node, should we print out the results | 
| 2068 | 
  | 
      RealType time = currentSnap_->getTime(); | 
| 2069 | 
  | 
      RealType avgArea; | 
| 2070 | 
  | 
      areaAccumulator_->getAverage(avgArea); | 
| 2064 | 
– | 
      RealType Jz = kineticExchange_ / (time * avgArea)  | 
| 2065 | 
– | 
        / PhysicalConstants::energyConvert; | 
| 2066 | 
– | 
      Vector3d JzP = momentumExchange_ / (time * avgArea);       | 
| 2067 | 
– | 
      Vector3d JzL = angularMomentumExchange_ / (time * avgArea);       | 
| 2071 | 
  | 
 | 
| 2072 | 
+ | 
      RealType Jz(0.0); | 
| 2073 | 
+ | 
      Vector3d JzP(V3Zero); | 
| 2074 | 
+ | 
      Vector3d JzL(V3Zero); | 
| 2075 | 
+ | 
      if (time >= info_->getSimParams()->getDt()) { | 
| 2076 | 
+ | 
        Jz = kineticExchange_ / (time * avgArea) | 
| 2077 | 
+ | 
          / PhysicalConstants::energyConvert; | 
| 2078 | 
+ | 
        JzP = momentumExchange_ / (time * avgArea); | 
| 2079 | 
+ | 
        JzL = angularMomentumExchange_ / (time * avgArea); | 
| 2080 | 
+ | 
      } | 
| 2081 | 
+ | 
 | 
| 2082 | 
  | 
      rnemdFile_ << "#######################################################\n"; | 
| 2083 | 
  | 
      rnemdFile_ << "# RNEMD {\n"; | 
| 2084 | 
  | 
 |