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

Parallel Tempering. More...

#include <ParTemp.hh>

Inherits prf::GMC.

Public Member Functions

 ParTemp ()
 default constructor
 
void enable_multiplexing ()
 Enable multiplexing.
 
void disable_multiplexing ()
 Disable multiplexing.
 
unsigned SwitchTemp ()
 Attempt a configuration switch, returns 0 if fails.
 
int Setup ()
 Basic setup work.
 
int parseCommand (InstructionString s)
 Execute an instruction.
 
- 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 SimpleStep ()
 Perform one Monte Carlo step: naive version.
 
virtual int Step ()
 One Monte Carlo Step, as used in PROFASI.
 
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 the implementation of parallel tempering for ProFASi usingMPI.

In this implementation, parallel tempering contains the concept of multiplexing. Given "n" nodes working with "m" temperatures, with n=p*m, with integer p, the system contains m simplexes with p elements in each. At each temperature exchange, a node in a certain simplex attempts to exchange with a node in a neighbouring simplex. But the serial number of the node inside the other simplex is varied randomly at every cycle, so that the system does not segregate into p independent parallel tempering runs with m temperatures each, but evolves together. It is hoped that this leads to better/faster equillibration. The exact extent of its effectiveness is unclear. Of course, if n is set equal to m, it reduces to a simple parallel tempering as before.

This class assumes that there is some main program somewhere which has been started with MPI. So, no MPI specific initialisation is done here. But all communication between nodes happens using MPI.

Member Function Documentation

int ParTemp::parseCommand ( InstructionString  s)
virtual

The MC class handles some instructions of its own, as well as forwarding instructions meant for the UpdatesHandler. Instructions for the MC class are:

  • steps_per_cycle : Sets how many Monte Carlo updates constitute a Monte Carlo cycle. Example: steps_per_cylce 100
  • random_number_seed : Manually set a random number seed.
  • temperature Temperature for the MC simulation. Example: temperature 310 Kelvin, or temperature 0.485. If no unit is given, temperature is read in the dimensionless ProFASi units.
  • ntmp Number of temperatures (mostly relevant for methods derived from Metropolis Monte Carlo) Example: ntmp 10

Reimplemented from prf::MC.

unsigned ParTemp::SwitchTemp ( )

This attempts an exchange of the temperature between two nodes of neighbouring temperature indices.


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