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

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