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

Comparing branches/development/src/applications/staticProps/pAngle.cpp (file contents):
Revision 1764 by gezelter, Tue Jul 3 18:32:27 2012 UTC vs.
Revision 1850 by gezelter, Wed Feb 20 15:39:39 2013 UTC

# Line 35 | Line 35
35   *                                                                      
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).          
38 > * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008).          
39   * [4] Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010).
40   * [4] , Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). *
41   */
# Line 103 | Line 103 | namespace OpenMD {
103          seleMan_.setSelectionSet(evaluator_.evaluate());
104        }
105        
106      int runningTot = 0;
106        for (sd = seleMan_.beginSelected(i); sd != NULL;
107             sd = seleMan_.nextSelected(i)) {
108          
# Line 134 | Line 133 | namespace OpenMD {
133    void pAngle::processHistogram() {
134      
135      int atot = 0;
136 <    for(int i = 0; i < count_.size(); ++i)
136 >    for(unsigned int i = 0; i < count_.size(); ++i)
137        atot += count_[i];
138      
139 <    for(int i = 0; i < count_.size(); ++i) {
139 >    for(unsigned int i = 0; i < count_.size(); ++i) {
140        histogram_[i] = double(count_[i] / double(atot));
141      }    
142    }
# Line 152 | Line 151 | namespace OpenMD {
151        rdfStream << "#selection: (" << selectionScript_ << ")\n";
152        rdfStream << "#cos(theta)\tp(cos(theta))\n";
153        RealType dct = 2.0 / histogram_.size();
154 <      for (int i = 0; i < histogram_.size(); ++i) {
154 >      for (unsigned int i = 0; i < histogram_.size(); ++i) {
155          RealType ct = -1.0 + (2.0 * i + 1) / (histogram_.size());
156          rdfStream << ct << "\t" << histogram_[i]/dct << "\n";
157        }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines