[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ccp4bb]: Summary: making movie by Bobscript



***  For details on how to be removed from this list visit the  ***
***          CCP4 home page http://www.ccp4.ac.uk         ***

Thank you all for kind response for my question about
how to make movie by Bobscript.  Here are the summary
for the reponses.  I have not finished to try them all
yet.

1. Dr. David R. Cooper <drc2n@unix.mail.virginia.edu>

movie_david.sh
##########################
#!/bin/sh
#Parameters
size="300x300"
start=0
stop=359
delta=5 
infile=temp.inp
 
#Generate frames
angle=$start
while [ $angle -le $stop  ] ; do
echo "by rotation y " $angle > rotation.file 
outfile=`printf frame-%03d.tif $angle `
bobscript -r < $infile > ms.rd
cat <<end-floor >> ms.rd
15
6
-.5 -.6 -.5   0 -.7 .5  .5 -.6 -.5    0 0 0
9
15
6
0 0 -1.5    .5 0 -1.5   .5 .5 -1.5   .1 .1 .7
9
end-floor
 render -tiff -size $size< ms.rd > $outfile
 angle=`expr $angle + $delta`
done

#Make movie
convert -delay 5 -loop 0 frame-*.tif movie.gif

#Cleanup -- leave first frame
 angle=`expr $start + $delta`
while [ $angle -le $stop  ] ; do
outfile=`printf frame-%03d.tif $angle `
rm -f $outfile
 angle=`expr $angle + $delta`
done

2. Dr. Peter Burkhard <Peter.Burkhard@unibas.ch>

movie_pete.csh
##########################
#!/bin/csh -f # set curr = 0 set old = 0 while ($curr
!= 360) rm temp.r3d sed "s/by rotation y ${old}/by
rotation y
${curr}/g" temp.inp > test_{$old}.inp mv
test_{$old}.inp temp.inp foreach i ( temp.inp )
molscript2 -r < $i > $i.r3d
sed 's/50 50 tiles in/40 40 tiles in/' $i.r3d >
temp.r3d render -sgi < temp.r3d mv render.rgb
$curr.rgb rm $i.r3d $i.tif
end set old = $curr @ curr = $curr + 5 end sed "s/by
rotation y ${old}/by rotation y 0/g" temp.inp >
test_{$old}.inp
mv test_{$old}.inp temp.inp makemovie -o test.qt -c
jpeg -f qt \ 0.rgb 5.rgb \ 10.rgb 15.rgb \ 20.rgb
25.rgb \ 30.rgb
35.rgb \ 40.rgb 45.rgb \ 50.rgb 55.rgb \ 60.rgb 65.rgb
\ 70.rgb 75.rgb \ 80.rgb 85.rgb \ 90.rgb 95.rgb \
100.rgb 105.rgb \
110.rgb 115.rgb \ 120.rgb 125.rgb \ 130.rgb 135.rgb \
140.rgb 145.rgb \ 150.rgb 155.rgb \ 160.rgb 165.rgb \
170.rgb
175.rgb \ 180.rgb 185.rgb \ 190.rgb 195.rgb \ 200.rgb
205.rgb \ 210.rgb 215.rgb \ 220.rgb 225.rgb \ 230.rgb
235.rgb \
240.rgb 245.rgb \ 250.rgb 255.rgb \ 260.rgb 265.rgb \
270.rgb 275.rgb \ 280.rgb 285.rgb \ 290.rgb 295.rgb \
300.rgb
305.rgb \ 310.rgb 315.rgb \ 320.rgb 325.rgb \ 330.rgb
335.rgb \ 340.rgb 345.rgb \ 350.rgb 355.rgb \ 

3. Dr. Charles S. Bond <C.S.Bond@dundee.ac.uk>

in molscript input file,

add lines in the transform atom section as follows

transform atom * by centre position atom *
!by rotation z 90 etc...
by rotation y %Y% 
;

movie_charlie.csh
##########################

#!/bin/csh -f

# use perl to write a list of formatted numbers from
000 to 044
foreach n (`perl -e 'foreach$f(0..44){printf"%03d
",$f}'`)
# convert those numbers to rotation angles
@ y = $n * 8
# substitute each angle into the input file and render
with molscript
and r3d
sed "s/%Y%/$y/g" del.in | molscript -r | render -sgi
movie${n}.sgi
end

# now combine the 45 images into an animated gif
convert movie[0-9][0-9][0-9].sgi movie.gif

4. Mr. Goat <kkirkwood@dccnet.com>

movie_goat.ksh
##########################
#!/bin/ksh
# Create 90 frames of the X- Axis
((n = 0))
while ((n <=360))
# open the input template
do
  exec 1> bobout.txt
  while read line
  do
    rotation=${line#by rotation x }
    if [[ $rotation == $line ]]
    then 
      echo $line
    else
      echo "by rotation x  $n.0"
    fi
  done < bobfile.txt
  # we have modified it into filename bobout now run
it
  (( n = n + 4))
  exec 1>&-
  outfile="outfile.$n"
  bobscript <bobout.txt> $outfile   
done

5. Other suggestions and useful websites:

1) Dr. Juergen Bosch <jbosch@biochem.mpg.de>,
http://www.biozentrum.unibas.ch/~xray/dino/
http://www.povray.org/

2) Dr. Lothar Esser <lesser@helix.nih.gov>
http://convent.nci.nih.gov/~web/glr/glrhome.html

3) Dr. Gerard "DVD" Kleywegt <gerard@xray.bmc.uu.se>
http://portray.bmc.uu.se/cgi-bin/markh/molray.pl

Cheers,
Mary







__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/