19#include <boost/program_options.hpp>
35 out <<
"calculate density fluctuations in subvolumes of the simulation "
37 out <<
"Subolumes can be either cubic slabs in dimensions (x|y|z) or "
39 out <<
"slabs with respect to either the center of box or a reference "
50 boost::program_options::value<string>(&
filter_)->default_value(
"*"),
51 "filter molecule names")(
"rmax",
52 boost::program_options::value<double>(),
53 "maximal distance to be considered")(
55 boost::program_options::value<double>(&
rmin_)->default_value(0.0),
56 "minimal distance to be considered")(
58 boost::program_options::value<string>(&
refmol_)->default_value(
""),
59 "Reference molecule")(
61 boost::program_options::value<votca::Index>(&
nbins_)->default_value(
64 "geometry", boost::program_options::value<string>(),
65 "(sphere|x|y|z) Take radial or x, y, z slabs from rmin to rmax")(
68 ->default_value(
"fluctuations.dat"),
95 cout <<
"Doing spherical slabs" << endl;
98 cout <<
"Doing slabs along x-axis" << endl;
101 cout <<
"Doing slabs along y-axis" << endl;
104 cout <<
"Doing slabs along z-axis" << endl;
107 throw std::runtime_error(
"Unrecognized geometry option. (sphere|x|y|z)");
114 cout <<
"Calculating fluctions for " <<
rmin_ <<
"<r<" <<
rmax_;
115 cout <<
"using " <<
nbins_ <<
" bins" << endl;
119 cout <<
"using " <<
nbins_ <<
" bins" << endl;
123 Eigen::Matrix3d box = top->
getBox();
124 ref_ = box.rowwise().sum() / 2;
126 cout <<
"Reference is center of box " <<
ref_ << endl;
131 throw runtime_error(
"cannot open" +
outfilename_ +
" for output");
159int main(
int argc,
char **argv) {
162 return app.
Exec(argc, argv);
168 for (
const auto &bead : conf->
Beads()) {
170 ref_ = bead.getPos();
171 cout <<
" Solute pos " <<
ref_ << endl;
180 for (
const auto &bead : conf->
Beads()) {
186 Eigen::Vector3d eR = bead.getPos() -
ref_;
189 Eigen::Vector3d eR = bead.getPos();
192 }
else if (
dim_ == 1) {
194 }
else if (
dim_ == 2) {
211 outfile_ <<
"# radius number_fluct avg_number" << endl;
bool EvaluateOptions() override
Process command line options.
bool DoMapping() override
overload and return true to enable mapping command line options
bool DoTrajectory() override
overload and return true to enable trajectory command line options
void HelpText(ostream &out) override
help text of application without version information
Eigen::VectorXd N_sq_avg_
void Initialize() override
Initialize application data.
void EndEvaluate() override
called after the last frame
void BeginEvaluate(Topology *top, Topology *) override
called before the first frame
void EvalConfiguration(Topology *conf, Topology *top_ref) override
string ProgramName() override
program name
bool EvaluateOptions() override
Process command line options.
void Initialize() override
Initialize application data.
topology of the whole system
const Eigen::Matrix3d & getBox() const
int main(int argc, char **argv)