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

colvarbias_restraint_histogram Class Reference

Restrain the 1D histogram of a set of variables (or of a multidimensional one). More...

#include <colvarbias_restraint.h>

Inheritance diagram for colvarbias_restraint_histogram:

colvarbias colvarparse colvardeps colvarparams List of all members.

Public Methods

 colvarbias_restraint_histogram (char const *key)
int init (std::string const &conf)
 \brief Parse config string and (re)initialize. More...

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

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

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

virtual std::ostream & write_traj (std::ostream &os)
 Output quantities such as the bias energy to the trajectory file. More...


Protected Attributes

cvm::vector1d< cvm::realp
 Probability density. More...

cvm::vector1d< cvm::realref_p
 Reference probability density. More...

cvm::vector1d< cvm::realp_diff
 Difference between probability density and reference. More...

cvm::real lower_boundary
 Lower boundary of the grid. More...

cvm::real upper_boundary
 Upper boundary of the grid. More...

cvm::real width
 Resolution of the grid. More...

cvm::real gaussian_width
 Width of the Gaussians. More...

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

bool b_write_histogram
 Write the histogram to a file. More...


Detailed Description

Restrain the 1D histogram of a set of variables (or of a multidimensional one).

Definition at line 329 of file colvarbias_restraint.h.


Constructor & Destructor Documentation

colvarbias_restraint_histogram::colvarbias_restraint_histogram char const *    key
 

Definition at line 1327 of file colvarbias_restraint.C.

References gaussian_width, lower_boundary, upper_boundary, and width.

colvarbias_restraint_histogram::~colvarbias_restraint_histogram  
 

Definition at line 1441 of file colvarbias_restraint.C.

References p, p_diff, and ref_p.


Member Function Documentation

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

\brief Parse config string and (re)initialize.

Reimplemented from colvarbias.

Definition at line 1337 of file colvarbias_restraint.C.

References b_write_histogram, colvarmodule::cite_feature, colvarproxy_io::close_input_stream, COLVARS_FILE_ERROR, COLVARS_INPUT_ERROR, conf, data, colvardeps::enable, colvarmodule::error, colvardeps::f_cvb_apply_force, colvarmodule::fabs, force_k, gaussian_width, colvarparse::get_keyval, colvarparse::getline_nocomments, colvarbias::init, colvarproxy_io::input_stream, colvarmodule::log, lower_boundary, colvarmodule::main, p, p_diff, colvarparse::parse_silent, colvarmodule::proxy, ref_p, upper_boundary, and width.

int colvarbias_restraint_histogram::update   [virtual]
 

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

Reimplemented from colvarbias.

Definition at line 1449 of file colvarbias_restraint.C.

References colvarbias::bias_energy, colvarbias::colvar_forces, COLVARS_NOT_IMPLEMENTED, colvarmodule::debug, colvarmodule::error, colvarmodule::exp, force, force_k, gaussian_width, colvarmodule::log, lower_boundary, colvarbias::num_variables, p, p_diff, PI, colvarvalue::real_value, ref_p, colvarvalue::reset, colvarmodule::sqrt, colvarvalue::type, colvarvalue::type_scalar, colvarvalue::type_vector, colvarbias::variables, colvarvalue::vector1d_value, and width.

int colvarbias_restraint_histogram::write_output_files   [virtual]
 

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

Reimplemented from colvarbias.

Definition at line 1539 of file colvarbias_restraint.C.

References colvarproxy_io::close_output_stream, lower_boundary, colvarmodule::main, colvarbias::name, colvarproxy_io::output_stream, p, colvarmodule::proxy, colvarbias::variables, width, and colvarmodule::wrap_string.

std::ostream & colvarbias_restraint_histogram::write_traj std::ostream &    os [virtual]
 

Output quantities such as the bias energy to the trajectory file.

Reimplemented from colvarbias.

Definition at line 1581 of file colvarbias_restraint.C.

References colvarbias::bias_energy.

std::ostream & colvarbias_restraint_histogram::write_traj_label std::ostream &    os [virtual]
 

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

Reimplemented from colvarbias.

Definition at line 1570 of file colvarbias_restraint.C.

References colvarmodule::wrap_string.


Member Data Documentation

bool colvarbias_restraint_histogram::b_write_histogram [protected]
 

Write the histogram to a file.

Definition at line 370 of file colvarbias_restraint.h.

Referenced by init.

cvm::real colvarbias_restraint_histogram::force_k [protected]
 

Restraint force constant.

Definition at line 367 of file colvarbias_restraint.h.

Referenced by init, and update.

cvm::real colvarbias_restraint_histogram::gaussian_width [protected]
 

Width of the Gaussians.

Definition at line 364 of file colvarbias_restraint.h.

Referenced by colvarbias_restraint_histogram, init, and update.

cvm::real colvarbias_restraint_histogram::lower_boundary [protected]
 

Lower boundary of the grid.

Definition at line 355 of file colvarbias_restraint.h.

Referenced by colvarbias_restraint_histogram, init, update, and write_output_files.

cvm::vector1d<cvm::real> colvarbias_restraint_histogram::p [protected]
 

Probability density.

Definition at line 346 of file colvarbias_restraint.h.

Referenced by init, update, write_output_files, and ~colvarbias_restraint_histogram.

cvm::vector1d<cvm::real> colvarbias_restraint_histogram::p_diff [protected]
 

Difference between probability density and reference.

Definition at line 352 of file colvarbias_restraint.h.

Referenced by init, update, and ~colvarbias_restraint_histogram.

cvm::vector1d<cvm::real> colvarbias_restraint_histogram::ref_p [protected]
 

Reference probability density.

Definition at line 349 of file colvarbias_restraint.h.

Referenced by init, update, and ~colvarbias_restraint_histogram.

cvm::real colvarbias_restraint_histogram::upper_boundary [protected]
 

Upper boundary of the grid.

Definition at line 358 of file colvarbias_restraint.h.

Referenced by colvarbias_restraint_histogram, and init.

cvm::real colvarbias_restraint_histogram::width [protected]
 

Resolution of the grid.

Definition at line 361 of file colvarbias_restraint.h.

Referenced by colvarbias_restraint_histogram, init, update, and write_output_files.


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