PROFASI  Version 1.5
Public Member Functions | List of all members
prf::WangLandau Class Reference

Wang Landau iterations. More...

#include <WangLandau.hh>

Inherits prf::GMC.

Public Member Functions

int parseCommand (InstructionString s)
 Parse commands specific to the Wang Landau algorithm.
 
int Step ()
 Modify the MC step so that it perform Wang Landau updates.
 
- Public Member Functions inherited from prf::GMC
int SetTemps (std::vector< double > tmpv)
 Set temperatures from a given vector.
 
int SetTemps (std::string tempfile)
 Specify temperatures in a file.
 
double inverse_temperature (unsigned i) const
 i'th beta value
 
double temperature (unsigned i) const
 i'th temperature
 
size_t number_of_temperatures () const
 Number of temperatures.
 
int NVisits (unsigned i) const
 Number of visits to the i'th temperature.
 
unsigned CurTempIndex () const
 Index, or serial number of the current temperature.
 
void CurTempIndex (unsigned gind)
 Set current temperature.
 
void SetTemp (unsigned i)
 Set current temperature to the i'th.
 
void writeTempStat (std::string flnm)
 Write information about visits to different environments to file.
 
virtual int parseCommand (InstructionString s)
 Execute an instruction.
 
- Public Member Functions inherited from prf::MC
 MC ()
 default constructor
 
UpdatesHandlerupdates_hander ()
 Return pointer to the manager of conformational updates.
 
FFHandler * forcefield_handler ()
 Return pointer to the force field manager.
 
void forcefield_handler (FFHandler *fh)
 Introduce the force field manager.
 
RandomNumberBaseRandomNumberGenerator ()
 Return a pointer to the random number generator for other use.
 
void RandomNumberGenerator (RandomNumberBase *grn)
 Force use of a different a random number generator.
 
double temperature () const
 Get temperature in dimensionless ProFASi units.
 
void temperature (double x)
 Set temperature in dimensionless ProFASi units.
 
double temperature_in_kelvin () const
 Get MC temperature in Kelvin.
 
void temperature_in_kelvin (double val)
 Assign a temperature in kelvin for the simulation.
 
void SetBeta (double be)
 Set inverse temperature (model units for temperature)
 
void Connect (Population *p)
 Tell MC what population of proteins it needs to evolve.
 
virtual int Setup ()
 Initialize.
 
virtual int SimpleStep ()
 Perform one Monte Carlo step: naive version.
 
void Step (int nstps)
 Perform nstps Monte Carlo steps.
 
void RunCycle ()
 Run a Monte Carlo cycle or sweep.
 
void SetCycleLength (int i)
 Set length of cycle to i.
 
- Public Member Functions inherited from HandlerBase
virtual void parseCommands (std::list< InstructionString > &cmds, int argc, char *argv[])
 Parse commands passed as a deque of InstructionString objects.
 

Detailed Description

This is an MC class derivative that redefines how the "Step" function works to implement the Wang Landau iterations. The acceptance probability for an update, which changes the energy from E1 to E2, is g(E1)/g(E2), where g(E) is an estimate of the density of states. The class keeps a histogram for this density of states and uses that in the Monte Carlo steps. A special feature of the Wang-Landau algorithm is that this estimate of the density of states is updated "live" during the simulation. The algorithm can be roughly described like this:

  1. System is initialized randomly with an energy somewhere within the range
  2. A histogram of energy, H, is initialized in the range emin,emax
  3. Another histogram to store g(E) is initialized in the same range, but with every bin set to 1.
  4. A conformational update is performed
  5. Energies before and after the update are estimated
  6. Wang Landau acceptance criterion is applied, and the update is either accepted or rejected
  7. At the end of every update, g(Ei) for the bin corresponding to the energy of the system is multiplied by a certain factor, f.
  8. The appropriate bin of that histogram H is icremented by 1
  9. The last 5 steps are repeated until a certain convergence criterion is met, defined as a certain degree of flatness of the occupation histogram.
  10. The factor f is reduced, and the occupation histogram (but not the estimate of g) is reset to zero
  11. Simulation continues from step 4, unless the factor f is already below a preset final value.

If the energy found is below the minimum in the range, the range is extended to accommodate the new value. Lower energy values are always interesting. If the update produces a new energy higher than the maximum, some heuristics is needed to bring it to within the range. This implementation can perform a series of high temperature Monte Carlo steps until the system re-enters the relevant range. This feature must be invoked with the switch –use_htmc.


The documentation for this class was generated from the following files:

PROFASI: Protein Folding and Aggregation Simulator, Version 1.5
© (2005-2016) Anders Irbäck and Sandipan Mohanty
Documentation generated on Mon Jul 18 2016 using Doxygen version 1.8.2