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

Comparing trunk/src/applications/staticProps/pAngle.cpp (file contents):
Revision 1413 by gezelter, Mon Mar 22 19:21:22 2010 UTC vs.
Revision 1522 by kstocke1, Fri Nov 19 20:26:36 2010 UTC

# Line 100 | Line 100 | namespace OpenMD {
100          seleMan_.setSelectionSet(evaluator_.evaluate());
101        }
102        
103 +
104 +      int runningTot = 0;
105        for (sd = seleMan_.beginSelected(i); sd != NULL;
106             sd = seleMan_.nextSelected(i)) {
107 <        
107 >      
108          Vector3d pos = sd->getPos();
109          
110          Vector3d r1 = CenterOfMass - pos;
# Line 134 | Line 136 | namespace OpenMD {
136        atot += count_[i];
137      
138      for(int i = 0; i < count_.size(); ++i) {
139 <      histogram_[i] = double(count_[i] / atot);
139 >      histogram_[i] = double(count_[i]) / double(atot);
140      }    
141    }
142    
# Line 147 | Line 149 | namespace OpenMD {
149        rdfStream << "#nFrames:\t" << nProcessed_ << "\n";
150        rdfStream << "#selection: (" << selectionScript_ << ")\n";
151        rdfStream << "#cos(theta)\tp(cos(theta))\n";
152 +      RealType dct = 2.0 / histogram_.size();
153        for (int i = 0; i < histogram_.size(); ++i) {
154 <        RealType ct = -1.0 + i / histogram_.size();
155 <        rdfStream << ct << "\t" << histogram_[i] << "\n";
154 >        RealType ct = -1.0 + (2.0 * i + 1) / (histogram_.size());
155 >        rdfStream << ct << "\t" << histogram_[i]/dct << "\n";
156        }
157        
158      } else {

Comparing trunk/src/applications/staticProps/pAngle.cpp (property svn:keywords):
Revision 1413 by gezelter, Mon Mar 22 19:21:22 2010 UTC vs.
Revision 1522 by kstocke1, Fri Nov 19 20:26:36 2010 UTC

# Line 0 | Line 1
1 + Author Id Revision Date

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines