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

RMSD evaluator between a file and a collection of atoms in the program. More...

#include <ProteinRMSD.hh>

Inheritance diagram for prf::ProteinRMSD:
Inheritance graph
[legend]

Public Member Functions

 ProteinRMSD ()
 Default constructor.
 
int init_obs ()
 All observables must implement one initialize routine.
 
void set_struc1 (std::string rf)
 Set the first structure, see the discussion at the class description.
 
void set_struc2 (std::string rf)
 Set the second structure.
 
void set_default_sel1 (std::string s1)
 Set default selection.
 
void live_first_struc (bool tf=true)
 Declare the first structure as changable.
 
void filter (std::string flt)
 Add a filter for the kind of atoms to be used in the RMSD calculation.
 
void no_seq_align ()
 Don't try to align sequences.
 
void returnQ (bool tf)
 If called with "true", the observable value becomes exp(-MSD/100)
 
virtual void rangeEstimate (double &x1, double &x2)
 Estimate range for RMSD.
 
int init ()
 Initialize with selected ranges and filter.
 
void delete_matrix2 ()
 Delete information for the second object.
 
double evaluate ()
 Actual calculation of the value of the observable.
 
- Public Member Functions inherited from prf::Observable
void set (std::string cmd)
 Give the object an instruction to process during initialization.
 
virtual void refresh ()
 Necessary before an observable value is used.
 
virtual double delta (Update *u)
 Quick estimate of the change in an Observable due to an update.
 
double operator() ()
 Retrieve the value of the observable.
 
double Value ()
 Retrieve the value of the observable.
 
void disable_stats ()
 Stop collecting statistical data like averages and histograms.
 
void enable_stats ()
 Start collecting statistical data like averages and histograms.
 
- 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

This is an "Observable" class which facilitates RMSD evaluation from a structure in a PDB file with a structure in the program. Neither the structrue in the file nor in the program need to be complete Proteins.

The two comparison structures are built in a flexible way. One can select non-overlapping regions in the PDB file as follows:

ProteinRMSD myrmsd;
myrmsd.set_struc1("abc.pdb:7:A,12,19:A,25,45");

"abc.pdb" is the name of the reference pdb file. The MODEL 7 in that file is selected. In that model, the residues 12-19 and 25-45 of chain A are selected. The set of all selected atoms constitutes the comparison structure. Any number of segments can be selected, and they need not be from the same chain. But they have to be from the same MODEL. The model id can be omitted, so that it defaults to the first model. If residue range is not specified, the entire chain is selected.

The convention for residue range specification here is different from the rest of PROFASI. The range 12-19 above means the residues labeled as 12 through 19 (inclusive at both ends) in the file. In case the residue numbering in the file jumps from 13 to 16, the selection would include residues 12,13,16,17,18,19. It is precisely to deal with pdb files with omitted residues or with insertion codes, that the residue number labels are merely treated as strings.

A corresponding comparison object can be created from the PROFASI Population. The syntax is exactly the same, but instead of the file name, one uses the symbol $. For example,
myrmsd.set_struc2("$::A,12,19:A,25,45");

Notice that the numbering here starts from 1, to keep it consistent with the selection numbering in pdb files.

It is possible to set both struc1 and struc2 to be simulated segments in the program, instead of some external pdb file. For instance, one might be interested in the similarity between the corresponding segments in chain A and chain C in the program, without reference to any external pdb file, like...

myrmsd.set_struc1("$::A,1,15");

myrmsd.set_struc2("$::C,1,15");

One does not always want to include all the atoms in the selected segments for an RMSD calculations. To filter only the interesting ones, there are, well, filters! To use the backbone atoms and CB atoms only, you would write,

myrmsd.filter("+BB+CB");
If you additionally want to exclude proline residues and sulfur atoms from the calculations, then you would write instead,

myrmsd.filter("+BB+CB-%PRO-@S");

It is assumed by default that the first of the two structures does not change during the simulation. This is normally the case, like when it is an NMR derived PDB file. Some calculations related to that structure are done only once. If you use the population as the source of the first structure, by default, it would mean the state of the population at the time of invocation of ProteinRMSD::init. If on the other hand, you wish a genuine changing state to be compared with another changing state, you have to declare the first state to be mobile, using the following function.

myrmsd.mobile_first_struc();

Finally, you need the RMSD value for whatever selections and filters you made. This is done in the usual way, as in all other classes derived from Observable, call refresh(), and then Value(); //available through inheritance.

myrmsd.refresh(); x=myrmsd.Value();

Member Function Documentation

void prf::ProteinRMSD::delete_matrix2 ( )
inline

This should be called if you wish to call init over and over again, with new files for the second structure.

int prf::ProteinRMSD::init_obs ( )
virtual

Even if it seems that one particular observable might need additional arguments during initialization, it is advantageous to have a uniform syntax for all of them. So, when additional arguments are needed, one should provide them in a separate function called before initialization, and then call init_obs without arguments. The name init_obs instead of a more natural "init" or "initialize" is because an Observable often inherits from other classes which represent its character more fundamentally. So, the names such as "init" are kept free for such base classes.

Reimplemented from prf::Observable.

void prf::ProteinRMSD::no_seq_align ( )
inline

With this option, the program does not try to align sequences. It is useful, in combination with appropriate filters, to calculate RMSD between similar but not identical sequences.

void prf::ProteinRMSD::returnQ ( bool  tf)
inline

The quantity Q=exp(-RMSD^2 /100) has a range between 0 and 1 and has been found useful. We include an option for the Value() function to return this.


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