Load multiple frames into psf file in VMD

1.5k Views Asked by At

How can I open a psf file in vmd and then load for this psf file multiple frames (dcd files) using line commands only ? I have like hundreds of dcd files and I don't want to do this manually.

2

There are 2 best solutions below

0
On BEST ANSWER

I would recommend using catdcd to join the dcd files together first. http://www.ks.uiuc.edu/Development/MDTools/catdcd/

Then you can just load one giant dcd file with your psf file.

To use catdcd: catdcd -o output_file.dcd file1.dcd file2.dcd ... last_file.dcd

0
On

Did you try with the following? mol new yourfile.psf waitfor all mol addfile yourfile1.dcd waitfor all mol addfile yourfile2.dcd waitfor all ... mol addfile yourfileN.dcd waitfor all

if you have hundreds of dcd files you can create the list of vmd commands using something like the following in a bash shell: for i in *dcd ; do printf "mol addfile %s waitfor all\n" $i ; done > your_vmd_script.tcl

and source that after you have opened your psf in vmd: mol new yourfile.psf waitfor all source your_vmd_script.tcl

but make sure that the amount of data you are loading does not exceed the memory of your system, otherwise it will start to swap to disk and become unresponsive.