Miguel wrote:
Jaime wrote:
As long as Jmol knows internally the coordinates and position for every element, it should be possible for Jmol, by receiving the info on "TYR 97, Chain A, Model 1", to rotate the model if needed and to locate, in the center of the applet, the residue pointing to the user.
Is there something like this available? If not, can you add this command to Jmol?
I have done some initial implementation work on Jmol features to rotate the molecular model to a specified position, regardless of the starting point.
You need to check out the current CVS source v10pre13d in order to get this functionality.
I have implemented a few commands that work together to allow this. The geometric concept of an axisAngle may be a little difficult to grasp, but here is my short version:
An axisAngle represents an arbitrary rotation in 3D. 3 cartesian coordinates (x, y, z) define a vector. The angle is a right-handed rotation about that axis.
The command:
show axisAngle
will show the current axisAngle rotation of the molecular model.
I seem to be missing something. Don't you need more information to define a view? I have the vector, I see that -- that's the orientation. But how one moves to that vector would determine the rotation angle, wouldn't it? Maybe there's a standard. For example, if I have (0,1,0) for the vector, I presume I am looking at the model from the "top" (bottom?). But how I got there would depend upon orders of operations. No? Is (0,0,1,0) the default view? What would (0,0,0,0) mean then?
Bob
The command
moveTo {xAxis} {yAxis} {zAxis} {degrees} {seconds}
will rotate the model from its current position to the specified axisAngle.
So, start the Jmol application and open the script window using File -> Script ...
load a molecule.
the command 'show axisAngle' reports '0 0 0 0' because there has been no rotation.
Terrific!
This is to the message callback function, I presume?
Type 'moveto 1 2 3 45 2' and you will see it move to the axisAngle (1, 2, 3, 45) over 5 seconds.
Or 2 seconds....
type 'moveto 0 0 0 0' and you will see the molecule return to the home position. In this case the {seconds} parameter was specified, so it defaults to 1 second.
Now, use the mouse to rotate the molecule. Type 'show axisangle' and it will show you the current rotation. I will refer to these values as {your-*}
type 'moveto 0 0 0 0' to return to the home position.
Now, type 'moveto {your-x} {your-y} {your-z} {your-angle}'. You don't need to go to 7 digits of precision ... I plan to truncate them to hundredths anyway.
I still have not gotten the CVS to work on my PC. Can you put the JmolApplet.jar file somewhere I can just access it?
Please try this out and report any bugs.
Still to do:
- Zoom ... I plan to add an optional zoom parameter - Translations ... translations are ugly, but there may be a need.
Jaime later wrote:
Some day this will also tell Jmol to rotate itself the molecule and place the 'hotspot' facing the user.
Jaime, I think this work is a good foundation for the functionality that you want. Please try to use it and tell me what you think.
Another VERY useful aspect of this is that one could save the current view and restore it.
Miguel
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Jmol-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-developers
--
Robert M. Hanson, [EMAIL PROTECTED], 507-646-3107 Professor of Chemistry, St. Olaf College 1520 St. Olaf Ave., Northfield, MN 55057 mailto:[EMAIL PROTECTED] http://www.stolaf.edu/people/hansonr
"Imagination is more important than knowledge." - Albert Einstein
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Jmol-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-developers
