Wrapping Chimera in a Java program

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 -- Dr. Fabrice Jossinet Laboratoire de Bioinformatique, modelisation et simulation des acides nucleiques Universite Louis Pasteur Institut de biologie moleculaire et cellulaire du CNRS UPR9002, Architecture et Reactivite de l'ARN 15 rue Rene Descartes F-67084 Strasbourg Cedex France Tel + 33 (0) 3 88 417053 FAX + 33 (0) 3 88 60 22 18 f.jossinet@ibmc.u-strasbg.fr fjossinet@gmail.com http://www-ibmc.u-strasbg.fr/arn/Westhof/index.html http://fjossinet.u-strasbg.fr/

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... 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.htm... 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
participants (2)
-
Fabrice Jossinet
-
Tom Goddard