![]() |
Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
|
bin management: main data structure used by Wang_landau algorithm More...
#include <WL_data_structure_internal.hpp>
Classes | |
class | Initial_Parameters |
Public Types | |
typedef T_DS_conformation< Conformation > | DS_conformation |
using | DS_snapshot = DS_snapshot_< Bin_properties > |
typedef std::unique_ptr< DS_snapshot > | Snapshot_ptr |
Public Member Functions | |
T_WL_Data_Structure_Internal () | |
T_WL_Data_Structure_Internal (Initial_Parameters parameters) | |
virtual Snapshot_ptr | update_increment () |
update_increment is called after new points have been generated and accepted(or not) in the WL algo. it updates the increment by which the (log) density is increased when a new point is generated in a given bin. More... | |
virtual void | reset_increment () |
void | update_densities (const Bin_index &index) |
update_densities updates the density vector when a new point is sampled by the WL algorithm. More... | |
virtual void | display_state () |
std::pair< bool, Snapshot_ptr > | energy_out_of_range (const DS_conformation &conf) |
energy_out_of_range is called when a point is sampled in a not already existing bin. It should handle the creation of a new bin if supported. This should be modified to initialize Custom_per_bin_stats at propers values if needed. More... | |
void | update_histogram (const DS_conformation &newpt, const DS_conformation &oldpt, const bool &accepted, const bool &boundary_check) |
update_histogram is called when a new point is sampled. It should be used to store some statistics on how the algorithm is working, which might be later used in update_parameters() More... | |
double & | get_density (const Bin_index &index) |
get_density returns the density of a point More... | |
Bin_index | get_bin_index_from_energy (const double &e) |
get_bin_index_from_energy finds the bin containing the energy e More... | |
Bin_index | get_bin_index_from_energy (const double &e, const double &e1, const Bin_index &i1) |
get_bin_index_from_energy should uses that the point previously sampled should be in a bin close to the new newly sampled point More... | |
bool | is_energy_in_range (const DS_conformation &conf) |
is_energy_in_range checks if a Bin_index is valid. More... | |
bool | is_bin_index_valid (Bin_index index) |
unsigned int | get_number_of_bins () |
virtual Snapshot_ptr | create_snapshot () |
virtual void | restore_state (const DS_snapshot *snap) |
Initial_Parameters | get_params () const |
Public Attributes | |
std::vector< Bin_energy_range > | bin_ranges |
std::vector< Bin_properties > | bin_properties |
double | increment |
int | gamma_index |
uint64_t | num_steps |
bool | exp_regime |
std::vector< std::pair< uint64_t, uint64_t > > | climbs |
std::vector< std::pair< uint64_t, uint64_t > > | descents |
bool | is_climbing = false |
bool | is_descending = false |
Protected Member Functions | |
double | gamma (unsigned int n) |
void | reset_gamma () |
void | update_density (double &density) |
double | get_gamma () |
double | get_gamma_index () |
virtual void | reset_histogram () |
virtual std::list< Bin_energy_range > | get_new_bins_ranges (const double &energy) |
Bin_index | add_bin (Bin_energy_range bin) |
add_bin is a helper function which add a bin to the bin vector/ properties vector More... | |
virtual bool | flat_hist () const |
Protected Attributes | |
Initial_Parameters | mParams |
double | averageInterbinSize |
uint64_t | h_tot |
bin management: main data structure used by Wang_landau algorithm
typedef T_DS_conformation<Conformation> DS_conformation |
using DS_snapshot = DS_snapshot_<Bin_properties> |
typedef std::unique_ptr<DS_snapshot> Snapshot_ptr |
|
inline |
|
inline |
|
inlineprotected |
add_bin is a helper function which add a bin to the bin vector/ properties vector
bin |
|
inlinevirtual |
|
inlinevirtual |
|
inline |
energy_out_of_range is called when a point is sampled in a not already existing bin. It should handle the creation of a new bin if supported. This should be modified to initialize Custom_per_bin_stats at propers values if needed.
conf |
|
inlineprotectedvirtual |
|
inlineprotected |
|
inline |
get_bin_index_from_energy finds the bin containing the energy e
e |
|
inline |
get_bin_index_from_energy should uses that the point previously sampled should be in a bin close to the new newly sampled point
e | new energy |
e1 | previous energy |
i1 | previous bin |
|
inline |
get_density returns the density of a point
index |
|
inlineprotected |
|
inlineprotected |
|
inlineprotectedvirtual |
|
inline |
|
inline |
|
inline |
|
inline |
is_energy_in_range checks if a Bin_index is valid.
conf |
|
inlineprotected |
|
inlineprotectedvirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inline |
update_densities updates the density vector when a new point is sampled by the WL algorithm.
index |
|
inlineprotected |
|
inline |
update_histogram is called when a new point is sampled. It should be used to store some statistics on how the algorithm is working, which might be later used in update_parameters()
oldpt | previous point in the algorithm |
newpt | point sampled by the Point_generator |
accepted | is the new point accepted after the metropolis test |
boundary_check | is the result of the boundary check |
|
inlinevirtual |
update_increment is called after new points have been generated and accepted(or not) in the WL algo. it updates the increment by which the (log) density is increased when a new point is generated in a given bin.
|
protected |
std::vector<Bin_properties> bin_properties |
std::vector<Bin_energy_range> bin_ranges |
std::vector<std::pair<uint64_t,uint64_t> > climbs |
std::vector<std::pair<uint64_t,uint64_t> > descents |
bool exp_regime |
int gamma_index |
|
protected |
double increment |
bool is_climbing = false |
bool is_descending = false |
|
protected |
uint64_t num_steps |