Opened 6 years ago
Last modified 5 years ago
#2696 assigned enhancement
Direct selection of swapaa residue type
Reported by: | Owned by: | Tom Goddard | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Structure Editing | Version: | |
Keywords: | Cc: | Tristan Croll | |
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
The following bug report has been submitted: Platform: Darwin-18.7.0-x86_64-i386-64bit ChimeraX Version: 0.91 (2019-12-17) Description Hi, The swapaa mouse mode currently seems to work as follows: Right click and drag cycles through all possible amino acids, one by one. This is not ideal, as it makes it kind of slow/awkward to quickly mutate a residue to the desired amino acid, and it is easy to scroll past the intended reisdue. Would it be possible to change this such that a right click brings up a selector, where the user can just choose the residue directly? This could be instead of or in addition to the current right-click/drag behavior, as currently just right-clicking doesn't do anything in this mode. Cheers Oli Log: > camera ortho > cofr centerOfView > alias crosshairs_on log text crosshairs_on: displays crosshairs at center of > rotation and places cofr at center of view; cofr centerofview showpivot > 5,0.2 > alias crosshairs_off cofr centerofview showpivot false > alias cootmode volume style mesh step 1 squaremesh false meshlighting true > twosidedlighting false capfaces false; surface cap false; size stickradius > 0.05; ~rib; disp; color gold target a; color byhet; lighting flat; lighting > depthcuestart 0.2 depthcueend 0.7; set silhouettes false; set subdivision 1; > crosshairs_on; color #3333851effff target s; style stick; set bgcolor black > alias cootmode_white volume style mesh step 1 squaremesh false meshlighting > true twosidedlighting false capfaces false; surface cap false; size > stickradius 0.05; ~rib; disp; color orange target a; color byhet; lighting > flat; lighting depthcuestart 0.2 depthcueend 0.7; set silhouettes false; set > subdivision 1; crosshairs_on; color #00000000cccc target s; style stick; set > bgcolor white > alias carve surface zone #* nearatoms sel distance $1 maxcomponents 1 > alias uncarve surface unzone #* > alias focus view cofr false > alias saturation_down color modify $1 saturation - 10 > alias saturation_up color modify $1 saturation + 10 > alias lightness_up color modify $1 lightness + 5 > alias lightness_down color modify $1 lightness - 5 > alias hue_up color modify $1 hue + 5 > alias hue_down color modify $1 hue - 5 > alias symclip clip near -$1 far $1 position cofr > alias section clip near $1 far $1 UCSF ChimeraX version: 0.91 (2019-12-17) © 2016-2019 Regents of the University of California. All rights reserved. How to cite UCSF ChimeraX > open 1bl8 format mmCIF fromDatabase pdb 1bl8 title: Potassium channel (KCSA) from streptomyces lividans [more info...] Chain information for 1bl8 #1 --- Chain | Description A B C D | protein (potassium channel protein) Non-standard residues in 1bl8 #1 --- K — potassium ion > ui mousemode rightMode "tape measure" > ui mousemode rightMode "crop volume" > ui mousemode rightMode swapaa > swapaa mousemode /A:42 ALA > swapaa mousemode /B:75 THR > swapaa mousemode /B:75 THR > swapaa mousemode /B:75 THR > swapaa mousemode /B:75 CYS > swapaa mousemode /B:75 CYS > swapaa mousemode /B:75 CYS > swapaa mousemode /B:75 CYS > swapaa mousemode /B:75 CYS > swapaa mousemode /B:75 CYS > swapaa mousemode /B:75 GLY > swapaa mousemode /A:78 TRP > swapaa mousemode /A:78 TRP > swapaa mousemode /A:78 TRP > swapaa mousemode /A:78 TRP > swapaa mousemode /A:78 TRP OpenGL version: 4.1 ATI-2.11.21 OpenGL renderer: AMD Radeon Pro 580 OpenGL Engine OpenGL vendor: ATI Technologies Inc.
Change History (8)
comment:1 by , 6 years ago
Component: | Unassigned → Structure Editing |
---|---|
Owner: | set to |
Platform: | → all |
Project: | → ChimeraX |
Status: | new → assigned |
Summary: | ChimeraX bug report submission → Direct selection of swapaa residue type |
Type: | defect → enhancement |
comment:2 by , 6 years ago
follow-up: 3 comment:3 by , 6 years ago
Yes - swapaa as a context menu item would be a great solution, I think Oli
comment:4 by , 6 years ago
Cc: | added |
---|
I second this! One thing I find swapaa
really useful for is completing a truncated residue by "mutating" it to something else and back to its original identity. Works, but obviously not the long-term ideal - would be awesome to have the specific "complete this residue" option on a context menu that just uses the swapaa
code underneath. Where I find the "drag-to-mutate" option gets really cumbersome is when you have the combination of a large model and the cartoon drawn. There it really starts to drag since each mutation triggers a full redraw, and it becomes a somewhat-frustrating case of "drag the mouse a little bit, then wait to see if you landed on the right residue".
I faced a similar problem with ISOLDE's dial-a-rotamer previews. The approach I took (which appears to be working nicely) was to create a new AtomicStructure
subclass to draw the preview in, and only copy the results back to the master model once done. Doing it that way would allow you to just hide the "real" residue, do the mutation(s) in the preview model, then make the required edit back to the master model only on mouse_up()
.
from chimerax.atomic import AtomicStructure class _RotamerPreview(AtomicStructure): ''' Since ISOLDE maintains a trigger checking all added/removed `AtomicStructure` instances to decide whether to rebuild its menu, we want to differentiate the preview model to avoid downstream complexities. ''' SESSION_SAVE=True # and in the RotamerRestraintMgr class: def _create_preview(self, rotamer, target_def, target_index): pm = self._preview_model if pm is not None and pm.rotamer != rotamer: self.remove_preview() if self._preview_model is None: from chimerax.std_commands.split import molecule_from_atoms pm = self._preview_model = molecule_from_atoms(self.model, rotamer.residue.atoms) pm.__class__ = _RotamerPreview # etc.
follow-up: 5 comment:5 by , 6 years ago
During swapaa mouse mode drag the cartoon should not be updated because no backbone atoms move. Recomputing the cartoon is slow. I will have to check if this is broken. But in any case, your approach of making another structure to show the preview is a good one. The main trouble with context menu entries is that 99% of users will never know that menu exists since it is not shown by the conventional right click, instead it is ctrl-double-click.
comment:6 by , 5 years ago
Added "Mutate Residue" to the double-click selection context menu. Did not change the swapaa mouse mode.
comment:7 by , 5 years ago
The problem mentioned by Tristan in comment 4 where swapaa mouse mode causes cartoons to recompute does not occur in current ChimeraX. The cartoon is not recomputed.
comment:8 by , 5 years ago
Eric did you push your mutate residue context menu change? I don't see it.
I still agree that the swapaa mouse mode would make more sense if it popped up a panel of the standard residues, ideally in a nice compact layout like 4 columns and 5 rows and then a click on the desired amino acid in the menu would get you directly the new residue you want. This is probably pretty easy for desktop use. It should work in the same way in VR -- that will be harder since the popup will need to be placed relative to the VR controller.
It is a bit weird to have a mouse mode that simply acts as a context menu. But I think it has advantages over the generic context menu (ctrl-double-click). The most obvious advantage is most users will probably never know about the context menu since ctrl-double-click is rather obscure. Most users probably will not reassign any mouse modes either so the swapaa mode is not a great improvement for discoverability. But the swapaa mode can have a tailored context menu that optimizes doing that one task.
That's an interesting idea, that just click and release without a drag would bring up a popup panel to choose the desired amino acid type.
I guess you have a scenario where you are mutating lots of residues? If only one residue needs to be mutated it doesn't seem like saving a few seconds is too high a priority, although still it would be nice.
With the current behavior if you drag the mouse up or down and pass the desired residue, then you can just reverse the direction of the drag and go back to the passed residue.
I added swapaa as a mouse mode for use in virtual reality where you can't type a command. Another way to do it would be to add a swapaa menu to the context menu when you ctrl-double-click on an atom. Then you would not need to be in a special mouse mode.