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.
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
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!
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:
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 :)
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!