00001 // -*- c++ -*- 00002 00003 // This file is part of the Collective Variables module (Colvars). 00004 // The original version of Colvars and its updates are located at: 00005 // https://github.com/Colvars/colvars 00006 // Please update all Colvars source files before making any changes. 00007 // If you wish to distribute your changes, please submit them to the 00008 // Colvars repository at GitHub. 00009 00010 #ifndef COLVARBIAS_HISTOGRAM_H 00011 #define COLVARBIAS_HISTOGRAM_H 00012 00013 #include <vector> 00014 #include <list> 00015 #include <sstream> 00016 #include <iomanip> 00017 00018 #include "colvarbias.h" 00019 #include "colvargrid.h" 00020 00022 class colvarbias_histogram : public colvarbias { 00023 00024 public: 00025 00026 colvarbias_histogram(char const *key); 00027 ~colvarbias_histogram(); 00028 virtual int init(std::string const &conf); 00029 virtual int update(); 00030 virtual int write_output_files(); 00031 00032 protected: 00033 00035 colvar_grid_scalar *grid; 00036 std::vector<int> bin; 00037 std::string out_name, out_name_dx; 00038 00040 size_t colvar_array_size; 00042 std::vector<cvm::real> weights; 00043 00044 virtual std::istream & read_state_data(std::istream &is); 00045 virtual std::ostream & write_state_data(std::ostream &os); 00046 }; 00047 00048 #endif