[chimera-dev] Chimera 2 input devices

Tom Goddard goddard at sonic.net
Fri Oct 30 16:39:26 PDT 2015


Hi Matt,

  There is a way to send commands (and shortcuts) to Chimera 1 that you may not know about that does not require the focus — it uses http to send commands to Chimera.  Here’s how it works.

	$ chimera --start RESTServer
	REST server on host 127.0.0.1 port 55169 

I start Chimera with the above RESTServer option and it tells me it is listening on localhost (127.0.0.1) port 55169.  Then I type in my web browser url

	http://localhost:55169/run?command=open%201a0m <http://localhost:55169/run?command=open%201a0m>

	http://localhost:55169/run?command=display <http://localhost:55169/run?command=display>

	http://localhost:55169/run?command=ac%20sp <http://localhost:55169/run?command=ac%20sp>

The first url opens 1a0m in Chimera.  The “%20” is the escape sequence for a space character.  The second url displays the atoms with the “display” command.  And the third URL runs keyboard shortcut sp (display atoms as spheres) using the command “ac sp”  (ac is to run accelerators ie shorcuts).

  So to connect an input device you just need it to be able to send http requests.  Instead of using a browser you could use some standard command-line program like wget or curl to send the http requests:

	$ curl http://localhost:55169/run?command=turn%20y%201%2090 <http://localhost:55169/run?command=turn%20y%201%2090>

	$ wget http://localhost:55169/run?command=turn%20y%201%2090 <http://localhost:55169/run?command=turn%20y%201%2090>

I guess you are able to have your input devices run a shell command.

	Tom



> On Oct 30, 2015, at 11:07 AM, Dougherty, Matthew T <matthewd at bcm.edu> wrote:
> 
> Under C1 accelerators and some other USB HID activity require the cursor to be on a graphics window. An exception would be the mouse or keyboard interacting with other gui windows such as button pushes or entering file names.
> 
> For C2 it would be good to have a dedicated input channel independent of the cursor position like the 3dconnexion.  The general trend I see with researchers is dual display. One handles graphics and the other gui controls. This gets tricky when s3d is used and the cursor. Is not exactly what. you think (2 visible cursors one active the other inactive)
> 
> I manage this now with a dedicated chimera extension user gui buttons that rearrange the screens; and with controller mate I can have preconfigured-window-gui-location accelerator commands sent to activate the buttons, at the same time controller mate can set cursor positions and do button pushes. Works for Mac, not an option for PC or Linux.
> 
> I guess I could set a frame trigger and check a dedicated tcp port, but I am hesitant creating a kludge, because of the underlying strategic design issue and messing with the event loop.
> 
> Matthew Dougherty
> National Center for Macromolecular Imaging
> Baylor College of Medicine
> =================================================
> =================================================
> _______________________________________________
> Chimera-dev mailing list
> Chimera-dev at cgl.ucsf.edu
> http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20151030/1f61788d/attachment.html>


More information about the Chimera-dev mailing list