--- trunk/src/applications/staticProps/GofR.cpp 2005/02/10 22:37:21 311 +++ trunk/src/applications/staticProps/GofR.cpp 2005/02/15 17:11:35 347 @@ -70,8 +70,9 @@ void GofR::processHistogram() { void GofR::processHistogram() { + int nRealPairs = getNRealPairs(); double volume = info_->getSnapshotManager()->getCurrentSnapshot()->getVolume(); - double pairDensity = npairs_ /volume; + double pairDensity = nRealPairs /volume; double pairConstant = ( 4.0 * NumericConstant::PI * pairDensity ) / 3.0; for(int i = 0 ; i < histogram_.size(); ++i){ @@ -99,9 +100,11 @@ void GofR::collectHistogram(StuntDouble* sd1, StuntDou double distance = r12.length(); - int whichBin = distance / deltaR_; - ++histogram_[whichBin]; - ++npairs_; + if (distance < len_) { + int whichBin = distance / deltaR_; + ++histogram_[whichBin]; + ++npairs_; + } }