Opened 4 years ago

Last modified 4 years ago

#5610 assigned enhancement

RFE: add Z-translate mouse mode

Reported by: Elaine Meng Owned by: Tom Goddard
Priority: high Milestone:
Component: UI Version:
Keywords: Cc: olibclarke@…, p.shah.lab@…
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

On Nov 15, 2021, at 8:20 AM, Pranav Shah <p.shah.lab@…> wrote:

[...], I really like Chimera's ability push/pull the
model/surface towards or away from the user. Currently it seems the
selected has only 2˚ of translational freedom...
Best,
Pranav

On Nov 15, 2021, at 9:10 AM, Oliver Clarke <olibclarke@…> wrote:
Yes seconded! A "Translate-Z" right mouse mode would be really useful
Cheers
Oli

Attachments (2)

PastedGraphic-1.png (205.6 KB ) - added by olibclarke@… 4 years ago.
Added by email2trac
mouse_toolbar_width.png (501.4 KB ) - added by goddard@… 4 years ago.
Added by email2trac

Download all attachments as: .zip

Change History (15)

comment:1 by Tom Goddard, 4 years ago

Hi Pranav, Oli,

Could you explain the translate-Z mouse mode you want a bit more? Do you mean you want to move just the selected model in z while other models do not move? Or do you mean you want to move all models in z relative to the clip planes (already possible by moving the two clip planes together)? And there is a "move selected atoms" mouse mode, do you want that to be able to move in z?

Currently when you are in any of the move modes if you hold the shift key down it switches from xy translation to rotation. This makes it quick to switch between translating and rotating and back just using the shift key. But there is no trick to translate in z. Actually if you have a mouse wheel, then you can assign it to translate and it will do a z translation (command: mouse wheel "translate selected models").

Tom

comment:2 by Tom Goddard, 4 years ago

Hi Tom,

The first one - move in Z relative to other models. This is useful when fitting a model to a map, it is possible in Chimera but not in ChimeraX I think?

Cheers
Oli

comment:3 by Tom Goddard, 4 years ago

Hi Tom,
Gladly! What Oli and I were referring to was the ability to translate
the selected object(s) in Z. In Chimera this is achieved by holding
down ctrl+alt+rt.click and moving the mouse up to "push" the object
further into the screen (or away from the viewer) or down to pull the
object towards the viewer.

RE clipping planes - I think holding down the middle-mouse button on
the foreground clipping plane allows the user to display slabs of
density and "scroll" through it in Z whereas the same operation when
performed on the background clipping plane enables the user to choose
the thickness of the represented slab.
Best,
Pranav

comment:4 by Tom Goddard, 4 years ago

I don't have a good idea what button combination to use for z translation. Here are various ideas that don't work well. 1) Hold the Alt/Option key while in move selected models or move atoms mouse mode. Unfortunately many uses on a laptops use a trackpad and Alt/Option is used to emulate middle mouse click so it would not work with those modes bound to the right mouse button. Ctrl-key and Command key on Mac have similar problems of conflicting with other uses. The shift key is used to make translation modes do a rotation and make rotation modes do a translation. But I don't see any other usable available key to do z-translation. In Chimera the ctrl key changes the xy translation into a z translation. Unfortunately in the Qt window toolkit used by ChimeraX holding the ctrl key turns a left mouse click into a right mouse click. This means we can't distinguish a left and right ctrl click since they all look like right. But selection is a left-ctrl click and to get that to work we assume right ctrl click is actually left ctrl click on Mac. The Tk window toolkit used by Chimera did not have this problem which allowed ctrl to be usable for z-translation. Qt does not support CapsLock or Fn key as a modifiers, so those also are not readily usable. 2) Have a separate z-translate mouse mode. Could do this but it is inconvenient to use as you would need to switch between translate selected models to z-translate selected models mode using the toolbar or assign some other mouse button to do it using commands -- almost no users would do that so it is not a very useful addition.

Unfortunately with many users on laptops with only a trackpad the modifier keys are all used. If you have a suggestion that would make z-translation work well I would like to hear it.

Version 0, edited 4 years ago by Tom Goddard (next)

comment:5 by Tom Goddard, 4 years ago

Another difficulty with having separate z translate selected models and z translate selected atoms modes is the toolbar tab for mouse modes already has too many modes. To add more modes we are going to need to change the user interface somehow -- split it into multiple toolbar tabs, or use drop-down toolbar menus, or some trick to avoid having many modes hidden off the right edge of the toolbar. This is another user interface problem I don't have a good solution for.

Last edited 4 years ago by Tom Goddard (previous) (diff)

in reply to:  6 ; comment:6 by goddard@…, 4 years ago

I guess you already know this, but the standard way to adjust the z position of a selected model with the mouse/trackpad in ChimeraX is to rotate 90 degrees about y then translate in x.  Since the shift key allows switching between translation and rotation this is a fast operation.  I guess its main disadvantage is that because you don't rotate exactly 90 degrees you end up changing the original xy positioning by small amounts.  On the other hand it has the advantage over the direct z-translation that you can better judge whether you got the right z shift.

in reply to:  7 ; comment:7 by Elaine Meng, 4 years ago

We can have mouse modes that are not on the toolbar, right?  So one possibility is to add another mode that does not have an icon there. I realize clicking the toolbar is convenient, but one could have an alias or functionkey assignment, e.g. if there were a mode named "ztranslate selected models", then assign F1 to turn it on with command:

function F1 mouse right 'ztranslate selected models'

in reply to:  8 ; comment:8 by olibclarke@…, 4 years ago

Yes - or allow users to customize the mouse modes that do appear in the toolbar? I would happily replace pivot, move atoms, select or drag model, which I use rarely or have other ways of accomplishing.

You could also add an expandable menu to the toolbar, to show items hidden due to lack of space in a drop down menu? (I don't know if this is possible in Qt)

Cheers
Oli


in reply to:  9 ; comment:9 by goddard@…, 4 years ago

Thanks for the suggestions Oli.  We plan to allow more customization of the toolbar (been on our todo list for years) -- currently only the Home tab of the toolbar can be customized (right click on the toolbar and choose Settings... to customize).  And the toolbar already does make a roll-over menu at the right edge when all the icons don't fit.  But that makes those icons much less useful, so don't want that rollover when the ChimeraX window is a normal size.

So far my only idea is to do what Elaine suggested to make separate z translation modes that are not in the toolbar and that you can assign to some mouse buttons if you are knowledgable.  I am not thrilled about this because almost no one will ever know about it or use it, and even if you do know there is not a good way to assign mouse buttons to use it.  So its value is very limited and I need to work on other things that we have  good solutions for and will have high impact.

in reply to:  10 ; comment:10 by olibclarke@…, 4 years ago

Fair enough - I guess it depends what you mean by "normal size" - on my system (16" MBP) it looks like there is plenty of room for at least a couple more icons?



Added by email2trac

by olibclarke@…, 4 years ago

Attachment: PastedGraphic-1.png added

Added by email2trac

in reply to:  12 comment:11 by goddard@…, 4 years ago

For me on 15" Mac laptop with ChimeraX taking 3/4 the width of my screen 6 icons in the Right Mouse toolbar are not shown and appear in a roll over menu.  If I use ChimeraX fullscreen it looks like yours with room for more icons.  But I usually need to use other windows as I use ChimeraX so I don't ever use it fullscreen.  People will use the program in different ways.  I think there are already too many icons in the mouse toolbar.

Added by email2trac

by goddard@…, 4 years ago

Attachment: mouse_toolbar_width.png added

Added by email2trac

in reply to:  14 ; comment:12 by p.shah.lab@…, 4 years ago

One could engineer a drop-down activated with right mouse click and an
option that
allows the user to translate in Z, then moving the selected object with a
two finger scroll action or mouse-wheel up and down?
Best,
Pranav
--
Pranav Shah
Postdoctoral Research Fellow.

Division of Structural Biology,
Wellcome Trust Centre for Human Genetics,
University of Oxford,
Roosevelt Drive, Oxford OX3 7BN,
UK


On Tue, Nov 16, 2021 at 6:40 PM ChimeraX
<ChimeraX-bugs-admin@cgl.ucsf.edu> wrote:

in reply to:  15 comment:13 by goddard@…, 4 years ago

Where would this drop-down menu be?  On the toolbar?  That would be a way to avoid more icons that we have considered.  But again it becomes very cumbersome to switch between xy and z translations with that method.  Currently we don't have a way to reassign 2-finger trackpad scroll which always does rotation.  It does not seem desirable because then you lose the ability to rotate.

My current plan is to add a z translation mode that can be assigned by command.  You could bind that to a function key for quick switching.  It is a poor solution in my view because almost no one will set that up.
Last edited 4 years ago by Tom Goddard (previous) (diff)
Note: See TracTickets for help on using tickets.