CODE FOR VECTOR ALGEBRA DIHEDRAL ANGLE CALCULATION
4 次查看(过去 30 天)
显示 更早的评论
I have calculated the dihedral angle (phi, psi of am amino acid in a protein) using following steps. Coordinates (X,Y,Z) of four atoms are given.
Let the four points (atoms) be a,b,c,d.
STEP 1: Calculation of vectors:
p = b - a q = c - b r = d - c
STEP 2: To find normal to the planes:
n1 = p X q n2 = q X r
(theta) = cos inverse [ (n1.n2) / n1.|n2| ]
I am getting the numerical value correct , but the sign is different. Where have I be wrong ?
回答(1 个)
Roger Stafford
2013-8-6
Your notation "(n1.n2) / n1.|n2|" is confusing. If by this you mean the dot product of n1 and n2 divided by the product of their norms, you should get the correct answer for theta. I don't see how you can possibly get the wrong sign for it since the principal values of the inverse cosine are understood to lie between 0 and pi radians and are therefore all positive.
I assume the dihedral angle you are seeking is that defined by the two half planes which contain atom a and d respectively with the line bc as their intersection. The other possible dihedral angle would be the supplement of this angle, but either angle would be positive.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear Algebra 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!