{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# lecture4 - Bioinformatics 2 lecture 4 Rotation and...

This preview shows pages 1–11. Sign up to view the full content.

Bioinformatics 2 -- lecture 4 Rotation and superposition Structure-based alignment

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
What happens when you move the mouse to rotate a molecule? 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 = 1 0 0 0 cos θ x sin x 0 sin x cos x y R = cos y 0 sin y 0 1 0 sin y 0 cos y 2. 1. 3. y x
What happens when you move the mouse (cont'd): New atom coordinates are calculated v r ' = y R x R v r The scene is rendered using the new coordinates. 5. 4. All of this happens in a fraction of a second.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
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.
Sum of angles formuli cos ( α + β ) = cos α cos β sin α sin β sin ( α + β ) = sin α cos β + sin β cos α

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
A rotation matrix β x y r α (x,y) (x’,y’) x' = |r| cos ( α + β ) = |r|(cos α cos β sin α sin β ) = (|r| cos α ) cos β ( |r| sin α ) sin β = x cos β y sin β y' = |r| sin ( α + β ) = |r|(sin α cos β + sin β cos α ) = (|r| sin α ) cos β + ( |r| cos α ) sin β = y cos β + x sin β x = |r|cos α y = |r|sin α x ' y ' = cos β sin sin cos r cos α r sin = cos sin sin cos x y rotation matrix is the same for any r , any α .
Principal axis rotations The Z coordinate stays the same. X and Y change. cos β sin 0 sin cos 0 0 0 1 R z = 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 y = R x =

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Rotation around two principal axes 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
multiplication order matters. 1 0 0 0 cos θ x sin x 0 sin x cos x y R x R = cos y 0 sin y 0 1 0 sin y 0 cos y = cos y sin x sin y sin y cos x 0 cos x sin x sin y sin x cos y cos x cos y This is the matrix if the X-rotation is Frst, then the Y-rotation.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Rotating in opposite order gives a different matrix x R y R = 1 0 0 0 cos θ x