ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/applications/staticProps/BOPofR.cpp
(Generate patch)

Comparing branches/development/src/applications/staticProps/BOPofR.cpp (file contents):
Revision 1668 by gezelter, Fri Jan 6 19:03:05 2012 UTC vs.
Revision 1826 by gezelter, Wed Jan 9 19:41:48 2013 UTC

# Line 50 | Line 50
50   #include "primitives/Molecule.hpp"
51   #include "utils/NumericConstant.hpp"
52   #include "math/Wigner3jm.hpp"
53 + #include "brains/Thermo.hpp"
54  
55   using namespace MATPACK;
56   namespace OpenMD {
# Line 144 | Line 145 | namespace OpenMD {
145    }
146  
147    
148 <  void BOPofR::initalizeHistogram() {
148 >  void BOPofR::initializeHistogram() {
149          for (int i = 0; i < nBins_; i++){
150                  RCount_[i] = 0;
151                  WofR_[i] = 0;
# Line 166 | Line 167 | namespace OpenMD {
167      RealType costheta;
168      RealType phi;
169      RealType r;
169    RealType dist;
170      Vector3d rCOM;
171      RealType distCOM;
172      Vector3d pos;
# Line 181 | Line 181 | namespace OpenMD {
181      std::vector<RealType> Q;
182      std::vector<ComplexType> W;
183      std::vector<ComplexType> W_hat;
184 <    int nBonds, Nbonds;
184 >    int nBonds;
185      SphericalHarmonic sphericalHarmonic;
186 <    int i, j;
187 <
186 >    int i;
187 >    
188      DumpReader reader(info_, dumpFilename_);    
189      int nFrames = reader.getNFrames();
190      frameCounter_ = 0;
191  
192 +    Thermo thermo(info_);
193 +
194      q_l.resize(lMax_+1);
195      q2.resize(lMax_+1);
196      w.resize(lMax_+1);
# Line 198 | Line 200 | namespace OpenMD {
200      Q.resize(lMax_+1);
201      W.resize(lMax_+1);
202      W_hat.resize(lMax_+1);
201    Nbonds = 0;
203  
204      for (int istep = 0; istep < nFrames; istep += step_) {
205        reader.readFrame(istep);
206        frameCounter_++;
207        currentSnapshot_ = info_->getSnapshotManager()->getCurrentSnapshot();
208 <      CenterOfMass = info_->getCom();
208 >      CenterOfMass = thermo.getCom();
209        if (evaluator_.isDynamic()) {
210          seleMan_.setSelectionSet(evaluator_.evaluate());
211        }
# Line 320 | Line 321 | namespace OpenMD {
321  
322      if ( distCOM < len_){
323        // Figure out where this distance goes...
324 <      int whichBin = distCOM / deltaR_;
324 >      int whichBin = int(distCOM / deltaR_);
325        RCount_[whichBin]++;
326  
327        if(real(what[6]) < -0.15){                                

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines