10#ifndef COLVARBIAS_HISTOGRAM_REWEIGHT_AMD
11#define COLVARBIAS_HISTOGRAM_REWEIGHT_AMD
13#include "colvarbias_histogram.h"
21 virtual int init(std::string
const &conf)
override;
22 virtual int update()
override;
50 const std::string& p_output_prefix,
bool keep_open =
false);
56 const std::string& p_output_prefix,
bool keep_open =
false);
62 const std::string& p_output_prefix,
bool keep_open =
false);
82 template <
typename OST> OST & write_state_data_template_(OST& os);
83 template <
typename IST> IST & read_state_data_template_(IST& is);
Class for accumulating the gradient of a scalar function on a grid.
Definition: colvargrid.h:1555
Class for accumulating a scalar function on a grid.
Definition: colvargrid.h:1242
Histogram "bias" (does as the name says)
Definition: colvarbias_histogram.h:22
Definition: colvarbias_histogram_reweight_amd.h:17
virtual int write_count(const std::string &p_output_prefix, bool keep_open=false)
output the biased sampling
Definition: colvarbias_histogram_reweight_amd.cpp:262
std::vector< int > previous_bin
Current accelMD factor is the from previous frame.
Definition: colvarbias_histogram_reweight_amd.h:65
colvarmodule::step_number start_after_steps
Start collecting samples after N steps.
Definition: colvarbias_histogram_reweight_amd.h:67
bool b_use_cumulant_expansion
Use cumulant expansion to second order?
Definition: colvarbias_histogram_reweight_amd.h:70
virtual int write_cumulant_expansion_pmf(const std::string &p_output_prefix, bool keep_open=false)
output the PMF by the cumulant expansion estimator
Definition: colvarbias_histogram_reweight_amd.cpp:226
virtual int write_output_files() override
Write any output files that this bias may have (e.g. PMF files)
Definition: colvarbias_histogram_reweight_amd.cpp:148
void compute_cumulant_expansion_factor(const colvar_grid_scalar *hist_dV, const colvar_grid_scalar *hist_dV_square, const colvar_grid_scalar *hist_count, colvar_grid_scalar *cumulant_expansion_factor) const
calculate the cumulant expansion to second order
Definition: colvarbias_histogram_reweight_amd.cpp:327
virtual int init(std::string const &conf) override
Parse config string and (re)initialize.
Definition: colvarbias_histogram_reweight_amd.cpp:52
virtual int write_exponential_reweighted_pmf(const std::string &p_output_prefix, bool keep_open=false)
output the PMF by the exponential average estimator
Definition: colvarbias_histogram_reweight_amd.cpp:178
virtual std::ostream & write_state_data(std::ostream &os) override
Write all mutable data not already written by get_state_params() to a formatted stream.
Definition: colvarbias_histogram_reweight_amd.cpp:365
bool b_write_gradients
Write gradients of the PMF?
Definition: colvarbias_histogram_reweight_amd.h:80
void hist_to_pmf(colvar_grid_scalar *hist, const colvar_grid_scalar *hist_count) const
convert histogram to PMF by taking logarithm and multiplying it with -1/beta
Definition: colvarbias_histogram_reweight_amd.cpp:276
size_t history_freq
Number of timesteps between recording data in history files (if non-zero)
Definition: colvarbias_histogram_reweight_amd.h:76
virtual int update() override
Definition: colvarbias_histogram_reweight_amd.cpp:84
colvar_grid_scalar * pmf_grid_exp_avg
temporary grids for evaluating PMFs
Definition: colvarbias_histogram_reweight_amd.h:93
virtual std::istream & read_state_data(std::istream &is) override
save and restore
Definition: colvarbias_histogram_reweight_amd.cpp:407
long long step_number
Use a 64-bit integer to store the step number.
Definition: colvarmodule.h:92
Definition: colvars_memstream.h:30