<html><head></head><body><div class="ydp727b23ceyahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div></div>
<div dir="ltr" data-setdir="false"><div><div dir="ltr" data-setdir="false">Thank you! I thought it must be some stupid mistake. It works now. <br></div><div dir="ltr" data-setdir="false"><br></div>Visvaldas</div><div><br></div></div><div><br></div>
</div><div id="ydp8dc91ca4yahoo_quoted_0023249621" class="ydp8dc91ca4yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Monday, November 28, 2022 at 10:19:19 PM GMT, Tom Goddard <goddard@sonic.net> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div id="ydp8dc91ca4yiv0566955263"><div>The "--script" option in ChimeraX 1.4 only takes Python scripts, not ChimeraX command scripts. The clue to this is in the error message where is says it is in function "open_python_script". ChimeraX 1.5 accepts either Python or ChimeraX (.cxc) scripts with the --script option.<div class="ydp8dc91ca4yiv0566955263"><br class="ydp8dc91ca4yiv0566955263" clear="none"></div><div class="ydp8dc91ca4yiv0566955263">For ChimeraX 1.4 just use</div><div class="ydp8dc91ca4yiv0566955263"><br class="ydp8dc91ca4yiv0566955263" clear="none"></div><div class="ydp8dc91ca4yiv0566955263"><span style="white-space: pre-wrap;" class="ydp8dc91ca4yiv0566955263Apple-tab-span"> </span>chimerax --nogui myscript.cxc</div><div class="ydp8dc91ca4yiv0566955263"><br class="ydp8dc91ca4yiv0566955263" clear="none"></div><div class="ydp8dc91ca4yiv0566955263">The --script option is mostly intended to pass arguments to a script.</div><div class="ydp8dc91ca4yiv0566955263"><br class="ydp8dc91ca4yiv0566955263" clear="none"></div><div class="ydp8dc91ca4yiv0566955263"><span style="white-space: pre-wrap;" class="ydp8dc91ca4yiv0566955263Apple-tab-span"> </span>Tom</div><div class="ydp8dc91ca4yiv0566955263"><br class="ydp8dc91ca4yiv0566955263" clear="none"><div><br class="ydp8dc91ca4yiv0566955263" clear="none"><blockquote type="cite" class="ydp8dc91ca4yiv0566955263"><div id="ydp8dc91ca4yiv0566955263yqt46144" class="ydp8dc91ca4yiv0566955263yqt2126162048"><div class="ydp8dc91ca4yiv0566955263">On Nov 28, 2022, at 2:00 PM, Visvaldas K. via ChimeraX-users <<a shape="rect" href="mailto:chimerax-users@cgl.ucsf.edu" class="ydp8dc91ca4yiv0566955263" rel="nofollow" target="_blank">chimerax-users@cgl.ucsf.edu</a>> wrote:</div><br class="ydp8dc91ca4yiv0566955263Apple-interchange-newline" clear="none"><div class="ydp8dc91ca4yiv0566955263"><div class="ydp8dc91ca4yiv0566955263"><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;" class="ydp8dc91ca4yiv0566955263yahoo-style-wrap"><div dir="ltr" class="ydp8dc91ca4yiv0566955263">Dear ChimeraX wizards,<br class="ydp8dc91ca4yiv0566955263" clear="none"></div><br class="ydp8dc91ca4yiv0566955263" clear="none">I was trying to generate hbond analysis via nogui, by issuing "chimerax --nogui --script "myscript.cxc",<br class="ydp8dc91ca4yiv0566955263" clear="none"><br class="ydp8dc91ca4yiv0566955263" clear="none">where in the script I put the following commands:<br class="ydp8dc91ca4yiv0566955263" clear="none"><br class="ydp8dc91ca4yiv0566955263" clear="none"><div class="ydp8dc91ca4yiv0566955263"><b class="ydp8dc91ca4yiv0566955263">open /Users/visvaldas/temp0000.pdb</b></div><b class="ydp8dc91ca4yiv0566955263">select /B<br class="ydp8dc91ca4yiv0566955263" clear="none">hbonds sel saveFile /Users/visvaldas/temp00.hbonds restrict cross batch true<br class="ydp8dc91ca4yiv0566955263" clear="none"></b><div class="ydp8dc91ca4yiv0566955263"><b class="ydp8dc91ca4yiv0566955263">quit</b></div><div class="ydp8dc91ca4yiv0566955263"><br class="ydp8dc91ca4yiv0566955263" clear="none"></div><div class="ydp8dc91ca4yiv0566955263">However, something is wrong with hbonds line since I am getting this error:</div><div class="ydp8dc91ca4yiv0566955263">Executing: runscript myscript.cxc<br class="ydp8dc91ca4yiv0566955263" clear="none">Traceback (most recent call last):<br class="ydp8dc91ca4yiv0566955263" clear="none"> File "/Applications/ChimeraX-1.4.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/core/scripting.py", line 83, in open_python_script<br class="ydp8dc91ca4yiv0566955263" clear="none"> code = compile(data, stream.name, 'exec')<br class="ydp8dc91ca4yiv0566955263" clear="none"> File "myscript.cxc", line 4<br class="ydp8dc91ca4yiv0566955263" clear="none"> hbonds sel saveFile /Users/visvaldas/temp00.hbonds restrict cross batch true<br class="ydp8dc91ca4yiv0566955263" clear="none"> ^<br class="ydp8dc91ca4yiv0566955263" clear="none">SyntaxError: invalid syntax<br class="ydp8dc91ca4yiv0566955263" clear="none"><br class="ydp8dc91ca4yiv0566955263" clear="none"><div class="ydp8dc91ca4yiv0566955263">What I am doing wrong? <br class="ydp8dc91ca4yiv0566955263" clear="none"></div><div dir="ltr" class="ydp8dc91ca4yiv0566955263">(Also, when using GUI, the hbonds line was much longer, so I deleted those reveal, color, etc entities to make it more relevant to batch. (The "long" line <br class="ydp8dc91ca4yiv0566955263" clear="none"></div><div class="ydp8dc91ca4yiv0566955263"><b class="ydp8dc91ca4yiv0566955263">hbonds sel saveFile /Users/visvaldas/temp00.hbonds color #fffb00 dashes 5 restrict cross reveal true retainCurrent true</b></div><div class="ydp8dc91ca4yiv0566955263">from the GUI does not work either)</div><div class="ydp8dc91ca4yiv0566955263"><br class="ydp8dc91ca4yiv0566955263" clear="none"></div><div dir="ltr" class="ydp8dc91ca4yiv0566955263">Best wishes,</div><div dir="ltr" class="ydp8dc91ca4yiv0566955263"><br class="ydp8dc91ca4yiv0566955263" clear="none"></div><div dir="ltr" class="ydp8dc91ca4yiv0566955263">Visvaldas<br class="ydp8dc91ca4yiv0566955263" clear="none"></div></div></div></div>_______________________________________________<br class="ydp8dc91ca4yiv0566955263" clear="none">ChimeraX-users mailing list<br class="ydp8dc91ca4yiv0566955263" clear="none"><a shape="rect" href="mailto:ChimeraX-users@cgl.ucsf.edu" class="ydp8dc91ca4yiv0566955263" rel="nofollow" target="_blank">ChimeraX-users@cgl.ucsf.edu</a><br class="ydp8dc91ca4yiv0566955263" clear="none">Manage subscription:<br class="ydp8dc91ca4yiv0566955263" clear="none">https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users<br class="ydp8dc91ca4yiv0566955263" clear="none"></div></div></blockquote></div><br class="ydp8dc91ca4yiv0566955263" clear="none"></div></div></div></div>
</div>
</div></body></html>