23 #include "tools/SwitchingFunction.h"
70 static void registerKeywords(
Keywords& keys );
71 virtual double pairing(
double distance,
double&dfunc,
unsigned i,
unsigned j)
const;
77 CoordinationBase::registerKeywords(keys);
78 keys.add(
"compulsory",
"NN",
"6",
"The n parameter of the switching function ");
79 keys.add(
"compulsory",
"MM",
"12",
"The m parameter of the switching function ");
80 keys.add(
"compulsory",
"D_0",
"0.0",
"The d_0 parameter of the switching function");
81 keys.add(
"compulsory",
"R_0",
"The r_0 parameter of the switching function");
82 keys.add(
"optional",
"SWITCH",
"This keyword is used if you want to employ an alternative to the continuous swiching function defined above. "
83 "The following provides information on the \\ref switchingfunction that are available. "
84 "When this keyword is present you no longer need the NN, MM, D_0 and R_0 keywords.");
96 if( errors.length()!=0 )
error(
"problem reading SWITCH keyword : " + errors );
103 if(r0<=0.0)
error(
"R_0 should be explicitly specified and positive");
double calculate(double x, double &df) const
Log & log
Reference to the log stream.
void set(int nn, int mm, double r_0, double d_0)
void error(const std::string &msg) const
Crash calculation and print documentation.
SwitchingFunction switchingFunction
void checkRead()
Check if Action was properly read.
Small class to compure switching functions in the form In the future we might extend it so as to be s...
void parse(const std::string &key, T &t)
Parse one keyword as generic type.
Provides the keyword COORDINATION
This class holds the keywords and their documentation.
This class is used to bring the relevant information to the Action constructor.
virtual double pairing(double distance, double &dfunc, unsigned i, unsigned j) const
Base class for all the input Actions.
std::string description() const