SSAGES
0.1
A MetaDynamics Package
|
Generalized collective variable based on pairwise properties of atoms. More...
#include <PairwiseCV.h>
Public Member Functions | |
PairwiseCV (const Label &group1, const Label &group2, PairwiseKernel *pk) | |
Constructor. More... | |
void | Initialize (const Snapshot &snapshot) override |
Initialize necessary variables. More... | |
void | Evaluate (const Snapshot &snapshot) override |
Evaluate the CV. More... | |
![]() | |
CollectiveVariable () | |
Constructor. | |
double | GetValue () const |
Get current value of the CV. More... | |
virtual double | GetMinimumImage (double) const |
Returns the minimum image of a CV based on the input location. More... | |
virtual double | GetPeriodicValue (double location) const |
Apply periodic boundaries to a given value. More... | |
const std::vector< Vector3 > & | GetGradient () const |
Get current gradient of the CV. More... | |
const Matrix3 & | GetBoxGradient () const |
Get gradient contribution to box. | |
const std::array< double, 2 > & | GetBoundaries () |
Get CV boundaries. More... | |
virtual double | GetDifference (double location) const |
Static Public Member Functions | |
static PairwiseCV * | Build (const Json::Value &json, const std::string &path) |
![]() | |
static CollectiveVariable * | BuildCV (const Json::Value &json, const std::string &path) |
Set up collective variable. More... | |
Private Attributes | |
Label | group1_ |
IDs of the first group of atoms. | |
Label | group2_ |
IDs of the second group of atoms. | |
PairwiseKernel * | pk_ |
Pairwise kernel function used for CV. | |
Additional Inherited Members | |
![]() | |
std::vector< Vector3 > | grad_ |
Gradient vector dCv/dxi. | |
Matrix3 | boxgrad_ |
Gradient w.r.t box vectors dCv/dHij. | |
double | val_ |
Current value of CV. | |
std::array< double, 2 > | bounds_ |
Bounds on CV. | |
Generalized collective variable based on pairwise properties of atoms.
Collective variable on pairwise properties between two groups of atoms. To ensure generality of usage, there are various pairwise kernel functions from which to choose.
Definition at line 40 of file PairwiseCV.h.
|
inline |
Constructor.
group1 | IDs of the first group of atoms. |
group2 | IDs of the second group of atoms. |
Construct a PairwiseCV.
Definition at line 56 of file PairwiseCV.h.
|
inlineoverride |
Evaluate the CV.
snapshot | Current simulation snapshot. |
Definition at line 111 of file PairwiseCV.h.
References SSAGES::Snapshot::ApplyMinimumImage(), SSAGES::CollectiveVariable::boxgrad_, SSAGES::PairwiseKernel::Evaluate(), SSAGES::Snapshot::GetAtomIDs(), SSAGES::Snapshot::GetCommunicator(), SSAGES::Snapshot::GetLocalIndex(), SSAGES::Snapshot::GetLocalIndices(), SSAGES::Snapshot::GetNumAtoms(), SSAGES::Snapshot::GetPositions(), SSAGES::CollectiveVariable::grad_, group1_, group2_, pk_, and SSAGES::CollectiveVariable::val_.
|
inlineoverride |
Initialize necessary variables.
snapshot | Current simulation snapshot. |
Definition at line 65 of file PairwiseCV.h.
References SSAGES::Snapshot::GetCommunicator(), SSAGES::Snapshot::GetLocalIndex(), group1_, and group2_.