# Why does it require 4 vectors to calculate a torsion angle?

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?

• You say you need two planes and that you can describe each plane with three points. That's 6 points total, which in three-dimensional space require 18 coordinates. Four vectors require only 12 coordinates. What is there to complain about?
– David K
Oct 10, 2021 at 21:12
• If you want to check out the actual source code to clarify this further see docs.python.org/3/library/inspect.html#inspect.getsource —a handy function in a great package. Oct 11, 2021 at 8:44
• Vector spaces include the origin, by definition. The origin supplies two of the six points need to define the two planes.
– merv
Oct 12, 2021 at 17:56

From wikipedia 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"

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$$.

• Could you be kind enough to add a picture/diagram? Oct 11, 2021 at 12:01