68 std::vector<double>
at;
70 std::vector<double>
exp;
71 std::vector<double>
eps;
76 static void registerKeywords(
Keywords& keys);
79 PLUMED_REGISTER_ACTION(
UWalls,
"UPPER_WALLS")
82 Bias::registerKeywords(keys);
84 keys.add(
"compulsory",
"AT",
"the positions of the wall. The a_i in the expression for a wall.");
85 keys.add(
"compulsory",
"KAPPA",
"the force constant for the wall. The k_i in the expression for a wall.");
86 keys.add(
"compulsory",
"OFFSET",
"0.0",
"the offset for the start of the wall. The o_i in the expression for a wall.");
87 keys.add(
"compulsory",
"EXP",
"2.0",
"the powers for the walls. The e_i in the expression for a wall.");
88 keys.add(
"compulsory",
"EPS",
"1.0",
"the values for s_i in the expression for a wall");
89 componentsAreNotOptional(keys);
90 keys.addOutputComponent(
"bias",
"default",
"the instantaneous value of the bias potential");
91 keys.addOutputComponent(
"force2",
"default",
"the instantaneous value of the squared force due to this bias potential");
96 at(getNumberOfArguments(),0),
97 kappa(getNumberOfArguments(),0.0),
98 exp(getNumberOfArguments(),2.0),
99 eps(getNumberOfArguments(),1.0),
100 offset(getNumberOfArguments(),0.0)
135 const double k=
kappa[i];
136 const double exponent=
exp[i];
138 const double off=
offset[i];
139 const double uscale = (cv+off)/epsilon;
142 double power = pow( uscale, exponent );
143 f = -( k /
epsilon ) * exponent * power / uscale;
Log & log
Reference to the log stream.
void componentIsNotPeriodic(const std::string &name)
Set your value component to have no periodicity.
std::vector< double > kappa
void calculate()
Calculate an Action.
double difference(int, double, double) const
Takes the difference taking into account pbc for arg i.
void checkRead()
Check if Action was properly read.
void addComponent(const std::string &name)
Add a value with a name like label.name.
void set(double)
Set the value of the function.
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.
void parseVector(const std::string &key, std::vector< T > &t)
Parse one keyword as std::vector.
void setOutputForce(int i, double g)
double getArgument(const unsigned n) const
Returns the value of an argument.
std::vector< double > eps
This is the abstract base class to use for implementing new simulation biases, within it there is inf...
std::vector< double > exp
#define PLUMED_BIAS_INIT(ao)
std::vector< double > offset
Value * getPntrToComponent(int i)
Return a pointer to the component by index.
unsigned getNumberOfArguments() const
Returns the number of arguments.
Provides the keyword UPPER_WALLS