--- trunk/src/applications/staticProps/GofZ.cpp 2009/11/25 20:02:06 1390 +++ trunk/src/applications/staticProps/GofZ.cpp 2012/08/30 17:18:22 1790 @@ -36,7 +36,8 @@ * [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). * [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). - * [4] Vardeman & Gezelter, in progress (2009). + * [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). + * [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). */ #include @@ -63,7 +64,7 @@ namespace OpenMD { std::fill(avgGofz_.begin(), avgGofz_.end(), 0.0); } - void GofZ::initalizeHistogram() { + void GofZ::initializeHistogram() { std::fill(histogram_.begin(), histogram_.end(), 0); } @@ -75,7 +76,7 @@ namespace OpenMD { RealType pairDensity = nPairs /volume * 2.0; RealType pairConstant = ( 2.0 * NumericConstant::PI * pairDensity ); - for(int i = 0 ; i < histogram_.size(); ++i){ + for(unsigned int i = 0 ; i < histogram_.size(); ++i){ RealType zLower = i * deltaZ_; RealType zUpper = zLower + deltaZ_; @@ -107,7 +108,7 @@ namespace OpenMD { if (xydist < rC_) { thisZ = abs(r12.z()); - int whichBin = thisZ / deltaZ_; + int whichBin = int(thisZ / deltaZ_); histogram_[whichBin] += 2; } } @@ -120,7 +121,7 @@ namespace OpenMD { rdfStream << "#selection1: (" << selectionScript1_ << ")\t"; rdfStream << "selection2: (" << selectionScript2_ << ")\n"; rdfStream << "#r\tcorrValue\n"; - for (int i = 0; i < avgGofz_.size(); ++i) { + for (unsigned int i = 0; i < avgGofz_.size(); ++i) { RealType z = deltaZ_ * (i + 0.5); rdfStream << z << "\t" << avgGofz_[i]/nProcessed_ << "\n"; }