Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## Re: [PyMOL] euler-rod axis

 Re: [PyMOL] euler-rod axis From: Thomas Holder - 2011-07-24 17:14:56 ```Hi jpd, > from the get_object_matrix output, > i can use the euler-rodrigues transformation > http://en.wikipedia.org/wiki/Euler%E2%80%93Rodrigues_formula > and get the axis and angle of rotation. > > is there a way to place the axis? if I understand you correct, you are looking for the translation T so that for object matrix M it yields: M = T * R * T^-1 With python (and numpy): from numpy import reshape, linalg, identity M = cmd.get_object_matrix(object_name) M = reshape(M, (4,4)) t = linalg.solve(identity(3) - M[0:3,0:3], M[0:3,3]) see if this is correct: from numpy import identity, matrix R = identity(4) T = identity(4) R[0:3,0:3] = M[0:3,0:3] T[0:3,3] = t # should print two times the same matrix print M print matrix(T) * matrix(R) * matrix(T).I Hope that helps. Cheers, Thomas -- Thomas Holder MPI for Developmental Biology Spemannstr. 35 D-72076 Tübingen ```

 [PyMOL] Performance Tips From: Jason Vertrees - 2011-07-20 21:49:19 ```Greetings PyMOLers, Ongoing work into PyMOL's graphics engine has given us time to test and learn a few things about performance. If you're a hard-core PyMOL user or you need to get every last frame-per-second out of PyMOL, try loading a large session and tweaking the following settings to check for improved rendering speed. The settings we've seen large differences with are: * set texture_fonts * set use_display_lists * set sphere_mode, 5 * set async_builds # uses all N-processors for geometry calculations * set defer_builds_mode, 3 # this is the best for large trajectories Check out the "cache" command if you work frequently with surfaces. If you're using an ATI card, then PyMOL might be turning off line smoothing, making lines look bad. So, please try setting "line_smooth". Here's a little code to get you started with testing speed using the various settings: # turn on the frames per second indicator in the # lower right hand corner of the screen set show_frame_rate # load a massive structure fetch 2qzv, type=pdb1, async=0 # re-create the biological entry split_states 2qzv # remove the original delete 2qzv # show as cartoons as cartoons # center and orient the view orient This scene has 355,392 atoms! Now, as you rotate the object about you can see in the lower right-hand corner a frame rate in Hz. Note the frame rate as you rotate the scene. Now, type, set use_display_lists give PyMOL a second to update and then try rotating the scene again. Put the faster setting in your .pymolrc. Try the other settings, too. Last, if you're running two monitors, some video cards show an affinity for a monitor (most likely the display port). On my current setup, the left monitor renders the above scene as cartoons at 23 Hz on the left screen and 12 Hz on the right (but only when display_lists are turned on). If you find a combination that gets you a significant boost in rendering speeds, feel free to share. Hope this helps. Cheers, -- Jason -- Jason Vertrees, PhD PyMOL Product Manager Schrodinger, LLC (e) Jason.Vertrees@... (o) +1 (603) 374-7120 ```
 [PyMOL] euler-rod axis From: jp d - 2011-07-22 16:18:35 Attachments: Message as HTML ```hi, from the get_object_matrix output, i can use the euler-rodrigues transformation http://en.wikipedia.org/wiki/Euler%E2%80%93Rodrigues_formula and get the axis and angle of rotation. is there a way to place the axis? perhaps from the translation vector in the matrix? thanks jpd```
 Re: [PyMOL] euler-rod axis From: Thomas Holder - 2011-07-24 17:14:56 ```Hi jpd, > from the get_object_matrix output, > i can use the euler-rodrigues transformation > http://en.wikipedia.org/wiki/Euler%E2%80%93Rodrigues_formula > and get the axis and angle of rotation. > > is there a way to place the axis? if I understand you correct, you are looking for the translation T so that for object matrix M it yields: M = T * R * T^-1 With python (and numpy): from numpy import reshape, linalg, identity M = cmd.get_object_matrix(object_name) M = reshape(M, (4,4)) t = linalg.solve(identity(3) - M[0:3,0:3], M[0:3,3]) see if this is correct: from numpy import identity, matrix R = identity(4) T = identity(4) R[0:3,0:3] = M[0:3,0:3] T[0:3,3] = t # should print two times the same matrix print M print matrix(T) * matrix(R) * matrix(T).I Hope that helps. Cheers, Thomas -- Thomas Holder MPI for Developmental Biology Spemannstr. 35 D-72076 Tübingen ```