[Chimera-users] [chimera-dev] Wrapping Chimera in a Java program

Tom Goddard goddard at cgl.ucsf.edu
Mon Mar 31 10:39:04 PDT 2008


Hi Fabrice,

  I do not think Chimera could run using Jython because Chimera uses 
dozens of compiled C/Python modules.

  You can communicate with Chimera via a pipe.  One approach is to start 
Chimera with a popen() system call and send commands to Chimera's stdin 
using the ReadStdin capability:

    
http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/readstdin/readstdin.html

  It is also possible to talk to an already running instance of Chimera 
using the "chimera --send <file>" shell command.  This is used to have a 
web browser helper application directly send files to Chimera.

    http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/options.html
    
http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/webdata/webdata.html

The implementation uses a socket that Chimera is listening on but it is 
somewhat tricky to find the right port number.  It is saved on the local 
machine in a file as a security measure to prevent network connections.  
The details of that implementation are in your Chimera distribution

    chimera/share/send_to_chimera.py

Scooter Morris in our lab has written code to communicate with Chimera 
from a Java application called Cytoscape.  He might be able to provide 
more advice.

  Tom




Fabrice Jossinet wrote:
> Dear developers,
>
> I would like to launch Chimera from my Java program. I would like to  
> send messages to Chimera to highlight in its own display selections I  
> do in my Java program's display. I already did that with PyMOL using a  
> pipe communication.
>
> So, several questions:
> - is it possible to start Chimera from a classical python distribution  
> (not the embedded python of Chimera)? One of my ideas is to start  
> Chimera from Jython, a Java implementation of Python
> - is it possible to communicate with Chimera using a pipe ?
> - and the most general question: is it possible to communicate with  
> Chimera from the outside?
>
> Thank you for your answers
>
> Fabrice
>
>   




More information about the Chimera-users mailing list