Hi,

I try to find out how to apply a rotation matrix to the model with jmol. I have 
a matrix to be applied to coordinates this way:
matrix [[a1,b1,c1],[a2,b2,c2],[a3,b3,c3]]
xnew=a1*x+b1*y+c1*z, ynew=a2*x+b2*y+c2*z etc

It looks like I need just to do $ rotate selected @matrix. But it works for one 
matrix and doesn't with another (I've checked with manually multiplied 
coordinates). Then I decided to check how does jmol rotate coordinates with 
matrix and found that in one case transformation equal to matrix, and in 
other not. The same, as for my models.

Is it a bug, or a feature, and how can I get rotation for the second matrix?


$ show transform
transform:
[
   [1.0 0.0     0.0]
   [0.0 1.0     0.0]
   [0.0 0.0     1.0] ]
$ show rot
rot = [
   [0.0444209   -0.23927301     0.969936]
   [0.0448276   -0.969439       -0.24120401]
   [0.998007    0.0541943       -0.0323373] ]
$ rotate @rot
$ show transform
transform:
[
   [0.044420823 -0.23927324     0.9699356]
   [0.044827897 -0.9694386      -0.24120365]
   [0.99800664  0.05419464      -0.032337148] ]

... rotate back

$ show transform
transform:
[
   [1.0 0.0     0.0]
   [0.0 1.0     0.0]
   [0.0 0.0     1.0] ]
$ show rot2
rot2 = [
   [-0.430167   -0.38484102     0.816611]
   [0.693676    -0.719811       0.0261867]
   [-0.57772803 -0.57772905     -0.57659] ]
$ rotate @rot2
$ show transform
transform:
[
   [0.9202282   0.35561728      0.16345158]
   [0.2475827   -0.85237557     0.46060684]
   [0.3031219   -0.3833956      -0.8724247] ]

Thanks, Nick

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to