A MetaDynamics Package
Public Member Functions | Static Public Member Functions | List of all members
SSAGES::PairwiseKernel Class Referenceabstract

Pairwise kernel base class. More...

#include <PairwiseKernel.h>

Inheritance diagram for SSAGES::PairwiseKernel:
Inheritance graph

Public Member Functions

virtual double Evaluate (double rij, double &df) const =0
 Evaluate the pairwise kernel function. More...

Static Public Member Functions

static PairwiseKernelBuild (const Json::Value &json, const std::string &path)
 Build PairwiseKernel from JSON value. More...

Detailed Description

Pairwise kernel base class.

Pairwise functions are useful for a variety of collective variables. Several classes of these functions exist.

Gaussian functions are useful for collective variables that focus on a certain value. Unlike a delta function, they interpolate provide a continuous function and gradient for biasing.

Switching functions are useful for collective variables that are discrete in nature. They interpolate the discrete values and provide a continuous gradient for biasing.

Definition at line 44 of file PairwiseKernel.h.

Member Function Documentation

PairwiseKernel * SSAGES::PairwiseKernel::Build ( const Json::Value &  json,
const std::string &  path 

Build PairwiseKernel from JSON value.

jsonJSON value node.
Pointer to new PairwiseKernel.

Definition at line 30 of file PairwiseKernel.cpp.

References SSAGES::GaussianPK::Build(), and SSAGES::RationalSwitchPK::Build().

Referenced by SSAGES::GaussianPK::Evaluate(), SSAGES::PairwiseCV::Evaluate(), and SSAGES::RationalSwitchPK::Evaluate().

31  {
32  auto type = json.get("type", "none").asString();
33  if(type == "gaussian")
34  return GaussianPK::Build(json, path);
35  else if(type == "rationalswitch")
36  return RationalSwitchPK::Build(json, path);
37  else
38  throw std::invalid_argument("Invalid pairwise kernel type \"" + type + "\".");
39  }
static RationalSwitchPK * Build(const Json::Value &json, const std::string &path)
Build RationalSwitchPK from JSON value.
static GaussianPK * Build(const Json::Value &json, const std::string &path)
Build GaussianPK from JSON value.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual double SSAGES::PairwiseKernel::Evaluate ( double  rij,
double &  df 
) const
pure virtual

Evaluate the pairwise kernel function.

rijdistance between two atoms.
dfReference to variable which will store the gradient.
value of pairwise kernel function.

Implemented in SSAGES::RationalSwitchPK, and SSAGES::GaussianPK.

Referenced by SSAGES::PairwiseCV::Evaluate().

Here is the caller graph for this function:

The documentation for this class was generated from the following files: