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

Comparing trunk/src/rnemd/RNEMD.cpp (file contents):
Revision 1978 by gezelter, Fri Feb 28 13:25:13 2014 UTC vs.
Revision 1979 by gezelter, Sat Apr 5 20:56:01 2014 UTC

# Line 2239 | Line 2239 | namespace OpenMD {
2239        }        
2240  
2241        rnemdFile_ << "#######################################################\n";
2242 <      rnemdFile_ << "# Standard Deviations in those quantities follow:\n";
2242 >      rnemdFile_ << "# 95% confidence intervals in those quantities follow:\n";
2243        rnemdFile_ << "#######################################################\n";
2244  
2245  
# Line 2248 | Line 2248 | namespace OpenMD {
2248          for (unsigned int i = 0; i < outputMask_.size(); ++i) {
2249            if (outputMask_[i]) {
2250              if (data_[i].dataType == "RealType")
2251 <              writeRealStdDev(i,j);
2251 >              writeRealErrorBars(i,j);
2252              else if (data_[i].dataType == "Vector3d")
2253 <              writeVectorStdDev(i,j);
2253 >              writeVectorErrorBars(i,j);
2254              else {
2255                sprintf( painCave.errMsg,
2256                         "RNEMD found an unknown data type for: %s ",
# Line 2321 | Line 2321 | namespace OpenMD {
2321      }
2322    }  
2323  
2324 <  void RNEMD::writeRealStdDev(int index, unsigned int bin) {
2324 >  void RNEMD::writeRealErrorBars(int index, unsigned int bin) {
2325      if (!doRNEMD_) return;
2326      assert(index >=0 && index < ENDINDEX);
2327      assert(int(bin) < nBins_);
# Line 2331 | Line 2331 | namespace OpenMD {
2331      count = data_[index].accumulator[bin]->count();
2332      if (count == 0) return;
2333      
2334 <    dynamic_cast<Accumulator *>(data_[index].accumulator[bin])->getStdDev(s);
2334 >    dynamic_cast<Accumulator *>(data_[index].accumulator[bin])->get95percentConfidenceInterval(s);
2335      
2336      if (! isinf(s) && ! isnan(s)) {
2337        rnemdFile_ << "\t" << s;
# Line 2344 | Line 2344 | namespace OpenMD {
2344      }    
2345    }
2346    
2347 <  void RNEMD::writeVectorStdDev(int index, unsigned int bin) {
2347 >  void RNEMD::writeVectorErrorBars(int index, unsigned int bin) {
2348      if (!doRNEMD_) return;
2349      assert(index >=0 && index < ENDINDEX);
2350      assert(int(bin) < nBins_);
# Line 2354 | Line 2354 | namespace OpenMD {
2354      count = data_[index].accumulator[bin]->count();
2355      if (count == 0) return;
2356  
2357 <    dynamic_cast<VectorAccumulator*>(data_[index].accumulator[bin])->getStdDev(s);
2357 >    dynamic_cast<VectorAccumulator*>(data_[index].accumulator[bin])->get95percentConfidenceInterval(s);
2358      if (isinf(s[0]) || isnan(s[0]) ||
2359          isinf(s[1]) || isnan(s[1]) ||
2360          isinf(s[2]) || isnan(s[2]) ) {      

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines