From: Shenoy, Sukesh (sukeshshenoy_at_neo.tamu.edu)
Date: Tue Oct 03 2006 - 10:37:04 CDT

Howdy,
    I have loaded a 1000 nitromethane molecules on 16384 frames. However i
need the position of just one particular molecule on all frames. So i wrote
a script file to do this. However it gives me a generic windows error
message after the script runs for a certain time and then VMD closes.
Surprisingly the same script file runs for 1000 water molecules perfectly
and using VMD menu i am able to store all the coordinates. I have a 1 GB
memory, so i am not sure if this is a memory problem. My script file is
below. please suggest ideas.

set outfile [open nitromethane.xyz w];
set nf [molinfo top get numframes];
for { set i 0 } { $i <= $nf } { incr i } {
set sel [atomselect top "resid 1" frame $i];
$sel writexyz w.xyz;
set fd [open w.xyz r];
set s [read $fd];
close $fd;
puts $outfile $s;
}
close $outfile;

Thanks,
Sukesh