From: Bryan Roessler (roessler_at_uab.edu)
Date: Mon Jan 23 2012 - 18:24:07 CST

Uh oh, it looks like catdcd cannot load multiple dcd's at one time from a
variable.

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

...gives me a properly formatted list of the filenames in $dcdfiles

If I try to call $dcdfiles in catdcd, it thinks that it is a single
filename and cannot find the files.

I've also tried adding

regsub -all {[ \r\t\n]+} $dcdfiles " -dcd " dcdfiles

...to delineate the filenames a little more clearly, and it still fails.

Ideas?

On Mon, Jan 23, 2012 at 4:15 PM, Bryan Roessler <roessler_at_uab.edu> wrote:

> 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
>>
>
>