141 |
|
processStuntDouble( sd, bin ); |
142 |
|
|
143 |
|
dynamic_cast<Accumulator *>(counts_->accumulator[bin])->add(1); |
144 |
< |
} |
144 |
> |
} |
145 |
|
} |
146 |
|
|
147 |
|
|
323 |
|
} |
324 |
|
|
325 |
|
SlabStatistics::~SlabStatistics() { |
326 |
– |
delete z_; |
326 |
|
} |
327 |
|
|
328 |
|
|
329 |
|
void SlabStatistics::processFrame(int istep) { |
330 |
|
RealType z; |
331 |
+ |
|
332 |
|
hmat_ = currentSnapshot_->getHmat(); |
333 |
|
for (int i = 0; i < nBins_; i++) { |
334 |
|
z = (((RealType)i + 0.5) / (RealType)nBins_) * hmat_(2,2); |
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"; |
370 |
|
r_->title = "R"; |
382 |
|
} |
383 |
|
|
384 |
|
ShellStatistics::~ShellStatistics() { |
375 |
– |
delete r_; |
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 |
|
} |