
Hi Noe, Chimera and ChimeraX are separate programs and have different Python APIs. The code you were trying to run is for Chimera. The equivalent in ChimeraX is: from chimerax.core.commands import run run(session, "open" + "hERGts_compiled.pdb") run(session, "color red") run("surf") However, if all you are doing is running a set of commands on multiple files, consider using the "forEachFile" option of the ChimeraX open <https://www.cgl.ucsf.edu/chimerax/docs/user/commands/open.html> command, which does exactly that. --Eric Eric Pettersen UCSF Computer Graphics Lab
On Dec 6, 2022, at 1:52 AM, Noe Robert via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Good morning, I'm trying to use a python script for ChimeraX version 1.5, to automate mutageneses on a specific protein. As a first try, it looks like this :
from chimera import runCommand as rc rc("open " + "hERGts_compiled.pdb") rc("color red") rc("surf");
So it refers to the chimera module for the runCommand. I tried to install it on Python through the command pip but it failed :
################################# Example of my shell while trying to install chimera module ####################### PS C:> python3 -m pip install chimera Collecting chimera Using cached chimera-0.4.7.tar.gz (355 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error
กม python setup.py egg_info did not run successfully. ฉฆ exit code: 1 จtฉค> [9 lines of output] Traceback (most recent call last): File "<string>", line 2, in <module> File "<pip-setuptools-caller>", line 34, in <module> File "C:\Users\CE PC\AppData\Local\Temp\pip-install-cfq97mii\chimera_bd7187074876462a9782eded8cb3a816\setup.py", line 1, in <module> import ez_setup File "C:\Users\CE PC\AppData\Local\Temp\pip-install-cfq97mii\chimera_bd7187074876462a9782eded8cb3a816\ez_setup.py", line 170 print "Setuptools version",version,"or greater has been installed." ^ [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed
กม Encountered error while generating package metadata. จtฉค> See above for output.
note: This is an issue with the package mentioned above, not pip. hint: See above for details. ######################################################################################################
So it looks like the temporary file generated has an error that doesn't allow the installation of the module, and so I cannot use any command from my script as runCommand is not recognized. There seem to be no mention of this issue in the mail archive but one colleague encountered the same problem, which I find strange. Do you have an idea on how to solve this issue ?
Thank you and have a great day,
Noจฆ Robert, Fifth-year student in bioengineering, minor in Bioinformatics and Modelling, at engineering school Polytech Nice Sophia, France Phone : +33 7 81 00 52 02 "let's limit the use of our resources and lighten our mails"
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users>