34 out <<
"calculate gyration- and hydrodynamic radius for a specific "
35 "molecule or molecule type";
58int main(
int argc,
char **argv) {
61 return app.
Exec(argc, argv);
66 for (
const auto &mol : top->
Molecules()) {
69 if (
OptionsMap()[
"mol"].as<votca::Index>() != mol.getId() + 1) {
85 double inv_r_hydr = 0;
91 Eigen::Vector3d r_ij =
92 mol.getBead(i)->getPos() - mol.getBead(j)->getPos();
94 r_gyr_sq += r_ij.squaredNorm() / (double)(N * N);
96 inv_r_hydr += 2. / (r_ij.norm() * (
double(N * N)));
107 Eigen::Vector3d cm(0, 0, 0);
109 M += mol.getBead(i)->getMass();
110 cm += mol.getBead(i)->getPos() * mol.getBead(i)->getMass();
114 double r_gyr_m_sq = 0;
116 Eigen::Vector3d r_ij = mol.getBead(i)->getPos() - cm;
117 r_gyr_m_sq += mol.getBead(i)->getMass() * r_ij.squaredNorm();
128 cout <<
"\n\n------------------------------\n";
135 cout <<
"------------------------------\n";
143 "mol", boost::program_options::value<votca::Index>(),
"molecule number")(
144 "molname", boost::program_options::value<string>()->default_value(
"*"),
145 "pattern for molecule name");
void HelpText(ostream &out) override
help text of application without version information
string ProgramName() override
program name
void EndEvaluate() override
called after the last frame
bool DoTrajectory() override
overload and return true to enable trajectory command line options
void EvalConfiguration(Topology *top, Topology *top_ref) override
void Initialize() override
Initialize application data.
votca::tools::Average< double > r_gyr_sq_
votca::tools::Average< double > r_gyr_m_sq_
votca::tools::Average< double > inv_r_hydr_
void Initialize() override
Initialize application data.
topology of the whole system
MoleculeContainer & Molecules()
int main(int argc, char **argv)