[chimera-dev] Running Chimera through Python script

Evan Seitz evan.e.seitz at gmail.com
Sun Jan 28 09:45:30 PST 2018


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

> On Jan 23, 2018, at 6:03 PM, Eric Pettersen <pett at cgl.ucsf.edu> wrote:
> 
> 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, <https://pypi.python.org/pypi/pychimera/0.2.0> which can be installed via pypi.
> 	Chimera only supports Python2.  ChimeraX uses Python3.
> 
> —Eric
> 
> 	Eric Pettersen
> 	UCSF Computer Graphics Lab
> 
>> On Jan 23, 2018, at 11:03 AM, Evan Seitz <evan.e.seitz at gmail.com <mailto:evan.e.seitz at gmail.com>> wrote:
>> 
>> Hi - I’m trying to follow Example 1 on http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/Examples/index.html <http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/Examples/index.html>, but after entering the code precisely as it is written, am getting back the ModuleNotFoundError: No module named ‘chimera’.
>> 
>> I’ve tried running the script using both Python2.7 and Python3, and both have resulted in the same error. As a sub-question, is Chimera supported in Python3, or is it best practice to still use Python2?
>> 
>> Thank you,
>> Evan Seitz
>> 
>> Chimera version: 1.12.0
>> OS: macOS High Sierra 10.13.2
>> _______________________________________________
>> Chimera-dev mailing list
>> Chimera-dev at cgl.ucsf.edu <mailto:Chimera-dev at cgl.ucsf.edu>
>> http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20180128/2a3fa64a/attachment.html>


More information about the Chimera-dev mailing list