PROFASI
Version 1.5

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  
UpdatesHandler *  updates_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.  
RandomNumberBase *  RandomNumberGenerator () 
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.  
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 WangLandau algorithm is that this estimate of the density of states is updated "live" during the simulation. The algorithm can be roughly described like this:
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 reenters the relevant range. This feature must be invoked with the switch –use_htmc.