http://www.stolaf.edu/people/hansonr/jmol/test/json/spin.htm

illustrates several new capabilities in the prototype:

#drawing a line between two specific atoms, extending a bit on both sides:
draw line1 150 (atomno=1) (atomno=2);color draw yellow

#drawing a line though the center of that first line and a third atom:
draw line2 350 [line1] (atomno=3);color draw white

#spinning around a line:
set spin [line1] 30;spin on

#spinning around a line fixed in space:
draw line2 [-2. 0. 0.] [0. 2. 0.];
set spin [line2] 30;spin on

#rotating about a line:
spin off;rotate [line2] 10;

#lines in animations follow the atoms in the frames:
load cyclohexane_movie.xyz;draw line1 250 (atomno=2) (atomno=5);draw line2 200 (atomno=4 or atomno=3) (atomno=1 or atomno=6);


The big difference in these spin operations is that instead of spinning around the APPLET x, y, and z, these operations spin around the model's coordinates, so if spinning is on and you drag the model with the mouse, it continues spinning around the same internally referenced axis. It's actually more natural than what Jmol and Chime do otherwise. Try it, you will see what I am talking about.


There may be a bit of unexpected behavior here; at the end of spinning, the model jumps to its former rotation center, and in rotating it centers the line prior to the rotation. If I can figure out how to have it not do that, I will add changes so that it does a smooth rotation with no other positional change. But that's a bit tricky, because it has to revise the rotation center as it goes. We'll see. It's probably easy to do; I just can't think right now how to do it.

Bob Hanson





-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to