SSAGES  0.9.3
Software Suite for Advanced General Ensemble Simulations
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
[legend]

Public Member Functions

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

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

◆ Build()

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

Build PairwiseKernel from JSON value.

Parameters
jsonJSON value node.
pathPath for JSON path specification.
Returns
Pointer to new PairwiseKernel.

Definition at line 30 of file PairwiseKernel.cpp.

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 GaussianPK * Build(const Json::Value &json, const std::string &path)
Build GaussianPK from JSON value.
static RationalSwitchPK * Build(const Json::Value &json, const std::string &path)
Build RationalSwitchPK from JSON value.

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

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Evaluate()

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

Evaluate the pairwise kernel function.

Parameters
rijdistance between two atoms.
dfReference to variable which will store the gradient.
Returns
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: