22 #include "core/ActionPilot.h"
23 #include "core/ActionWithArguments.h"
24 #include "core/ActionRegister.h"
25 #include "tools/File.h"
65 static void registerKeywords(
Keywords& keys);
71 PLUMED_REGISTER_ACTION(DumpForces,
"DUMPFORCES")
74 Action::registerKeywords(keys);
75 ActionPilot::registerKeywords(keys);
76 ActionWithArguments::registerKeywords(keys);
78 keys.add(
"compulsory",
"STRIDE",
"1",
"the frequency with which the forces should be output");
79 keys.add(
"compulsory",
"FILE",
"the name of the file on which to output the forces");
88 if(
file.length()==0 )
error(
"name of file was not specified");
Log & log
Reference to the log stream.
void apply()
Apply an Action.
This is used to create PLMD::Action objects that are run with some set frequency. ...
void error(const std::string &msg) const
Crash calculation and print documentation.
OFile & fmtField(const std::string &)
Set the format for writing double precision fields.
void checkRead()
Check if Action was properly read.
Value * getPntrToArgument(const unsigned n)
Return a pointer to specific argument.
This is used to create PLMD::Action objects that take the output from some other Action as input...
void parse(const std::string &key, T &t)
Parse one keyword as generic type.
This class holds the keywords and their documentation.
This class is used to bring the relevant information to the Action constructor.
OFile & link(OFile &)
Allows linking this OFile to another one.
double getTime() const
Return the present time.
int printf(const char *fmt,...)
Formatted output with explicit format - a la printf.
void calculate()
Calculate an Action.
const std::string & getName() const
Returns the name.
Base class for all the input Actions.
Provides the keyword DUMPFORCES
OFile & printField(const std::string &, double)
Set the value of a double precision field.
unsigned getNumberOfArguments() const
Returns the number of arguments.
OFile & open(const std::string &name)
Opens the file using automatic append/backup.