Jul 1 2004 |
buildpep "ACDF" # tetrapeptide # zoom out and create a small remote view v1=View() # the 1st view # zoom in and rotate v2=View() # the last view for i=1,100 set view View(v1,v2,i*0.01) # interpolation endforNow you can add a specific display ( cpk, skin or anything else) and add the write image command after set view . The following script and macro make a .mov file for a specified molecule. # makemovie -f qt -o tamox.mov -c qt_anim -r 15 `ls -tr ../f*.tif` print "DO NOT FORGET icmt -24; set view 10 10 640 480" macro molkino i_tZoom (20) i_tRotate (20) l_preview (yes) R_startView R_endView s_Files ("/icmdata/movies/tamox/f") GRAPHICS.ballQuality = 15 nfr=30 for i=0,i_tZoom*nfr set view View(R_startView ,R_endView, 0.5-0.5*Cos(180.*i/Real(i_tZoom*nfr))) if(!l_preview) write image s_Files + i endfor B = 0. for i=0,i_tRotate*nfr A = 360./Real(nfr*i_tRotate) * i A = 180. - 180.*Cos(A/2.) rotate view Rot({0. 1. 0.} A-B) B = A if(!l_preview) write image s_Files + (i_tZoom*nfr+ i) endfor endmacro #read object "tamoxifen" read object "propecia.ob" set window 10 10 640 480 GRAPHICS.ballRadius=0.4 display xstick color a_//c* green color a_//h* white read rarray "v0" read rarray "v1" set view v0
In this case, the process of making a molecular movie animating the trajectory can be split into two steps. The first step is a preparation of a series of images stored as separate disk files. Watch the ICM movie by the display movie command and select a range of frames you are going to include to the movie. There are two ways how a series of the molecular graphics images can be saved as tif or rgb formatted files. !_ Image collection (type I) The following molecular representations are allowed in this case: wire, cpk, ball, stick, xstick and ribbon . The image option of the ICM display movie command is required. An example: build "alpha" read movie "alpha" display ribbon color ribbon a_/1:9 magenta color ribbon a_/10:18 green print "Adjust the view, press ENTER to continue" pause # Pause to adjust a view of the molecule # start of the collection of the image disk files # (note, tif files are to be saved) nframe = Nof(frame) print "Total number of frames = ", nframe # specify the range you need, for example: ifrom = 10 ito = 20 # otherwise, for all frames: # ifrom = 1 # ito = nframe display movie ifrom ito imageComputationally more expensive skin and surface molecular representations (or a combination of any of these two with those mentioned above) require an ICM script, as in the following example. !_ Image collection (type II) build "alpha" read movie "alpha" display xstick a_//n,ca,c set window 600 30 640 480 # good to convert it later into NTSC format # change 640 480 to appropriate dimensions for PAL lineWidth = 3. print "Adjust the view, press ENTER to continue" pause nframe = Nof(frame) print "Total number of frames = ", nframe ifrom = 10 ito = 20 icount = 0 l_confirm = no IMAGE.compress = yes for iframe = ifrom, ito load frame iframe icount = icount + 1 imgname = s_tempDir + "alpha_" + String(icount-1) display xstick a_//n,ca,c green display surface a_/7:12/!n,ca,c a_/7:12/!n,ca,c magenta write image imgname undisplay surface # should be removed and redisplayed at the next step endfor Whatever protocol you make use of, a series of files should appear in the s_tempDir directory. List their names in a file, for example, alpha.lst: /usr/tmp/alpha_0.tif /usr/tmp/alpha_1.tif /usr/tmp/alpha_2.tif /usr/tmp/alpha_3.tif /usr/tmp/alpha_4.tif /usr/tmp/alpha_5.tif /usr/tmp/alpha_6.tif /usr/tmp/alpha_7.tif /usr/tmp/alpha_8.tif /usr/tmp/alpha_9.tif(Note, image numbers are started from zero, and "_" (underscore) is inserted before the current frame number.) Now, you can put these image files into a movie file. We suggest to use the makemovie command for Silicon Graphics machines. The following is a sample UNIX-shell command line which should be entered to make a non-interlaced MPEG-formatted movie with the frame size 640 by 480 saved in the Apple QuickTime movie file alpha.qt: makemovie -f qt -o alpha.qt -c qt_anim -s 640,480 -r 30 ` cat alpha.lst` Upon completion, use the movieplayer IRIX command to see the movie. UNIX man on-line help should allow you to learn more about these (and other) helpful commands. And let us give you several helpful hints:
|
Copyright© 1989-2004, Molsoft,LLC - All Rights Reserved. |
This document contains proprietary and confidential information of
Molsoft, LLC. The content of this document may not be disclosed to third parties, copied or duplicated in any form, in whole or in part, without the prior written permission from Molsoft, LLC. |