Many thanks Elaine, I got it all wrong. Obviously!. I’ll try to do my homework before I get back to y. Have a good day George
On 28 Oct 2025, at 19:39, Elaine Meng via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi George! You should probably test each of the commands by entering them in the command line before putting them into a .cxc file. That's what I do, anyway.
Most of your commands appear to be Chimera commands or some combination of Chimera and ChimeraX syntax that won't work in ChimeraX. See the ChimeraX command docs: <https://rbvi.ucsf.edu/chimerax/docs/user/index.html#commands>
Specifically,
My script is: # Auto-generated by make_chimerax_assets.py # Visualize L1 composition divergence on delta (1PN9) and epsilon (2IMI) open viz/delta_1PN9.pdb open viz/epsilon_2IMI.pdb defattr viz/delta_div.defattr model #1 defattr viz/epsilon_div.defattr model #2
...instead of using "defattr" in ChimeraX we recommend using "open," so something like
open viz/delta_div.defattr model #1 open viz/epsilon_div.defattr model #2
see <https://rbvi.ucsf.edu/chimerax/docs/user/commands/open.html#defattr>
style #1,#2 cartoon
...there is no style named cartoon, the "style" command is for atom styles (stick vs. ball vs. sphere). Instead maybe
cartoon #1,2
cartoon smoothRibbon true
...there is no "cartoon" option "smoothRibbon" so I don't know what you were trying to do. "cartoon" help is here <https://rbvi.ucsf.edu/chimerax/docs/user/commands/cartoon.html>
color byattribute divergence palette bluesred range 0,1 #1 color byattribute divergence palette bluesred range 0,1 #2
...there is no palette named bluesred (did you mean "bluered"?), and the "color" command syntax is also wrong. Maybe could be something like
color byattribute divergence #1,2 palette bluered range 0,1
... where the "#1,2" is the atomspec in the usage instructions for "color byattribute" ... see <https://rbvi.ucsf.edu/chimerax/docs/user/commands/color.html#byattribute> ...see palette names <https://rbvi.ucsf.edu/chimerax/docs/user/commands/color.html#palette>
key colorbar palette bluesred range 0,1 label "Δ composition (L1)" pos 0.85,0.15 size 0.03,0.5
...I'm afraid this key command is also totally wrong. There is no "colorbar" or "range" option for that command, and there should be a label for each palette color. Label is not the title of the color key. You would need to add the title of the color key separately with the 2Dlabels command. Maybe the "key" part (not including the title) with labels 0.0 for blue, 0.5 for white, 1.0 for red could be something like
key bluered :0.0 :0.5 :1.0 pos 0.85,0.15 size 0.03,0.5
see "key" help: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/key.html>
lighting soft
... yes there is a "lighting soft" command :-)
zoom true
... sorry there is no "true" option of "zoom." What are you trying to do? Maybe focus the view on the models??
view #1,2
Or if that is too small, then zoom in, e.g.
zoom 1.2
See help for those commands <https://rbvi.ucsf.edu/chimerax/docs/user/commands/view.html#initial> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/zoom.html>
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Resource for Biocomputing, Visualization, and Informatics Department of Pharmaceutical Chemistry University of California, San Francisco
On Oct 28, 2025, at 12:06 PM, Eric Pettersen via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi George, A mild goof, but easy to miss:
open ~Desktop/ChimeraX_test/delta_1PN9.pdb
should be:
open ~/Desktop/ChimeraX_test/delta_1PN9.pdb
Note the '/' between '~' and 'Desktop'.
--Eric
On Oct 28, 2025, at 11:44 AM, George Tzotzos via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Many thanks Eric for the prompt reply I set up a test directory ls /Users/george/Desktop/ChimeraX_test color_delta_epsilon_divergence.cxc delta_kd.defattr color_delta_epsilon_kdshift.cxc epsilon_2IMI.pdb delta_1PN9.pdb epsilon_div.defattr delta_div.defattr epsilon_kd.defattr
I have renamed the files as per your suggestion. I get: open /Users/george/Desktop/ChimeraX_test/color_delta_epsilon_divergence.cxc open ~Desktop/ChimeraX_test/delta_1PN9.pdb No such file/path: ~Desktop/ChimeraX_test/delta_1PN9.pdb
Have I goofed somewhere else?
George
On 28 Oct 2025, at 17:22, Eric Pettersen <pett@cgl.ucsf.edu> wrote:
Hi George, A ChimeraX command script file needs to have a suffix of .cxc . Yours has a suffix of .cxs (which is the suffix for ChimeraX session files).
--Eric
Eric Pettersen UCSF Computer Graphics Lab
On Oct 28, 2025, at 10:09 AM, George Tzotzos via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
I’d be grateful for your help
My script is: # Auto-generated by make_chimerax_assets.py # Visualize L1 composition divergence on delta (1PN9) and epsilon (2IMI) open viz/delta_1PN9.pdb open viz/epsilon_2IMI.pdb defattr viz/delta_div.defattr model #1 defattr viz/epsilon_div.defattr model #2 style #1,#2 cartoon cartoon smoothRibbon true color byattribute divergence palette bluesred range 0,1 #1 color byattribute divergence palette bluesred range 0,1 #2 key colorbar palette bluesred range 0,1 label "Δ composition (L1)" pos 0.85,0.15 size 0.03,0.5 lighting soft zoom true
When I try to open the color_delta_epsilon_divergence.cxs (see above), I get: RuntimeError: Not a ChimeraX session file
File "/Applications/ChimeraX-1.10.1.app/Contents/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/chimerax/core/session.py", line 798, in restore raise RuntimeError("Not a ChimeraX session file”)
Thank you
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/