From: Bryan Roessler (roessler_at_uab.edu)
Date: Mon Jan 23 2012 - 16:15:48 CST

Got it:

set dcdfiles [glob *sim?.dcd *sim??.dcd]

Thanks!

On Mon, Jan 23, 2012 at 3:24 PM, John Stone <johns_at_ks.uiuc.edu> wrote:

>
> If you use a file naming convention that guarantees that lexical sorting
> will result in the right order of files, you could simply use the Tcl
> "glob" and "sort" commands in VMD, thereby generating the command line
> to launch catdcd, either by "exec" or other means.
>
> Cheers,
> John Stone
> vmd_at_ks.uiuc.edu
>
> On Mon, Jan 23, 2012 at 03:11:34PM -0600, Bryan Roessler wrote:
> > Hi,
> > I'm writing an automated analysis script that I want to be able to
> run on
> > all of my NAMD output, regardless of directory or file names. I've
> been
> > able to get most of it written except for the very important first
> step
> > where I concatenate all of my dcd output files into a single file,
> whose
> > output name I can control (and therefore run the analysis). I was
> > wondering if there was a way to load all dcd files within a directory
> into
> > CatDCD.
> > My current example:
> > set name "Project Name"
> > catdcd -o protein_only.dcd -otype dcd -i protein_only.ind
> > ../$name_sim1.dcd ../$name_sim2.dcd ../$name_sim3.dcd
> ../$name_sim4.dcd
> > ../$name_sim5.dcd ../$name_sim6.dcd ../$name_sim7.dcd
> ../$name_sim8.dcd
> > ../$name_sim9.dcd ../$name_sim10.dcd ../$name_sim11.dcd
> ../$name_sim12.dcd
> > ../$name_sim13.dcd ../$name_sim14.dcd ../$name_sim15.dcd
> > ../$name_sim16.dcd
> > If I run additional simulations in the future (sim17, sim18, etc), I
> want
> > to be able to rerun the analysis after concatenating the dcd's without
> > having to manually edit the analysis script.
> > Is there some way in Tcl or VMD that I can call all dcd files in a
> > directory?
> > I guess the messy option would be to add a huge number of dcd entries
> into
> > the above script and allow CatDCD to fail to find them if they had
> not yet
> > been created.
> > Thanks,
> > Bryan Roessler
>
> --
> NIH Resource for Macromolecular Modeling and Bioinformatics
> Beckman Institute for Advanced Science and Technology
> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349
> http://www.ks.uiuc.edu/Research/vmd/ Fax: 217-244-6078
>