Thanks to all for replying...I also got checked it with VADAR server...also with DSSP(dictionary of secondary stryucture of proteins)..
Hi all...can anybody please give me perl or python script to calculate phi,psi angles from a pdb file? otherwise if u can provide a link which explains how to write such a script ? also any server which calculates phi,psi values will also be helpful....
4 answers
From http://www2.warwick.ac.uk/fac/sci/moac/students/peter_cock/python/ramachandran/calculate/
The are at least three python libraries which can be used to load PDB files and calculate the protein backbone's φ/ψ angles:
Konrad Hinsen's Molecular Modelling Toolkit (MMTK). Fussy about loading certain flawed PDB files, but getting phi and psi is very easy.
Thomas Hamelryck's Bio.PDB module in BioPython. Tolerant of odd PDB files, making it a safer bet.
Python Macromolecular Library (mmLib). Might be worth a look - but I haven't had time.
Provided your PDB files has nothing to funny in it, then I think using MMTK is the easiest way to get protein backbone deihedral angles in python. However, as Bio.PDB is much more tolerant of real world PDB files, it is a better choice for "data mining" tasks like calculating Ramachandran angles.
The page goes on to give code examples of the three options.
The WHAT IF server calculates torsion angles (click the Protein Analysis link) and a whole lot more.
As mentioned above, many packages can do this job. (Biopython, Bioperl , Biojava, Bio3D, MMTK, Pymol, VMD, Chimera, YASARA, etc., ) and - the popular secondary structure calculation tools namely DSSP & Stride outputs phi/psi angles.
There is also a well established, fast code written in C, called torsions.c
Another good program called Dangle, a java-code also provides this along with the other torsion angles including side chain torsions (chi1, chi2, chi3 etc., ) - this is from Richardson's lab who has created MolProbity (that extensively checks the goodness of a protein structure based on allowed regions in Ramachandran space & clashes etc.,)
PRODY, a very good package developed in the past 2-3 years (since the previous posting & answers) also does this phi/psi calculation well.
Another tool, part of the pdb-tools package available on Google Code, also has a python script for this calculation!
I have written a python script to compute torsional angles which is shared on my GitHub here: https://github.com/jamie-alnasir/artemis/blob/master/Artemis.py
Alternatively, if you prefer a visual tool, my molecular viewer Zeus (for Windows) is able to load quite a few molecular file formats and compute torsional angles on PDB structures: http://www.al-nasir.com/portfolio/zeus/
Log in to answer this question.
There is also an option to call R from Python/Perl, then you can get tremendous advantages of wide range of R package, Regarding your question you can look at Bio3d package