[Chimera-users] How to sequentially open PDB files using a "for loop" in the UCSF chimera's command line?

Prathvi Singh prathvi at iitk.ac.in
Sat Sep 18 07:13:33 PDT 2021


Thanks a lot!

On Thu, Sep 16, 2021 at 9:39 PM Elaine Meng <meng at cgl.ucsf.edu> wrote:

> Hi Prathvi,
> 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:
> <https://www.rbvi.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html>
>
> 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.
>
> open myscript.cxc foreach  ~/mypdbfolder/*.pdb
>
> <
> https://www.rbvi.ucsf.edu/chimerax/docs/user/commands/usageconventions.html#cxc-files
> >
> <
> https://www.rbvi.ucsf.edu/chimerax/docs/user/commands/open.html#forEachFile
> >
>
> I hope this helps,
> Elaine
> -----
> Elaine C. Meng, Ph.D.
> UCSF Chimera(X) team
> Department of Pharmaceutical Chemistry
> University of California, San Francisco
>
> > On Sep 16, 2021, at 12:21 AM, Prathvi Singh via Chimera-users <
> chimera-users at cgl.ucsf.edu> wrote:
> >
> > Greetings,
> > 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.
> > Thanks,
> > Prathvi
>
>

-- 
Prathvi Singh,
Research Fellow,
Department of Biological Sciences & Bioengineering,
Indian Institute of Technology, Kanpur-208016
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20210918/eb27459f/attachment.html>


More information about the Chimera-users mailing list