Talk:Dihedral angle

message: The red arrows in the figures on this page are misleading. As vectors, the arrows should be on the opposite end. -- JackSnoeyink 04:00, 18 April 2007 (UTC)
thread_title: Untitled

message: As well as being longer and more complex than the method given below it the algorithm can fail with a divide by zero error, if the 'arbitrary vector' is such that either Va or Vb is zero. The way to avoid that is put the whole thing in a while loop until the product of their magnitudes is non-zero, but that would make it even less clear. And even if not exactly zero it can be very inaccurate for vectors close to zero, due rounding errors. I.e. it's a generally poor algorithm.
Any objections to removing it and tidying up the cross product approach ?--JohnBlackburnewordsdeeds 10:54, 6 March 2010 (UTC)
replies: text: This seems to be the sort of thing that would be better explained in plain words (preferably with a picture) than with code.  At any rate, it is distilled in the observation that in order to find a normal vector, one can take a basis of tangent vectors to the plane, and apply Gram-Schmidt to any extension of this basis to a basis of the Euclidean space.  The relevant implementation details would be in the Gram-Schmidt algorithm itself, and the selection of the vector that completes the bases.  This has the advantage over the cross product approach because it works in any dimension.  The pseudocode itself is so problematic that it should be removed immediately.  I was going to comment more about this, but I think the issues are sufficiently obvious and numerous that they will not escape detection. Sławomir Biały (talk) 12:19, 7 March 2010 (UTC)
replies: text: I've gone ahead and taken a shot at writing out the more serious problems with the section.  Please feel free to expand on this! Sławomir Biały (talk) 12:59, 7 March 2010 (UTC)
thread_title:  Problems with first algorithm 

message: Looks like the Phi dihedral angle is drawn incorrectly (it should be counted in the opposite direction).  — Preceding unsigned comment added by 147.173.212.105 (talk) 10:30, 1 February 2013 (UTC)
thread_title:  Problem with the Figure 4: The backbone dihedral angles of proteins. 

message: The formula
 
\varphi = \operatorname{atan2} \left( |[\mathbf{b}_1 \times \mathbf{b}_2]\times [\mathbf{b}_2 \times \mathbf{b}_3]|, [\mathbf{b}_1 \times \mathbf{b}_2] \cdot [\mathbf{b}_2 \times \mathbf{b}_3] \right),
does not give correct results because the first argument is always positive.  Using this formula, \varphi  is always positive.  I believe that the correct formula is 
 
\varphi = \operatorname{atan2} \left( \left([\mathbf{b}_1 \times \mathbf{b}_2]\times [\mathbf{b}_2 \times \mathbf{b}_3]\right) \cdot \frac{\mathbf{b}_2}{|\mathbf{b}_2|}, [\mathbf{b}_1 \times \mathbf{b}_2] \cdot [\mathbf{b}_2 \times \mathbf{b}_3] \right).
As a citation, I propose formulae (3) and (4) in Blondel and Karplus, 1995 (DOI: 10.1002/(SICI)1096-987X(19960715)17:9<1132::AID-JCC5>3.0.CO;2-T).  The above formula is a slight manipulation of the sin and cos formulae cited.  — Preceding unsigned comment added by John Jumper (talk • contribs) 03:52, 1 November 2013 (UTC)
replies: text: I'm not sure. A dihedral angle, defined as the angle between two planes should be between 0 and 180 degrees, so atan2(abs(y),x) should work fine. I don't know under what conditions you want the answer as >180. Perhaps the intro should say the angle is between 0 and 180? Tom Ruen (talk) 06:56, 2 November 2013 (UTC)
replies: text:  If you define the dihedral angle between two planes as the angle you need to rotate the first plane so the normals are parallel and unidirectional, then the angle might be more than 180 (or, more elegantly, between -180 and 180). This is exactly the definition used in biochemistry to report covalent bond torsion angles. --RasF (talk) 12:02, 8 November 2013 (UTC)

text: I apologize for the late reply.  As used in biochemistry, dihedral angle really refers to the angle between the vectors r2->r1 and r3->r4, after both vectors have been projected onto the plane whose normal is given by the vector r2->r3.  Since this angle is in the plane, it is defined on [-180,180].  As an example of the use of this definition, see Ramachandran plot, noting that both axes on the figures are on [-180,180].  From a more mathematical perspective, the dihedral angle defined on (-180,180) is a continuous function of the 4 points, so long as 3 consecutive points are not collinear.  Reversing the order of the points negates the dihedral angle.  At the very least, I would note the difference in convention (I started this edit because I copied this formula into a piece of code where I expected the biochemistry definition and wasted an hour tracking down the bug).  That the biochemist follow the signed dihedral convention is documented by the Blondel and Karplus paper from 1995. John Jumper (talk) 08:56, 20 November 2013 (UTC)

text: I also just implemented a small script with a Computational Chemistry background for which I needed the dihedral angle. And I can confirm that the current atan2()-formula did not work the way I needed. The replacement suggested here worked fine. (Tobias) 10:05, 25 November 2013 (UTC)
thread_title:  atan2 formula does not give the correct sign in some cases 

message: 3D:
*{3,3}: 70°32′ = arcsec(3)
*{3,4}: 109°28′ = π − arcsec(3)
*{4,3}: 90° = π/2
*{3,5}: 138°11′ = π − arcsin(2/3)
*{5,3): 116°34′ = π − arctan(2)
*{5/2,5}: 116°34′ = π − arctan(2)
*{5,5/2}: 63°26′ = arctan(2)
*{5/2,3}: 63°26′ = arctan(2)
*{3,5/2}: 41°49′ = arcsin(2/3)
4D:
*{3,3,3}: 75°31′ = arcsec(4)
*{3,3,4}: 120° = 2π/3
*{4,3,3}: 90° = π/2
*{3,4,3}: 120° = 2π/3
*{3,3,5}: 164°29′ = 4π/3 − arcsec(4)
*{5,3,3}: 144° = 4π/5
*{5/2,5,3}: 144° = 4π/5
*{3,5,5/2}: 120° = 2π/3
*{5,5/2,5}: 144° = 4π/5
*{5/2,3,5}: 144° = 4π/5
*{5,3,5/2}: 72° = 2π/5
*{5/2,5,5/2}: 72° = 2π/5
*{3,5/2,5}: 120° = 2π/3
*{5,5/2,3}: 72° = 2π/5
*{5/2,3,3}: 72° = 2π/5
*{3,3,5/2}: 44°29′ = 2π/3 − arcsec(4)
nD:
*αn (n-simplex): arcsec(n)
*βn (n-orthoplex): π − 2 arccsc(√n)
*γn (n-cube): 90° = π/2
Ref: Coxeter, Regular Polytopes (3rd ed.), pp.292–5. Double sharp (talk) 20:49, 16 March 2015 (UTC)
thread_title:  Dihedral angles of the regular polytopes 

message: I have commented out this section as it is, in my opinion, rubbish. The very name dihedral implies two planes. See polyhedron for related etymology. 
Original text:
:An "improper" dihedral angle is a similar geometric analysis of four atoms, but typically involves a central atom with three others attached to it rather than the standard arrangement of all four of them bonded sequentially each to the next. One of the vectors is the bond from the central atom to one of its attachments. The other two vectors are pairs of the attachments, and thus together represent the plane of the attachments. Improper dihedral angles are useful for analyzing the planarity of the central atom: as the angle deviates from zero, the central atom moves out of the plane defined by the three attached to it.CHARMM parmfile.doc definition of "IMPH" energy parameter
User:Petergans|Petergans]] (talk) 11:02, 3 November 2015 (UTC)
thread_title:  Improper dihedral angle 

message: IUPAC definition of a torsion angle
In the Compendium of Chemical Terminology (IUPAC Gold Book) from the  International Union of Pure and Applied Chemistry (IUPAC) a torsion angle is  defined as:
In a chain of atoms A-B-C-D, the dihedral angle between the plane containing the atoms A,B,C and that containing B,C,D. In a Newman projection the torsion angle is the angle (having an absolute value between 0° and 180°) between bonds to two specified (fiducial) groups, one from the atom nearer (proximal) to the observer and the other from the further (distal) atom. 	 
The torsion angle between groups A and D is then considered to be positive if the bond A-B is rotated in a clockwise direction through less than 180° in order that it may eclipse the bond C-D: a negative torsion angle requires rotation in the opposite sense. 
	 
Stereochemical arrangements corresponding to torsion angles between 0° and ±90° are called syn (s), those corresponding to torsion angles between ±90° and 180° anti (a). 
	
Similarly, arrangements corresponding to torsion angles between 30° and 150° or between -30° and -150° are called clinal (c) and those between 0° and 30° or 150° and 180° are called periplanar (p).
	 
 
The two types of terms can be combined so as to define four ranges of torsion angle:
*  0° to 30° synperiplanar (sp); 
* 30° to 90° and -30° to -90° synclinal (sc);
* 90° to 150°, and -90° to -150° anticlinal (ac); 
* ±150° to 180° antiperiplanar (ap).
The synperiplanar conformation is also known as the syn- or cis-conformation; antiperiplanar as anti or trans and synclinal as gauche or skew.
For macromolecular usage the symbols T, C, G+, G-, A+ and A- are recommended (ap, sp, +sc, -sc, +ac and -ac respectively).
I have removed the reinstatements (above) by User:WillemienH for two reasons:
* The definition is unsourced. The links are to Wikipedia. The correct link to the Gold book definition is included in the definition at  Dihedral angle#Dihedral angles in stereochemistry.
*The remaining part of the deletion was a mere repetition of the text at Dihedral angle#Dihedral angles in stereochemistry.
Petergans (talk) 10:20, 5 November 2015 (UTC)
replies: text: Not sure what you mean by unsourced. There was a link to --> GoldBookRef|title=torsion angle|file=T06406| accessdate = 2015-10-25 <-- where it is comming from. Torsion angle does redirect to this page. My problem is more that the description dihedral angle#Dihedral angles of four atoms, the IUPAC definition and the dihedral angle#Angle between three vectors all differ subtely. While in general they will give similar results, directions and instructions differ.WillemienH (talk) 09:36, 6 November 2015 (UTC)
replies: text: There is an issue of semantics. To me the name "dihedral" means the angle between two (gk. di) planes (gk. hedra). I think that the three vector approach was used historically to obtain the dihrdral angle between two adjaced faces of polyhedra. I'm not sure about it as I have not been able find a source for verification. If you can source it, please feel free to re-instate in the section on polyhedra. Petergans (talk) 12:05, 15 November 2015 (UTC)
thread_title:  IUPAC definition