43 out <<
"Performs tasks that are needed for simple boltzmann\n"
44 "inversion in an interactive environment.";
65 "excl", boost::program_options::value<string>(),
66 "write atomistic exclusion list to file");
82 cout <<
"WARNING: cannot create exclusion list for topology with"
83 "multiple molecules, using only first molecule\n";
86 cout <<
"Writing exclusion list for atomistic molecule "
88 <<
" in coarse grained representation "
97 <<
" cgmap: " <<
OptionsMap()[
"cg"].as<
string>() << endl;
115 std::vector<Bead *> excl_list;
117 excl_list.push_back(top_atomistic->
getBead(parent_bead_id));
130 top_atomistic->
getBead(parent_bead_id_j));
148 std::map<std::string, AnalysisTool *> cmds;
155 "Interactive mode, expecting commands:\n"
156 "help: show this help\n"
158 "list: list all available bonds\n"
159 "vals <file> <selection>: write values to file\n"
160 "hist <file> <selection>: create histogram\n"
161 "tab <file> <selection>: create tabulated potential\n"
162 "autocor <file> <selection>: calculate autocorrelation, only one row "
163 "allowed in selection!\n"
164 "cor <file> <selection>: calculate correlations, first row is correlated "
165 "with all other rows";
177 vector<string> args = tok.
ToVector();
179 if (args.size() == 0) {
183 string cmd = args.front();
184 args.erase(args.begin());
190 std::map<string, AnalysisTool *>::iterator tool;
192 if (args.size() == 0) {
197 args.erase(args.begin());
198 tool = cmds.find(cmd);
199 if (tool == cmds.end()) {
200 cout <<
"error, no help item found" << endl;
203 tool->second->Help(cmd, args);
208 tool = cmds.find(cmd);
209 if (tool == cmds.end()) {
210 cout <<
"error, command not found" << endl;
214 tool->second->Command(
bs_, cmd, args);
218int main(
int argc,
char **argv) {
220 app.
Exec(argc, argv);
bool EvaluateTopology(Topology *top, Topology *top_ref)
called after topology was loaded
void HelpText(ostream &out)
help text of application without version information
void Initialize()
Initialize application data.
void Run()
Main body of application.
bool DoTrajectory()
overload and return true to enable trajectory command line options
bool DoMapping()
overload and return true to enable mapping command line options
bool EvaluateOptions()
Process command line options.
ExclusionList CreateExclusionList(Topology *top_atomistic, Molecule &atomistic, Topology *top_cg, Molecule &cg)
string ProgramName()
program name
const std::vector< Index > & ParentBeads()
Class calculates data associated with bond interactions.
bool EvaluateOptions() override
Process command line options.
void Initialize() override
Initialize application data.
void AddObserver(CGObserver *observer)
void Run(void) override
Main body of application.
void RemoveExclusion(Bead *bead1, Bead *bead2)
void ExcludeList(iterable &l)
bool IsExcluded(Bead *bead1, Bead *bead2) const
information about molecules
Bead * getBead(Index bead)
get the id of a bead in the molecule
const std::string & getName() const
get the name of the molecule
Index BeadCount() const
get the number of beads in the molecule
const std::vector< Bead * > & Beads() const
Tabulated Potential calculates histograms of bead interactions.
void Register(std::map< std::string, AnalysisTool * > &lib) override
topology of the whole system
Index MoleculeCount() const
number of molecules in the system
ExclusionList & getExclusions()
Molecule * MoleculeByIndex(Index index)
Bead * getBead(const Index i)
Returns a pointer to the bead with index i.
int main(int argc, char **argv)