[Chimera-users] non-GUI use of Chimera

Thomas Goddard goddard at cgl.ucsf.edu
Mon May 24 16:19:55 PDT 2004

Hi Randy,

  If I understand correctly you want to be able to type some Chimera Python
code or Chimera commands to a web browser, those get sent to the web server
which sends them to Chimera running on the web server machine.  Then you
capture the Chimera image and send it back to the web browser.

  I believe this can be done using the Chimera "Web Data" facility.  This
allows programs to send commands to Chimera.  The intended use is for
displaying models in Chimera when the user clicks a link in a web browser.
It works by having the *.chimerax file associated with the link lauch
helper application <chimera-install-location>/bin/chimera_send.
The same mechanism allows any program to send commands to Chimera.
The Chimera User's Guide describes this under Tools/Web Browser Configuration.
Here's a URL:


  What you might do is have your web server create an appropriate
*.chimerax that executes the user's commands and then prints the
Chimera graphics window to a file.  The web server than sends the
image (jpg) to the web client.  There is a bunch of somewhat tricky
glue to make this work.  As previous posts mentioned, Chimera will
need to pop up windows on some screen to render an image.  For the web
server to know when Chimera has finished making an image, the
*.chimerax file might end in a command that writes to some secondary
status file after the image file is written.  That will tell the web
server that the image is ready.

  We haven't tried this.  And there are other pitfalls, like you are
likely to run into trouble if the web server starts 2 instances of Chimera
and then tries to dispatch commands with the chimera_send program.

  Please let me know if you get this to work.  Feel free to send additional


More information about the Chimera-users mailing list