35int main(
int argc,
char **argv) {
37 return app.
Exec(argc, argv);
44 boost::program_options::value<double>(&
scale_)->default_value(-1.0),
45 " scaling factor for trajectory forces")(
46 "trj-force", boost::program_options::value<string>(),
47 " atomistic reference "
48 "trajectory containing forces "
49 "to add/subtract")(
"out", boost::program_options::value<string>(),
60 CheckRequired(
"trj-force",
"no reference trajectory file specified");
71 throw runtime_error(
string(
"input format not supported: ") +
82 throw runtime_error(
string(
"output trajectory format not supported: ") +
90 cout <<
"\nWe are done, thank you very much!" << endl;
99 throw std::runtime_error(
100 "number of beads in topology and reference force topology does not "
113 if (d.norm() > 1
e-6) {
114 throw std::runtime_error(
115 "One or more bead positions in trajectory and reference force "
116 "trajectory differ by more than 1e-6");
Adds/subtracts forces from given atomistic trajectories.
void Initialize(void) override
Initialize application data.
void BeginEvaluate(Topology *top, Topology *top_atom) override
called before the first frame
std::unique_ptr< TrajectoryWriter > trjwriter_
void WriteOutFiles()
Write results to output files.
void EndEvaluate() override
called after the last frame
void EvalConfiguration(Topology *conf, Topology *conf_atom) override
called for each frame which is mapped
std::unique_ptr< TrajectoryReader > trjreader_force_
double scale_
Scaling of forces, +1 for addition and -1 for subtraction.
bool EvaluateOptions() override
Process command line options.
virtual const Eigen::Vector3d & getPos() const
const Eigen::Vector3d & getF() const
get the force acting on the bead
bool EvaluateOptions() override
Process command line options.
void Initialize() override
Initialize application data.
topology of the whole system
Bead * getBead(const Index i)
Returns a pointer to the bead with index i.
void CopyTopologyData(Topology *top)
copy topology data of different topology
FileFormatFactory< TrajectoryWriter > & TrjWriterFactory()
FileFormatFactory< TrajectoryReader > & TrjReaderFactory()
int main(int argc, char **argv)