This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Angle Phi, Psi In Python

I need to calculate phi an psi angle from atom coordinates of a pdb file. Unfortunately I can only use python and R without any library. So I have to find the formula and to create a fonction.

But it's the problem... Find a formula for dihedral angle.

I completely understand what is phi, psi and which atoms is involved.

Thanks for all you answer.

alt text

protein homework

4 answers

hint: first you find the normal to a plane. this will give you two lines (one for each plane). You then calculate the angle between the two lines.

try an example here: http://members.tripod.com/vector_applications/angle_between_two_planes/

Thank you for your answer. I added a schema to show my problem. Phi and psi show the angle of the two different peptide plane according to c-alpha. Phi is the angle which give the torsion of the plan (C'=0) according to Calpha and Psi is the angle which give how the peptide plan with N- according to Calpha. I have my atom coordinates but I really don't know which atom I need, which plan I have to use... I understand the biological mecanism but no idea about mathematical.... completely lost!

Angle, each backbone torsion angle (phi or psi) is defined by four atoms. Phi atoms are N'-N-Ca-C; Psi atoms are N-Ca-C-N'. Phi is an angle between two planes, first plane is defined by atomic coordinates of first three atoms N'-N-Ca; second plane is defined by atomic coordinate last three atoms N-Ca-C. now that you have two planes find out a normal vector for each plane, and then find the angle between the two vectors. Hope this helps. another good webpage with visual representation of what you're planning to do is this one: http://www.bmb.uga.edu/wampler/tutorial/prot2.html

hope this he

Thank you, this helped me a lot. And now I have my function which is able to calculate my phi and psi angles :)

you can recur to "get_dihedral" from pymol

Common Python libs for structural bioinformatics provide means to do such calculations in pdb files, beside lots of other useful ones such as Chi-angle calculation, nearest neighbor searches in atom space etc. Take a look at e.g. the PDB module in Biopython. Other good libs are mmLib, Biskit to name just a few.

I've written a Python framework, in a single script, called Artemis to allow users to iterate over Brookhaven PDB records. It also computes torsional angles for residues in each chain:

Please cite: https://pure.royalholloway.ac.uk/portal/en/publications/artemis--python-library-for-readingwriting-pdb-files-and-computing-dihedral-angles(a3ad280a-35b9-4fe1-9545-9f24d6825702).html

The GItHub code is here: https://github.com/jamie-alnasir/artemis

Best, Jamie

Log in to answer this question.