22 #include "core/ActionPilot.h"
23 #include "core/ActionWithArguments.h"
24 #include "core/ActionRegister.h"
25 #include "tools/File.h"
49 static void registerKeywords(
Keywords& keys);
56 PLUMED_REGISTER_ACTION(DumpProjections,
"DUMPPROJECTIONS")
59 Action::registerKeywords(keys);
60 ActionPilot::registerKeywords(keys);
61 ActionWithArguments::registerKeywords(keys);
63 keys.add(
"compulsory",
"STRIDE",
"1",
"the frequency with which the derivatives should be output");
64 keys.add(
"compulsory",
"FILE",
"the name of the file on which to output the derivatives");
65 keys.add(
"compulsory",
"FMT",
"%15.10f",
"the format with which the derivatives should be output");
75 if(
file.length()==0 )
error(
"filename not specified");
void calculate()
Calculate an Action.
Log & log
Reference to the log stream.
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.
double getTime() const
Return the present time.
int printf(const char *fmt,...)
Formatted output with explicit format - a la printf.
const std::string & getName() const
Returns the name.
Base class for all the input Actions.
double getProjection(unsigned i, unsigned j) const
Get the scalar product between the gradients of two variables.
Provides the keyword DUMPPROJECTIONS
bool checkNeedsGradients() const
Check if the action needs gradient.
OFile & printField(const std::string &, double)
Set the value of a double precision field.
void apply()
Apply an Action.
unsigned getNumberOfArguments() const
Returns the number of arguments.
OFile & open(const std::string &name)
Opens the file using automatic append/backup.