



















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The concept of rotation and translation in bioinformatics 2, focusing on least-squares superposition and the calculation of rotation matrices when moving the mouse to rotate a molecule. It covers the mathematical formulas for rotation angles, new atom coordinates, and the sum of angles formula.
Typology: Study notes
1 / 27
This page cannot be seen from the preview
Don't miss anything!




















Rotation and translation
Least-squares superposition
Mouse sends mouse
coordinates (Δx,Δy) to the
running program
Rotation angles are calculated:
θ x
= Δx*scale, θ y
= Δy*scale
Rotation matrices are calculated:
x
R =
0 cos! x
" sin! x
0 sin! x
cos! x
R =
y
y
y
y
2.
1.
3.
y
x
Rotation is angular addition
β
x
r
α
(x,y)
(x’,y’)
y
axis of
rotation =
Cartesian
origin
atom starts at
(x=| r| cosα, y=| r| sinα)
..rotates to...
(x'=| r| cos(α+β), y'=| r| sin(α+β))
Convention: angles are measured counter-clockwise.
cos (α+β) = cos α cos β − sin α sin β
sin (α+β) = sin α cos β + sin β cos α
A rotation around a principle axis
The Z coordinate stays the same. X and Y change.
cos! " sin! 0
sin! cos! 0
0 0 1
$
%
%
%
&
'
(
(
(
R
=
cos! 0 sin!
0 1 0
" sin! 0 cos!
$
%
%
%
&
'
(
(
(
1 0 0
0 cos! " sin!
0 sin! cos!
$
%
%
%
&
'
(
(
(
The Y coordinate stays the same. X and Z change.
The X coordinate stays the same. Y and Z change.
R
=
R
=
Is the product of 2D rotation matrices.
cos! " sin! 0
sin! cos! 0
0 0 1
$
%
%
%
&
'
(
(
(
cos ) 0 " sin )
0 1 0
sin ) 0 cos )
$
%
%
%
&
'
(
(
(
=
cos! cos ) " sin! cos!
sin! cos ) cos! "sin! sin )
sin ) 0 cos )
$
%
%
%
&
'
(
(
(
Rotation around z-axis
Rotation around y-axis 3D rotation
Rotating in opposite order gives a different matrix
x
R
y
R =
0 cos! x
" sin! x
0 sin! x
cos! x
cos! y
0 "sin! y
sin! y
0 cos! y
cos! y
0 " sin! y
" sin! x
sin! y
cos! x
" sin! x
cos! y
sin! y
cos! x
sin! x
cos! x
cos! y
Reversing the rotation
x '
y '
cos ' sin '
( sin ' cos '
x
y
For the opposite rotation, flip the matrix.
The inverse matrix = The transposed matrix.
cos! sin!
" sin! cos!
$
% %
&
'
( (
cos! " sin!
sin! cos!
$
% %
&
'
( (
=
1 0
0 1
$
%
&
'
(
A B
C D
!
"
$
%
& &
T
=
A C
B D
!
"
$
%
& &
This is the “transpose”
NOTE: cosb cosb + sinb sinb = 1
x
y
0! 1 0
z
z
x
y
y
z
x
90° rotation around
X
Y
Z
For a R-handed rotation, the - sine is up and to the right of the + sine.
Helpful hint:
(x,y,z) = (1., 4., 7.)
Rotate this point by 90° around the Z-axis
Then...
Rotate the new point by 90° around the Y-axis.
What are the new coordinates?
z = north pole
x = prime meridean
@ equator
y
ψ
φ
κ
Rotation of κ degrees around an axis axis
located at φ degrees longitude and ψ degrees
latitude
Special properties of rotation matrices
Read more about rotation matrices at:
http://mathworld.wolfram.com/RotationMatrix.html
T
pseudo-pseudocode program for computing rmsd
sum = 0
N = 0
while {
/** Read coordinates for two aligned positions.
read (x 1
,y 1
,z 1
) , (x 2
,y 2
,z 2
)
/** Compute the distance
2
d =(x 1
-x 2
)
2 +(y 1
-y 2
)
2 +(z 1
-z 2
)
2
/** sum it.
sum = sum + d
/** keep track of how many pairs there are.
N = N + 1
}
/** Average and take square root.
rmsd = sqrt(sum/N)
i
i
2
i
Problem: find the rotation matrix, M, and a vector, v,
that minimize the following quantity:
Where x i
are the coordinates from one molecule and
y i
are the equivalent* coordinates from another molecule.