Hi Evan, There are multiple possible approaches here. You can tightly couple your GUI to Chimera, which is what you are describing, you can more loosely couple your GUI to Chimera, or you could not use Chimera at all. Briefly:
Tight Coupling
You write your GUI as a Chimera tool/extension, and starting your tool actually starts Chimera and your tool (possibly as “chimera —start “your tool” in a script).
Loose Coupling
Your GUI starts Chimera as a subprocess when needed (“chimera —start
RESTServer”) and sends commands to it via HTTP in order to open and change the display of structures.
Non-Chimera
One possibility is to use
NGL Viewer to show the structure in a web browser (that supports WebGL). The structure will be interactively manipulable.
Chimera citation info can be found via the Help->Citation Info menu item.
You other questions are only applicable if you go the “tight coupling” route. If you choose to go that route, then yes, all modules (including your own) would have to be installed using the Chimera interpreter. I am unaware of any module conflicts when this is done.
—Eric
Hi Eric, thank you for your detailed reply. I’m working on a project that analyzes user input data through a GUI, and at one point needs to open a 3d render of a specific protein mapping that can rotate, etc.
If we went with this option, our team would eventually have to compile our entire code using the Chimera Python interpreter, correct? Do you happen to know if this kind of thing is allowed, and if it is, what citations should be used? Also, are there any case you’ve heard of of the Chimera interpreter causing internal conflicts with other native Python modules and code?
Thank you so much for your time.
Best,
Evan
Hi Evan,
That code only works in the context of Chimera’s Python interpreter, not a generic Python interpreter. So like it says in the example, “to execute the script, either open the script file with the File→Open menu item or with the open command”.
Third parties have developed modules to allow Chimera modules to be used in standard Python interpreters. One such package is
pychimera, which can be installed via pypi.
Chimera only supports Python2. ChimeraX uses Python3.
—Eric
Eric Pettersen
UCSF Computer Graphics Lab
_______________________________________________
Chimera-dev mailing list
Chimera-dev@cgl.ucsf.eduhttp://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev