echo > abcmol.script set write on
for ppmfile in *.abc
do
  echo >> abcmol.script load abc4 \"$ppmfile\"
  echo >> abcmol.script rotate x -73
  echo >> abcmol.script wireframe 80
  echo >> abcmol.script colour atoms temperature
  echo >> abcmol.script write $(basename $ppmfile .abc).ppm
  echo >> abcmol.script zap
done
echo >> abcmol.script quit
abcmol < abcmol.script
rm abcmol.script
for ppmfile in *.ppm
do
  convert $ppmfile gif:$(basename $ppmfile .ppm).gif
  rm $ppmfile
done
gifsicle *.gif > $(basename $ppmfile .ppm)movie.gif2
rm *.gif
mv $(basename $ppmfile .ppm)movie.gif2 $(basename $ppmfile .ppm)movie.gif

