CODE FOR VECTOR ALGEBRA DIHEDRAL ANGLE CALCULATION
조회 수: 3 (최근 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!