24 #include "json/json.h"
55 virtual double Evaluate(
double rij,
double& df)
const = 0;
97 const auto f = exp( - dx*dx/2.);
98 const auto pre = - dx/
sigma_;
111 static GaussianPK*
Build(
const Json::Value& json,
const std::string& path);
142 double Evaluate(
double rij,
double& df)
const override
144 const auto xarg = (rij -
d0_)/
r0_;
145 const auto xn = std::pow(xarg,
n_);
146 const auto xm = std::pow(xarg,
m_);
147 const auto f = (1.-xn)/(1.-xm);
149 df = f/(
d0_-rij)*(
n_*xn/(1.-xn)+
m_*xm/(xm-1.));
double sigma_
Width of Gaussian.
double Evaluate(double rij, double &df) const
Evaluate the pairwise kernel function.
static GaussianPK * Build(const Json::Value &json, const std::string &path)
Build GaussianPK from JSON value.
double mu_
Center of Gaussian.
GaussianPK(double mu, double sigma)
Constructor.
Pairwise kernel base class.
virtual double Evaluate(double rij, double &df) const =0
Evaluate the pairwise kernel function.
static PairwiseKernel * Build(const Json::Value &json, const std::string &path)
Build PairwiseKernel from JSON value.
virtual ~PairwiseKernel()
Destructor.
Rational Switching Function.
RationalSwitchPK(double d0, double r0, int n, int m)
Constructor.
double d0_
Minimum linear shift value.
int m_
Exponent of denominator in switching function (controls stiffness).
static RationalSwitchPK * Build(const Json::Value &json, const std::string &path)
Build RationalSwitchPK from JSON value.
double r0_
Cutoff distance.
int n_
Exponent of numerator in switching function (controls stiffness).
double Evaluate(double rij, double &df) const override
Evaluate the pairwise kernel function.