[chimerax-users] setting up mousemode - translate z - set pivot

Tom Goddard goddard at sonic.net
Mon Dec 21 18:57:23 PST 2020


Hi Helge,

  The "move model" mouse mode in the Toolbar which moves the selected model has built into it that holding the shift key switches from translation to rotation.  (This mode has a longer name in the commands "translate selected model".) This is super convenient when fitting, you drag to move the model, then press shift and rotate it.  But because of this assigning this mouse modes to use the "shift" modifier key eliminates that feature since now the shift key has to be held just to use the mode.  This is a common feature of many mouse modes, that they already have built-in some alternate behavior when holding the shift key.  So you don't want to assign such a mode to shift key + button press.

  You might also like a new "drag model" mode in the Toolbar of the ChimeraX daily build (called "move picked models" by the mousemode command).  It is just like "move model" only it uses the model you click on rather than the selected model.  If you don't click on any model it translates and rotates all the models.

  For moving models into and out of the screen (z motion), I was surprised to see there is no mouse mode other than using the mouse wheel as Elaine points out.  I have implemented most of the mouse modes and I do fitting by hand a good bit and I think the reason I haven't yet added z translation is because it works better to rotate 90 degrees and translate in x,y so you can see the alignment better.  For instance with the drag model model I click and drag into position, then press the shift key and rotate to get a better fit orientation, then click off the model and rotate to see it from a new angle, and repeat.  In our older program Chimera I used to use z-translate and probably it would be useful in cases in ChimeraX.  I could add such a mode.  The trouble as you well know is there are not enough buttons and modifier keys so I am afraid z-translate would rarely get used.

  One other option for using lots of mouse modes is to assign function keys to switch to the mouse modes you like with the ChimeraX "functionkey" command.

	https://www.rbvi.ucsf.edu/chimerax/docs/user/commands/ui.html#functionkey

  Tom


> On Dec 21, 2020, at 9:37 AM, Elaine Meng <meng at cgl.ucsf.edu> wrote:
> 
> Hi Helge,
> There is no .ini file, so you would set up your mouse modes in the startup commands, like you said.  You can put all the mousemode assignment commands into a command file (.cxc), however, and then just include an "open" of that file in the startup commands.
> 
> All mousemode functions are listed in this table:
> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/ui.html#functions>
> 
> There is a "pivot" but as you saw, it works only for atoms.  For nonatomic models like maps, you might have to make your own function key assignment to "cofr sel" or something like that, where sel is the selected model.  See "functionkey"
> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/ui.html#functionkey>
> 
> The "zoom" mode is similar to Z-translate, except that the camera moves, not the structure.  To actually Z-translate a model relative to other models, I believe you would have to select it or part of it, assign "translate selected models" to "wheel" and scroll the wheel (or logical equivalent if you are using a touchpad).  I have a mac laptop with touchpad and with trackpad gestures turned OFF in the ChimeraX Preferences (Trackpad tab), and for me, 2-finger scrolling on the touchpad works for this mode.
> 
> It is better not to use shift explicitly in your rotation and translation assignments, because the addition of shift to the assignment can then be used to switch from rotation to translation and vice versa, as described in the table of mousemode functions.  That is probably the reason for the unexpected rotation/translation behavior you mentioned.
> 
> I hope this helps,
> Elaine
> -----
> Elaine C. Meng, Ph.D.                       
> UCSF Chimera(X) team
> Department of Pharmaceutical Chemistry
> University of California, San Francisco
> 
>> On Dec 21, 2020, at 8:29 AM, Helge Paternoga <Helge.Paternoga at chemie.uni-hamburg.de> wrote:
>> 
>> Dear ChimeraX users,
>> 
>> I am currently using the homeoffice time to finally get into ChimeraX, coming from Chimera.
>> 
>> I just discovered "mousemode" and am trying to set up the controls to my liking. My goal is to make the fitting process of models and volumes into cryo-EM maps as smooth as possible.
>> 
>> Currently, I use the following commands which are entered in the "execute these commands at startup" option in the settings => Is this the best way to permanently change the key-mapping? I could not find an .ini file, yet.
>> 
>> 
>> 	mousemode shift leftMode 'translate selected models'
>> 	mousemode shift middleMode 'rotate selected models'
>> 	mousemode rightMode zoom
>> 	mousemode shift wheel contour
>> 	mousemode setting contour speed 0.1
>> 
>> My idea is to have the following set up:
>> 
>> left mouse - turn all models (default)
>> middle mouse - translate xy (default)
>> right mouse - zoom
>> 
>> shift left mouse - turn selected model
>> shift middle mouse - translate xy selected model
>> shift right mouse - translate z selected model
>> 
>> scroll wheel - contour volume
>> 
>> control right mouse - set pivot on selected model
>> 
>> Turning and translating the models works well, also while holding shift for the selected model.
>> 
>> As a side note, 'translate selected models' rotates the selected models in place whereas 'rotate selected models' translates in xy, is this intentional?
>> 
>> => I would like to move the selected model in the z direction with the right mouse button while holding shift, is there an option for "translate z" ?
>> 
>> => I am often re-setting the pivot point, therefore I would like to bind this function ("Set Pivot") to the mouse as well, does this option exist? I tried "pivot" but it did not work for cryo-EM volumes.
>> 
>> Many thanks for reading,
>> 
>> Helge
> 
> 
> _______________________________________________
> ChimeraX-users mailing list
> ChimeraX-users at cgl.ucsf.edu
> Manage subscription:
> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
> 




More information about the ChimeraX-users mailing list