Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

colvar Class Reference

\brief A collective variable (main class); to be defined, it needs at least one object of a derived class of colvar::cvc; it calculates and returns a colvarvalue object This class parses the configuration, defines the behaviour and stores the value (colvar::x) and all related data of a collective variable. How the value is calculated is defined in colvar::cvc and its derived classes. The colvar object contains pointers to multiple colvar::cvc derived objects, which can be combined together into one collective variable. This makes possible to implement new collective variables at runtime based on the existing ones. Currently, this possibility is limited to a polynomial, using the coefficients cvc::sup_coeff and the exponents cvc::sup_np. In case of non-scalar variables, only exponents equal to 1 are accepted. Please note that most of its members are colvarvalue objects, i.e. they can handle different data types together, and must all be set to the same type of colvar::value() before using them together in assignments or other operations; this is usually done automatically in the constructor. If you add a new member of colvarvalue type, you should also add its initialization line in the colvar constructor. More...

#include <colvar.h>

Inheritance diagram for colvar:

colvarparse colvardeps colvarparams List of all members.

Public Methods

colvarvalue const & value () const
 \brief Current value (previously set by calc() or by read_traj()). More...

colvarvalue const & actual_value () const
 \brief Current actual value (not extended DOF). More...

colvarvalue const & run_ave () const
 \brief Current running average (if calculated as set by analysis flag). More...

cvm::real const & force_constant () const
 \brief Force constant of the spring. More...

colvarvalue const & velocity () const
 \brief Current velocity (previously set by calc() or by read_traj()). More...

colvarvalue const & total_force () const
 \brief Current total force (previously obtained from calc() or read_traj()). Note: this is calculated using the atomic forces from the last simulation step. Total atom forces are read from the MD program, the total force acting on the collective variable is calculated summing those from all colvar components, the bias and walls forces are subtracted. More...

virtual const std::vector<
feature * > & 
features () const
 \brief Implementation of the feature list accessor for colvar. More...

virtual std::vector< feature * > & modify_features ()
void do_feature_side_effects (int id)
 Implements possible actions to be carried out when a given feature is enabled This overloads the base function in colvardeps. More...

bool periodic_boundaries () const
 \brief Is the interval defined by the two boundaries periodic? More...

bool periodic_boundaries (colvarvalue const &lb, colvarvalue const &ub) const
 \brief Is the interval defined by the two boundaries periodic? More...

 colvar ()
 Constructor. More...

int init (std::string const &conf)
 Main init function. More...

int init_components (std::string const &conf)
 Parse the CVC configuration and allocate their data. More...

int init_custom_function (std::string const &conf)
 Parse parameters for custom function with Lepton. More...

int init_grid_parameters (std::string const &conf)
 Init defaults for grid options. More...

int init_extended_Lagrangian (std::string const &conf)
 Init extended Lagrangian parameters. More...

int init_output_flags (std::string const &conf)
 Init output flags. More...

virtual int init_dependencies ()
 \brief Initialize dependency tree. More...

void setup ()
 Get ready for a run and re-initialize internal data if needed. More...

 ~colvar ()
 Destructor. More...

int calc ()
 \brief Calculate the colvar's value and related quantities. More...

int end_of_step ()
 Carry out operations needed before next step is run. More...

int calc_cvcs (int first=0, size_t num_cvcs=0)
 \brief Calculate a subset of the colvar components (CVCs) currently active (default: all active CVCs) Note: both arguments refer to the sect of *active* CVCs, not all CVCs. More...

int check_cvc_range (int first_cvc, size_t num_cvcs)
 Ensure that the selected range of CVCs is consistent. More...

int calc_cvc_values (int first, size_t num_cvcs)
 \brief Calculate the values of the given subset of CVCs. More...

int calc_cvc_gradients (int first, size_t num_cvcs)
 \brief Same as colvar::calc_cvc_values but for gradients. More...

int calc_cvc_total_force (int first, size_t num_cvcs)
 \brief Same as colvar::calc_cvc_values but for total forces. More...

int calc_cvc_Jacobians (int first, size_t num_cvcs)
 \brief Same as colvar::calc_cvc_values but for Jacobian derivatives/forces. More...

int collect_cvc_data ()
 \brief Collect quantities from CVCs and update aggregated data for the colvar. More...

int collect_cvc_values ()
 \brief Collect the values of the CVCs. More...

int collect_cvc_gradients ()
 \brief Same as colvar::collect_cvc_values but for gradients. More...

int collect_cvc_total_forces ()
 \brief Same as colvar::collect_cvc_values but for total forces. More...

int collect_cvc_Jacobians ()
 \brief Same as colvar::collect_cvc_values but for Jacobian derivatives/forces. More...

int calc_colvar_properties ()
 \brief Calculate the quantities associated to the colvar (but not to the CVCs). More...

colvarvalue const applied_force () const
 Get the current applied force. More...

void reset_bias_force ()
 Set the total biasing force to zero. More...

void add_bias_force (colvarvalue const &force)
 Add to the total force from biases. More...

void add_bias_force_actual_value (colvarvalue const &force)
 Apply a force to the actual value (only meaningful with extended Lagrangian). More...

cvm::real update_forces_energy ()
 \brief Collect all forces on this colvar, integrate internal equations of motion of internal degrees of freedom; see also colvar::communicate_forces() return colvar energy if extended Lagrandian active. More...

void update_extended_Lagrangian ()
 \brief Integrate equations of motion of extended Lagrangian coordinate if needed. More...

void communicate_forces ()
 \brief Communicate forces (previously calculated in colvar::update()) to the external degrees of freedom. More...

int set_cvc_flags (std::vector< bool > const &flags)
 \brief Enables and disables individual CVCs based on the given array. More...

int update_cvc_flags ()
 \brief Updates the flags in the CVC objects, and their number. More...

int update_cvc_config (std::vector< std::string > const &confs)
 \brief Modify the configuration of CVCs (currently, only base class data). More...

int cvc_param_exists (std::string const &param_name)
 Whether this named parameter exists (in the first and only component). More...

cvm::real get_cvc_param (std::string const &param_name)
 Get the value of the named parameter (from the first and only component). More...

void const * get_cvc_param_ptr (std::string const &param_name)
 Get a pointer to the named parameter (from the first and only component). More...

colvarvalue const * get_cvc_param_grad (std::string const &param_name)
 Pointer to the derivative of the variable with respect to param_name. More...

int set_cvc_param (std::string const &param_name, void const *new_value)
 Set the named parameter in the first and only component to the given value. More...

size_t num_dimensions () const
 \brief Number of dimensions of the value of this colvar. More...

size_t num_cvcs () const
 \brief Number of CVC objects defined. More...

size_t num_active_cvcs () const
 \brief number of CVC objects with an active flag (as set by update_cvc_flags). More...

cvm::real dist2 (colvarvalue const &x1, colvarvalue const &x2) const
 \brief Use the internal metrics (as from colvar::cvc objects) to calculate square distances and gradients Handles correctly symmetries and periodic boundary conditions. More...

colvarvalue dist2_lgrad (colvarvalue const &x1, colvarvalue const &x2) const
 \brief Use the internal metrics (as from colvar::cvc objects) to calculate square distances and gradients Handles correctly symmetries and periodic boundary conditions. More...

colvarvalue dist2_rgrad (colvarvalue const &x1, colvarvalue const &x2) const
 \brief Use the internal metrics (as from colvar::cvc objects) to calculate square distances and gradients Handles correctly symmetries and periodic boundary conditions. More...

void wrap (colvarvalue &x_unwrapped) const
 \brief Use the internal metrics (as from colvar::cvc objects) to wrap a value into a standard interval Handles correctly symmetries and periodic boundary conditions. More...

int parse_analysis (std::string const &conf)
 Read the analysis tasks. More...

int analyze ()
 Perform analysis tasks. More...

std::istream & read_traj (std::istream &is)
 Read the value from a collective variable trajectory file. More...

std::ostream & write_traj (std::ostream &os)
 Output formatted values to the trajectory file. More...

std::ostream & write_traj_label (std::ostream &os)
 Write a label to the trajectory file (comment line). More...

std::istream & read_state (std::istream &is)
 Read the collective variable from a restart file. More...

std::ostream & write_state (std::ostream &os)
 Write the collective variable to a restart file. More...

int write_output_files ()
 Write output files (if defined, e.g. in analysis mode). More...

virtual std::vector< std::vector<
int > > 
get_atom_lists ()
 \brief Get vector of vectors of atom IDs for all atom groups. More...

std::vector< int > const & get_volmap_ids ()
 Volmap numeric IDs, one for each CVC (-1 if not available). More...


Static Public Methods

void delete_features ()
bool compare_cvc (const colvar::cvc *const i, const colvar::cvc *const j)
 getter of the global cvc map \brief function for sorting cvcs by their names. More...


Public Attributes

std::string name
 Name. More...

cvm::real width
 \brief Typical fluctuation amplitude for this collective variable (e.g. local width of a free energy basin) In metadynamics calculations, colvarbias_meta, this value is used to calculate the width of a gaussian. In ABF calculations, colvarbias_abf, it is used to calculate the grid spacing in the direction of this collective variable. More...

std::vector< colvarbias * > biases
 List of biases that depend on this colvar. More...

colvarvalue fb
 \brief Bias force; reset_bias_force() should be called before the biases are updated. More...

colvarvalue fb_actual
 \brief Bias force to the actual value (only useful with extended Lagrangian). More...

colvarvalue f
 \brief Total applied force; fr (if extended_lagrangian is defined), fb (if biases are applied) and the walls' forces (if defined) contribute to it. More...

colvarvalue f_old
 Applied force at the previous step (to be subtracted from total force if needed). More...

colvarvalue ft
 \brief Total force, as derived from the atomic trajectory; should equal the system force plus f. More...

cvm::real period
 Period, if this variable is periodic. More...

cvm::real wrap_center
 Center of wrapping, if this variable is periodic. More...

bool expand_boundaries
 \brief Expand the boundaries of multiples of width, to keep the value always within range. More...

colvarvalue lower_boundary
 \brief Location of the lower boundary. More...

colvarvalue upper_boundary
 \brief Location of the upper boundary. More...

std::vector< int > atom_ids
 \brief Sorted array of (zero-based) IDs for all atoms involved. More...

std::vector< cvm::rvector > atomic_gradients
 \brief Array of atomic gradients collected from all cvcs with appropriate components, rotations etc. For scalar variables only! More...


Static Public Attributes

std::vector< feature * > cv_features
 \brief Implementation of the feature list for colvar. More...


Protected Types

enum  acf_type_e { acf_notset, acf_vel, acf_coor, acf_p2coor }
 Type of autocorrelation function (ACF). More...


Protected Methods

colvarvalue fdiff_velocity (colvarvalue const &xold, colvarvalue const &xnew)
void update_active_cvc_square_norm ()
 Update the sum of square coefficients for active cvcs. More...

void calc_vel_acf (std::list< colvarvalue > &v_history, colvarvalue const &v)
 \brief Velocity ACF, scalar product between v(0) and v(t). More...

void calc_coor_acf (std::list< colvarvalue > &x_history, colvarvalue const &x)
 \brief Coordinate ACF, scalar product between x(0) and x(t) (does not work with scalar numbers). More...

void calc_p2coor_acf (std::list< colvarvalue > &x_history, colvarvalue const &x)
 \brief Coordinate ACF, second order Legendre polynomial between x(0) and x(t) (does not work with scalar numbers). More...

int calc_acf ()
 Calculate the auto-correlation function (ACF). More...

int write_acf (std::ostream &os)
 Save the ACF to a file. More...

int calc_runave ()
 Calculate the running average and its standard deviation. More...

void build_atom_list (void)
 \brief Initialize the sorted list of atom IDs for atoms involved in all cvcs (called when enabling f_cv_collect_gradients). More...


Protected Attributes

colvarvalue x
 Value of the colvar. More...

colvarvalue x_reported
 Cached reported value (x may be manipulated). More...

colvarvalue v_fdiff
 Finite-difference velocity. More...

colvarvalue v_reported
 Cached reported velocity. More...

colvarvalue x_ext
 Restraint center. More...

colvarvalue prev_x_ext
 Previous value of the restraint center;. More...

colvarvalue v_ext
 Velocity of the restraint center. More...

colvarvalue prev_v_ext
 Previous velocity of the restraint center. More...

cvm::real ext_mass
 Mass of the restraint center. More...

cvm::real ext_force_k
 Restraint force constant. More...

cvm::real ext_gamma
 Friction coefficient for Langevin extended dynamics. More...

cvm::real ext_sigma
 Amplitude of Gaussian white noise for Langevin extended dynamics. More...

colvarvalue fr
 \brief Applied force on extended DOF, for output (unscaled if using MTS). More...

colvarvalue fj
 \brief Jacobian force, when Jacobian_force is enabled. More...

colvarvalue ft_reported
 Cached reported total force. More...

size_t n_active_cvcs
 \brief Number of CVC objects with an active flag. More...

cvm::real active_cvc_square_norm
 Sum of square coefficients for active cvcs. More...

cvm::step_number prev_timestep
 \brief Absolute timestep number when this colvar was last updated. More...

colvarvalue x_old
 Previous value (to calculate velocities during analysis). More...

colvarvalue x_restart
 Value read from the most recent state file (if any). More...

bool after_restart
 True if a state file was just read. More...

std::list< std::list< colvarvalue > > acf_x_history
 Time series of values and velocities used in correlation functions. More...

std::list< std::list< colvarvalue > > acf_v_history
 Time series of values and velocities used in correlation functions. More...

std::list< std::list< colvarvalue
> >::iterator 
acf_x_history_p
 Time series of values and velocities used in correlation functions (pointers)x. More...

std::list< std::list< colvarvalue
> >::iterator 
acf_v_history_p
 Time series of values and velocities used in correlation functions (pointers)x. More...

std::list< std::list< colvarvalue > > x_history
 Time series of values and velocities used in running averages. More...

std::list< std::list< colvarvalue
> >::iterator 
x_history_p
 Time series of values and velocities used in correlation functions (pointers)x. More...

std::string acf_colvar_name
 \brief Collective variable with which the correlation is calculated (default: itself). More...

size_t acf_length
 Length of autocorrelation function (ACF). More...

size_t acf_offset
 After how many steps the ACF starts. More...

size_t acf_stride
 How many timesteps separate two ACF values. More...

size_t acf_nframes
 Number of frames for each ACF point. More...

bool acf_normalize
 Normalize the ACF to a maximum value of 1? More...

std::vector< cvm::realacf
 ACF values. More...

std::string acf_outfile
 Name of the file to write the ACF. More...

acf_type_e acf_type
 Type of autocorrelation function (ACF). More...

size_t runave_length
 Length of running average series. More...

size_t runave_stride
 Timesteps to skip between two values in the running average series. More...

std::string runave_outfile
 Name of the file to write the running average. More...

colvarvalue runave
 Current value of the running average. More...

cvm::real runave_variance
 Current value of the square deviation from the running average. More...

cvm::real kinetic_energy
 If extended Lagrangian active: colvar kinetic energy. More...

cvm::real potential_energy
 If extended Lagrangian active: colvar harmonic potential. More...

std::vector< cvc * > cvcs
 \brief Array of colvar::cvc objects. More...

std::vector< bool > cvc_flags
 \brief Flags to enable or disable cvcs at next colvar evaluation. More...

std::string scripted_function
 Name of scripted function to be used. More...

std::vector< const colvarvalue * > sorted_cvc_values
 Current cvc values in the order requested by script when using scriptedFunction. More...

std::vector< int > volmap_ids_
 Volmap numeric IDs, one for each CVC (-1 if not available). More...


Detailed Description

\brief A collective variable (main class); to be defined, it needs at least one object of a derived class of colvar::cvc; it calculates and returns a colvarvalue object This class parses the configuration, defines the behaviour and stores the value (colvar::x) and all related data of a collective variable. How the value is calculated is defined in colvar::cvc and its derived classes. The colvar object contains pointers to multiple colvar::cvc derived objects, which can be combined together into one collective variable. This makes possible to implement new collective variables at runtime based on the existing ones. Currently, this possibility is limited to a polynomial, using the coefficients cvc::sup_coeff and the exponents cvc::sup_np. In case of non-scalar variables, only exponents equal to 1 are accepted. Please note that most of its members are colvarvalue objects, i.e. they can handle different data types together, and must all be set to the same type of colvar::value() before using them together in assignments or other operations; this is usually done automatically in the constructor. If you add a new member of colvarvalue type, you should also add its initialization line in the colvar constructor.

Definition at line 54 of file colvar.h.


Member Enumeration Documentation

enum colvar::acf_type_e [protected]
 

Type of autocorrelation function (ACF).

Enumeration values:
acf_notset  Unset type.
acf_vel  Velocity ACF, scalar product between v(0) and v(t).
acf_coor  Coordinate ACF, scalar product between x(0) and x(t).
acf_p2coor  \brief Coordinate ACF, second order Legendre polynomial between x(0) and x(t) (does not work with scalar numbers).

Definition at line 514 of file colvar.h.


Constructor & Destructor Documentation

colvar::colvar  
 

Constructor.

Definition at line 27 of file colvar.C.

References after_restart, colvardeps::description, expand_boundaries, init_dependencies, kinetic_energy, potential_energy, and prev_timestep.

colvar::~colvar  
 

Destructor.

Definition at line 1275 of file colvar.C.

References biases, colvarmodule::config_changed, cvcs, colvarmodule::log, colvarmodule::main, name, NULL, colvardeps::remove_all_children, and colvarmodule::variables.


Member Function Documentation

colvarvalue const & colvar::actual_value   const [inline]
 

\brief Current actual value (not extended DOF).

Definition at line 713 of file colvar.h.

References x.

void colvar::add_bias_force colvarvalue const &    force [inline]
 

Add to the total force from biases.

Definition at line 737 of file colvar.h.

References colvardeps::check_enabled, colvarmodule::debug, colvardeps::f_cv_gradient, fb, force, colvarmodule::log, and name.

void colvar::add_bias_force_actual_value colvarvalue const &    force [inline]
 

Apply a force to the actual value (only meaningful with extended Lagrangian).

Definition at line 748 of file colvar.h.

References colvarmodule::debug, fb_actual, force, colvarmodule::log, and name.

int colvar::analyze  
 

Perform analysis tasks.

Definition at line 2559 of file colvar.C.

References calc_acf, calc_runave, colvardeps::f_cv_corrfunc, colvardeps::f_cv_runave, and colvardeps::is_enabled.

colvarvalue const colvar::applied_force   const [inline]
 

Get the current applied force.

Definition at line 333 of file colvar.h.

References colvardeps::f_cv_extended_Lagrangian, and colvardeps::is_enabled.

Referenced by write_traj.

void colvar::build_atom_list void    [protected]
 

\brief Initialize the sorted list of atom IDs for atoms involved in all cvcs (called when enabling f_cv_collect_gradients).

Definition at line 973 of file colvar.C.

References atom_ids, atomic_gradients, cvcs, colvarmodule::debug, colvardeps::f_ag_fit_gradients, colvardeps::f_ag_fitting_group, and colvarmodule::log.

Referenced by do_feature_side_effects.

int colvar::calc  
 

\brief Calculate the colvar's value and related quantities.

Definition at line 1340 of file colvar.C.

References calc_cvcs, collect_cvc_data, colvardeps::f_cv_active, colvardeps::is_enabled, and update_cvc_flags.

int colvar::calc_acf   [protected]
 

Calculate the auto-correlation function (ACF).

Definition at line 2593 of file colvar.C.

References acf, acf_colvar_name, acf_coor, acf_length, acf_nframes, acf_notset, acf_offset, acf_p2coor, acf_stride, acf_v_history, acf_v_history_p, acf_vel, acf_x_history, acf_x_history_p, calc_coor_acf, calc_p2coor_acf, calc_vel_acf, colvarvalue::check_types, colvarmodule::colvar_by_name, COLVARS_INPUT_ERROR, colvarmodule::error, history_add_value, history_incr, colvarmodule::log, name, NULL, prev_timestep, colvarmodule::step_relative, value, and velocity.

Referenced by analyze.

int colvar::calc_colvar_properties  
 

\brief Calculate the quantities associated to the colvar (but not to the CVCs).

Definition at line 1688 of file colvar.C.

References after_restart, colvardeps::f_cv_extended_Lagrangian, colvardeps::f_cv_fdiff_velocity, colvardeps::f_cv_reflecting_lower_boundary, colvardeps::f_cv_reflecting_upper_boundary, colvardeps::f_cv_subtract_applied_force, f_old, fdiff_velocity, ft, ft_reported, colvardeps::is_enabled, colvarmodule::log, lower_boundary, colvarvalue::norm2, prev_timestep, prev_v_ext, prev_x_ext, colvarvalue::reset, colvarmodule::step_relative, colvarvalue::type, colvarvalue::type_notset, upper_boundary, v_ext, v_fdiff, v_reported, x, x_ext, x_old, and x_reported.

Referenced by collect_cvc_data.

void colvar::calc_coor_acf std::list< colvarvalue > &    x_history,
colvarvalue const &    x
[protected]
 

\brief Coordinate ACF, scalar product between x(0) and x(t) (does not work with scalar numbers).

Definition at line 2713 of file colvar.C.

References acf, acf_length, acf_nframes, acf_offset, colvarvalue::inner_opt, colvarvalue::norm2, and x.

Referenced by calc_acf.

int colvar::calc_cvc_gradients int    first,
size_t    num_cvcs
 

\brief Same as colvar::calc_cvc_values but for gradients.

Definition at line 1532 of file colvar.C.

References cvcs, colvarmodule::debug, colvarmodule::decrease_depth, colvardeps::f_cvc_debug_gradient, colvardeps::f_cvc_gradient, colvarmodule::increase_depth, colvarmodule::log, num_active_cvcs, and num_cvcs.

Referenced by calc_cvcs.

int colvar::calc_cvc_Jacobians int    first,
size_t    num_cvcs
 

\brief Same as colvar::calc_cvc_values but for Jacobian derivatives/forces.

Definition at line 1645 of file colvar.C.

References cvcs, colvarmodule::decrease_depth, colvardeps::f_cv_Jacobian, colvarmodule::increase_depth, colvardeps::is_enabled, num_active_cvcs, and num_cvcs.

Referenced by calc_cvcs.

int colvar::calc_cvc_total_force int    first,
size_t    num_cvcs
 

\brief Same as colvar::calc_cvc_values but for total forces.

Definition at line 1584 of file colvar.C.

References cvcs, colvarmodule::debug, colvarmodule::decrease_depth, colvardeps::f_cv_total_force_calc, colvarmodule::increase_depth, colvardeps::is_enabled, colvarmodule::log, num_active_cvcs, and num_cvcs.

Referenced by calc_cvcs.

int colvar::calc_cvc_values int    first,
size_t    num_cvcs
 

\brief Calculate the values of the given subset of CVCs.

Definition at line 1429 of file colvar.C.

References cvcs, colvarmodule::debug, colvarmodule::decrease_depth, colvarmodule::increase_depth, colvarmodule::log, num_active_cvcs, and num_cvcs.

Referenced by calc_cvcs.

int colvar::calc_cvcs int    first = 0,
size_t    num_cvcs = 0
 

\brief Calculate a subset of the colvar components (CVCs) currently active (default: all active CVCs) Note: both arguments refer to the sect of *active* CVCs, not all CVCs.

Definition at line 1355 of file colvar.C.

References calc_cvc_gradients, calc_cvc_Jacobians, calc_cvc_total_force, calc_cvc_values, check_cvc_range, colvarmodule::debug, colvarmodule::log, colvarmodule::main, num_cvcs, colvarmodule::proxy, colvarmodule::step_relative, and colvarproxy_system::total_forces_same_step.

Referenced by calc, and colvarproxy_smp::smp_colvars_loop.

void colvar::calc_p2coor_acf std::list< colvarvalue > &    x_history,
colvarvalue const &    x
[protected]
 

\brief Coordinate ACF, second order Legendre polynomial between x(0) and x(t) (does not work with scalar numbers).

Definition at line 2733 of file colvar.C.

References acf, acf_length, acf_nframes, acf_offset, and colvarvalue::p2leg_opt.

Referenced by calc_acf.

int colvar::calc_runave   [protected]
 

Calculate the running average and its standard deviation.

Definition at line 2813 of file colvar.C.

References acf_nframes, colvarvalue::apply_constraints, colvarmodule::debug, dist2, history_add_value, colvarmodule::log, colvarmodule::main, colvarproxy_io::output_stream, colvarproxy_io::output_stream_exists, colvarvalue::output_width, prev_timestep, colvarmodule::proxy, colvarmodule::real, colvarvalue::reset, runave, runave_length, runave_outfile, runave_stride, runave_variance, colvarmodule::sqrt, colvarmodule::step_relative, string, colvarvalue::type, value, colvarmodule::wrap_string, x, x_history, and x_history_p.

Referenced by analyze.

void colvar::calc_vel_acf std::list< colvarvalue > &    v_history,
colvarvalue const &    v
[protected]
 

\brief Velocity ACF, scalar product between v(0) and v(t).

Definition at line 2688 of file colvar.C.

References acf, acf_length, acf_nframes, acf_offset, colvarvalue::inner_opt, and colvarvalue::norm2.

Referenced by calc_acf.

int colvar::check_cvc_range int    first_cvc,
size_t    num_cvcs
 

Ensure that the selected range of CVCs is consistent.

Definition at line 1418 of file colvar.C.

References COLVARS_BUG_ERROR, cvcs, colvarmodule::error, and name.

Referenced by calc_cvcs.

int colvar::collect_cvc_data  
 

\brief Collect quantities from CVCs and update aggregated data for the colvar.

Definition at line 1389 of file colvar.C.

References calc_colvar_properties, collect_cvc_gradients, collect_cvc_Jacobians, collect_cvc_total_forces, collect_cvc_values, colvarmodule::debug, colvarmodule::log, colvarmodule::main, colvarmodule::proxy, colvarmodule::step_relative, and colvarproxy_system::total_forces_same_step.

Referenced by calc.

int colvar::collect_cvc_gradients  
 

\brief Same as colvar::collect_cvc_values but for gradients.

Definition at line 1567 of file colvar.C.

References atom_ids, atomic_gradients, cvcs, colvardeps::f_cv_collect_gradient, and colvardeps::is_enabled.

Referenced by collect_cvc_data.

int colvar::collect_cvc_Jacobians  
 

\brief Same as colvar::collect_cvc_values but for Jacobian derivatives/forces.

Definition at line 1666 of file colvar.C.

References active_cvc_square_norm, colvarproxy_system::boltzmann, cvcs, colvarmodule::debug, colvardeps::f_cv_Jacobian, fj, colvardeps::is_enabled, colvarmodule::log, colvarmodule::main, colvarmodule::proxy, colvarvalue::reset, and colvarproxy_system::target_temperature.

Referenced by collect_cvc_data.

int colvar::collect_cvc_total_forces  
 

\brief Same as colvar::collect_cvc_values but for total forces.

Definition at line 1613 of file colvar.C.

References active_cvc_square_norm, cvcs, colvarmodule::debug, colvardeps::f_cv_hide_Jacobian, colvardeps::f_cv_subtract_applied_force, colvardeps::f_cv_total_force_calc, fj, ft, colvardeps::is_enabled, colvarmodule::log, colvarvalue::reset, and colvarmodule::step_relative.

Referenced by collect_cvc_data.

int colvar::collect_cvc_values  
 

\brief Collect the values of the CVCs.

Definition at line 1460 of file colvar.C.

References COLVARS_INPUT_ERROR, COLVARS_NOT_IMPLEMENTED, cvcs, colvarmodule::debug, dist2, colvarmodule::error, colvardeps::f_cv_custom_function, colvardeps::f_cv_scripted, colvarmodule::integer_power, colvardeps::is_enabled, colvarmodule::log, name, colvarvalue::reset, scripted_function, colvarvalue::size, sorted_cvc_values, colvarvalue::type, colvarvalue::type_scalar, value, width, x, and x_restart.

Referenced by collect_cvc_data.

void colvar::communicate_forces  
 

\brief Communicate forces (previously calculated in colvar::update()) to the external degrees of freedom.

Definition at line 1930 of file colvar.C.

References colvarvalue::as_vector, COLVARS_NOT_IMPLEMENTED, cvcs, colvarmodule::debug, colvarmodule::error, f, colvardeps::f_cv_custom_function, colvardeps::f_cv_scripted, colvardeps::is_enabled, colvarmodule::log, scripted_function, colvarvalue::size, sorted_cvc_values, colvarvalue::type, colvarvalue::type_scalar, value, and x.

bool colvar::compare_cvc const colvar::cvc *const    i,
const colvar::cvc *const    j
[static]
 

getter of the global cvc map \brief function for sorting cvcs by their names.

Definition at line 47 of file colvar.C.

References colvar::cvc::name.

Referenced by init.

int colvar::cvc_param_exists std::string const &    param_name
 

Whether this named parameter exists (in the first and only component).

Definition at line 2099 of file colvar.C.

References COLVARS_NOT_IMPLEMENTED, cvcs, colvarmodule::error, colvardeps::f_cv_single_cvc, and colvardeps::is_enabled.

void colvar::delete_features   [inline, static]
 

Definition at line 108 of file colvar.h.

References cv_features.

Referenced by colvarmodule::~colvarmodule.

cvm::real colvar::dist2 colvarvalue const &    x1,
colvarvalue const &    x2
const
 

\brief Use the internal metrics (as from colvar::cvc objects) to calculate square distances and gradients Handles correctly symmetries and periodic boundary conditions.

Definition at line 2179 of file colvar.C.

References cvcs, colvarvalue::dist2, colvardeps::f_cv_custom_function, colvardeps::f_cv_homogeneous, colvardeps::f_cv_periodic, colvardeps::f_cv_scalar, colvardeps::f_cv_scripted, colvardeps::is_enabled, period, colvarvalue::real_value, and wrap_center.

Referenced by calc_runave, collect_cvc_values, colvarbias_restraint_harmonic_walls::colvar_distance, and update_extended_Lagrangian.

colvarvalue colvar::dist2_lgrad colvarvalue const &    x1,
colvarvalue const &    x2
const
 

\brief Use the internal metrics (as from colvar::cvc objects) to calculate square distances and gradients Handles correctly symmetries and periodic boundary conditions.

Definition at line 2198 of file colvar.C.

References cvcs, colvarvalue::dist2_grad, colvardeps::f_cv_custom_function, colvardeps::f_cv_homogeneous, colvardeps::f_cv_periodic, colvardeps::f_cv_scalar, colvardeps::f_cv_scripted, colvardeps::is_enabled, period, colvarvalue::real_value, and wrap_center.

Referenced by colvarbias_restraint_harmonic_walls::colvar_distance, fdiff_velocity, and update_extended_Lagrangian.

colvarvalue colvar::dist2_rgrad colvarvalue const &    x1,
colvarvalue const &    x2
const
 

\brief Use the internal metrics (as from colvar::cvc objects) to calculate square distances and gradients Handles correctly symmetries and periodic boundary conditions.

Definition at line 2217 of file colvar.C.

References cvcs, colvarvalue::dist2_grad, colvardeps::f_cv_custom_function, colvardeps::f_cv_homogeneous, colvardeps::f_cv_periodic, colvardeps::f_cv_scalar, colvardeps::f_cv_scripted, colvardeps::is_enabled, period, colvarvalue::real_value, and wrap_center.

void colvar::do_feature_side_effects int    id [virtual]
 

Implements possible actions to be carried out when a given feature is enabled This overloads the base function in colvardeps.

Reimplemented from colvardeps.

Definition at line 956 of file colvar.C.

References atom_ids, build_atom_list, colvardeps::f_cv_collect_atom_ids, colvardeps::f_cv_total_force_calc, and colvarmodule::request_total_force.

int colvar::end_of_step  
 

Carry out operations needed before next step is run.

Definition at line 1911 of file colvar.C.

References colvarmodule::debug, f, colvardeps::f_cv_fdiff_velocity, colvardeps::f_cv_subtract_applied_force, f_old, colvardeps::is_enabled, colvarmodule::log, prev_timestep, colvarmodule::step_relative, x, and x_old.

colvarvalue colvar::fdiff_velocity colvarvalue const &    xold,
colvarvalue const &    xnew
[inline, protected]
 

Definition at line 163 of file colvar.h.

References dist2_lgrad, and colvarmodule::dt.

Referenced by calc_colvar_properties.

virtual const std::vector<feature *>& colvar::features   const [inline, virtual]
 

\brief Implementation of the feature list accessor for colvar.

Implements colvardeps.

Definition at line 100 of file colvar.h.

References cv_features.

Referenced by init_dependencies.

cvm::real const & colvar::force_constant   const [inline]
 

\brief Force constant of the spring.

Definition at line 701 of file colvar.h.

References ext_force_k.

std::vector< std::vector< int > > colvar::get_atom_lists   [virtual]
 

\brief Get vector of vectors of atom IDs for all atom groups.

Definition at line 1249 of file colvar.C.

References cvcs.

cvm::real colvar::get_cvc_param std::string const &    param_name
 

Get the value of the named parameter (from the first and only component).

Definition at line 2109 of file colvar.C.

References COLVARS_NOT_IMPLEMENTED, cvcs, colvarmodule::error, colvardeps::f_cv_single_cvc, and colvardeps::is_enabled.

colvarvalue const * colvar::get_cvc_param_grad std::string const &    param_name
 

Pointer to the derivative of the variable with respect to param_name.

Definition at line 2131 of file colvar.C.

References COLVARS_NOT_IMPLEMENTED, cvcs, colvarmodule::error, colvardeps::f_cv_single_cvc, colvardeps::is_enabled, and NULL.

void const * colvar::get_cvc_param_ptr std::string const &    param_name
 

Get a pointer to the named parameter (from the first and only component).

Definition at line 2120 of file colvar.C.

References COLVARS_NOT_IMPLEMENTED, cvcs, colvarmodule::error, colvardeps::f_cv_single_cvc, colvardeps::is_enabled, and NULL.

std::vector< int > const & colvar::get_volmap_ids  
 

Volmap numeric IDs, one for each CVC (-1 if not available).

Definition at line 1260 of file colvar.C.

References cvcs, and volmap_ids_.

int colvar::init std::string const &    conf
 

Main init function.

Definition at line 53 of file colvar.C.

References active_cvc_square_norm, colvarvalue::check_types, colvarmodule::cite_feature, colvarmodule::colvar_by_name, COLVARS_ERROR, COLVARS_INPUT_ERROR, compare_cvc, conf, cvcs, colvarmodule::debug, colvardeps::description, colvardeps::enable, colvarmodule::error, f, colvardeps::f_cv_active, colvardeps::f_cv_custom_function, colvardeps::f_cv_external, colvardeps::f_cv_gradient, colvardeps::f_cv_homogeneous, colvardeps::f_cv_linear, colvardeps::f_cv_multiple_ts, colvardeps::f_cv_periodic, colvardeps::f_cv_scalar, colvardeps::f_cv_scripted, colvardeps::f_cv_single_cvc, colvardeps::f_cvc_periodic, f_old, colvarmodule::fabs, fj, ft, ft_reported, colvarmodule::get_error, colvarparse::get_keyval, init_components, init_custom_function, init_extended_Lagrangian, init_grid_parameters, init_output_flags, colvardeps::is_enabled, colvarmodule::log, colvarmodule::main, name, NULL, parse_analysis, colvarparse::parse_silent, period, colvarvalue::reset, reset_bias_force, colvarmodule::scripted_forces, scripted_function, colvardeps::set_enabled, colvarparse::set_string, colvarvalue::size, size, sorted_cvc_values, colvardeps::time_step_factor, colvarmodule::to_str, colvarvalue::Type, colvarvalue::type, colvarvalue::type_all, colvarvalue::type_desc, colvarvalue::type_keyword, colvarvalue::type_notset, colvarvalue::type_scalar, colvarvalue::type_vector, v_fdiff, v_reported, value, colvarmodule::variables, colvarvalue::vector1d_value, wrap_center, x, x_old, x_reported, and x_restart.

int colvar::init_components std::string const &    conf
 

Parse the CVC configuration and allocate their data.

Definition at line 841 of file colvar.C.

References colvardeps::add_child, COLVARS_INPUT_ERROR, conf, cvcs, colvarmodule::error, it, colvarmodule::log, n_active_cvcs, and name.

Referenced by init.

int colvar::init_custom_function std::string const &    conf
 

Parse parameters for custom function with Lepton.

Definition at line 463 of file colvar.C.

References COLVARS_NOT_IMPLEMENTED, conf, colvarmodule::error, colvarparse::key_lookup, and string.

Referenced by init.

int colvar::init_dependencies   [virtual]
 

\brief Initialize dependency tree.

Implements colvardeps.

Definition at line 1086 of file colvar.C.

References colvardeps::description, colvarmodule::error, colvardeps::exclude_feature_self, colvardeps::f_cv_active, colvardeps::f_cv_awake, colvardeps::f_cv_collect_atom_ids, colvardeps::f_cv_collect_gradient, colvardeps::f_cv_corrfunc, colvardeps::f_cv_custom_function, colvardeps::f_cv_extended_Lagrangian, colvardeps::f_cv_external, colvardeps::f_cv_fdiff_velocity, colvardeps::f_cv_gradient, colvardeps::f_cv_grid, colvardeps::f_cv_hard_lower_boundary, colvardeps::f_cv_hard_upper_boundary, colvardeps::f_cv_hide_Jacobian, colvardeps::f_cv_homogeneous, colvardeps::f_cv_Jacobian, colvardeps::f_cv_Langevin, colvardeps::f_cv_linear, colvardeps::f_cv_lower_boundary, colvardeps::f_cv_multiple_ts, colvardeps::f_cv_ntot, colvardeps::f_cv_output_applied_force, colvardeps::f_cv_output_energy, colvardeps::f_cv_output_total_force, colvardeps::f_cv_output_value, colvardeps::f_cv_output_velocity, colvardeps::f_cv_periodic, colvardeps::f_cv_reflecting_lower_boundary, colvardeps::f_cv_reflecting_upper_boundary, colvardeps::f_cv_runave, colvardeps::f_cv_scalar, colvardeps::f_cv_scripted, colvardeps::f_cv_single_cvc, colvardeps::f_cv_subtract_applied_force, colvardeps::f_cv_total_force, colvardeps::f_cv_total_force_calc, colvardeps::f_cv_upper_boundary, colvardeps::f_cvc_collect_atom_ids, colvardeps::f_cvc_explicit_gradient, colvardeps::f_cvc_gradient, colvardeps::f_cvc_inv_gradient, colvardeps::f_cvc_Jacobian, colvardeps::f_type_dynamic, colvardeps::f_type_static, colvardeps::f_type_user, feature, colvardeps::feature_states, features, colvardeps::init_feature, colvardeps::is_not_set, colvarmodule::main, modify_features, colvarmodule::proxy, colvardeps::require_feature_alt, colvardeps::require_feature_children, colvardeps::require_feature_self, and colvarproxy::simulation_running.

Referenced by colvar.

int colvar::init_extended_Lagrangian std::string const &    conf
 

Init extended Lagrangian parameters.

Definition at line 634 of file colvar.C.

References colvarproxy_system::boltzmann, COLVARS_INPUT_ERROR, conf, colvarmodule::dt, colvardeps::enable, colvarmodule::error, ext_force_k, ext_gamma, ext_mass, ext_sigma, colvardeps::f_cv_extended_Lagrangian, colvardeps::f_cv_external, colvardeps::f_cv_Langevin, colvardeps::f_cv_output_energy, colvardeps::f_cv_reflecting_lower_boundary, colvardeps::f_cv_reflecting_upper_boundary, fr, colvarparse::get_keyval, colvardeps::get_keyval_feature, colvardeps::is_enabled, colvarmodule::log, colvarmodule::main, PI, colvarmodule::proxy, colvarmodule::real, colvarmodule::sqrt, colvarproxy_system::target_temperature, colvardeps::time_step_factor, colvarvalue::type, colvarvalue::type_notset, v_ext, value, and x_ext.

Referenced by init.

int colvar::init_grid_parameters std::string const &    conf
 

Init defaults for grid options.

Definition at line 486 of file colvar.C.

References colvarmodule::append_new_config, COLVARS_INPUT_ERROR, conf, cvcs, colvardeps::disable, colvardeps::enable, colvarmodule::error, expand_boundaries, colvardeps::f_cv_hard_lower_boundary, colvardeps::f_cv_hard_upper_boundary, colvardeps::f_cv_lower_boundary, colvardeps::f_cv_scalar, colvardeps::f_cv_single_cvc, colvardeps::f_cv_upper_boundary, colvardeps::f_cvc_lower_boundary, colvardeps::f_cvc_upper_boundary, colvardeps::f_cvc_width, colvarparse::get_keyval, colvardeps::get_keyval_feature, colvardeps::is_enabled, colvarparse::key_already_set, colvarmodule::log, lower_boundary, colvarmodule::main, colvarparse::parse_silent, periodic_boundaries, colvarvalue::real_value, string, colvardeps::time_step_factor, colvarvalue::type, upper_boundary, value, and width.

Referenced by init.

int colvar::init_output_flags std::string const &    conf
 

Init output flags.

Definition at line 712 of file colvar.C.

References COLVARS_INPUT_ERROR, conf, colvardeps::enable, colvarmodule::error, colvardeps::f_cv_output_applied_force, colvardeps::f_cv_output_total_force, colvardeps::f_cv_output_value, colvardeps::f_cv_output_velocity, colvardeps::f_cv_subtract_applied_force, colvarparse::get_keyval, colvardeps::get_keyval_feature, and colvarparse::parse_silent.

Referenced by init.

virtual std::vector<feature *>& colvar::modify_features   [inline, virtual]
 

Implements colvardeps.

Definition at line 104 of file colvar.h.

References cv_features.

Referenced by init_dependencies.

size_t colvar::num_active_cvcs   const [inline]
 

\brief number of CVC objects with an active flag (as set by update_cvc_flags).

Definition at line 417 of file colvar.h.

References n_active_cvcs.

Referenced by calc_cvc_gradients, calc_cvc_Jacobians, calc_cvc_total_force, and calc_cvc_values.

size_t colvar::num_cvcs   const [inline]
 

\brief Number of CVC objects defined.

Definition at line 410 of file colvar.h.

References cvcs.

Referenced by calc_cvc_gradients, calc_cvc_Jacobians, calc_cvc_total_force, calc_cvc_values, and calc_cvcs.

size_t colvar::num_dimensions   const [inline]
 

\brief Number of dimensions of the value of this colvar.

Definition at line 404 of file colvar.h.

References colvarvalue::size, and value.

int colvar::parse_analysis std::string const &    conf
 

Read the analysis tasks.

Definition at line 1013 of file colvar.C.

References acf_colvar_name, acf_coor, acf_length, acf_normalize, acf_offset, acf_outfile, acf_p2coor, acf_stride, acf_type, acf_vel, colvarmodule::colvar_by_name, COLVARS_ERROR, COLVARS_INPUT_ERROR, conf, colvardeps::enable, colvarmodule::error, colvardeps::f_cv_corrfunc, colvardeps::f_cv_fdiff_velocity, colvardeps::f_cv_runave, colvarmodule::get_error, colvarparse::get_keyval, colvarmodule::log, name, NULL, runave_length, runave_outfile, runave_stride, colvarmodule::set_error_bits, and colvarparse::to_lower_cppstr.

Referenced by init.

bool colvar::periodic_boundaries colvarvalue const &    lb,
colvarvalue const &    ub
const
 

\brief Is the interval defined by the two boundaries periodic?

Definition at line 2156 of file colvar.C.

References period, colvarmodule::sqrt, and width.

bool colvar::periodic_boundaries   const
 

\brief Is the interval defined by the two boundaries periodic?

Definition at line 2168 of file colvar.C.

References colvardeps::f_cv_lower_boundary, colvardeps::f_cv_upper_boundary, colvardeps::is_enabled, lower_boundary, and upper_boundary.

Referenced by init_grid_parameters.

std::istream & colvar::read_state std::istream &    is
 

Read the collective variable from a restart file.

Definition at line 2256 of file colvar.C.

References after_restart, COLVARS_INPUT_ERROR, conf, colvarmodule::debug, colvarmodule::error, colvardeps::f_cv_extended_Lagrangian, colvardeps::f_cv_output_velocity, colvarparse::get_keyval, colvardeps::is_enabled, colvarmodule::log, name, colvarparse::parse_silent, colvarvalue::type, v_ext, v_fdiff, v_reported, x, x_ext, x_reported, and x_restart.

std::istream & colvar::read_traj std::istream &    is
 

Read the value from a collective variable trajectory file.

Definition at line 2337 of file colvar.C.

References f, colvardeps::f_cv_extended_Lagrangian, colvardeps::f_cv_output_applied_force, colvardeps::f_cv_output_total_force, colvardeps::f_cv_output_value, colvardeps::f_cv_output_velocity, ft, ft_reported, colvardeps::is_enabled, colvarmodule::log, v_ext, v_fdiff, v_reported, x, x_ext, and x_reported.

void colvar::reset_bias_force   [inline]
 

Set the total biasing force to zero.

Definition at line 757 of file colvar.h.

References fb, fb_actual, colvarvalue::reset, colvarvalue::type, and value.

Referenced by init.

colvarvalue const & colvar::run_ave   const [inline]
 

\brief Current running average (if calculated as set by analysis flag).

Definition at line 719 of file colvar.h.

References runave.

int colvar::set_cvc_flags std::vector< bool > const &    flags
 

\brief Enables and disables individual CVCs based on the given array.

Definition at line 2016 of file colvar.C.

References COLVARS_ERROR, cvc_flags, cvcs, and colvarmodule::error.

int colvar::set_cvc_param std::string const &    param_name,
void const *    new_value
 

Set the named parameter in the first and only component to the given value.

Definition at line 2142 of file colvar.C.

References COLVARS_NOT_IMPLEMENTED, cvcs, colvarmodule::error, colvardeps::f_cv_single_cvc, and colvardeps::is_enabled.

void colvar::setup  
 

Get ready for a run and re-initialize internal data if needed.

Definition at line 1235 of file colvar.C.

References atoms, cvcs, and name.

colvarvalue const & colvar::total_force   const [inline]
 

\brief Current total force (previously obtained from calc() or read_traj()). Note: this is calculated using the atomic forces from the last simulation step. Total atom forces are read from the MD program, the total force acting on the collective variable is calculated summing those from all colvar components, the bias and walls forces are subtracted.

Definition at line 731 of file colvar.h.

References ft_reported.

void colvar::update_active_cvc_square_norm   [protected]
 

Update the sum of square coefficients for active cvcs.

Definition at line 2029 of file colvar.C.

References active_cvc_square_norm, and cvcs.

Referenced by update_cvc_config, and update_cvc_flags.

int colvar::update_cvc_config std::vector< std::string > const &    confs
 

\brief Modify the configuration of CVCs (currently, only base class data).

Definition at line 2064 of file colvar.C.

References COLVARS_INPUT_ERROR, conf, cvcs, colvarmodule::decrease_depth, colvarmodule::error, colvarmodule::increase_depth, colvarmodule::log, name, and update_active_cvc_square_norm.

int colvar::update_cvc_flags  
 

\brief Updates the flags in the CVC objects, and their number.

Definition at line 2040 of file colvar.C.

References COLVARS_ERROR, cvc_flags, cvcs, colvarmodule::error, colvardeps::f_cvc_active, n_active_cvcs, and update_active_cvc_square_norm.

Referenced by calc.

void colvar::update_extended_Lagrangian  
 

\brief Integrate equations of motion of extended Lagrangian coordinate if needed.

Definition at line 1800 of file colvar.C.

References colvarvalue::apply_constraints, cvcs, colvarmodule::debug, colvardeps::description, dist2, dist2_lgrad, colvarmodule::dt, colvarmodule::error, ext_force_k, ext_gamma, ext_mass, ext_sigma, f, colvardeps::f_cv_external, colvardeps::f_cv_Langevin, colvardeps::f_cv_reflecting_lower_boundary, colvardeps::f_cv_reflecting_upper_boundary, colvardeps::f_cv_subtract_applied_force, fb_actual, fr, ft_reported, colvardeps::is_enabled, kinetic_energy, colvarmodule::log, lower_boundary, potential_energy, prev_timestep, prev_v_ext, prev_x_ext, colvarmodule::real, colvarvalue::reset, colvarvalue::set_random, colvarmodule::step_relative, colvardeps::time_step_factor, colvarvalue::type, upper_boundary, v_ext, wrap, x, and x_ext.

Referenced by update_forces_energy.

cvm::real colvar::update_forces_energy  
 

\brief Collect all forces on this colvar, integrate internal equations of motion of internal degrees of freedom; see also colvar::communicate_forces() return colvar energy if extended Lagrandian active.

Definition at line 1754 of file colvar.C.

References colvarmodule::debug, f, colvardeps::f_cv_active, colvardeps::f_cv_extended_Lagrangian, colvardeps::f_cv_external, colvardeps::f_cv_hide_Jacobian, colvardeps::f_cv_Jacobian, fb, fb_actual, fj, fr, colvardeps::is_enabled, kinetic_energy, colvarmodule::log, potential_energy, colvarmodule::real, colvarvalue::reset, colvardeps::time_step_factor, colvarvalue::type, update_extended_Lagrangian, and value.

colvarvalue const & colvar::value   const [inline]
 

\brief Current value (previously set by calc() or by read_traj()).

Definition at line 707 of file colvar.h.

References x_reported.

Referenced by colvarbias::add_colvar, calc_acf, calc_runave, collect_cvc_values, communicate_forces, init, init_extended_Lagrangian, init_grid_parameters, num_dimensions, colvarmodule::read_colvar, reset_bias_force, and update_forces_energy.

colvarvalue const & colvar::velocity   const [inline]
 

\brief Current velocity (previously set by calc() or by read_traj()).

Definition at line 725 of file colvar.h.

References v_reported.

Referenced by calc_acf.

void colvar::wrap colvarvalue   x_unwrapped const
 

\brief Use the internal metrics (as from colvar::cvc objects) to wrap a value into a standard interval Handles correctly symmetries and periodic boundary conditions.

Definition at line 2237 of file colvar.C.

References cvcs, colvardeps::f_cv_custom_function, colvardeps::f_cv_periodic, colvardeps::f_cv_scripted, colvarmodule::floor, colvardeps::is_enabled, period, colvarvalue::real_value, and wrap_center.

Referenced by update_extended_Lagrangian.

int colvar::write_acf std::ostream &    os [protected]
 

Save the ACF to a file.

Definition at line 2755 of file colvar.C.

References acf, acf_colvar_name, acf_coor, acf_nframes, acf_normalize, acf_notset, acf_offset, acf_p2coor, acf_stride, acf_vel, COLVARS_FILE_ERROR, it, name, colvarmodule::real, and colvarmodule::wrap_string.

Referenced by write_output_files.

int colvar::write_output_files  
 

Write output files (if defined, e.g. in analysis mode).

Definition at line 2529 of file colvar.C.

References acf, acf_outfile, colvarmodule::backup_file, COLVARS_FILE_ERROR, colvardeps::f_cv_corrfunc, colvardeps::is_enabled, colvarmodule::log, string, and write_acf.

std::ostream & colvar::write_state std::ostream &    os
 

Write the collective variable to a restart file.

Definition at line 2387 of file colvar.C.

References colvardeps::f_cv_extended_Lagrangian, colvardeps::f_cv_output_velocity, colvarproxy_io::flush_output_stream, colvardeps::is_enabled, colvarmodule::main, name, colvarmodule::proxy, runave_outfile, v_reported, x, and x_reported.

std::ostream & colvar::write_traj std::ostream &    os
 

Output formatted values to the trajectory file.

Definition at line 2475 of file colvar.C.

References applied_force, colvardeps::f_cv_extended_Lagrangian, colvardeps::f_cv_external, colvardeps::f_cv_output_applied_force, colvardeps::f_cv_output_energy, colvardeps::f_cv_output_total_force, colvardeps::f_cv_output_value, colvardeps::f_cv_output_velocity, ft_reported, colvardeps::is_enabled, kinetic_energy, potential_energy, v_fdiff, v_reported, x, and x_reported.

std::ostream & colvar::write_traj_label std::ostream &    os
 

Write a label to the trajectory file (comment line).

Definition at line 2424 of file colvar.C.

References colvardeps::f_cv_extended_Lagrangian, colvardeps::f_cv_external, colvardeps::f_cv_output_applied_force, colvardeps::f_cv_output_energy, colvardeps::f_cv_output_total_force, colvardeps::f_cv_output_value, colvardeps::f_cv_output_velocity, colvardeps::is_enabled, colvarvalue::output_width, colvarmodule::wrap_string, and x.


Member Data Documentation

std::vector<cvm::real> colvar::acf [protected]
 

ACF values.

Definition at line 509 of file colvar.h.

Referenced by calc_acf, calc_coor_acf, calc_p2coor_acf, calc_vel_acf, write_acf, and write_output_files.

std::string colvar::acf_colvar_name [protected]
 

\brief Collective variable with which the correlation is calculated (default: itself).

Definition at line 497 of file colvar.h.

Referenced by calc_acf, parse_analysis, and write_acf.

size_t colvar::acf_length [protected]
 

Length of autocorrelation function (ACF).

Definition at line 499 of file colvar.h.

Referenced by calc_acf, calc_coor_acf, calc_p2coor_acf, calc_vel_acf, and parse_analysis.

size_t colvar::acf_nframes [protected]
 

Number of frames for each ACF point.

Definition at line 505 of file colvar.h.

Referenced by calc_acf, calc_coor_acf, calc_p2coor_acf, calc_runave, calc_vel_acf, and write_acf.

bool colvar::acf_normalize [protected]
 

Normalize the ACF to a maximum value of 1?

Definition at line 507 of file colvar.h.

Referenced by parse_analysis, and write_acf.

size_t colvar::acf_offset [protected]
 

After how many steps the ACF starts.

Definition at line 501 of file colvar.h.

Referenced by calc_acf, calc_coor_acf, calc_p2coor_acf, calc_vel_acf, parse_analysis, and write_acf.

std::string colvar::acf_outfile [protected]
 

Name of the file to write the ACF.

Definition at line 511 of file colvar.h.

Referenced by parse_analysis, and write_output_files.

size_t colvar::acf_stride [protected]
 

How many timesteps separate two ACF values.

Definition at line 503 of file colvar.h.

Referenced by calc_acf, parse_analysis, and write_acf.

acf_type_e colvar::acf_type [protected]
 

Type of autocorrelation function (ACF).

Definition at line 527 of file colvar.h.

Referenced by parse_analysis.

std::list< std::list<colvarvalue> > colvar::acf_v_history [protected]
 

Time series of values and velocities used in correlation functions.

Definition at line 484 of file colvar.h.

Referenced by calc_acf.

std::list< std::list<colvarvalue> >::iterator colvar::acf_v_history_p [protected]
 

Time series of values and velocities used in correlation functions (pointers)x.

Definition at line 487 of file colvar.h.

Referenced by calc_acf.

std::list< std::list<colvarvalue> > colvar::acf_x_history [protected]
 

Time series of values and velocities used in correlation functions.

Definition at line 484 of file colvar.h.

Referenced by calc_acf.

std::list< std::list<colvarvalue> >::iterator colvar::acf_x_history_p [protected]
 

Time series of values and velocities used in correlation functions (pointers)x.

Definition at line 487 of file colvar.h.

Referenced by calc_acf.

cvm::real colvar::active_cvc_square_norm [protected]
 

Sum of square coefficients for active cvcs.

Definition at line 393 of file colvar.h.

Referenced by collect_cvc_Jacobians, collect_cvc_total_forces, init, and update_active_cvc_square_norm.

bool colvar::after_restart [protected]
 

True if a state file was just read.

Definition at line 480 of file colvar.h.

Referenced by calc_colvar_properties, colvar, and read_state.

std::vector<int> colvar::atom_ids
 

\brief Sorted array of (zero-based) IDs for all atoms involved.

Definition at line 685 of file colvar.h.

Referenced by build_atom_list, collect_cvc_gradients, colvar::dihedPC::collect_gradients, colvar::alpha_angles::collect_gradients, colvar::cvc::collect_gradients, and do_feature_side_effects.

std::vector<cvm::rvector> colvar::atomic_gradients
 

\brief Array of atomic gradients collected from all cvcs with appropriate components, rotations etc. For scalar variables only!

Definition at line 690 of file colvar.h.

Referenced by build_atom_list, collect_cvc_gradients, colvar::dihedPC::collect_gradients, colvar::alpha_angles::collect_gradients, and colvar::cvc::collect_gradients.

std::vector<colvarbias *> colvar::biases
 

List of biases that depend on this colvar.

Definition at line 121 of file colvar.h.

Referenced by colvarbias::add_colvar, and ~colvar.

std::vector< colvardeps::feature * > colvar::cv_features [static]
 

\brief Implementation of the feature list for colvar.

Definition at line 2898 of file colvar.C.

Referenced by delete_features, features, and modify_features.

std::vector<bool> colvar::cvc_flags [protected]
 

\brief Flags to enable or disable cvcs at next colvar evaluation.

Definition at line 646 of file colvar.h.

Referenced by set_cvc_flags, and update_cvc_flags.

std::vector<cvc *> colvar::cvcs [protected]
 

\brief Array of colvar::cvc objects.

Definition at line 643 of file colvar.h.

Referenced by build_atom_list, calc_cvc_gradients, calc_cvc_Jacobians, calc_cvc_total_force, calc_cvc_values, check_cvc_range, collect_cvc_gradients, collect_cvc_Jacobians, collect_cvc_total_forces, collect_cvc_values, communicate_forces, cvc_param_exists, dist2, dist2_lgrad, dist2_rgrad, get_atom_lists, get_cvc_param, get_cvc_param_grad, get_cvc_param_ptr, get_volmap_ids, init, init_components, init_grid_parameters, num_cvcs, set_cvc_flags, set_cvc_param, setup, update_active_cvc_square_norm, update_cvc_config, update_cvc_flags, update_extended_Lagrangian, wrap, and ~colvar.

bool colvar::expand_boundaries
 

\brief Expand the boundaries of multiples of width, to keep the value always within range.

Definition at line 234 of file colvar.h.

Referenced by colvar, and init_grid_parameters.

cvm::real colvar::ext_force_k [protected]
 

Restraint force constant.

Definition at line 189 of file colvar.h.

Referenced by force_constant, init_extended_Lagrangian, and update_extended_Lagrangian.

cvm::real colvar::ext_gamma [protected]
 

Friction coefficient for Langevin extended dynamics.

Definition at line 191 of file colvar.h.

Referenced by init_extended_Lagrangian, and update_extended_Lagrangian.

cvm::real colvar::ext_mass [protected]
 

Mass of the restraint center.

Definition at line 187 of file colvar.h.

Referenced by init_extended_Lagrangian, and update_extended_Lagrangian.

cvm::real colvar::ext_sigma [protected]
 

Amplitude of Gaussian white noise for Langevin extended dynamics.

Definition at line 193 of file colvar.h.

Referenced by init_extended_Lagrangian, and update_extended_Lagrangian.

colvarvalue colvar::f
 

\brief Total applied force; fr (if extended_lagrangian is defined), fb (if biases are applied) and the walls' forces (if defined) contribute to it.

Definition at line 217 of file colvar.h.

Referenced by communicate_forces, end_of_step, energythread, init, read_traj, shader_template, update_extended_Lagrangian, and update_forces_energy.

colvarvalue colvar::f_old
 

Applied force at the previous step (to be subtracted from total force if needed).

Definition at line 220 of file colvar.h.

Referenced by calc_colvar_properties, end_of_step, and init.

colvarvalue colvar::fb
 

\brief Bias force; reset_bias_force() should be called before the biases are updated.

Definition at line 209 of file colvar.h.

Referenced by add_bias_force, reset_bias_force, and update_forces_energy.

colvarvalue colvar::fb_actual
 

\brief Bias force to the actual value (only useful with extended Lagrangian).

Definition at line 212 of file colvar.h.

Referenced by add_bias_force_actual_value, reset_bias_force, update_extended_Lagrangian, and update_forces_energy.

colvarvalue colvar::fj [protected]
 

\brief Jacobian force, when Jacobian_force is enabled.

Definition at line 199 of file colvar.h.

Referenced by collect_cvc_Jacobians, collect_cvc_total_forces, init, and update_forces_energy.

colvarvalue colvar::fr [protected]
 

\brief Applied force on extended DOF, for output (unscaled if using MTS).

Definition at line 196 of file colvar.h.

Referenced by init_extended_Lagrangian, update_extended_Lagrangian, and update_forces_energy.

colvarvalue colvar::ft
 

\brief Total force, as derived from the atomic trajectory; should equal the system force plus f.

Definition at line 224 of file colvar.h.

Referenced by calc_colvar_properties, collect_cvc_total_forces, init, and read_traj.

colvarvalue colvar::ft_reported [protected]
 

Cached reported total force.

Definition at line 202 of file colvar.h.

Referenced by calc_colvar_properties, init, read_traj, total_force, update_extended_Lagrangian, and write_traj.

cvm::real colvar::kinetic_energy [protected]
 

If extended Lagrangian active: colvar kinetic energy.

Definition at line 563 of file colvar.h.

Referenced by colvar, update_extended_Lagrangian, update_forces_energy, and write_traj.

colvarvalue colvar::lower_boundary
 

\brief Location of the lower boundary.

Definition at line 237 of file colvar.h.

Referenced by calc_colvar_properties, init_grid_parameters, periodic_boundaries, and update_extended_Lagrangian.

size_t colvar::n_active_cvcs [protected]
 

\brief Number of CVC objects with an active flag.

Definition at line 390 of file colvar.h.

Referenced by init_components, num_active_cvcs, and update_cvc_flags.

std::string colvar::name
 

Name.

Definition at line 59 of file colvar.h.

Referenced by add_bias_force, add_bias_force_actual_value, colvarbias::add_colvar, calc_acf, check_cvc_range, collect_cvc_values, init, init_components, parse_analysis, read_state, setup, colvarproxy_smp::smp_colvars_loop, update_cvc_config, write_acf, write_state, and ~colvar.

cvm::real colvar::period
 

Period, if this variable is periodic.

Definition at line 227 of file colvar.h.

Referenced by dist2, dist2_lgrad, dist2_rgrad, init, periodic_boundaries, and wrap.

cvm::real colvar::potential_energy [protected]
 

If extended Lagrangian active: colvar harmonic potential.

Definition at line 565 of file colvar.h.

Referenced by colvar, update_extended_Lagrangian, update_forces_energy, and write_traj.

cvm::step_number colvar::prev_timestep [protected]
 

\brief Absolute timestep number when this colvar was last updated.

Definition at line 399 of file colvar.h.

Referenced by calc_acf, calc_colvar_properties, calc_runave, colvar, end_of_step, and update_extended_Lagrangian.

colvarvalue colvar::prev_v_ext [protected]
 

Previous velocity of the restraint center.

Definition at line 185 of file colvar.h.

Referenced by calc_colvar_properties, and update_extended_Lagrangian.

colvarvalue colvar::prev_x_ext [protected]
 

Previous value of the restraint center;.

Definition at line 181 of file colvar.h.

Referenced by calc_colvar_properties, and update_extended_Lagrangian.

colvarvalue colvar::runave [protected]
 

Current value of the running average.

Definition at line 555 of file colvar.h.

Referenced by calc_runave, and run_ave.

size_t colvar::runave_length [protected]
 

Length of running average series.

Definition at line 549 of file colvar.h.

Referenced by calc_runave, and parse_analysis.

std::string colvar::runave_outfile [protected]
 

Name of the file to write the running average.

Definition at line 553 of file colvar.h.

Referenced by calc_runave, parse_analysis, and write_state.

size_t colvar::runave_stride [protected]
 

Timesteps to skip between two values in the running average series.

Definition at line 551 of file colvar.h.

Referenced by calc_runave, and parse_analysis.

cvm::real colvar::runave_variance [protected]
 

Current value of the square deviation from the running average.

Definition at line 557 of file colvar.h.

Referenced by calc_runave.

std::string colvar::scripted_function [protected]
 

Name of scripted function to be used.

Definition at line 653 of file colvar.h.

Referenced by collect_cvc_values, communicate_forces, and init.

std::vector<const colvarvalue *> colvar::sorted_cvc_values [protected]
 

Current cvc values in the order requested by script when using scriptedFunction.

Definition at line 657 of file colvar.h.

Referenced by collect_cvc_values, communicate_forces, and init.

colvarvalue colvar::upper_boundary
 

\brief Location of the upper boundary.

Definition at line 240 of file colvar.h.

Referenced by calc_colvar_properties, init_grid_parameters, periodic_boundaries, and update_extended_Lagrangian.

colvarvalue colvar::v_ext [protected]
 

Velocity of the restraint center.

Definition at line 183 of file colvar.h.

Referenced by calc_colvar_properties, init_extended_Lagrangian, read_state, read_traj, and update_extended_Lagrangian.

colvarvalue colvar::v_fdiff [protected]
 

Finite-difference velocity.

Definition at line 161 of file colvar.h.

Referenced by calc_colvar_properties, init, read_state, read_traj, and write_traj.

colvarvalue colvar::v_reported [protected]
 

Cached reported velocity.

Definition at line 175 of file colvar.h.

Referenced by calc_colvar_properties, init, read_state, read_traj, velocity, write_state, and write_traj.

std::vector<int> colvar::volmap_ids_ [protected]
 

Volmap numeric IDs, one for each CVC (-1 if not available).

Definition at line 680 of file colvar.h.

Referenced by get_volmap_ids.

cvm::real colvar::width
 

\brief Typical fluctuation amplitude for this collective variable (e.g. local width of a free energy basin) In metadynamics calculations, colvarbias_meta, this value is used to calculate the width of a gaussian. In ABF calculations, colvarbias_abf, it is used to calculate the grid spacing in the direction of this collective variable.

Definition at line 94 of file colvar.h.

Referenced by collect_cvc_values, init_grid_parameters, and periodic_boundaries.

cvm::real colvar::wrap_center
 

Center of wrapping, if this variable is periodic.

Definition at line 230 of file colvar.h.

Referenced by dist2, dist2_lgrad, dist2_rgrad, init, and wrap.

colvarvalue colvar::x [protected]
 

Value of the colvar.

Definition at line 148 of file colvar.h.

Referenced by actual_value, calc_colvar_properties, calc_coor_acf, calc_runave, collect_cvc_values, communicate_forces, end_of_step, init, read_state, read_traj, colvar::cvc::set_value, update_extended_Lagrangian, write_state, write_traj, and write_traj_label.

colvarvalue colvar::x_ext [protected]
 

Restraint center.

Definition at line 179 of file colvar.h.

Referenced by calc_colvar_properties, init_extended_Lagrangian, read_state, read_traj, and update_extended_Lagrangian.

std::list< std::list<colvarvalue> > colvar::x_history [protected]
 

Time series of values and velocities used in running averages.

Definition at line 490 of file colvar.h.

Referenced by calc_runave.

std::list< std::list<colvarvalue> >::iterator colvar::x_history_p [protected]
 

Time series of values and velocities used in correlation functions (pointers)x.

Definition at line 493 of file colvar.h.

Referenced by calc_runave.

colvarvalue colvar::x_old [protected]
 

Previous value (to calculate velocities during analysis).

Definition at line 474 of file colvar.h.

Referenced by calc_colvar_properties, end_of_step, and init.

colvarvalue colvar::x_reported [protected]
 

Cached reported value (x may be manipulated).

Definition at line 158 of file colvar.h.

Referenced by calc_colvar_properties, init, read_state, read_traj, value, write_state, and write_traj.

colvarvalue colvar::x_restart [protected]
 

Value read from the most recent state file (if any).

Definition at line 477 of file colvar.h.

Referenced by collect_cvc_values, init, and read_state.


The documentation for this class was generated from the following files:
Generated on Fri Apr 19 02:46:21 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002