[chimera-dev] Interfacing with Chimera
Conrad Huang
conrad at cgl.ucsf.edu
Mon Oct 21 09:25:47 PDT 2013
There are a number of options that Chimera offers, depending on whether
your application is used to generate Chimera input or running
concurrently with Chimera.
If you're just generating an input file to open in Chimera, you can
either use Chimera's Python session format (which is probably not that
easy to generate), a command file or a Python script. The issue with
the session approach is that you have to embed your molecular data in
the file and the session data structures are not well documented. If
you leave your molecular data (eg in a PDB format file), you can
generate a command file that opens the PDB file and applies your custom
styling. If you need more detailed control, you can use a Python script
to open the PDB file and then directly manipulate the Chimera data
structures.
If you'd like to make your files available via the network, I would
recommend looking at our chimerax format
(http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/webdata/chimerax.html).
This format allows you to the same thing using local files but across
the network via web protocol.
(I assume that different residues will be highlighted for different
input structures. For more generic styling scripts, you can also
implement your own preset. See
http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/preferences.html#Presets
for a description on how to add custom presets.)
Finally, if you want your program to run concurrently with Chimera and
send commands as part of your application progress, you should look at
RESTserver
(http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/restserver/restserver.html)
or ReadStdin
(http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/readstdin/readstdin.html).
REST is preferred because it is a more general solution that ReadStdin.
Please let us know if you have any questions regarding any of these
approaches.
Conrad
On 10/21/2013 7:40 AM, Bernard Lieberman wrote:
> Hello,
>
> I'm presently writing an application that I'd like to interface with
> Chimera. Essentially my program will be capable of loading a specific
> python session with the appropriate model and then select, stylize, etc.
> specific residues. I'm able to generate the commands required but I'm
> wondering if it's best to find a way to hook the Chimera command line or
> if I should be going the route of editing my source py file? I'm
> essentially looking for the best method to have my VB6 application
> interface with Chimera and was looking for some suggestions if others
> have done this in the past.
>
> Any tips or suggestions are greatly appreciated.
>
> Thanks!
>
> *Bernard Lazarus Lieberman*
>
>
> _______________________________________________
> 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