24 #include "json/json.h"
55 virtual double Evaluate(
double rij,
double& df)
const = 0;
100 const auto f = exp( - dx*dx/2.);
101 const auto pre = - dx/
sigma_;
113 static GaussianPK*
Build(
const Json::Value& json,
const std::string& path);
150 double Evaluate(
double rij,
double& df)
const override
152 const auto xarg = (rij -
d0_)/
r0_;
153 const auto xn = std::pow(xarg, n_);
154 const auto xm = std::pow(xarg,
m_);
155 const auto f = (1.-xn)/(1.-xm);
157 df = f/(
d0_-rij)*(n_*xn/(1.-xn)+
m_*xm/(xm-1.));
double r0_
Cutoff distance.
double d0_
Minimum linear shift value.
static RationalSwitchPK * Build(const Json::Value &json, const std::string &path)
Build RationalSwitchPK from JSON value.
RationalSwitchPK(double d0, double r0, int n, int m)
Constructor.
virtual double Evaluate(double rij, double &df) const =0
Evaluate the pairwise kernel function.
double mu_
Center of Gaussian.
static GaussianPK * Build(const Json::Value &json, const std::string &path)
Build GaussianPK from JSON value.
double Evaluate(double rij, double &df) const override
Evaluate the switching function.
Pairwise kernel base class.
double sigma_
Width of Gaussian.
GaussianPK(double mu, double sigma)
Constructor.
double Evaluate(double rij, double &df) const
Evaluate the Gaussian function.
Rational Switching Function.
int m_
Exponents of the switching function which control the stiffness.
static PairwiseKernel * Build(const Json::Value &json, const std::string &path)
Build PairwiseKernel from JSON value.