#include <colvargrid.h>
Inheritance diagram for colvar_grid_gradient:
Public Methods | |
colvar_grid_gradient () | |
Default constructor. More... | |
virtual | ~colvar_grid_gradient () |
Destructor. More... | |
colvar_grid_gradient (std::vector< int > const &nx_i) | |
Constructor from specific sizes arrays. More... | |
colvar_grid_gradient (std::vector< colvar * > &colvars) | |
Constructor from a vector of colvars. More... | |
colvar_grid_gradient (std::string &filename) | |
Constructor from a multicol file. More... | |
virtual std::istream & | read_multicol (std::istream &is, bool add=false) |
Read a grid written by write_multicol(), incrementin if data is true. More... | |
virtual int | read_multicol (std::string const &filename, std::string description="grid file", bool add=false) |
Read a grid written by write_multicol(), incrementin if data is true. More... | |
virtual std::ostream & | write_multicol (std::ostream &os) const |
Write grid in a format which is both human-readable and gnuplot-friendly. More... | |
virtual int | write_multicol (std::string const &filename, std::string description="grid file") const |
Write grid in a format which is both human-readable and gnuplot-friendly. More... | |
virtual std::ostream & | write_opendx (std::ostream &os) const |
Write the grid data without labels, as they are represented in memory. More... | |
virtual int | write_opendx (std::string const &filename, std::string description="grid file") const |
Write the grid data without labels, as they are represented in memory. More... | |
void | vector_value (std::vector< int > const &ix, std::vector< cvm::real > &v) const |
\brief Get a vector with the binned value(s) indexed by ix, normalized if applicable. More... | |
void | acc_value (std::vector< int > const &ix, std::vector< colvarvalue > const &values) |
\brief Accumulate the value. More... | |
void | acc_force (std::vector< int > const &ix, cvm::real const *forces) |
\brief Accumulate the gradient based on the force (i.e. sums the opposite of the force). More... | |
void | acc_force_weighted (std::vector< int > const &ix, cvm::real const *forces, cvm::real weight) |
\brief Accumulate the gradient based on the force (i.e. sums the opposite of the force) with a non-integer weight. More... | |
virtual cvm::real | value_output (std::vector< int > const &ix, size_t const &imult=0) const |
\brief Return the value of the function at ix divided by its number of samples (if the count grid is defined). More... | |
virtual void | value_input (std::vector< int > const &ix, cvm::real const &new_value, size_t const &imult=0, bool add=false) |
\brief Get the value from a formatted output and transform it into the internal representation (it may have been rescaled or manipulated). More... | |
cvm::real | average () |
Compute and return average value for a 1D gradient grid. More... | |
void | write_1D_integral (std::ostream &os) |
\brief If the grid is 1-dimensional, integrate it and write the integral to a file. More... | |
Public Attributes | |
colvar_grid_count * | samples |
\brief Provide the sample count by which each binned value should be divided. More... | |
colvar_grid_scalar * | weights |
\brief Provide the floating point weights by which each binned value should be divided (alternate to samples, only one should be non-null). More... |
Definition at line 1446 of file colvargrid.h.
|
Default constructor.
Definition at line 199 of file colvargrid.C. References NULL. |
|
Destructor.
Definition at line 1462 of file colvargrid.h. |
|
Constructor from specific sizes arrays.
Definition at line 205 of file colvargrid.C. |
|
Constructor from a vector of colvars.
Definition at line 211 of file colvargrid.C. |
|
Constructor from a multicol file.
Definition at line 218 of file colvargrid.C. References colvarproxy_io::close_input_stream, COLVARS_INPUT_ERROR, colvarmodule::error, colvarproxy_io::input_stream, colvar_grid< cvm::real >::lower_boundaries, colvarmodule::main, colvar_grid< cvm::real >::mult, colvar_grid< cvm::real >::nd, NULL, colvar_grid< cvm::real >::periodic, colvarmodule::proxy, read_multicol, colvar_grid< cvm::real >::setup, and colvar_grid< cvm::real >::widths. |
|
\brief Accumulate the gradient based on the force (i.e. sums the opposite of the force).
Definition at line 1530 of file colvargrid.h. References colvar_grid< cvm::real >::address, colvar_grid< cvm::real >::data, colvar_grid_count::incr_count, and colvar_grid< cvm::real >::mult. Referenced by colvarbias_meta::project_hills, and colvarbias_abf::update. |
|
\brief Accumulate the gradient based on the force (i.e. sums the opposite of the force) with a non-integer weight.
Definition at line 1540 of file colvargrid.h. References colvar_grid_scalar::acc_value, colvar_grid< cvm::real >::address, colvar_grid< cvm::real >::data, and colvar_grid< cvm::real >::mult. |
|
\brief Accumulate the value.
Definition at line 1520 of file colvargrid.h. References colvar_grid< cvm::real >::address, colvar_grid< cvm::real >::data, colvar_grid_count::incr_count, and colvar_grid< cvm::real >::mult. Referenced by colvarbias_ti::update_system_forces. |
|
Compute and return average value for a 1D gradient grid.
Definition at line 1586 of file colvargrid.h. References colvar_grid< cvm::real >::incr, colvar_grid< cvm::real >::index_ok, n, colvar_grid< cvm::real >::nd, colvar_grid< cvm::real >::new_index, colvar_grid< cvm::real >::nx, colvarmodule::real, colvar_grid< cvm::real >::value, and colvar_grid< size_t >::value. Referenced by integrate_potential::integrate, colvarbias_abf::update, and write_1D_integral. |
|
Read a grid written by write_multicol(), incrementin if data is true.
Reimplemented from colvar_grid< cvm::real >. Definition at line 289 of file colvargrid.C. References colvar_grid::read_multicol. |
|
Read a grid written by write_multicol(), incrementin if data is true.
Reimplemented from colvar_grid< cvm::real >. Definition at line 284 of file colvargrid.C. References colvar_grid::read_multicol. Referenced by colvar_grid_gradient. |
|
\brief Get the value from a formatted output and transform it into the internal representation (it may have been rescaled or manipulated).
Reimplemented from colvar_grid< cvm::real >. Definition at line 1565 of file colvargrid.h. References colvar_grid< cvm::real >::address, colvar_grid< cvm::real >::data, colvar_grid< cvm::real >::has_data, colvar_grid_count::new_count, and colvar_grid< size_t >::value. |
|
\brief Return the value of the function at ix divided by its number of samples (if the count grid is defined).
Reimplemented from colvar_grid< cvm::real >. Definition at line 1551 of file colvargrid.h. References colvar_grid< cvm::real >::address, colvar_grid< cvm::real >::data, colvarmodule::real, and colvar_grid< size_t >::value. Referenced by integrate_potential::integrate. |
|
\brief Get a vector with the binned value(s) indexed by ix, normalized if applicable.
Definition at line 1497 of file colvargrid.h. References colvar_grid< cvm::real >::mult, colvar_grid< size_t >::value, and colvar_grid< cvm::real >::value. Referenced by colvarbias_abf::update. |
|
\brief If the grid is 1-dimensional, integrate it and write the integral to a file.
Definition at line 319 of file colvargrid.C. References average, bin, colvar_grid< cvm::real >::cv, colvarmodule::error, colvar_grid< cvm::real >::incr, colvar_grid< cvm::real >::index_ok, colvar_grid< cvm::real >::new_index, colvar_grid< cvm::real >::nx, colvar_grid< cvm::real >::periodic, colvarmodule::real, samples, colvar_grid< cvm::real >::value, and colvar_grid< size_t >::value. Referenced by colvarbias_ti::write_output_files. |
|
Write grid in a format which is both human-readable and gnuplot-friendly.
Reimplemented from colvar_grid< cvm::real >. Definition at line 301 of file colvargrid.C. References colvar_grid::write_multicol. |
|
Write grid in a format which is both human-readable and gnuplot-friendly.
Reimplemented from colvar_grid< cvm::real >. Definition at line 296 of file colvargrid.C. References colvar_grid::write_multicol. Referenced by colvarbias_reweightaMD::write_cumulant_expansion_pmf, colvarbias_reweightaMD::write_exponential_reweighted_pmf, and colvarbias_ti::write_output_files. |
|
Write the grid data without labels, as they are represented in memory.
Reimplemented from colvar_grid< cvm::real >. Definition at line 312 of file colvargrid.C. References colvar_grid::write_opendx. |
|
Write the grid data without labels, as they are represented in memory.
Reimplemented from colvar_grid< cvm::real >. Definition at line 307 of file colvargrid.C. References colvar_grid::write_opendx. |
|
\brief Provide the sample count by which each binned value should be divided.
Definition at line 1452 of file colvargrid.h. Referenced by integrate_potential::get_grad, colvarbias_abf::init, colvarbias_ti::init_grids, and write_1D_integral. |
|
\brief Provide the floating point weights by which each binned value should be divided (alternate to samples, only one should be non-null).
Definition at line 1456 of file colvargrid.h. |