53 static void registerKeywords(
Keywords& keys );
56 virtual void calculate();
62 Colvar::registerKeywords( keys );
63 keys.add(
"atoms",
"ATOMS",
"the fake atom index, a number is enough");
64 keys.reserve(
"compulsory",
"PERIODIC",
"if the output of your function is periodic then you should specify the periodicity of the function. If the output is not periodic you must state this using PERIODIC=NO,NO (one for the lower and the other for the upper boundary). For multicomponents then it is PERIODIC=mincomp1,maxcomp1,mincomp2,maxcomp2 etc ");
66 keys.add(
"optional",
"COMPONENTS",
"additional componnets that this variable is supposed to have. Periodicity is ruled by PERIODIC keyword ");
72 vector<AtomNumber>
atoms;
79 for(
unsigned i=0;i<comps.size();i++){
87 std::vector<std::string> period;
90 plumed_massert(
getNumberOfComponents()*2==period.size(),
"the periodicty should coincide with the number of components");
94 if(period[i*2]!=
"none" && period[i*2+1]!=
"none" ){
101 if(period[0]!=
"none" && period[1]!=
"none" ){
124 plumed_merror(
"you should never have got here");
void setNotPeriodic()
Set your default value to have no periodicity.
void componentIsNotPeriodic(const std::string &name)
Set your value component to have no periodicity.
void checkRead()
Check if Action was properly read.
void parseAtomList(const std::string &key, std::vector< AtomNumber > &t)
Parse a list of atoms without a numbered keyword.
void addValueWithDerivatives()
Add a value with the name label that has derivatives.
void requestAtoms(const std::vector< AtomNumber > &a)
#define PLUMED_COLVAR_INIT(ao)
This class holds the keywords and their documentation.
This class is used to bring the relevant information to the Action constructor.
void setPeriodic(const std::string &min, const std::string &max)
Set the value to be periodic with a particular domain.
This is the abstract base class to use for implementing new collective variables, within it there is ...
const std::string & getName() const
Returns the name.
void parseVector(const std::string &key, std::vector< T > &t)
Parse one keyword as std::vector.
void componentIsPeriodic(const std::string &name, const std::string &min, const std::string &max)
Set the value to be periodic with a particular domain.
virtual void calculate()
Calculate an Action.
Provides the keyword FAKE
void addComponentWithDerivatives(const std::string &name)
Add a value with a name like label.name that has derivatives.
int getNumberOfComponents() const
Returns the number of values defined.
Value * getPntrToComponent(int i)
Return a pointer to the component by index.