From: Axel Kohlmeyer (
Date: Sun May 16 2010 - 11:00:52 CDT

2010/5/16 <>:
> Dear VMD users and developers.
> I was using "animate write pdb $pdb beg 0 end $final_frame waitfor all sel
> $sel" in order to create a pdb file that contains the coordinates of
> selected residues.
> now I want to save the coordinates not from the whole trajectory but only if
> it answer to some condition. I tried to use "animate write pdb $pdb beg $i
> end $i waitfor all sel $sel" but instead of appending pdb from different
> frames the command overwrites the file so that i\m getting only the
> coordinates of the last frame. How can I save the coordinates of my
> selection from all the frames that answer the desired condition? The

dear regina,

just write each segment to a different file (you can generate a
file name with, e.g., [format "myfile%06d.pdb" $n]) and then
combine the files with catdcd (or in this case just plain cat).


> condition is sasa.
> Thank you in advance.
> Regina

Dr. Axel Kohlmeyer
Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.