<div dir="ltr">Thanks a lot! <br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 16, 2021 at 9:39 PM Elaine Meng <<a href="mailto:meng@cgl.ucsf.edu">meng@cgl.ucsf.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Prathvi,<br>
There is no "for loop" to process multiple PDB files using the Chimera command line. Instead you would have to use Python as described here:<br>
<<a href="https://www.rbvi.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html" rel="noreferrer" target="_blank">https://www.rbvi.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html</a>><br>
<br>
However, you can do it in ChimeraX: when opening a ChimeraX command file, you can use the ChimeraX command "open" with the "forEachFile" option to run it on multiple input files, e.g.<br>
<br>
open myscript.cxc foreach ~/mypdbfolder/*.pdb<br>
<br>
<<a href="https://www.rbvi.ucsf.edu/chimerax/docs/user/commands/usageconventions.html#cxc-files" rel="noreferrer" target="_blank">https://www.rbvi.ucsf.edu/chimerax/docs/user/commands/usageconventions.html#cxc-files</a>><br>
<<a href="https://www.rbvi.ucsf.edu/chimerax/docs/user/commands/open.html#forEachFile" rel="noreferrer" target="_blank">https://www.rbvi.ucsf.edu/chimerax/docs/user/commands/open.html#forEachFile</a>><br>
<br>
I hope this helps,<br>
Elaine<br>
-----<br>
Elaine C. Meng, Ph.D. <br>
UCSF Chimera(X) team<br>
Department of Pharmaceutical Chemistry<br>
University of California, San Francisco<br>
<br>
> On Sep 16, 2021, at 12:21 AM, Prathvi Singh via Chimera-users <<a href="mailto:chimera-users@cgl.ucsf.edu" target="_blank">chimera-users@cgl.ucsf.edu</a>> wrote:<br>
> <br>
> Greetings,<br>
> Is it possible to use a "for loop" in the UCSF chimera's command line to open a PDB file, perform an action (say delete an atom), save the PDB file & close it, open the next PDB file, perform the same operation, save it & close it and so on.<br>
> Thanks,<br>
> Prathvi<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Prathvi Singh,<div>Research Fellow,<br><div>Department of Biological Sciences & Bioengineering,</div><div>Indian Institute of Technology, Kanpur-208016</div></div></div></div></div></div>