PROFASI  Version 1.5
Public Member Functions | List of all members
UpdatesHandler Class Reference

A manager for MC updates. More...

#include <UpdatesHandler.hh>

Inherits HandlerBase.

Public Member Functions

 UpdatesHandler ()
 Default constructor.
 
int parseCommand (InstructionString s)
 Parse updates related instructions.
 
void autoSelect (Population *p)
 Smart choice of updates.
 
size_t num_updates () const
 Number of updates selected for the given Population.
 
Updateused_update (size_t i)
 Get a pointer to the i'th update in use.
 
Updateused_update (std::string upnm)
 Get a pointer to an update by name, if it is in use.
 
bool have_update (std::string upnm)
 Whether an update of a given name is in the list for the given Population.
 
int use_update (Update *updt)
 Explicitly state that an update should be used.
 
int use_update (std::string updtname)
 Explicitly mark one of the known updates by name, to be used.
 
int skip_update (std::string updtname)
 Request that one model update be skipped.
 
void set_n_temps (size_t nt)
 Propagate temperature index range to updates.
 
void assign_probs ()
 Assign probabilities from file or use auto assignment.
 
void init ()
 Perform any necessary initialisation operations for the updates.
 
- 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

UpdatesHandler manages a lot of things relating to conformational updates for Monte Carlo simulations. It's the interface for the conformational updates module in ProFASi. Based on a given Population, it can automatically set up a reasonable choice of conformational updates. It can calculate good relative frequency of performing those updates. The UpdateHandler is also used as a helper class in MC to bring about the conformational changes in each MC step.

The behaviour of the update manager can be controlled through commands passed to it as InstructionStrings. For instance, it can be told to use an update although the automatic set up does not select that update using its more generic criteria.

Member Function Documentation

void UpdatesHandler::assign_probs ( )

This function first tries to read in update probabilities from a file in the format described in Specifying relative probability of conformation updates. If that fails, it uses population information to set up some reasonable values.

void UpdatesHandler::autoSelect ( Population p)

For single chain systems, nothing is normally gained by performing rigid body updates. So, this function checks if there is indeed only one chain, and switches off those updates... that is, if the user did not explicitly state that such an update is desired! For instance, the single protein might be subject to an external force field which is space dependent, in which case, even rigid body updates are dynamically interesting. In such a situation, the user should make an explicit call to useUpdate("Rotation"), for instance, which would tell the autoSelectUpdates() function to leave the rigid body rotations alone, even if there is only one chain.


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