21#include <boost/format.hpp>
34 namespace propt = boost::program_options;
37 " hdf5 state file, *.hdf5");
39 " start from this frame");
41 " number of frames to process");
43 " whether or not to save changes to state file");
60 std::string statefile =
OptionsMap()[
"file"].as<std::string>();
62 std::vector<Index> frames = statsav.getFrames();
64 throw std::runtime_error(
"Statefile " + statefile +
" not found.");
67 std::cout <<
"Initializing calculator" << std::endl;
69 std::cout << frames.size() <<
" frames in statefile, Ids are: ";
70 for (
Index frame : frames) {
71 std::cout << frame <<
" ";
73 std::cout << std::endl;
74 if (fframe <
Index(frames.size())) {
75 std::cout <<
"Starting at frame " << frames[fframe] << std::endl;
77 std::cout <<
"First frame:" << fframe
78 <<
" is larger than number of frames:" <<
Index(frames.size())
83 if ((fframe + nframes) >
Index(frames.size())) {
84 nframes =
Index(frames.size()) - fframe;
87 for (
Index i = fframe; i < nframes; i++) {
88 std::cout <<
"Evaluating frame " << frames[i] << std::endl;
89 Topology top = statsav.ReadFrame(frames[i]);
92 statsav.WriteFrame(top);
94 std::cout <<
"Changes have not been written to state file." << std::endl;
void EvaluateSpecificOptions() final
virtual bool EvaluateFrame(Topology &top)=0
virtual bool savetoStateFile() const =0
virtual void ConfigCalculator()=0
virtual void AddCommandLineOpt()=0
virtual void CheckOptions()=0
void AddCommandLineOptions() final
Container for segments and box and atoms.
base class for all analysis tools