There's a bit more to it. In the pymol view, the camera is located at the origin, so to rotate your coordinates you first have to move the center to the origin, do the rotation and move the thing back. I've scripted this in Povray. If you're interested, I can send you the script. You can then rescript it in python or you can output your scene to povray and do the rest there.
In addition (although you may already know this), the meaning of all elements of the result of get_view (python index) is
0:9 - rotation matrix
9:12 - camera position
12:15 - origin of rotation
15:17 - slab near and far
17 - orthoscopic flag
On 4/25/06, Terry Jones <firstname.lastname@example.org> wrote:
I wrote a pymol plugin that produces a bunch of cgo. The images I generate
have a cube drawn around them.
I've been asked if it's possible to allow the user to initially rotate the
image to their heart's content and then have the plugin draw the
surrounding cube. I.e., once the image is rotated, the cube will be drawn
in a way that always looks good to the viewer, not at some random angle. In
other words, the cube will always have the same orientation, no matter how
much the image has been rotated before the cube is drawn.
OK, having said the same thing 3 times, and hopefully made sense at least
once, I'll say something new...
I imagine this can be done easily enough. I guess I should be able to call
get_view and get the current rotation matrix (elements 0-8 of the returned
list) and apply this to all points that I plan to draw between when making
My questions: Is this right? Do I need to do anything more than just
multiply the old point by the rotation matrix? What's the easiest way to do
this in Pymol or Python, or should I just code it (it's very simple after
all). And, of course, is there a better way to do what I want?
Thanks for any help. Don't assume I know what I'm doing, because I probably
don't. So the more details, the better.
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
PyMOL-users mailing list
Tsjerk A. Wassenaar, M.Sc.
Groningen Biomolecular Sciences and Biotechnology Institute (GBB)
Dept. of Biophysical Chemistry
University of Groningen
9747AG Groningen, The Netherlands
+31 50 363 4336