SSAGES
0.1
A MetaDynamics Package
|
Collective variable is a Rouse mode for a polymer chain comprised of N particle groups. More...
#include <RouseModeCV.h>
Public Member Functions | |
RouseModeCV (const std::vector< Label > &groups, int p) | |
Basic Constructor for Rouse Mode CV. More... | |
void | setMasses (const std::vector< Label > &groups, const Snapshot &snapshot) |
Helper function to determine masses of each group. 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 RouseModeCV * | 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 | |
std::vector< Label > | groups_ |
std::vector< double > | massg_ |
int | N_ |
int | p_ |
Vector3 | xp_ |
std::vector< Vector3 > | r_ |
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. | |
Collective variable is a Rouse mode for a polymer chain comprised of N particle groups.
This CV returns the value for the p'th Rouse mode, computed as Xp(t) ~ (1/N) sum_{i=1}^{N} ri(t)*cos[pi(n-0.5)p/N], where N is the number of particle groups, p is the mode index, ri is the center-of-mass position of a collection of atoms comprising the i'th bead in the N-bead polymer chain
Definition at line 39 of file RouseModeCV.h.
|
inline |
Basic Constructor for Rouse Mode CV.
groups | - vector of vector of atom IDs, each group comprising a bead in the Rouse chain |
p | - index for relevant Rouse mode |
Definition at line 55 of file RouseModeCV.h.
|
inlineoverride |
Evaluate the CV.
snapshot | Current simulation snapshot. |
Definition at line 120 of file RouseModeCV.h.
References SSAGES::Snapshot::ApplyMinimumImage(), SSAGES::Snapshot::CenterOfMass(), SSAGES::Snapshot::GetLocalIndices(), SSAGES::Snapshot::GetMasses(), SSAGES::Snapshot::GetNumAtoms(), SSAGES::CollectiveVariable::grad_, and SSAGES::CollectiveVariable::val_.
|
inlineoverride |
Initialize necessary variables.
snapshot | Current simulation snapshot. |
Definition at line 79 of file RouseModeCV.h.
References SSAGES::Snapshot::GetCommunicator(), SSAGES::Snapshot::GetLocalIndex(), and setMasses().
|
inline |
Helper function to determine masses of each group.
Note: this here assumes that the masses of each group are not changing during the simulation, which is likely typical...
groups | - vector of vector of atom IDs, each group comprising a bead in the Rouse chain |
Definition at line 64 of file RouseModeCV.h.
References SSAGES::Snapshot::GetLocalIndices(), and SSAGES::Snapshot::TotalMass().
Referenced by Initialize().