SSAGES
0.9.3
Software Suite for Advanced General Ensemble Simulations
|
Collective variable on components of the gyration tensor. More...
#include <GyrationTensorCV.h>
Public Member Functions | |
GyrationTensorCV (const Label &atomids, GyrationTensor component) | |
Constructor. More... | |
GyrationTensorCV (const Label &atomids, GyrationTensor component, bool dimx, bool dimy, bool dimz) | |
Constructor. More... | |
void | Initialize (const Snapshot &snapshot) override |
Initialize necessary variables. More... | |
void | Evaluate (const Snapshot &snapshot) override |
Evaluate the CV. More... | |
Public Member Functions inherited from SSAGES::CollectiveVariable | |
CollectiveVariable () | |
Constructor. | |
virtual | ~CollectiveVariable () |
Destructor. | |
virtual void | Initialize (const class Snapshot &) |
Initialize CV. More... | |
virtual void | Evaluate (const class Snapshot &)=0 |
Evaluate CV. More... | |
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. More... | |
const std::array< double, 2 > & | GetBoundaries () |
Get CV boundaries. More... | |
virtual double | GetDifference (double location) const |
Static Public Member Functions | |
static GyrationTensorCV * | Build (const Json::Value &json, const std::string &path) |
Set up collective variable. More... | |
Static Public Member Functions inherited from SSAGES::CollectiveVariable | |
static CollectiveVariable * | BuildCV (const Json::Value &json, const std::string &path) |
Set up collective variable. More... | |
Private Attributes | |
Label | atomids_ |
IDs of the atoms used for calculation. | |
GyrationTensor | component_ |
Component of gyration tensor to compute. | |
Bool3 | dim_ |
Each dimension determines if it is applied by the CV. | |
Additional Inherited Members | |
Protected Attributes inherited from SSAGES::CollectiveVariable | |
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 on components of the gyration tensor.
Collective variable on components of gyration tensor. Depending on the user selection, this will specify a principal moment, radius of gyration, or another shape descriptor.
Definition at line 56 of file GyrationTensorCV.h.
|
inline |
Constructor.
atomids | IDs of the atoms defining gyration tensor. |
component | Specification of component to compute. |
Construct a GyrationTensorCV.
Definition at line 74 of file GyrationTensorCV.h.
Referenced by Build().
|
inline |
Constructor.
atomids | IDs of the atoms defining gyration tensor. |
component | Specification of component to compute. |
dimx | If True , include x dimension. |
dimy | If True , include y dimension. |
dimz | If True , include z dimension. |
Construct a GyrationTensorCV.
Definition at line 90 of file GyrationTensorCV.h.
|
inlinestatic |
Set up collective variable.
nullptr
in case of unknown error.Builds a CV from a JSON node. Returns a pointer to the built cv. If an unknown error is encountered, this function will return a nullptr
, but generally it will throw a BuildException on failure.
Definition at line 246 of file GyrationTensorCV.h.
References Json::Requirement::GetErrors(), GyrationTensorCV(), Json::Requirement::HasErrors(), Json::ObjectRequirement::Parse(), and Json::ObjectRequirement::Validate().
Referenced by SSAGES::CollectiveVariable::BuildCV().
|
inlineoverride |
Evaluate the CV.
snapshot | Current simulation snapshot. |
Definition at line 128 of file GyrationTensorCV.h.
References SSAGES::Snapshot::ApplyMinimumImage(), atomids_, SSAGES::Snapshot::CenterOfMass(), component_, dim_, SSAGES::Snapshot::GetCommunicator(), SSAGES::Snapshot::GetLocalIndices(), SSAGES::Snapshot::GetMasses(), SSAGES::Snapshot::GetNumAtoms(), SSAGES::Snapshot::GetPositions(), SSAGES::CollectiveVariable::grad_, SSAGES::Snapshot::TotalMass(), and SSAGES::CollectiveVariable::val_.
|
inlineoverride |
Initialize necessary variables.
snapshot | Current simulation snapshot. |
Definition at line 99 of file GyrationTensorCV.h.
References atomids_, SSAGES::Snapshot::GetCommunicator(), and SSAGES::Snapshot::GetLocalIndex().