[chimerax-users] trouble with importing chimerax module
Tom Goddard
goddard at sonic.net
Fri Mar 5 16:55:49 PST 2021
Hi Greg,
ChimeraX like Chimera includes Python within the application. So the normal way to run a ChimeraX Python script is to just open it in ChimeraX for example with the open command "open myscript.py" or you can run ChimeraX from a shell without a graphical user interface and have it run the script
chimerax --nogui myscript.py
With Chimera there is a pychimera PyPi module (https://pypi.org/project/pychimera/ <https://pypi.org/project/pychimera/>) created by Jaime Rodriguez-Guerra outside our lab to use Chimera with your own Python 2 installation. There currently is not a PyPi module to use ChimeraX in your own Python 3. I made a ChimeraX PyPi module (a "wheel") a few months ago as a test but it only partly works and we have not released it. Various initializations in the ChimeraX code need to be fixed to work outside the ChimeraX application. We proposed doing that work in a grant application to Chan-Zuckerberg Initiative last month, their Visual Proteomics call for proposals (https://chanzuckerberg.com/rfa/visual-proteomics/ <https://chanzuckerberg.com/rfa/visual-proteomics/>). We will not know whether we get funding to pursue that until at least May 2021.
Is it essential to your use of ChimeraX that you run Python scripts in your own Python? If so we could try to get something rigged up that would work for you.
If the main issue is you need other PyPi packages that are not in ChimeraX for your Python scripts, you can install those packages easily into ChimeraX using
chimerax -m pip install <NameOfPyPiPackage>
Tom
>
>> On Mar 5, 2021, at 12:49 PM, Gregory Babbitt <gabsbi at rit.edu> wrote:
>>
>> Hi Dr. Meng
>>
>> Some of us at RIT are having trouble importing chimerax.core.commands to python3 so we can write a script to run things in chimerax.
>>
>> Does debian have it? I also noticed my pip list does not show the older chimera module even though we call it alot in python. Does it have a different name like midas or pychimera?
>>
>> What is chimeraX equivalent...how do we install it via pip/pip3?
>>
>> thx
>>
>> Greg B
>>
>> Dr. Gregory A Babbitt
>> Associate Professor
>> T.H. Gosnell School of Life Sciences
>> Rochester Institute of Technology
>> Rochester NY USA
>> website: http://people.rit.edu/gabsbi
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimerax-users/attachments/20210305/ec8b112b/attachment.html>
More information about the ChimeraX-users
mailing list