SSAGES  0.1
A MetaDynamics Package
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
SSAGES::CVManager Class Reference

Collective variable manager. More...

#include <CVManager.h>

Public Member Functions

void AddCV (CollectiveVariable *cv)
 Adds a CV to the CV manager. More...
 
void ClearCVs ()
 Clears CVs from CV manager.
 
std::vector< CollectiveVariable * > GetCVs (const std::vector< uint > &mask=std::vector< uint >()) const
 Get CV iterator.
 

Static Public Member Functions

static void AddCVtoMap (const std::string &name, uint id)
 Register CV name with map.
 
static int LookupCV (const std::string &name)
 Get CV id from map.
 

Private Attributes

std::vector< CollectiveVariable * > cvs_
 List of collective variables.
 

Static Private Attributes

static std::map< std::string, uint > cvmap_ = {}
 Map between CV names and ID's.
 

Detailed Description

Collective variable manager.

CVManager is a class used to manage collective variables (CVs) and how they are exposed to methods. A metohd may wish to bias on a subset of available CVs. The CVManager provides a seamless interface to masking unwanted CVs and providing a suitable iterator which can be used to iterate through the desired CVs.

CVManager is also responsible for maintaining the lifetime of the CV objects it contains.

Definition at line 40 of file CVManager.h.

Member Function Documentation

void SSAGES::CVManager::AddCV ( CollectiveVariable cv)
inline

Adds a CV to the CV manager.

Parameters
cvPointer to collective variable.

Definition at line 57 of file CVManager.h.

58  {
59  if(std::find(cvs_.begin(), cvs_.end(), cv) == cvs_.end())
60  cvs_.push_back(cv);
61  }
std::vector< CollectiveVariable * > cvs_
List of collective variables.
Definition: CVManager.h:44

The documentation for this class was generated from the following files: