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

Comparing trunk/src/applications/staticProps/SpatialStatistics.cpp (file contents):
Revision 1944 by gezelter, Tue Jun 18 17:48:52 2013 UTC vs.
Revision 1945 by gezelter, Thu Nov 7 16:42:46 2013 UTC

# Line 354 | Line 354 | namespace OpenMD {
354      SpatialStatistics(info, filename, sele, nbins), coordinateOrigin_(V3Zero) {
355      
356      binWidth_ = 1.0;
357 +
358 +    Globals* simParams = info->getSimParams();
359 +    RNEMDParameters* rnemdParams = simParams->getRNEMDParameters();
360 +    bool hasCoordinateOrigin = rnemdParams->haveCoordinateOrigin();
361 +    
362 +    if (hasCoordinateOrigin) {
363 +      coordinateOrigin_ = rnemdParams->getCoordinateOrigin();
364 +    } else {
365 +      coordinateOrigin_ = V3Zero;
366 +    }
367      
368      r_ = new OutputData;
369      r_->units =  "Angstroms";
# Line 374 | Line 384 | namespace OpenMD {
384    ShellStatistics::~ShellStatistics() {
385    }
386  
387 <  int ShellStatistics::getBin(Vector3d pos) {    
387 >  int ShellStatistics::getBin(Vector3d pos) {
388      Vector3d rPos = pos - coordinateOrigin_;
389      return int(rPos.length() / binWidth_);
390    }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines