[chimera-dev] tangent wave

Tom Goddard goddard at sonic.net
Thu Mar 27 12:28:00 PDT 2014


Hi Matt,

  You will need to paw your way through the Chimera code to figure out how Tk can listen on a socket.  That is one difficulty -- navigating the complexity of existing Chimera code.  The current "chimera --send file.py" code will not be simple to understand because it worries about security.  Production Chimera versions can't just listen on a port and run any Python code that comes its way because that code could do anything and anyone could connect to it.  So there is complexity because of the need for security -- maybe that is not an issue for you.

  First I suggest trying easy approaches that require no Chimera programming, then if those do not give adequate performance you can attempt to make Chimera listen on a socket to get commands from your Tangent Wave.

	Tom


On Mar 27, 2014, at 12:07 AM, "Dougherty, Matthew T" wrote:

>> Writing code to establish your own socket connection will be a major pain.  It has to be integrated into the Tk event loop.
> 
> Not sure why.  have written other device interrupts and DMA xfer realtime before.
> Is this a chimera issue or a tk issue?
> 
> 
> 
> Matthew Dougherty
> National Center for Macromolecular Imaging
> Baylor College of Medicine
> ________________________________________
> From: Tom Goddard [goddard at sonic.net]
> Sent: Wednesday, March 26, 2014 11:49 PM
> To: Dougherty, Matthew T
> Cc: chimera-dev at cgl.ucsf.edu
> Subject: Re: [chimera-dev] tangent wave
> 
> Hi Matt,
> 
>  If you run “chimera —send somecode.py” from a shell it will try to use a socket to send the Python file to an already running Chimera.  Writing code to establish your own socket connection will be a major pain.  It has to be integrated into the Tk event loop.
> 
>  You’d probably be better off sending Chimera an http request using the Chimera RESTServer capability described here
> 
>        http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/restserver/restserver.html
> 
>  An older mechanism of talking to Chimera by sending commands to it standard input (stdin), but this requires starting Chimera with another process piping the commands to Chimera.
> 
>        http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/readstdin/readstdin.html
> 
>  I recommend trying RESTServer.
> 
>    Tom
> 
> 
> 
> On Mar 26, 2014, at 2:37 AM, Dougherty, Matthew T wrote:
> 
>> Hi,
>> 
>> I just purchased a Tangent Wave that I plan to interface into chimera.
>> 
>> The best design is to use sockets.  Is there any precedence for using sockets in chimera?
>> 
>> 
>> 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
>> 
> 
> 





More information about the Chimera-dev mailing list