How to open .py file downloaded from MOLEonline in ChimeraX?

Hello, I've been using Chimera in the past for opening downloaded .py files from MOLEonline to visualize tunnels in my structure. When I try to do the same in ChimeraX, I get the following error: Traceback (most recent call last): File "/Users/katekim/Downloads/mole_channels_6Qzq10eGEqLciv3DpeS8Q_1_chimera.py", line 1, in <module> import chimera, _surface, numpy ModuleNotFoundError: No module named 'chimera' Error opening python file /Users/katekim/Downloads/mole_channels_6Qzq10eGEqLciv3DpeS8Q_1_chimera.py toolshed show Any suggestions on the best approach to visualize MOLE channels using ChimeraX? Thank you, Kate

Hi Kate, Yes, the MOLEonline scripts are written just for Chimera. ChimeraX is a different program and won't work with Chimera sessions or python scripts written for Chimera. Chimera does have an option to export a file for input to ChimeraX, but it only includes the atomic/ribbon displays, not yet surfaces (but see below, to my surprise it worked!). If the reason for using ChimeraX is display only (not calculations requiring atomic data), other Chimera export formats may also work, like Collada. ChimeraX can read Collada files. See Chimera menu: File... Export Scene, options include ChimeraX and collada: <https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/export.html> ... or Chimera's "export" command: <https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/export.html> Just now I tested exporting a Chimera scene showing MOLEonline results (Chimera 1.16 daily build from August was what I had handy) and even though I got a warning message that the export to ChimeraX file does not work for surfaces, to my surprise, when I open it in ChimeraX, voila! It does include the tunnel displays! So maybe it WILL work for your situation. You may have to change the background color yourself. I was also able to export collada (.dae) file from Chimera that gave the same display when opened in ChimeraX. The ChimeraX choice is better than collada, since it will also include all the other tunnels that aren't displayed when you export, see screenshot below: Best, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco How it looked in Chimera when I exported a file for ChimeraX How it looks in ChimeraX after I open that file (except I had to change background to white again myself), can hide/show all the tunnels.
On Oct 29, 2021, at 7:37 PM, Kate Kim via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hello, I've been using Chimera in the past for opening downloaded .py files from MOLEonline to visualize tunnels in my structure. When I try to do the same in ChimeraX, I get the following error:
Traceback (most recent call last): File "/Users/katekim/Downloads/mole_channels_6Qzq10eGEqLciv3DpeS8Q_1_chimera.py", line 1, in <module> import chimera, _surface, numpy ModuleNotFoundError: No module named 'chimera'
Error opening python file /Users/katekim/Downloads/mole_channels_6Qzq10eGEqLciv3DpeS8Q_1_chimera.py toolshed show
Any suggestions on the best approach to visualize MOLE channels using ChimeraX?
Thank you, Kate _______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users

Thank you so much Elaine for such thorough and rapid instructions! I really appreciate it! When I tried opening a .py file in ChimeraX exported from Chimera, it gave the following error and didn't work: File "/Users/katekim/Dropbox/Kate_private_pks13_ms/Pks13_ChimeraX_stuff/Tunnels_only_4ChimeraX_wPDB.py", line 41, in make_structure from chimerax.pdb.pdb import set_logging_info ImportError: cannot import name 'set_logging_info' from 'chimerax.pdb.pdb' (/private/var/folders/jl/b36pl7px7sz1691hs9ycjs_80000gn/T/AppTranslocation/F0FF3182-52F0-41C1-88BD-EFCCE94E2CB5/d/ChimeraX-1.2.5.app/Contents/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/chimerax/pdb/pdb.py) Error opening python file /Users/katekim/Dropbox/Kate_private_pks13_ms/Pks13_ChimeraX_stuff/Tunnels_only_4ChimeraX_wPDB.py However, the COLLADA option is good for me to use in this case as I'm only trying to visualize the tunnels in ChimeraX. Thank you, Kate On Sat, Oct 30, 2021 at 7:57 AM Elaine Meng <meng@cgl.ucsf.edu> wrote:
Hi Kate, Yes, the MOLEonline scripts are written just for Chimera. ChimeraX is a different program and won't work with Chimera sessions or python scripts written for Chimera.
Chimera does have an option to export a file for input to ChimeraX, but it only includes the atomic/ribbon displays, not yet surfaces (but see below, to my surprise it worked!). If the reason for using ChimeraX is display only (not calculations requiring atomic data), other Chimera export formats may also work, like Collada. ChimeraX can read Collada files.
See Chimera menu: File... Export Scene, options include ChimeraX and collada: <https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/export.html> ... or Chimera's "export" command: <https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/export.html>
Just now I tested exporting a Chimera scene showing MOLEonline results (Chimera 1.16 daily build from August was what I had handy) and even though I got a warning message that the export to ChimeraX file does not work for surfaces, to my surprise, when I open it in ChimeraX, voila! It does include the tunnel displays! So maybe it WILL work for your situation. You may have to change the background color yourself. I was also able to export collada (.dae) file from Chimera that gave the same display when opened in ChimeraX. The ChimeraX choice is better than collada, since it will also include all the other tunnels that aren't displayed when you export, see screenshot below:
Best, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
How it looked in Chimera when I exported a file for ChimeraX
How it looks in ChimeraX after I open that file (except I had to change background to white again myself), can hide/show all the tunnels.
On Oct 29, 2021, at 7:37 PM, Kate Kim via ChimeraX-users < chimerax-users@cgl.ucsf.edu> wrote:
Hello, I've been using Chimera in the past for opening downloaded .py files from MOLEonline to visualize tunnels in my structure. When I try to do the same in ChimeraX, I get the following error:
Traceback (most recent call last): File "/Users/katekim/Downloads/mole_channels_6Qzq10eGEqLciv3DpeS8Q_1_chimera.py", line 1, in <module> import chimera, _surface, numpy ModuleNotFoundError: No module named 'chimera'
Error opening python file /Users/katekim/Downloads/mole_channels_6Qzq10eGEqLciv3DpeS8Q_1_chimera.py toolshed show
Any suggestions on the best approach to visualize MOLE channels using ChimeraX?
Thank you, Kate _______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users

Hi Kate, The Chimera→ChimeraX exporter is using features that were only added to ChimeraX in August (explicitly for the exporter), so you would need to use either the ChimeraX 1.3 release candidate or the current daily build to avoid that error. --Eric Eric Pettersen UCSF Computer Graphics Lab
On Nov 1, 2021, at 5:31 PM, Kate Kim via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Thank you so much Elaine for such thorough and rapid instructions! I really appreciate it!
When I tried opening a .py file in ChimeraX exported from Chimera, it gave the following error and didn't work:
File "/Users/katekim/Dropbox/Kate_private_pks13_ms/Pks13_ChimeraX_stuff/Tunnels_only_4ChimeraX_wPDB.py", line 41, in make_structure from chimerax.pdb.pdb import set_logging_info ImportError: cannot import name 'set_logging_info' from 'chimerax.pdb.pdb' (/private/var/folders/jl/b36pl7px7sz1691hs9ycjs_80000gn/T/AppTranslocation/F0FF3182-52F0-41C1-88BD-EFCCE94E2CB5/d/ChimeraX-1.2.5.app/Contents/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/chimerax/pdb/pdb.py)
Error opening python file /Users/katekim/Dropbox/Kate_private_pks13_ms/Pks13_ChimeraX_stuff/Tunnels_only_4ChimeraX_wPDB.py
However, the COLLADA option is good for me to use in this case as I'm only trying to visualize the tunnels in ChimeraX.
Thank you, Kate
On Sat, Oct 30, 2021 at 7:57 AM Elaine Meng <meng@cgl.ucsf.edu <mailto:meng@cgl.ucsf.edu>> wrote: Hi Kate, Yes, the MOLEonline scripts are written just for Chimera. ChimeraX is a different program and won't work with Chimera sessions or python scripts written for Chimera.
Chimera does have an option to export a file for input to ChimeraX, but it only includes the atomic/ribbon displays, not yet surfaces (but see below, to my surprise it worked!). If the reason for using ChimeraX is display only (not calculations requiring atomic data), other Chimera export formats may also work, like Collada. ChimeraX can read Collada files.
See Chimera menu: File... Export Scene, options include ChimeraX and collada: <https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/export.html <https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/export.html>> ... or Chimera's "export" command: <https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/export.html <https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/export.html>>
Just now I tested exporting a Chimera scene showing MOLEonline results (Chimera 1.16 daily build from August was what I had handy) and even though I got a warning message that the export to ChimeraX file does not work for surfaces, to my surprise, when I open it in ChimeraX, voila! It does include the tunnel displays! So maybe it WILL work for your situation. You may have to change the background color yourself. I was also able to export collada (.dae) file from Chimera that gave the same display when opened in ChimeraX. The ChimeraX choice is better than collada, since it will also include all the other tunnels that aren't displayed when you export, see screenshot below:
Best, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
How it looked in Chimera when I exported a file for ChimeraX <molechimera.png>
How it looks in ChimeraX after I open that file (except I had to change background to white again myself), can hide/show all the tunnels. <Screen Shot 2021-10-30 at 7.51.19 AM.png>
On Oct 29, 2021, at 7:37 PM, Kate Kim via ChimeraX-users <chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu>> wrote:
Hello, I've been using Chimera in the past for opening downloaded .py files from MOLEonline to visualize tunnels in my structure. When I try to do the same in ChimeraX, I get the following error:
Traceback (most recent call last): File "/Users/katekim/Downloads/mole_channels_6Qzq10eGEqLciv3DpeS8Q_1_chimera.py", line 1, in <module> import chimera, _surface, numpy ModuleNotFoundError: No module named 'chimera'
Error opening python file /Users/katekim/Downloads/mole_channels_6Qzq10eGEqLciv3DpeS8Q_1_chimera.py toolshed show
Any suggestions on the best approach to visualize MOLE channels using ChimeraX?
Thank you, Kate _______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu <mailto:ChimeraX-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users>
_______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
participants (3)
-
Elaine Meng
-
Eric Pettersen
-
Kate Kim