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

The base class for all conformational updates. More...

#include <Update.hh>

Inheritance diagram for prf::Update:
Inheritance graph

Public Member Functions

void set_RandomNumberGenerator (RandomNumberBase *rn)
 An update needs a random number generator.
void set_sequencial_sweep (bool sw=true)
 Sweep through the DOFs sequencially rather than randomly.
void connect (Population *pl)
 An update must be connected with a population.
virtual void init ()
 Initialize update for use.
int perform (int itm)
 Make a move in the conformation space.
virtual int accept ()
 Finalizes a proposed update.
virtual int revert ()
 Reverts the proposed update.
virtual void print_setup (std::string &st)
 Print info about any departure from default behaviour.
Modulating the behaviour of updates
size_t n_relevant_dof () const
 The number of DOF in the system which may be touched by the update.
double get_weight_of_dof (int idof)
 Weight of a particular DOF.
void set_weight_of_dof (int idof, double vl)
 Set weight of a DOF.
virtual void configure (prf_xml::XML_Node *nd)
 Configure update using options provided in an XML node.
size_t get_site_of_dof (DOF_Info &dof)
 get site index of a given DOF
Update categories
bool sidechain_update () const
bool rigid_chain_update () const
bool backbone_update () const
bool multichain_update () const
bool local_update () const
So, what changed ?
unsigned num_changes ()
dof_change_typechange (unsigned i)
Ranges of changed things
void current_atoms (int &istr, int &iend)
 The first and last atoms affected by the update.
int begin_atom ()
 First affected atom.
int end_atom ()
 One past the last atom, like the end() in standard containers.
int begin_flexible_part ()
 Start of the flexible part of the update.
int end_flexible_part ()
 End of the flexible part, once again, one past the last ...
virtual double intrinsic_weight () const
 Additional weight for Metropolis-Hastings updates.
int n_residue_rigid_ranges () const
 Makes list of ranges of changed residues.
void residue_rigid_range (int i, int &r1, int &r2)
 i'th rigid range returned as ligand indices in r1 and r2
std::vector< std::pair< int,
int > > * 
residue_rigid_ranges ()
 Pointer to the vector of rigid ranges.
int n_atom_rigid_ranges () const
void atom_rigid_range (int i, int &r1, int &r2)
std::vector< std::pair< int,
int > > * 
atom_rigid_ranges ()
- Public Member Functions inherited from prf::Named
 Named ()
 Create an object with name "unnamed".
 Named (const char *st)
 Create an object with name st given as a C string.
 Named (std::string st)
 Create an object with a name given as a string.
std::string Name () const
 Retrive the name of an object.
void Name (std::string gnm)
 Assign a new name to an object.

Detailed Description

In this class we define the interface that every conformational update in PROFASI must have. The individual updates, like bgs for instance, would over-ride the virtual functions, and define exactly what happens when that update is invoked. But having a common interface facillitates integration with the rest of the package. For instance, the MC class makes a vector of Update's and calls the functions perform(), accept() or reject() on the Update object.

In other words, Update is an abstract concept... something happens to the system conformation. That is all that is required to define the behaviour of the Markov Chain generators. So, all such classes which only require an abstract interface, make use of this base class, and invoke Update objects through pointers. A real application on the other hand, will not define abstract Updates but rather objects of the derived classes. But a pointer to an Update can also point to an object of a derived class. This way, the implementation of the MC class or its derivatives can be kept separate from the details and finer points of individual conformational updates.

Member Function Documentation

int prf::Update::begin_flexible_part ( )

If the update moves a section of the system in which lots of atoms move non-rigidly wrt eachother, we define a "flexible_part".

size_t prf::Update::get_site_of_dof ( DOF_Info dof)

Search and return the site index of a certain DOF. If the DOF is not in the domain of the update, the size of the dof_at_site array is returned.

double prf::Update::get_weight_of_dof ( int  idof)

The input argument is the unique id of a DOF. The output is 0 if the DOF will never be touched: like if the DOF is a sidechain angle and the update is a purely backbone update. Otherwise, it is the relative weight of the DOF compared to other DOFs in the domain of the update. Appart from a normalising factor, this corresponds to the number of times a certain DOF is updated in a sweep.

double prf::Update::intrinsic_weight ( ) const

PROFASI provides a method to use a corrective weight for an update on top of what would be used in a pure Metropolis step. Such a weight is required if the probabilities for the size of the update somehow depend on the starting conformation, so that the forward and backward processes would have would have different distributions. In order to ensure detail balance, one needs to introduce an additional weight that compensates for the above. In PROFASI, only BGS has that kind of a weight. But the provision is made more generally to smoothen the interface and allow for more updates like the BGS in the future. The corrective weight is called IntrinsicWeight.

Reimplemented in prf::BGS.

int prf::Update::n_residue_rigid_ranges ( ) const

Each range returned represents a set of residues which have moved in a rigid manner relative to each other.

void prf::Update::residue_rigid_range ( int  i,
int &  r1,
int &  r2 

An update can divide the system into many segments which move rigidly with respect to the rest of the system. Since the degrees of freedom in PROFASI are only the torsional angles, it is most often the case that there are indeed only a few subsystems that move rigidly with respect to the rest. Most easy to visualize is a rigid body translation of a single chain relative to the rest. But also when a torsional angle is changed, two parts of the system move rigidly with respect to each other about the axis of that torsional angle.

Here, the ranges returned are not the atomic ranges, but rather at the level of residues, or ligands, relative to the entire system.

The following convention is used here, and is important in the design of new updates: If a range contains more than one ligand, atoms in one ligand have a fixed distance with respect to all atoms in the other ligands covered in the range. If the range contains only one ligand, no such restriction is assumed. That is, atoms inside that ligand can change distance between each other. Such single ligand ranges must be used for residues in which one or more degrees of freedom have changed. Longer ranges can only be used for residues in which no internal degrees of freedom have changed.

The ranges are inclusive at both the left and the right, meaning, a range of (2,5) would include residues 2,3,4,5 as a rigidly moving block.

It is further assumed that the ranges are arranged in increasing ligand indices, and are mutually non-overlapping, and are non-degenerate, meaning they always contain at-least one residue.

void prf::Update::set_weight_of_dof ( int  idof,
double  vl 

If the DOF is in the domain of an update, this changes the probability that it is selected for a move. All DOFs in the domain are given a weight 1 by default, which means that they will be updated with equal probability. If a DOF is given a higher weight, it will be favoured. Normalisation is taken care off internally. Like get_weight_of_dof, the input argument is the global unique id of a DOF.

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