66 static void registerKeywords(
Keywords& keys);
70 PLUMED_REGISTER_ACTION(
Sort,
"SORT")
73 Function::registerKeywords(keys);
75 ActionWithValue::useCustomisableComponents(keys);
86 error(
"Cannot sort periodic values (check argument "+s+
")");
102 sort(vals.begin(),vals.end());
105 v->
set(vals[i].first);
A class for holding the value of a function together with its derivatives.
void error(const std::string &msg) const
Crash calculation and print documentation.
void checkRead()
Check if Action was properly read.
Value * getPntrToArgument(const unsigned n)
Return a pointer to specific argument.
void set(double)
Set the value of the function.
void addComponentWithDerivatives(const std::string &name)
This class holds the keywords and their documentation.
void setNotPeriodic()
Set the function not periodic.
This class is used to bring the relevant information to the Action constructor.
Base class for all the input Actions.
double getArgument(const unsigned n) const
Returns the value of an argument.
void calculate()
Calculate an Action.
int getNumberOfComponents() const
Returns the number of values defined.
This is the abstract base class to use for implementing new CV function, within it there is informati...
Value * getPntrToComponent(int i)
Return a pointer to the component by index.
unsigned getNumberOfArguments() const
Returns the number of arguments.
void setDerivative(int, double)
Provides the keyword SORT