Collective Variables Module - Developer Documentation
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
colvardeps Class Referenceabstract

Parent class for a member object of a bias, cv or cvc etc. containing features and their dependencies, and handling dependency resolution. More...

#include <colvardeps.h>

Inheritance diagram for colvardeps:
Inheritance graph
[legend]
Collaboration diagram for colvardeps:
Collaboration graph
[legend]

Classes

class  feature
 
struct  feature_state
 This contains the current state of each feature for each object. More...
 

Public Types

enum  features_biases {
  f_cvb_active , f_cvb_awake , f_cvb_step_zero_data , f_cvb_apply_force ,
  f_cvb_bypass_ext_lagrangian , f_cvb_get_total_force , f_cvb_output_acc_work , f_cvb_history_dependent ,
  f_cvb_time_dependent , f_cvb_scalar_variables , f_cvb_calc_pmf , f_cvb_calc_ti_samples ,
  f_cvb_write_ti_samples , f_cvb_write_ti_pmf , f_cvb_scale_biasing_force , f_cvb_extended ,
  f_cvb_smp , f_cvb_ntot
}
 
enum  features_colvar {
  f_cv_active , f_cv_awake , f_cv_apply_force , f_cv_gradient ,
  f_cv_collect_gradient , f_cv_collect_atom_ids , f_cv_fdiff_velocity , f_cv_total_force ,
  f_cv_total_force_calc , f_cv_total_force_current_step , f_cv_subtract_applied_force , f_cv_Jacobian ,
  f_cv_hide_Jacobian , f_cv_extended_Lagrangian , f_cv_external , f_cv_Langevin ,
  f_cv_output_energy , f_cv_output_value , f_cv_output_velocity , f_cv_output_applied_force ,
  f_cv_output_total_force , f_cv_lower_boundary , f_cv_upper_boundary , f_cv_hard_lower_boundary ,
  f_cv_hard_upper_boundary , f_cv_reflecting_lower_boundary , f_cv_reflecting_upper_boundary , f_cv_grid ,
  f_cv_runave , f_cv_corrfunc , f_cv_scripted , f_cv_custom_function ,
  f_cv_periodic , f_cv_single_cvc , f_cv_scalar , f_cv_linear ,
  f_cv_homogeneous , f_cv_multiple_ts , f_cv_ntot
}
 
enum  features_cvc {
  f_cvc_active , f_cvc_scalar , f_cvc_periodic , f_cvc_width ,
  f_cvc_lower_boundary , f_cvc_upper_boundary , f_cvc_explicit_atom_groups , f_cvc_gradient ,
  f_cvc_explicit_gradient , f_cvc_inv_gradient , f_cvc_Jacobian , f_cvc_one_site_total_force ,
  f_cvc_debug_gradient , f_cvc_pbc_minimum_image , f_cvc_com_based , f_cvc_scalable ,
  f_cvc_scalable_com , f_cvc_collect_atom_ids , f_cvc_require_cpu_buffers , f_cvc_ntot
}
 
enum  features_atomgroup {
  f_ag_active , f_ag_center , f_ag_center_origin , f_ag_rotate ,
  f_ag_fitting_group , f_ag_explicit_gradient , f_ag_fit_gradients , f_ag_atom_forces ,
  f_ag_scalable , f_ag_scalable_com , f_ag_collect_atom_ids , f_ag_ntot
}
 
- Public Types inherited from colvarparse
enum  Parse_Mode {
  parse_null = 0 , parse_echo = (1<<1) , parse_echo_default = (1<<2) , parse_deprecation_warning = (1<<3) ,
  parse_silent = 0 , parse_required = (1<<16) , parse_override = (1<<17) , parse_restart = (1<<18) ,
  parse_normal = (1<<1) | (1<<2) | (1<<17) , parse_deprecated = (1<<1) | (1<<3) | (1<<17)
}
 How a keyword is parsed in a string. More...
 

Public Member Functions

 colvardeps (colvarmodule *cvmodule_in)
 
int get_time_step_factor () const
 returns time_step_factor
 
void init_feature (int feature_id, const char *description, feature_type type)
 Pair a numerical feature ID with a description and type.
 
bool is_not_set (int id)
 
bool is_dynamic (int id)
 
bool is_static (int id)
 
bool is_user (int id)
 
virtual const std::vector< feature * > & features () const =0
 
virtual std::vector< feature * > & modify_features ()=0
 
void add_child (colvardeps *child)
 
void remove_child (colvardeps *child)
 
void remove_all_children ()
 
bool is_enabled (int f=f_cv_active) const
 
bool is_available (int f=f_cv_active) const
 
void provide (int feature_id, bool truefalse=true)
 
void set_enabled (int feature_id, bool truefalse=true)
 Enable or disable, depending on flag value.
 
int enable (int f, bool dry_run=false, bool toplevel=true, bool error=false)
 
int disable (int f)
 
void free_children_deps ()
 
void restore_children_deps ()
 re-enable children features (to be used when object becomes active)
 
int decr_ref_count (int f)
 
virtual void do_feature_side_effects (int)
 
virtual int init_dependencies ()=0
 Initialize dependency tree for object of a derived class. More...
 
void require_feature_self (int f, int g)
 Make feature f require feature g within the same object.
 
void exclude_feature_self (int f, int g)
 Make features f and g mutually exclusive within the same object.
 
void require_feature_children (int f, int g)
 Make feature f require feature g within children.
 
void require_feature_alt (int f, int g, int h)
 Make feature f require either g or h within the same object.
 
void require_feature_alt (int f, int g, int h, int i)
 Make feature f require any of g, h, or i within the same object.
 
void require_feature_alt (int f, int g, int h, int i, int j)
 Make feature f require any of g, h, i, or j within the same object.
 
void print_state ()
 print all enabled features and those of children, for debugging
 
std::vector< colvardeps * > get_parents () const
 Return the parents.
 
std::vector< colvardeps * > get_children () const
 Return the children.
 
- Public Member Functions inherited from colvarparse
colvarmoduleget_cvmodule ()
 
 colvarparse (colvarmodule *cvmodule_in)
 Default constructor. More...
 
void clear ()
 Set the object ready to parse a new configuration string.
 
void set_string (std::string const &conf)
 Set a new config string for this object.
 
 ~colvarparse () override
 Default destructor.
 
std::string const & get_config () const
 Get the configuration string (includes comments)
 
int check_keywords (std::string &conf, char const *key)
 Check that all the keywords within "conf" are in the list of allowed keywords; this will invoke strip_values() first and then loop over all words.
 
void clear_keyword_registry ()
 Use this after parsing a config string (note that check_keywords() calls it already)
 
bool get_keyval (std::string const &conf, char const *key, int &value, int const &def_value=0, Parse_Mode const parse_mode=parse_normal)
 
bool get_keyval (std::string const &conf, char const *key, size_t &value, size_t const &def_value=0, Parse_Mode const parse_mode=parse_normal)
 
bool get_keyval (std::string const &conf, char const *key, long &value, long const &def_value=0, Parse_Mode const parse_mode=parse_normal)
 
bool get_keyval (std::string const &conf, char const *key, cvm::step_number &value, cvm::step_number const &def_value=0, Parse_Mode const parse_mode=parse_normal)
 
bool get_keyval (std::string const &conf, char const *key, std::string &value, std::string const &def_value=std::string(""), Parse_Mode const parse_mode=parse_normal)
 
bool get_keyval (std::string const &conf, char const *key, cvm::real &value, cvm::real const &def_value=0.0, Parse_Mode const parse_mode=parse_normal)
 
bool get_keyval (std::string const &conf, char const *key, cvm::rvector &value, cvm::rvector const &def_value=cvm::rvector(), Parse_Mode const parse_mode=parse_normal)
 
bool get_keyval (std::string const &conf, char const *key, cvm::quaternion &value, cvm::quaternion const &def_value=cvm::quaternion(), Parse_Mode const parse_mode=parse_normal)
 
bool get_keyval (std::string const &conf, char const *key, colvarvalue &value, colvarvalue const &def_value=colvarvalue(colvarvalue::type_notset), Parse_Mode const parse_mode=parse_normal)
 
bool get_keyval (std::string const &conf, char const *key, bool &value, bool const &def_value=false, Parse_Mode const parse_mode=parse_normal)
 
bool get_keyval (std::string const &conf, char const *key, std::vector< int > &values, std::vector< int > const &def_values=std::vector< int >(0, 0), Parse_Mode const parse_mode=parse_normal)
 
bool get_keyval (std::string const &conf, char const *key, std::vector< size_t > &values, std::vector< size_t > const &def_values=std::vector< size_t >(0, 0), Parse_Mode const parse_mode=parse_normal)
 
bool get_keyval (std::string const &conf, char const *key, std::vector< long > &values, std::vector< long > const &def_values=std::vector< long >(0, 0), Parse_Mode const parse_mode=parse_normal)
 
bool get_keyval (std::string const &conf, char const *key, std::vector< std::string > &values, std::vector< std::string > const &def_values=std::vector< std::string >(0, std::string("")), Parse_Mode const parse_mode=parse_normal)
 
bool get_keyval (std::string const &conf, char const *key, std::vector< cvm::real > &values, std::vector< cvm::real > const &def_values=std::vector< cvm::real >(0, 0.0), Parse_Mode const parse_mode=parse_normal)
 
bool get_keyval (std::string const &conf, char const *key, std::vector< cvm::rvector > &values, std::vector< cvm::rvector > const &def_values=std::vector< cvm::rvector >(0, cvm::rvector()), Parse_Mode const parse_mode=parse_normal)
 
bool get_keyval (std::string const &conf, char const *key, std::vector< cvm::quaternion > &values, std::vector< cvm::quaternion > const &def_values=std::vector< cvm::quaternion >(0, cvm::quaternion()), Parse_Mode const parse_mode=parse_normal)
 
bool get_keyval (std::string const &conf, char const *key, std::vector< colvarvalue > &values, std::vector< colvarvalue > const &def_values=std::vector< colvarvalue >(0, colvarvalue(colvarvalue::type_notset)), Parse_Mode const parse_mode=parse_normal)
 
bool key_lookup (std::string const &conf, char const *key, std::string *data=nullptr, size_t *save_pos=nullptr)
 Low-level function for parsing configuration strings; automatically adds the requested keyword to the list of valid ones. More...
 
std::istream & read_config_line (std::istream &is, std::string &line)
 Reads a configuration line, adds it to config_string, and returns the stream. More...
 
int check_ascii (std::string const &conf)
 Check that a config string contains non-ASCII characters. More...
 
template<>
int _get_keyval_scalar_value_ (std::string const &key_str, std::string const &data, bool &value, bool const &)
 
template<>
int _get_keyval_scalar_novalue_ (std::string const &key_str, bool &value, Parse_Mode const &parse_mode)
 
- Public Member Functions inherited from colvarparams
int param_exists (std::string const &param_name)
 Whether the parameter param_name exists.
 
virtual std::vector< std::string > get_param_names ()
 Get a copy of the names of registered parameters.
 
virtual std::vector< std::string > get_param_grad_names ()
 Get a copy of the names of registered parameter gradients.
 
virtual void const * get_param_ptr (std::string const &param_name)
 Pointer to the parameter param_name.
 
virtual void const * get_param_grad_ptr (std::string const &param_name)
 Pointer to the gradient of parameter param_name.
 
virtual cvm::real get_param (std::string const &param_name)
 Value of the parameter param_name (must be a scalar)
 
virtual int set_param (std::string const &param_name, void const *new_value)
 Set the named parameter to the given value. More...
 

Public Attributes

std::string description
 

Protected Types

enum  feature_type { f_type_not_set , f_type_dynamic , f_type_user , f_type_static }
 Enum of possible feature types.
 
- Protected Types inherited from colvarparse
enum  key_set_mode { key_not_set = 0 , key_set_user = 1 , key_set_default = 2 }
 How a keyword has been set.
 

Protected Member Functions

bool get_keyval_feature (colvarparse *cvp, std::string const &conf, char const *key, int feature_id, bool const &def_value, colvarparse::Parse_Mode const parse_mode=colvarparse::parse_normal)
 Parse a keyword and enable a feature accordingly.
 
- Protected Member Functions inherited from colvarparse
bool get_key_string_value (std::string const &conf, char const *key, std::string &data)
 Get the string value of a keyword, and save it for later parsing.
 
bool get_key_string_multi_value (std::string const &conf, char const *key, std::vector< std::string > &data)
 Get multiple strings from repeated instances of a same keyword.
 
template<typename TYPE >
bool _get_keyval_scalar_ (std::string const &conf, char const *key, TYPE &value, TYPE const &def_value, Parse_Mode const &parse_mode)
 Template for single-value keyword parsers.
 
template<typename TYPE >
bool _get_keyval_vector_ (std::string const &conf, char const *key, std::vector< TYPE > &values, std::vector< TYPE > const &def_values, Parse_Mode const &parse_mode)
 Template for multiple-value keyword parsers.
 
template<typename TYPE >
int _get_keyval_scalar_value_ (std::string const &key_str, std::string const &data, TYPE &value, TYPE const &def_value)
 Extract the value of a variable from a string.
 
template<typename TYPE >
int _get_keyval_scalar_novalue_ (std::string const &key_str, TYPE &value, Parse_Mode const &parse_mode)
 Handle the case where the user provides a keyword without value.
 
template<typename TYPE >
void mark_key_set_user (std::string const &key_str, TYPE const &value, Parse_Mode const &parse_mode)
 Record that the keyword has just been user-defined.
 
template<typename TYPE >
void mark_key_set_default (std::string const &key_str, TYPE const &def_value, Parse_Mode const &parse_mode)
 Record that the keyword has just been set to its default value.
 
void error_key_required (std::string const &key_str, Parse_Mode const &parse_mode)
 Raise error condition due to the keyword being required!
 
bool key_already_set (std::string const &key_str)
 True if the keyword has been set already.
 
void add_keyword (char const *key)
 Add a new valid keyword to the list.
 
void strip_values (std::string &conf)
 Remove all the values from the config string.
 
- Protected Member Functions inherited from colvarparams
 colvarparams ()
 Default constructor.
 
virtual ~colvarparams ()
 Default destructor.
 
void register_param (std::string const &param_name, void *param_ptr)
 Register the given parameter.
 
void register_param_grad (std::string const &param_name, colvarvalue *param_grad_ptr)
 Register the gradient of the given parameter.
 

Protected Attributes

int time_step_factor = 1
 
std::vector< feature_statefeature_states
 List of the states of all features.
 
- Protected Attributes inherited from colvarparse
colvarmodulecvmodule = nullptr
 
std::string const keyword_delimiters_left
 Characters allowed immediately to the left of a kewyord.
 
std::string const keyword_delimiters_right
 Characters allowed immediately to the right of a kewyord.
 
std::list< std::string > allowed_keywords
 List of legal keywords for this object: this is updated by each call to colvarparse::get_keyval() or colvarparse::key_lookup()
 
std::map< std::string, key_set_modekey_set_modes
 Track which keywords have been already set, and how.
 
std::list< size_t > data_begin_pos
 List of delimiters for the values of each keyword in the configuration string; all keywords will be stripped of their values before the keyword check is performed.
 
std::list< size_t > data_end_pos
 List of delimiters for the values of each keyword in the configuration string; all keywords will be stripped of their values before the keyword check is performed.
 
std::string config_string
 Configuration string of the object (includes comments)
 
- Protected Attributes inherited from colvarparams
std::map< std::string, void const * > param_map
 Pointers to relevant parameters that may be accessed by other objects.
 
std::map< std::string, colvarvalue const * > param_grad_map
 Derivatives of the object with respect to internal parameters.
 

Private Attributes

std::vector< colvardeps * > children
 
std::vector< colvardeps * > parents
 

Additional Inherited Members

- Static Public Member Functions inherited from colvarparse
static std::string to_lower_cppstr (std::string const &in)
 Return a lowercased copy of the string.
 
static std::istream & getline_nocomments (std::istream &is, std::string &s)
 Works as std::getline() but also removes everything between a comment character and the following newline.
 
static int check_braces (std::string const &conf, size_t const start_pos)
 Check if the content of a config string has matching braces. More...
 
static void split_string (const std::string &data, const std::string &delim, std::vector< std::string > &dest)
 Split a string with a specified delimiter into a vector. More...
 
- Static Public Attributes inherited from colvarparse
static const char *const white_space = " \t"
 Accepted white space delimiters, used in key_lookup()
 

Detailed Description

Parent class for a member object of a bias, cv or cvc etc. containing features and their dependencies, and handling dependency resolution.

There are 3 kinds of features:

  1. Dynamic features are under the control of the dependency resolution system. They may be enabled or disabled depending on dependencies.
  2. User features may be enabled based on user input (they may trigger a failure upon dependency resolution, though)
  3. Static features are static properties of the object, determined programmatically at initialization time.

The following diagram summarizes the dependency tree at the bias, colvar, and colvarcomp levels. Isolated and atom group features are not shown to save space.

In all classes, feature 0 is active. When an object is inactivated all its children dependencies are dereferenced (free_children_deps) While the object is inactive, no dependency solving is done on children it is done when the object is activated back (restore_children_deps)

Member Enumeration Documentation

◆ features_atomgroup

Enumerator
f_ag_explicit_gradient 

Does not have explicit atom gradients from parent CVC.

Perform a standard minimum msd fit for given atoms ie. not using refpositionsgroup

f_ag_collect_atom_ids 

Build list of atoms involved in atom group.

◆ features_biases

Enumerator
f_cvb_active 

Bias is active.

f_cvb_awake 

Bias is awake (active on its own accord) this timestep.

f_cvb_step_zero_data 

Accumulates data starting from step 0 of a simulation run.

f_cvb_apply_force 

will apply forces

f_cvb_bypass_ext_lagrangian 

force this bias to act on actual value for extended-Lagrangian coordinates

f_cvb_get_total_force 

requires total forces

f_cvb_output_acc_work 

whether this bias should record the accumulated work

f_cvb_history_dependent 

depends on simulation history

f_cvb_time_dependent 

depends on time

f_cvb_scalar_variables 

requires scalar colvars

f_cvb_calc_pmf 

whether this bias will compute a PMF

f_cvb_calc_ti_samples 

whether this bias will compute TI samples

f_cvb_write_ti_samples 

whether this bias will write TI samples

f_cvb_write_ti_pmf 

whether this bias should write the TI PMF

f_cvb_scale_biasing_force 

whether this bias uses an external grid to scale the biasing forces

f_cvb_extended 

whether this bias is applied to one or more ext-Lagrangian colvars

f_cvb_smp 

Process this bias's data in parallel over multiple CPU threads.

◆ features_colvar

Enumerator
f_cv_active 

Calculate colvar.

f_cv_awake 

Colvar is awake (active on its own accord) this timestep.

f_cv_apply_force 

External force can be applied, either to atoms or to an extended DOF.

f_cv_gradient 

Gradients are calculated and temporarily stored, so that external forces can be propagated to atoms.

f_cv_collect_gradient 

Collect atomic gradient data from all cvcs into vector atomic_gradient.

f_cv_collect_atom_ids 

Build list of atoms involved in CV calculation.

f_cv_fdiff_velocity 

Calculate the velocity with finite differences.

f_cv_total_force 

The total force is calculated, projecting the atomic forces on the inverse gradient.

f_cv_total_force_calc 

Calculate total force from atomic forces or get it from the back-end for an external parameter.

f_cv_total_force_current_step 

Total force is that of current time step.

f_cv_subtract_applied_force 

Subtract the applied force from the total force.

f_cv_Jacobian 

Estimate Jacobian derivative.

f_cv_hide_Jacobian 

Do not report the Jacobian force as part of the total force instead, apply a correction internally to cancel it.

f_cv_extended_Lagrangian 

The variable has a harmonic restraint around a moving center with fictitious mass; bias forces will be applied to the center.

f_cv_external 

A variable that constrains or follows an external parameter in the back-end (eg. an alchemical coupling parameter for lambda-dynamics) If extended Lagrangian, then we drive the external parameter Otherwise we follow it Can have a single component.

f_cv_Langevin 

The extended system coordinate undergoes Langevin dynamics.

f_cv_output_energy 

Output the potential and kinetic energies (for extended Lagrangian colvars only)

f_cv_output_value 

Output the value to the trajectory file (on by default)

f_cv_output_velocity 

Output the velocity to the trajectory file.

f_cv_output_applied_force 

Output the applied force to the trajectory file.

f_cv_output_total_force 

Output the total force to the trajectory file.

f_cv_lower_boundary 

A lower boundary is defined.

f_cv_upper_boundary 

An upper boundary is defined.

f_cv_hard_lower_boundary 

The lower boundary is not defined from user's choice.

f_cv_hard_upper_boundary 

The upper boundary is not defined from user's choice.

f_cv_reflecting_lower_boundary 

Reflecting lower boundary condition.

f_cv_reflecting_upper_boundary 

Reflecting upper boundary condition.

f_cv_grid 

Provide a discretization of the values of the colvar to be used by the biases or in analysis (needs lower and upper boundary)

f_cv_runave 

Compute running average.

f_cv_corrfunc 

Compute time correlation function.

f_cv_scripted 

Value and gradient computed by user script.

f_cv_custom_function 

Value and gradient computed by user function through Lepton.

f_cv_periodic 

Colvar is periodic.

f_cv_single_cvc 

The colvar has only one component.

f_cv_scalar 

is scalar

f_cv_multiple_ts 

multiple timestep through time_step_factor

f_cv_ntot 

Number of colvar features.

◆ features_cvc

Enumerator
f_cvc_active 

Computation of this CVC is enabled.

f_cvc_scalar 

This CVC computes a scalar value.

f_cvc_periodic 

Values of this CVC lie in a periodic interval.

f_cvc_width 

This CVC provides a default value for the colvar's width.

f_cvc_lower_boundary 

This CVC provides a default value for the colvar's lower boundary.

f_cvc_upper_boundary 

This CVC provides a default value for the colvar's upper boundary.

f_cvc_explicit_atom_groups 

CVC accesses atom groups directly (as opposed to going throuh other objects)

f_cvc_gradient 

CVC calculates atom gradients.

f_cvc_explicit_gradient 

CVC calculates and stores explicit atom gradients on rank 0.

f_cvc_inv_gradient 

CVC calculates and stores inverse atom gradients (used for total force)

f_cvc_Jacobian 

CVC calculates the Jacobian term of the total-force expression.

f_cvc_one_site_total_force 

The total force for this CVC will be computed from one group only.

f_cvc_debug_gradient 

calc_gradients() will call debug_gradients() for every group needed

f_cvc_pbc_minimum_image 

With PBCs, minimum-image convention will be used for distances (does not affect the periodicity of CVC values, e.g. angles)

f_cvc_com_based 

This CVC is a function of centers of mass.

f_cvc_scalable 

This CVC can be computed in parallel.

f_cvc_scalable_com 

Centers-of-mass used in this CVC can be computed in parallel.

f_cvc_collect_atom_ids 

Build list of atoms involved in CVC calculation.

f_cvc_require_cpu_buffers 

This CVC requires CPU buffers.

f_cvc_ntot 

Number of CVC features.

Member Function Documentation

◆ decr_ref_count()

int colvardeps::decr_ref_count ( int  f)

Decrement the reference count of a feature disabling it if it's dynamic and count reaches zero

◆ disable()

int colvardeps::disable ( int  f)

Disable a feature, decrease the reference count of its dependencies and recursively disable them as applicable

◆ do_feature_side_effects()

virtual void colvardeps::do_feature_side_effects ( int  )
inlinevirtual

Implements possible actions to be carried out when a given feature is enabled Base function does nothing, can be overloaded

Reimplemented in colvar, and cvm::atom_group.

◆ enable()

int colvardeps::enable ( int  f,
bool  dry_run = false,
bool  toplevel = true,
bool  error = false 
)

Enable a feature and recursively solve its dependencies. For accurate reference counting, do not add spurious calls to enable()

Parameters
dry_runRecursively test whether a feature is available, without enabling it
toplevelFalse if this is called as part of a chain of dependency resolution. This is used to diagnose failed dependencies by displaying the full stack: only the toplevel dependency will throw a fatal error.
errorRecursively enable, printing error messages along the way Necessary when propagating errors across alternate dependencies

◆ features()

virtual const std::vector< feature * > & colvardeps::features ( ) const
pure virtual

Implemented in colvar, cvm::atom_group, colvarbias, and colvar::cvc.

◆ free_children_deps()

void colvardeps::free_children_deps ( )

disable all enabled features to free their dependencies to be done when deleting the object Cannot be in the base class destructor because it needs the derived class features()

◆ init_dependencies()

virtual int colvardeps::init_dependencies ( )
pure virtual

Initialize dependency tree for object of a derived class.

Implemented in colvar, cvm::atom_group, colvarbias, and colvar::cvc.

◆ provide()

void colvardeps::provide ( int  feature_id,
bool  truefalse = true 
)

Set the feature's available flag, without checking To be used for dynamic properties dependencies will be checked by enable()

◆ remove_all_children()

void colvardeps::remove_all_children ( )

Used before deleting an object, if not handled by that object's destructor (useful for cvcs because their children are member objects)

Member Data Documentation

◆ children

std::vector<colvardeps *> colvardeps::children
private

pointers to objects this object depends on list should be maintained by any code that modifies the object this could be secured by making lists of colvars / cvcs / atom groups private and modified through accessor functions

◆ parents

std::vector<colvardeps *> colvardeps::parents
private

pointers to objects that depend on this object the size of this array is in effect a reference counter

◆ time_step_factor

int colvardeps::time_step_factor = 1
protected

Time step multiplier (for coarse-timestep biases & colvars) Biases and colvars will only be calculated at those times (f_cvb_awake and f_cv_awake); a Biases use this to apply "impulse" biasing forces at the outer timestep Unused by lower-level objects (cvcs and atom groups)


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