<p>From <a href="https://en.wikipedia.org/wiki/Dihedral_angle" rel="nofollow noreferrer">wikipedia</a> on torsion angles:</p>
<blockquote>
<p>A dihedral angle is the angle between two intersecting planes or half-planes. In chemistry, it is the clockwise angle between half-planes through two sets of three atoms, having two atoms in common.</p>
</blockquote>
<p>Two sets of three with two in common makes four total atoms.</p>
<p>You are defining not one plane but two half-planes or planes.</p>
<p>Wikipedia includes the following as an illustrative image:</p>
<p><a href="https://i.sstatic.net/N5x9R.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/N5x9R.png" alt="Angle between two half-planes (α, β, green) in a third plane (pink) which cuts the line of intersection at right angles
" /></a>
&quot;Angle between two half-planes (α, β, green) in a third plane (pink) which cuts the line of intersection at right angles&quot;</p>
<p>In this image I interpret the atoms to be at the vertices of the planes, e.g. the two atoms that are in common between the two planes are those at the points of intersection of the planes, and the two other atoms extend the planes <span class="math-container">$\alpha$</span> and <span class="math-container">$\beta$</span>.</p>

CC BY-SA 4.0
2021-10-11T12:01:16.280Z
Could you be kind enough to add a picture/diagram?
user366312
CC BY-SA 4.0
2021-10-12T22:40:15.263Z
@user366312 I have added the image from the wikipedia page.
Maximilian Press
CC BY-SA 4.0
2021-10-11T03:54:05.840Z
2021-10-12T22:39:54.313Z
2021-10-12T22:39:54.313Z
Maximilian Press
<p>The BioPython documentation shows the following:</p>
<blockquote>
<p>11.6.3 Measuring torsion angles Use the vector representation of the atomic coordinates, and the calc dihedral function from the Vector module:</p>
<pre><code>&gt;&gt;&gt; vector1 = atom1.get_vector()
&gt;&gt;&gt; vector2 = atom2.get_vector()
&gt;&gt;&gt; vector3 = atom3.get_vector()
&gt;&gt;&gt; vector4 = atom4.get_vector()
&gt;&gt;&gt; angle = calc_dihedral(vector1, vector2, vector3, vector4)
</code></pre>
</blockquote>
<p>We know that a torsion angle between N-C-alpha and C-alpha-C planes.</p>
<p>So, the minimum number of points required to form a plane is 3.</p>
<p>Then, Why does BioPython require 4 vectors?</p>

CC BY-SA 4.0
2021-10-11T08:44:22.703Z
If you want to check out the actual source code to clarify this further see https://docs.python.org/3/library/inspect.html#inspect.getsource —a handy function in a great package.
Matteo Ferla
CC BY-SA 4.0
2021-10-12T17:56:43.860Z
Vector spaces include the origin, by definition. The origin supplies two of the six points need to define the two planes.
merv
<python>
Why does it require 4 vectors to calculate a torsion angle?
# Why does it require 4 vectors to calculate a torsion angle?

(Asked by: username_0 on 2021-10-10)

The BioPython documentation shows the following:

11.6.3 Measuring torsion angles Use the vector representation of the atomic coordinates, and the calc dihedral function from the Vector module:
>>> vector1 = atom1.get_vector()
>>> vector2 = atom2.get_vector()
>>> vector3 = atom3.get_vector()
>>> vector4 = atom4.get_vector()
>>> angle = calc_dihedral(vector1, vector2, vector3, vector4)


We know that a torsion angle between N-C-alpha and C-alpha-C planes.
So, the minimum number of points required to form a plane is 3.
Then, Why does BioPython require 4 vectors?

**Tags:** python
> **Comments:**
> **username_1**: If you want to check out the actual source code to clarify this further see https://docs.python.org/3/library/inspect.html#inspect.getsource —a handy function in a great package.  
> **username_2**: Vector spaces include the origin, by definition. The origin supplies two of the six points need to define the two planes.  

---

## 1 answers

### Answer by username_3 on 2021-10-11. Score: 5 | Accepted answer

From [wikipedia](https://en.wikipedia.org/wiki/Dihedral_angle) on torsion angles:

> A dihedral angle is the angle between two intersecting planes or half-planes. In chemistry, it is the clockwise angle between half-planes through two sets of three atoms, having two atoms in common.

Two sets of three with two in common makes four total atoms.

You are defining not one plane but two half-planes or planes.

Wikipedia includes the following as an illustrative image:

[![Angle between two half-planes (α, β, green) in a third plane (pink) which cuts the line of intersection at right angles
](https://i.sstatic.net/N5x9R.png)](https://i.sstatic.net/N5x9R.png)
"Angle between two half-planes (α, β, green) in a third plane (pink) which cuts the line of intersection at right angles"

In this image I interpret the atoms to be at the vertices of the planes, e.g. the two atoms that are in common between the two planes are those at the points of intersection of the planes, and the two other atoms extend the planes $\alpha$ and $\beta$.

> **Comments:**
> **username_0**: Could you be kind enough to add a picture/diagram?  
> **username_3**: @user366312 I have added the image from the wikipedia page.  

---

