<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-family: Arial, Helvetica, sans-serif; color: rgb(0, 0, 0);">Nathan,</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-family: Arial, Helvetica, sans-serif; color: rgb(0, 0, 0);">Many GUI elements use the `run` function you mentioned, so it should be there if you aren't having major issues with the GUI. I suspect the problem has to do with how you are running
your code. </span><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div><span style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">ChimeraX uses its own Python interpreter and module directory, so your system Python won't be able to import chimerax modules.
</span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(0, 0, 0);">Make sure you're running your code by entering it in the shell (Tools -> General -> Shell), opening the Python script in ChimeraX (using the open command or menu options),
or packaging it as a bundle and installing it in ChimeraX.</span><br>
</div>
<div><span><br>
</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(0, 0, 0);">Best,</span></div>
<div><span><br>
</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(0, 0, 0);">Tony</span><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div id="appendonsend"></div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> ChimeraX-users <chimerax-users-bounces@cgl.ucsf.edu> on behalf of Nathan Wood via ChimeraX-users <chimerax-users@cgl.ucsf.edu><br>
<b>Sent:</b> Tuesday, June 29, 2021 10:25 PM<br>
<b>To:</b> chimerax-users@cgl.ucsf.edu <chimerax-users@cgl.ucsf.edu><br>
<b>Subject:</b> [chimerax-users] Python API Inquiry</font>
<div> </div>
</div>
<div><font color="BA0C2F">[EXTERNAL SENDER - PROCEED CAUTIOUSLY]</font><br>
<br>
<div>
<p style="margin-top: 0px; margin-bottom: 0px;">To Whom it May Concern,</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">My name is Nathan Wood and I am currently a Google Summer of Code Intern with the OpenChemistry Group. Currently I am currently in the process of replacing Visualizing Molecular Dynamics (VMD) with ChimeraX as
a means to visualizing computationally generated electrostatic potential diagrams. To accomplish this I am having to use the Python API in a script.
<br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">However, I am having difficulties enabling the Python API. When I execute a Tutorials example found in the online developer's documentation, I receive the error:
<br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><i>ImportError: No module named chimerax.core.commands</i><i><br>
</i></p>
<p style="margin-top: 0px; margin-bottom: 0px;">which suggests that the python modules were never installed properly. I also recieve similar errors when attempting to import the toolshed.
<br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">Otherwise, the ChimeraX GUI and its shell work properly and I am unsure how to resolve the API error.
<br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">I am currently using the Generic Linux 64 Bit Daily Release and can provide more information if necessary.<br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">Any assistance would be greatly appreciated</p>
<p style="margin-top: 0px; margin-bottom: 0px;">------------------------------------------------------<br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">Very Respectfully, <br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">Nathan Wood</p>
<p style="margin-top: 0px; margin-bottom: 0px;">Undergraduate Year 3, GSOC Intern</p>
<p style="margin-top: 0px; margin-bottom: 0px;">University of Florida <br>
</p>
</div>
</div>
</body>
</html>