ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/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.
branches/development/src/applications/staticProps/pAngle.cpp (file contents), Revision 1665 by gezelter, Tue Nov 22 20:38:56 2011 UTC

# Line 36 | Line 36
36   * [1]  Meineke, et al., J. Comp. Chem. 26, 252-271 (2005).            
37   * [2]  Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006).          
38   * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008).          
39 < * [4]  Vardeman & Gezelter, in progress (2009).                        
40 < *
39 > * [4] Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010).
40 > * [4] , Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). *
41   */
42  
43   /* Calculates Rho(theta) */
# Line 100 | Line 100 | namespace OpenMD {
100          seleMan_.setSelectionSet(evaluator_.evaluate());
101        }
102        
103 +      int runningTot = 0;
104        for (sd = seleMan_.beginSelected(i); sd != NULL;
105             sd = seleMan_.nextSelected(i)) {
106          
# Line 134 | Line 135 | namespace OpenMD {
135        atot += count_[i];
136      
137      for(int i = 0; i < count_.size(); ++i) {
138 <      histogram_[i] = double(count_[i] / atot);
138 >      histogram_[i] = double(count_[i] / double(atot));
139      }    
140    }
141    
# Line 147 | Line 148 | namespace OpenMD {
148        rdfStream << "#nFrames:\t" << nProcessed_ << "\n";
149        rdfStream << "#selection: (" << selectionScript_ << ")\n";
150        rdfStream << "#cos(theta)\tp(cos(theta))\n";
151 +      RealType dct = 2.0 / histogram_.size();
152        for (int i = 0; i < histogram_.size(); ++i) {
153 <        RealType ct = -1.0 + i / histogram_.size();
154 <        rdfStream << ct << "\t" << histogram_[i] << "\n";
153 >        RealType ct = -1.0 + (2.0 * i + 1) / (histogram_.size());
154 >        rdfStream << ct << "\t" << histogram_[i]/dct << "\n";
155        }
156        
157      } else {

Comparing:
trunk/src/applications/staticProps/pAngle.cpp (property svn:keywords), Revision 1413 by gezelter, Mon Mar 22 19:21:22 2010 UTC vs.
branches/development/src/applications/staticProps/pAngle.cpp (property svn:keywords), Revision 1665 by gezelter, Tue Nov 22 20:38:56 2011 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines