|
SSAGES
0.1
A MetaDynamics Package
|
Collective variable on an particle position. More...
#include <ParticlePositionCV.h>

Public Member Functions | |
| ParticlePositionCV (const Label &atomids, const Vector3 &position, bool fixx, bool fixy, bool fixz) | |
| 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. | |
| 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 ParticlePositionCV * | Build (const Json::Value &json, const std::string &path) |
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_ |
| Vector of atom ids of interest. | |
| Vector3 | point_ |
| Target point in space. | |
| Bool3 | fix_ |
| Each dimension determines if a constraint 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 an particle position.
This CV will return the distance of a particle (collection of atoms) from a particular point in (1,2,3)-dimensional space.
Definition at line 39 of file ParticlePositionCV.h.
|
inline |
Constructor.
| atomids | Vector of atom ID's. |
| position | Point in (1,2,3)D space for the distance calculation. |
| fixx | If False, constrain x dimension. |
| fixy | If False, constrain y dimension. |
| fixz | If False, constrain z dimension. |
Construct a particle position CV. If a dimension is constrained, this dimension does not contribute to the distance calculation. For example, if the y- and z-dimension are constrained, the CV calculates only the distance in x-direction.
Definition at line 67 of file ParticlePositionCV.h.
|
inlineoverride |
Evaluate the CV.
| snapshot | Current simulation snapshot. |
Definition at line 105 of file ParticlePositionCV.h.
References SSAGES::Snapshot::ApplyMinimumImage(), atomids_, SSAGES::Snapshot::CenterOfMass(), fix_, SSAGES::Snapshot::GetLocalIndices(), SSAGES::Snapshot::GetMasses(), SSAGES::Snapshot::GetNumAtoms(), SSAGES::CollectiveVariable::grad_, point_, SSAGES::Snapshot::TotalMass(), and SSAGES::CollectiveVariable::val_.

|
inlineoverride |
Initialize necessary variables.
| snapshot | Current simulation snapshot. |
Definition at line 76 of file ParticlePositionCV.h.
References atomids_, SSAGES::Snapshot::GetCommunicator(), and SSAGES::Snapshot::GetLocalIndex().

1.8.7