ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/integrators/RNEMD.cpp
(Generate patch)

Comparing trunk/src/integrators/RNEMD.cpp (file contents):
Revision 1330 by skuang, Thu Mar 19 21:03:36 2009 UTC vs.
Revision 1331 by gezelter, Thu Apr 2 16:04:52 2009 UTC

# Line 59 | Line 59 | namespace oopse {
59  
60   namespace oopse {
61    
62 <  RNEMD::RNEMD(SimInfo* info) : info_(info) {
62 >  RNEMD::RNEMD(SimInfo* info) : info_(info), evaluator_(info), seleMan_(info) {
63      
64      int seedValue;
65      Globals * simParams = info->getSimParams();
# Line 70 | Line 70 | namespace oopse {
70      stringToEnumMap_["Pz"] = rnemdPz;
71      stringToEnumMap_["Unknown"] = rnemdUnknown;
72  
73 +    rnemdObjectSelection_ = simParams->getRNEMD_objectSelection();
74 +
75 +    std::cerr << "calling  evaluator with " << rnemdObjectSelection_ << "\n";
76 +    evaluator_.loadScriptString(rnemdObjectSelection_);
77 +    std::cerr << "done";
78 +    
79      const std::string st = simParams->getRNEMD_swapType();
80  
81      std::map<std::string, RNEMDTypeEnum>::iterator i;
82      i = stringToEnumMap_.find(st);
83      rnemdType_  = (i == stringToEnumMap_.end()) ? RNEMD::rnemdUnknown : i->second;
84  
79
85      set_RNEMD_swapTime(simParams->getRNEMD_swapTime());
86      set_RNEMD_nBins(simParams->getRNEMD_nBins());
87      exchangeSum_ = 0.0;
# Line 108 | Line 113 | namespace oopse {
113      std::cerr << "swapTime = " << swapTime_ << "\n";
114      std::cerr << "exchangeSum = " << exchangeSum_ << "\n";
115      std::cerr << "swapType = " << rnemdType_ << "\n";
116 +    std::cerr << "selection = " << rnemdObjectSelection_ << "\n";
117 +
118 +    seleMan_.setSelectionSet(evaluator_.evaluate());
119 +
120 +    std::cerr << "selectionCount = " << seleMan_.getSelectionCount() << "\n\n";
121 +
122 +    int i;
123 +    StuntDouble* sd;
124 +
125 +    for (sd = seleMan_.beginSelected(i); sd != NULL; sd = seleMan_.nextSelected(i)) {
126 +      Vector3d pos = sd->getPos();
127 +      //wrap the stuntdoubles into a cell      
128 +      if (usePeriodicBoundaryConditions_)
129 +        info_->getSnapshotManager()->getCurrentSnapshot()->wrapVector(pos);
130 +      int binNo = int(nBins_ * (pos.z()) / hmat(2,2));
131 +      sliceSDLists_[binNo].push_back(sd);
132 +    }
133 +
134    }  
135   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines