On 25/05/11 19:41, Hena Dutta wrote:
Dear Members,
I want to know the mathematical relations between 2 sets of co-ordinates, one before and one after the rotation. I used COOT to rotate the side chain (containing atoms N1, C2, N3, C4, C5, C6, N6, N7 and C8) of Adenine by 180 degree about the glycosidic bond (C1’-N9). How the initial co-ordinates (Xi, Yi, Zi) and final co-ordinates (Xf, Yf, Zf) are mathematically related? I shall be very grateful if someone can tell me the equations.
I got it from the matrix from the Amore documentation. Coord_orth rotate_round_vector(direction, // vector of the bond about which we are rotating position, // of the moving atom origin_shift, // typically the position of the B atom (e.g. N9) angle) { unit_vec = direction.unit(); l = unit_vec[0]; m = unit_vec[1]; n = unit_vec[2]; ll = l*l; mm = m*m; nn = n*n; cosk = cos(angle); sink = sin(angle); I_cosk = 1.0 - cosk; // The Rotation matrix angle w about vector with direction cosines l,m,n. // // ( l**2+(m**2+n**2)cos k lm(1-cos k)-nsin k nl(1-cos k)+msin k ) // ( lm(1-cos k)+nsin k m**2+(l**2+n**2)cos k mn(1-cos k)-lsin k ) // ( nl(1-cos k)-msin k mn(1-cos k)+lsin k n*2+(l**2+m**2)cos k ) // // Thanks for that pointer EJD :). Paul.