#!/bin/csh

set time = 0
set i = 1

ptraj GAAC-ions.topo <<EOF
trajin GAAC-strip.netcdf
rms first mass out rms.tmp2 :1-36
EOF
perl ~/perl/avg_column1.perl 1 $time < rms.tmp2 > rms.coor2

while ($i < 48000) 

@ i = $i + 1
@ time = $time + 50

ptraj GAAC-ions.topo <<EOF
trajin GAAC-strip.netcdf
runningaverage window $i
rms first mass out rms.tmp2 :1-36
EOF

perl ~/perl/avg_column1.perl 1 $time < rms.tmp2 >> rms.coor2

end
