| 44 |  | * | 
| 45 |  | *  Created by Charles F. Vardeman II on 11/26/05. | 
| 46 |  | *  @author  Charles F. Vardeman II | 
| 47 | < | *  @version $Id: RhoZ.cpp,v 1.4 2006-03-07 16:43:52 gezelter Exp $ | 
| 47 | > | *  @version $Id: RhoZ.cpp,v 1.5 2006-05-17 21:51:42 tim Exp $ | 
| 48 |  | * | 
| 49 |  | */ | 
| 50 |  |  | 
| 58 |  | #include "primitives/Molecule.hpp" | 
| 59 |  | namespace oopse { | 
| 60 |  |  | 
| 61 | < | RhoZ::RhoZ(SimInfo* info, const std::string& filename, const std::string& sele, double len, int nrbins) | 
| 61 | > | RhoZ::RhoZ(SimInfo* info, const std::string& filename, const std::string& sele, RealType len, int nrbins) | 
| 62 |  | : StaticAnalyser(info, filename), selectionScript_(sele),  evaluator_(info), seleMan_(info), len_(len), nRBins_(nrbins){ | 
| 63 |  |  | 
| 64 |  | evaluator_.loadScriptString(sele); | 
| 91 |  | reader.readFrame(istep); | 
| 92 |  | currentSnapshot_ = info_->getSnapshotManager()->getCurrentSnapshot(); | 
| 93 |  |  | 
| 94 | < | double sliceVolume = currentSnapshot_->getVolume() /nRBins_; | 
| 94 | > | RealType sliceVolume = currentSnapshot_->getVolume() /nRBins_; | 
| 95 |  | //assume simulation box will never change | 
| 96 |  | //Mat3x3d hmat = currentSnapshot_->getHmat(); | 
| 97 | < | double halfBoxZ_ = len_ / 2.0; | 
| 97 | > | RealType halfBoxZ_ = len_ / 2.0; | 
| 98 |  |  | 
| 99 |  | if (evaluator_.isDynamic()) { | 
| 100 |  | seleMan_.setSelectionSet(evaluator_.evaluate()); | 
| 118 |  |  | 
| 119 |  | //loop over the slices to calculate the densities | 
| 120 |  | for (i = 0; i < nRBins_; i++) { | 
| 121 | < | double totalMass = 0; | 
| 121 | > | RealType totalMass = 0; | 
| 122 |  | for (int k = 0; k < sliceSDLists_[i].size(); ++k) { | 
| 123 |  | totalMass += sliceSDLists_[i][k]->getMass(); | 
| 124 |  | } | 
| 140 |  | rdfStream << "#selection: (" << selectionScript_ << ")\n"; | 
| 141 |  | rdfStream << "#z\tdensity\n"; | 
| 142 |  | for (int i = 0; i < density_.size(); ++i) { | 
| 143 | < | double r = deltaR_ * (i + 0.5); | 
| 143 | > | RealType r = deltaR_ * (i + 0.5); | 
| 144 |  | rdfStream << r << "\t" << 1.660535*density_[i]/nProcessed_ << "\n"; | 
| 145 |  | } | 
| 146 |  |  |