Difference between revisions of "Tutorial"

From victor
Jump to: navigation, search
(Parsing a PDB file (PdbLoader))
Line 20: Line 20:
 
The simplest way to load a PDB into a '''Protein object''' is:
 
The simplest way to load a PDB into a '''Protein object''' is:
  
<syntaxhighlight lang="cpp">
+
<syntaxhighlight line lang="cpp">
 
   #include <PdbLoader.h>
 
   #include <PdbLoader.h>
 
   #include <Protein.h>
 
   #include <Protein.h>
Line 35: Line 35:
 
   }
 
   }
 
</syntaxhighlight>
 
</syntaxhighlight>
 
  
 
== Modify the structure ==
 
== Modify the structure ==

Revision as of 17:01, 27 June 2014

Biopool

The Biopool class implementation follows the composite design pattern and for a complete description of the class hierarchy we reccomend to see the [Doxygen documentation]. Whitout going into implementation details a Protein object is just a container for vectors representing chains. Each vector has 2 elements: the Spacer and the Ligand Set. The Spacer is the container for AminoAcid objects whereas the LigandSet is a container for all other melecules and ions, including DNA/RNA chains. Ultimately all molecules, both in the Spacer and in the LigandSet are collections of Atom objects. The main feature in Biopool is that each AminoAcid object in the Spacer is connected to its neighbours by menas of one rotational vector plus one translational vector. This implementation make ease the modification of the protein structure and lot of functions were implemented to modify/perturbate/transformate the residue relative position in an efficent way. Rotation and Translation vectors:


The object representation look like that:

immagine:SchemeProteinclass.jpg


Victor includes different packages: Biopool, Lobo and Energy. Every package is identified by a direcotry, starting with a capital letter, in the main Victor path. Inside each package you will find the Source folder containing the classes code and the APPS directory including useful utilities. In the main Victor path you will find the bin directory containing most important porgrams simply copied from the APPS folders. In the main path you should also find the data folder containing symbolic links to data files used by singular packages.


Parsing a PDB file (PdbLoader)

Biopool uses the PdbLoader class to load PDB files. By default it loads all standard residues and hetero atoms excluding nucleotides and water molecules. When possible it also tries to place hydrogen atoms to every amino acid included in the spacer and determine the secondary structure with the DSSP algorithm. The simplest way to load a PDB into a Protein object is:

  1.   #include <PdbLoader.h>
  2.   #include <Protein.h>
  3.   #include <iostream>
  4.  
  5.   int main( int argc, char* argv[] ) {
  6.  
  7.      string inputFile = "MyPdbFile.pdb";
  8.      ifstream inFile( inputFile.c_str() );
  9.      PdbLoader pl(inFile);    // creates the PdbLoader object
  10.  
  11.      Protein prot;            
  12.      prot.load( pl );         // creates the Protein object
  13.   }

Modify the structure

Add hydrogen atoms

Get the secondary structure

There are 3 different ways in Victor to get the secondary structure. The first (innacurate) is just parsing the HELIX and SHEET fields in the PDB file. The second method is to infer the secondary structure from torsional angles. The last choice is to use an implementation of the DSSP algorithm, consider that you can find little (negligible) differences compared to the original algorithm but it is the most accurate way to calculate the secondary structure.

Lobo

Energy