Collective Variables Module - Developer Documentation
colvarbias_histogram.h
1 // -*- c++ -*-
2 
3 #ifndef COLVARBIAS_HISTOGRAM_H
4 #define COLVARBIAS_HISTOGRAM_H
5 
6 #include <vector>
7 #include <list>
8 #include <sstream>
9 #include <iomanip>
10 
11 #include "colvarbias.h"
12 #include "colvargrid.h"
13 
16 
17 public:
18 
19  colvarbias_histogram(char const *key);
21  virtual int init(std::string const &conf);
22  virtual int update();
23  virtual int write_output_files();
24 
25 protected:
26 
29  std::vector<int> bin;
30  std::string out_name, out_name_dx;
31  size_t output_freq;
32 
36  std::vector<cvm::real> weights;
37 
38  virtual std::istream & read_state_data(std::istream &is);
39  virtual std::ostream & write_state_data(std::ostream &os);
40 };
41 
42 #endif
Histogram "bias" (does as the name says)
Definition: colvarbias_histogram.h:15
virtual std::ostream & write_state_data(std::ostream &os)
Write all mutable data not already written by get_state_params()
Definition: colvarbias_histogram.cpp:211
std::vector< cvm::real > weights
If colvar_array_size is larger than 1, weigh each one by this number before accumulating the histogra...
Definition: colvarbias_histogram.h:36
size_t colvar_array_size
If one or more of the variables are type_vector, treat them as arrays of this length.
Definition: colvarbias_histogram.h:34
colvar_grid_scalar * grid
n-dim histogram
Definition: colvarbias_histogram.h:28
virtual std::istream & read_state_data(std::istream &is)
Read all mutable data not already set by set_state_params()
Definition: colvarbias_histogram.cpp:198
virtual int update()
Definition: colvarbias_histogram.cpp:101
virtual int write_output_files()
Write any output files that this bias may have (e.g. PMF files)
Definition: colvarbias_histogram.cpp:163
Collective variable bias, base class.
Definition: colvarbias.h:12
Class for accumulating a scalar function on a grid.
Definition: colvargrid.h:1249
void init()
Set the object ready to parse a new configuration string.
Definition: colvarparse.h:61