| version 1.12 | version 1.13 |
|---|
| |
| | |
| public: | public: |
| | |
| colvarbias_abf(std::string const &conf, char const *key); | colvarbias_abf(char const *key); |
| ~colvarbias_abf(); | virtual int init(std::string const &conf); |
| | virtual ~colvarbias_abf(); |
| cvm::real update(); | virtual int update(); |
| | |
| private: | private: |
| | |
| |
| /// Base filename(s) for reading previous gradient data (replaces data from restart file) | /// Base filename(s) for reading previous gradient data (replaces data from restart file) |
| std::vector<std::string> input_prefix; | std::vector<std::string> input_prefix; |
| | |
| bool apply_bias; | |
| bool update_bias; | bool update_bias; |
| bool hide_Jacobian; | bool hide_Jacobian; |
| size_t full_samples; | size_t full_samples; |
| |
| int output_freq; | int output_freq; |
| /// Write combined files with a history of all output data? | /// Write combined files with a history of all output data? |
| bool b_history_files; | bool b_history_files; |
| | /// Write CZAR output file for stratified eABF (.zgrad) |
| | bool b_czar_window_file; |
| size_t history_freq; | size_t history_freq; |
| | |
| /// Cap applied biasing force? | /// Cap applied biasing force? |
| |
| | |
| // Internal data and methods | // Internal data and methods |
| | |
| std::vector<int> bin, force_bin; | std::vector<int> bin, force_bin, z_bin; |
| gradient_t force; | gradient_t system_force, applied_force; |
| | |
| /// n-dim grid of free energy gradients | /// n-dim grid of free energy gradients |
| colvar_grid_gradient *gradients; | colvar_grid_gradient *gradients; |
| /// n-dim grid of number of samples | /// n-dim grid of number of samples |
| colvar_grid_count *samples; | colvar_grid_count *samples; |
| | /// n-dim grid: average force on "real" coordinate for eABF z-based estimator |
| | colvar_grid_gradient *z_gradients; |
| | /// n-dim grid of number of samples on "real" coordinate for eABF z-based estimator |
| | colvar_grid_count *z_samples; |
| | /// n-dim grid contining CZAR estimator of "real" free energy gradients |
| | colvar_grid_gradient *czar_gradients; |
| | |
| | inline int update_system_force(size_t i) |
| | { |
| | if (colvars[i]->is_enabled(f_cv_subtract_applied_force)) { |
| | // this colvar is already subtracting the ABF force |
| | system_force[i] = colvars[i]->total_force().real_value; |
| | } else { |
| | system_force[i] = colvars[i]->total_force().real_value |
| | - colvar_forces[i].real_value; |
| | } |
| | if (cvm::debug()) |
| | cvm::log("ABF System force calc: cv " + cvm::to_str(i) + |
| | " fs " + cvm::to_str(system_force[i]) + |
| | " = ft " + cvm::to_str(colvars[i]->total_force().real_value) + |
| | " - fa " + cvm::to_str(colvar_forces[i].real_value)); |
| | return COLVARS_OK; |
| | } |
| | |
| // shared ABF | // shared ABF |
| bool shared_on; | bool shared_on; |