[Chimera-users] Keyboard shortcuts for DockView?

Tom Goddard goddard at sonic.net
Fri Mar 27 12:58:17 PDT 2020


Hi James,

  Nice.  I delved a bit deeper and added the Python magic to advance to the next compound with a shortcut or go to the previous one.  With that addition maybe you want to make a separate shortcut to refresh the list (eliminating deleted and purged) and have the mark as purged or deleted just mark them.  That would give the user more control.  Maybe marking shortcuts should also advance automatically to the next compound.  Whatever you find most useful.

  You are welcome and encouraged to put any of this code on the web for the benefit of others.

	Tom



> On Mar 27, 2020, at 7:02 AM, James Wagstaff <wagstaff.james at gmail.com> wrote:
> 
> Thanks Tom,
> Very helpful - I think(?) I now have it working somewhat usefully by changing a couple of lines (see attached).
> The accelerators now mimic clicking the ViewDock radio buttons, but with focus remaining on main window. So, if you start with all compounds "Deleted", and are only showing "Deleted" in the table, then use the accelerators to change selected compound status to either "Viable" or "Purged" the selected compound disappears and you move to the next compound in the table. I couldn't quickly see a way to create a function for directly moving to the next molecule (which would be preferable).
> Best,
> James
> 
> 
> On Thu, 26 Mar 2020 at 18:49, Tom Goddard <goddard at sonic.net <mailto:goddard at sonic.net>> wrote:
> Hi James,
> 
>   There are keyboard shortcuts in Chimera but they only work when the main window has the focus.  So if you wanted to press the down arrow key to go to the next compound in View Dock and then press a shortcut key to purge it won't work nicely because the View Dock window has to have the focus to get the down arrow key, and the main window needs the focus to get the shortcut key.  Probably a different shortcut key could be assigned to go to the next compound but I didn't see how to do it.
> 
>   Anyways I used the Chimera Accelerators (menu Tools / General / Keyboard Shortcuts)
> 
> https://www.cgl.ucsf.edu/chimera/current/docs/ContributedSoftware/accelerators/accelerators.html#adding <https://www.cgl.ucsf.edu/chimera/current/docs/ContributedSoftware/accelerators/accelerators.html#adding>
> 
> to add purge (cp), delete (cd), and viable (cv) shortcuts before I found out it won't work well so here.  It needed some magic Python code and I attach it here in case you want to pursue it further.
> 
>   Maybe the shortcuts could be done in the newer ChimeraX with ViewDockX -- it allows assigning function keys.
> 
> 	Tom
> 
> 
>> On Mar 26, 2020, at 10:39 AM, James Wagstaff <wagstaff.james at gmail.com <mailto:wagstaff.james at gmail.com>> wrote:
>> 
>> Hi all
>> I am using the DockView extensions to inspect outputs of a virtual screen, and would like to use a keyboard shortcut to (re)assign the state of the currently selected compound. I am not familiar with the inner workings of Chimera so cannot easily see how to do this myself - I am hoping someone else has implemented this!
>> Best
>> James
>> 
>> -- 
>> James Wagstaff
>> 
>> +447910113349
>> _______________________________________________
>> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu <mailto:Chimera-users at cgl.ucsf.edu>
>> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users>
> 
> 
> 
> -- 
> James Wagstaff
> 
> +447910113349
> <vdock_accel.py>_______________________________________________
> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu
> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20200327/47fb60d6/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vdock_accel3.py
Type: text/x-python-script
Size: 1681 bytes
Desc: not available
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20200327/47fb60d6/attachment-0001.bin>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20200327/47fb60d6/attachment-0003.html>


More information about the Chimera-users mailing list