From: René Hafner TUK (
Date: Tue May 04 2021 - 13:57:07 CDT

Hi Kelly,

    you could write a wrapper shell script that

    creates multiple of such tcl script that only load 100 frames or
    something each


    set first xxx

    set last yyy

    mol new $psffile

    mol addfile $dcdfile first $first last $last

    This script you can then easily pass to a cluster batch system like
    slurm (if you have this at hand):

    for i in {1..10}; do

         sbatch -c 1 -n 1 --wrap 'vmd -dispdev text -e script_id$i.tcl'




On 5/4/2021 7:45 PM, Mcguire, Kelly wrote:
> I have a DCD file with 5000 frames.  I have a script that saves each
> frame as a PDB (shown below).  This takes quite a bit of time to
> finish as you can imagine.  Is there a way to run this in parallel
> with MPI (I don't have much experience with this) or on multiple CPUs
> on a node with 24 CPUs or multiple threads to speed up the process?  I
> will need to do this with multiple DCD files in the future. Thanks!
> mol new ../../Aldolase-HMR.prmtop
> mol addfile ../../ waitfor all
> for {set i 1} {$i < 4999} {incr i} {
>          [atomselect top all frame $i] writepdb $i.pdb
>  }
> Dr. Kelly McGuire
> Postdoc
> Chemistry/Biochemistry Department
> Natural Science Building, 4104A, 4106A, 4017

Dipl.-Phys. René Hafner
TU Kaiserslautern