augment mousemode center with cofr centerofview; alter animation frames

Hi, I find the mousemode center function very useful when navigating around a model. One of the features I loved about the original Chimera. Would it be possible to have the option to augment it with a cofr centerofview feature so that the pivotpoint then follows subsequent translation? Also, would it be possible to define a custom number of frames over which the animation occurs? Cheers, Yang

Hi Yang, The ChimeraX centering mouse mode already sets the pivot point on the clicked atom in addition to moving it to the center of view. And if you translate the molecule the pivot point stays with the atom. You can assign this mode to the right mouse button with mouse right center You might prefer the "center or translate" mode which centers if you click an atom, but also allows you to translate the model by pressing and dragging. mouse right "center or translate" Get the ChimeraX 1.7 release candidate or daily build for these centering modes since they were added after the 1.6 release. When you click an atom and it centers it in the view in animates the motion over 10 frames. Normal display rate is 60 frames/second so it moves in 1/6 second. There is currently no command to change that number of frames. You could edit the code in your ChimeraX, on Mac, edit file ChimeraX.app/Contents/lib/python3.11/site-packages/chimerax/mouse_modes/std_modes.py changing the line frames = 10 How did you want to change this value? Fewer frames or more frames? There is a "mousemode settings" command that could be enhanced to allow setting that parameter. But we have plenty of things to improve in ChimeraX and I'd be surprised if many people would use that. Tom
On Dec 8, 2023, at 2:01 AM, leeyang+chimerax--- via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi,
I find the mousemode center function very useful when navigating around a model. One of the features I loved about the original Chimera.
Would it be possible to have the option to augment it with a cofr centerofview feature so that the pivotpoint then follows subsequent translation?
Also, would it be possible to define a custom number of frames over which the animation occurs?
Cheers, Yang _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

Hi Tom, Thank you for implementing those mousemodes. If I'm not mistaken, you had kindly implemented the 'center' function in that first daily build to address an earlier request that I had made. Currently it centers and fixes cofr at the location. It does mean in subsequent manual drag-to-translate operations, the cofr does not track the viewport. I wonder if there may be some utility in having the option to either a) respect current cofr setting and merely center the location, or b) setting cofr to either frontcenter or centerofview in addition to centering the location? My current workaround is to click-to-center and then reset cofr with an alias. RE: frames, Thanks for clueing me into the relevant section of code. Found the equivalent file on Windows. The idea would be to reduce the number of frames in order to speed up the animation slightly; but it only feels like it could do with a tweak when zoomed in and the movement spans a short "real" distance. This works. Cheers, Yang

Hi Yang, I see, you want the center of rotation to stay in the middle of the graphics window. Currently if you use the "center" mouse mode it centers the clicked atom and makes the center of rotation at that new atom position which is in the middle of the window, but then if you translate the center of rotation stays at the atom position even though it is no longer in the center of the window. This center of rotation method is called "fixed" (fixed to the atom). The trouble I see with your suggestions is that if the center of rotation method is centerofview or frontcenter then when the atom is centered the rotation will not be about the atom. I think that is very bad behavior. The first thing you are likely to do after centering is rotate to get a clearer view and if the rotation is not about the atom position then the atom moves away. The reason it won't be centered on the atom is because the z-depth of the rotation center will be wrong. For centerofview it will be midway between the front and back of the scene, and for frontcenter it will be on the front-most object at the center. ChimeraX doesn't have a center of rotation method that does what is needed here. At any rate, I made a feature request, but I don't see a good way to do it using current ChimeraX modes. https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/10319 Tom
On Dec 9, 2023, at 5:14 AM, leeyang+chimerax--- via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi Tom,
Thank you for implementing those mousemodes. If I'm not mistaken, you had kindly implemented the 'center' function in that first daily build to address an earlier request that I had made.
Currently it centers and fixes cofr at the location. It does mean in subsequent manual drag-to-translate operations, the cofr does not track the viewport. I wonder if there may be some utility in having the option to either a) respect current cofr setting and merely center the location, or b) setting cofr to either frontcenter or centerofview in addition to centering the location? My current workaround is to click-to-center and then reset cofr with an alias.
RE: frames, Thanks for clueing me into the relevant section of code. Found the equivalent file on Windows. The idea would be to reduce the number of frames in order to speed up the animation slightly; but it only feels like it could do with a tweak when zoomed in and the movement spans a short "real" distance. This works.
Cheers, Yang _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
participants (2)
-
leeyang+chimerax@gmail.com
-
Tom Goddard