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

colvarbias_ti Class Reference

\brief Base class for unconstrained thermodynamic-integration FE estimator. More...

#include <colvarbias.h>

Inheritance diagram for colvarbias_ti:

colvarbias colvarparse colvardeps colvarparams colvarbias_meta colvarbias_restraint colvarbias_restraint_centers colvarbias_restraint_k colvarbias_restraint_centers_moving colvarbias_restraint_k_moving colvarbias_restraint_harmonic colvarbias_restraint_linear colvarbias_restraint_harmonic colvarbias_restraint_harmonic_walls colvarbias_restraint_linear List of all members.

Public Methods

 colvarbias_ti (char const *key)
virtual ~colvarbias_ti ()
virtual int clear_state_data ()
 \brief Delete only the allocatable data (save memory). More...

virtual int init (std::string const &conf)
 \brief Parse config string and (re)initialize. More...

virtual int init_grids ()
virtual int update ()
 Retrieve colvar values and calculate their biasing forces Some implementations may use calc_energy() and calc_forces(). More...

virtual int update_system_forces (std::vector< colvarvalue > const *subtract_forces)
 Subtract applied forces (either last forces or argument) from the total forces. More...

virtual std::string const get_state_params () const
 Write the values of specific mutable properties to a string. More...

virtual int set_state_params (std::string const &state_conf)
 Read the values of specific mutable properties from a string. More...

virtual std::ostream & write_state_data (std::ostream &os)
 Write all mutable data not already written by get_state_params(). More...

virtual std::istream & read_state_data (std::istream &is)
 Read all mutable data not already set by set_state_params(). More...

virtual int write_output_files ()
 Write any output files that this bias may have (e.g. PMF files). More...


Protected Attributes

std::vector< colvarvalueti_system_forces
 \brief Forces exerted from the system to the associated variables. More...

colvar_grid_gradientti_avg_forces
 Averaged system forces. More...

colvar_grid_countti_count
 Histogram of sampled data. More...

std::vector< int > ti_bin
 Because total forces may be from the last simulation step, store the index of the variables then. More...


Detailed Description

\brief Base class for unconstrained thermodynamic-integration FE estimator.

Definition at line 271 of file colvarbias.h.


Constructor & Destructor Documentation

colvarbias_ti::colvarbias_ti char const *    key
 

Definition at line 680 of file colvarbias.C.

References colvardeps::f_cvb_calc_ti_samples, colvardeps::f_cvb_step_zero_data, colvardeps::feature_states, colvarmodule::main, NULL, colvardeps::provide, colvarmodule::proxy, ti_avg_forces, ti_count, and colvarproxy_system::total_forces_same_step.

colvarbias_ti::~colvarbias_ti   [virtual]
 

Definition at line 694 of file colvarbias.C.

References clear_state_data.


Member Function Documentation

int colvarbias_ti::clear_state_data   [virtual]
 

\brief Delete only the allocatable data (save memory).

Reimplemented from colvarbias.

Reimplemented in colvarbias_meta.

Definition at line 700 of file colvarbias.C.

References NULL, ti_avg_forces, and ti_count.

Referenced by ~colvarbias_ti.

std::string const colvarbias_ti::get_state_params   const [virtual]
 

Write the values of specific mutable properties to a string.

Reimplemented from colvarbias.

Reimplemented in colvarbias_meta.

Definition at line 846 of file colvarbias.C.

References string.

int colvarbias_ti::init std::string const &    conf [virtual]
 

\brief Parse config string and (re)initialize.

Reimplemented from colvarbias.

Reimplemented in colvarbias_meta.

Definition at line 714 of file colvarbias.C.

References colvarmodule::cite_feature, COLVARS_INPUT_ERROR, COLVARS_NOT_IMPLEMENTED, conf, colvardeps::enable, colvarmodule::error, colvardeps::f_cv_subtract_applied_force, colvardeps::f_cvb_calc_ti_samples, colvardeps::f_cvb_write_ti_pmf, colvardeps::f_cvb_write_ti_samples, colvardeps::get_keyval_feature, init_grids, colvardeps::is_enabled, colvarmodule::main, colvarbias::name, colvarbias::num_variables, colvarmodule::time_dependent_biases, and colvarbias::variables.

Referenced by colvarbias_restraint::init, and colvarbias_meta::init.

int colvarbias_ti::init_grids   [virtual]
 

Definition at line 765 of file colvarbias.C.

References colvarbias::colvars, colvardeps::f_cvb_calc_ti_samples, colvar_grid< size_t >::has_parent_data, colvardeps::is_enabled, NULL, colvarbias::num_variables, colvar_grid_gradient::samples, ti_avg_forces, ti_bin, ti_count, ti_system_forces, and colvarbias::variables.

Referenced by init.

std::istream & colvarbias_ti::read_state_data std::istream &    is [virtual]
 

Read all mutable data not already set by set_state_params().

Reimplemented from colvarbias.

Reimplemented in colvarbias_meta.

Definition at line 871 of file colvarbias.C.

References colvarmodule::debug, colvardeps::f_cvb_calc_ti_samples, colvardeps::is_enabled, colvarmodule::log, colvar_grid< cvm::real >::read_raw, colvar_grid< size_t >::read_raw, colvarbias::read_state_data_key, ti_avg_forces, and ti_count.

Referenced by colvarbias_restraint_linear::read_state_data, colvarbias_restraint_harmonic_walls::read_state_data, colvarbias_restraint_harmonic::read_state_data, and colvarbias_meta::read_state_data.

int colvarbias_ti::set_state_params std::string const &    state_conf [virtual]
 

Read the values of specific mutable properties from a string.

Reimplemented from colvarbias.

Reimplemented in colvarbias_meta.

Definition at line 852 of file colvarbias.C.

int colvarbias_ti::update   [virtual]
 

Retrieve colvar values and calculate their biasing forces Some implementations may use calc_energy() and calc_forces().

Reimplemented from colvarbias.

Reimplemented in colvarbias_meta.

Definition at line 787 of file colvarbias.C.

References NULL, and update_system_forces.

Referenced by colvarbias_restraint_linear::update, colvarbias_restraint_harmonic_walls::update, colvarbias_restraint_harmonic::update, and colvarbias_meta::update.

int colvarbias_ti::update_system_forces std::vector< colvarvalue > const *    subtract_forces [virtual]
 

Subtract applied forces (either last forces or argument) from the total forces.

Definition at line 793 of file colvarbias.C.

References colvar_grid_gradient::acc_value, colvar_grid< cvm::real >::current_bin_scalar, colvarmodule::debug, colvardeps::f_cv_subtract_applied_force, colvardeps::f_cvb_calc_ti_samples, colvardeps::f_cvb_step_zero_data, colvarbias::has_data, colvar_grid< cvm::real >::index_ok, colvardeps::is_enabled, colvarmodule::log, colvarmodule::main, NULL, colvarbias::num_variables, colvarbias::previous_colvar_forces, colvarmodule::proxy, colvarmodule::step_relative, ti_avg_forces, ti_bin, ti_system_forces, colvarproxy_system::total_forces_same_step, and colvarbias::variables.

Referenced by update.

int colvarbias_ti::write_output_files   [virtual]
 

Write any output files that this bias may have (e.g. PMF files).

Reimplemented from colvarbias.

Reimplemented in colvarbias_meta.

Definition at line 898 of file colvarbias.C.

References COLVARS_FILE_ERROR, colvardeps::f_cvb_write_ti_pmf, colvardeps::f_cvb_write_ti_samples, colvarbias::has_data, colvardeps::is_enabled, colvarmodule::log, colvar_grid< cvm::real >::multiply_constant, colvarbias::name, colvarmodule::output_prefix, ti_avg_forces, ti_count, colvar_grid_gradient::write_1D_integral, colvar_grid_gradient::write_multicol, and colvar_grid_count::write_multicol.

Referenced by colvarbias_meta::write_output_files.

std::ostream & colvarbias_ti::write_state_data std::ostream &    os [virtual]
 

Write all mutable data not already written by get_state_params().

Reimplemented from colvarbias.

Reimplemented in colvarbias_meta.

Definition at line 858 of file colvarbias.C.

References colvardeps::f_cvb_calc_ti_samples, colvardeps::is_enabled, ti_avg_forces, ti_count, colvar_grid< cvm::real >::write_raw, and colvar_grid< size_t >::write_raw.

Referenced by colvarbias_restraint_linear::write_state_data, colvarbias_restraint_harmonic_walls::write_state_data, colvarbias_restraint_harmonic::write_state_data, and colvarbias_meta::write_state_data.


Member Data Documentation

colvar_grid_gradient* colvarbias_ti::ti_avg_forces [protected]
 

Averaged system forces.

Definition at line 300 of file colvarbias.h.

Referenced by clear_state_data, colvarbias_ti, init_grids, read_state_data, update_system_forces, write_output_files, and write_state_data.

std::vector<int> colvarbias_ti::ti_bin [protected]
 

Because total forces may be from the last simulation step, store the index of the variables then.

Definition at line 307 of file colvarbias.h.

Referenced by init_grids, and update_system_forces.

colvar_grid_count* colvarbias_ti::ti_count [protected]
 

Histogram of sampled data.

Definition at line 303 of file colvarbias.h.

Referenced by clear_state_data, colvarbias_ti, init_grids, read_state_data, write_output_files, and write_state_data.

std::vector<colvarvalue> colvarbias_ti::ti_system_forces [protected]
 

\brief Forces exerted from the system to the associated variables.

Definition at line 297 of file colvarbias.h.

Referenced by init_grids, and update_system_forces.


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