71 static void registerKeywords(
Keywords& keys);
75 PLUMED_REGISTER_ACTION(
Combine,
"COMBINE")
78 Function::registerKeywords(keys);
79 keys.use(
"ARG"); keys.use(
"PERIODIC");
80 keys.add(
"compulsory",
"COEFFICIENTS",
"1.0",
"the coefficients of the arguments in your function");
81 keys.add(
"compulsory",
"POWERS",
"1.0",
"the powers to which you are raising each of the arguments in your function");
82 keys.addFlag(
"NORMALIZE",
false,
"normalize all the coefficents so that in total they are equal to one");
89 coefficients(getNumberOfArguments(),1.0),
90 powers(getNumberOfArguments(),1.0)
94 error(
"Size of COEFFICIENTS array should be the same as number for arguments");
98 error(
"Size of POWERS array should be the same as number for arguments");
void parseFlag(const std::string &key, bool &t)
Parse one keyword as boolean flag.
Log & log
Reference to the log stream.
void error(const std::string &msg) const
Crash calculation and print documentation.
void checkRead()
Check if Action was properly read.
std::vector< double > powers
This class holds the keywords and their documentation.
This class is used to bring the relevant information to the Action constructor.
int printf(const char *fmt,...)
Formatted output with explicit format - a la printf.
Base class for all the input Actions.
void parseVector(const std::string &key, std::vector< T > &t)
Parse one keyword as std::vector.
void setValue(const double &d)
Set the default value (the one without name)
double getArgument(const unsigned n) const
Returns the value of an argument.
void addValueWithDerivatives()
Provides the keyword COMBINE
This is the abstract base class to use for implementing new CV function, within it there is informati...
std::vector< double > coefficients
unsigned getNumberOfArguments() const
Returns the number of arguments.
void setDerivative(int, double)
void calculate()
Calculate an Action.