#include <colvargrid.h>
Inheritance diagram for colvar_grid_count:

Public Member Functions | |
| colvar_grid_count () | |
| Default constructor. | |
| virtual | ~colvar_grid_count () |
| Destructor. | |
| colvar_grid_count (std::vector< int > const &nx_i, size_t const &def_count=0) | |
| Constructor. | |
| colvar_grid_count (std::vector< colvar * > &colvars, size_t const &def_count=0) | |
| Constructor from a vector of colvars. | |
| void | incr_count (std::vector< int > const &ix) |
| Increment the counter at given position. | |
| size_t const & | new_count (std::vector< int > const &ix, size_t const &imult=0) |
| Get the binned count indexed by ix from the newly read data. | |
| std::istream & | read_restart (std::istream &is) |
| Read the grid from a restart. | |
| std::ostream & | write_restart (std::ostream &os) |
| Write the grid to a restart. | |
| virtual void | value_input (std::vector< int > const &ix, size_t const &t, size_t const &imult=0, bool add=false) |
| Get the value from a formatted output and transform it into the internal representation (it may have been rescaled or manipulated). | |
Definition at line 780 of file colvargrid.h.
|
|
Default constructor.
Definition at line 11 of file colvargrid.C. 00012 : colvar_grid<size_t>() 00013 {}
|
|
|
Destructor.
Definition at line 788 of file colvargrid.h. 00789 {}
|
|
||||||||||||
|
Constructor.
Definition at line 15 of file colvargrid.C. 00017 : colvar_grid<size_t> (nx_i, def_count) 00018 {}
|
|
||||||||||||
|
Constructor from a vector of colvars.
Definition at line 20 of file colvargrid.C. 00022 : colvar_grid<size_t> (colvars, def_count) 00023 {}
|
|
|
Increment the counter at given position.
Definition at line 800 of file colvargrid.h. References colvar_grid< size_t >::address(). Referenced by colvar_grid_gradient::acc_force(), colvar_grid_gradient::acc_grad(), colvar_grid_scalar::acc_value(), and colvarbias_histogram::update().
|
|
||||||||||||
|
Get the binned count indexed by ix from the newly read data.
Definition at line 806 of file colvargrid.h. References colvar_grid< size_t >::address(). Referenced by colvar_grid_gradient::value_input(), and colvar_grid_scalar::value_input().
|
|
|
Read the grid from a restart.
Definition at line 25 of file colvargrid.C. References colvarmodule::log(), colvar_grid< size_t >::parse_params(), and colvar_grid< size_t >::read_raw(). 00026 {
00027 size_t const start_pos = is.tellg();
00028 std::string key, conf;
00029 if ((is >> key) && (key == std::string ("grid_parameters"))) {
00030 is.seekg (start_pos, std::ios::beg);
00031 is >> colvarparse::read_block ("grid_parameters", conf);
00032 parse_params (conf);
00033 } else {
00034 cvm::log ("Grid parameters are missing in the restart file, using those from the configuration.\n");
00035 is.seekg (start_pos, std::ios::beg);
00036 }
00037 read_raw (is);
00038 return is;
00039 }
|
|
||||||||||||||||||||
|
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< size_t >. Definition at line 821 of file colvargrid.h. References colvar_grid< size_t >::address(). 00825 {
00826 if (add) {
00827 data[address (ix)] += t;
00828 if (this->has_parent_data) {
00829 // save newly read data for inputting parent grid
00830 new_data[address (ix)] = t;
00831 }
00832 } else {
00833 data[address (ix)] = t;
00834 }
00835 }
|
|
|
Write the grid to a restart.
Definition at line 41 of file colvargrid.C. References colvar_grid< size_t >::write_params(), and colvar_grid< size_t >::write_raw(). 00042 {
00043 write_params (os);
00044 write_raw (os);
00045 return os;
00046 }
|
1.3.9.1