From: Sourav Ray (
Date: Fri Feb 13 2015 - 04:09:36 CST


I have been trying to extract all the frames of a protein into a single PDB
file. There is a code available currently in a thread here for extracting
each frame in different PDB files:

set nf [molinfo top get numframes]

for { set i 0 } {$i < $nf } { incr i } {
        set sel [atomselect top protein frame $i]
        $sel writepdb $i.pdb

Can someone please suggest a modification that works? Also, what if there
are multiple proteins? Can we extract each one separately?