81 ZClipEstimator(
AtomicGroup& water, pTraj& traj,
const std::vector<uint>& frames,
const double zclip,
const double gridres)
82 : water_(water), zclip_(zclip), gridres_(gridres), count_zero(
false)
84 reinitialize(traj, frames);
87 void countZero(
const bool flag =
true) { count_zero = flag; }
89 void reinitialize(pTraj& traj,
const std::vector<uint>& frames);
90 void operator()(
const double density);
91 double bulkDensity(
void)
const;
92 double stdDev(
const double mean)
const;
93 void clear(
void) { thegrid.clear(); }
96 std::ostream& print(std::ostream& os)
const {
97 os << boost::format(
"ZClipEstimator = %s x %s @ %s") % thegrid.minCoord() % thegrid.maxCoord() % thegrid.gridDims();
103 double zclip_, gridres_;
105 DensityGrid<double> thegrid;
111 ZSliceEstimator(
AtomicGroup& water, pTraj& traj,
const std::vector<uint>& frames,
const double zmin,
const double zmax,
const double gridres)
112 : water_(water), zmin_(zmin), zmax_(zmax), gridres_(gridres), count_zero(
false)
114 reinitialize(traj, frames);
117 void countZero(
const bool flag =
true) { count_zero = flag; }
119 void reinitialize(pTraj& traj,
const std::vector<uint>& frames);
120 void operator()(
const double density);
121 double bulkDensity(
void)
const;
122 double stdDev(
const double mean)
const;
123 void clear(
void) { thegrid.clear(); }
126 std::ostream& print(std::ostream& os)
const {
127 os << boost::format(
"ZSliceEstimator = %s x %s @ %s") % thegrid.minCoord() % thegrid.maxCoord() % thegrid.gridDims();
133 double zmin_, zmax_, gridres_;
135 DensityGrid<double> thegrid;
144 protein_(protein), water_(water), estimator_(est), the_filter(filter), out_of_bounds(0) { }
146 void clear() { grid_.clear(); out_of_bounds = 0; }
148 void setGrid(
const GCoord& min,
const GCoord& max,
const double resolution);
149 void setGrid(pTraj& traj,
const std::vector<uint>& frames,
const double resolution,
const double pad = 0.0);
151 void accumulate(
const double density);
152 void accumulate(pTraj& traj,
const std::vector<uint>& frames);
153 DensityGrid<double> grid()
const {
return(grid_); }
154 long outOfBounds()
const {
return(out_of_bounds); }
163 DensityGrid<double> grid_;