From: Axel Kohlmeyer (axel.kohlmeyer_at_theochem.ruhr-uni-bochum.de)
Date: Mon May 24 2004 - 08:59:05 CDT

On Mon, 24 May 2004, Anthony Ivetac wrote:

AI> Is it possible to have a multiple-frame file consisting purely of "draw"
AI> statements?
AI>
AI> I have a 100-frame protein trajectory of alpha-carbon co-ordinates. I
AI> can make a movie of the trajectory rocking back & forth with the
AI> built-in vmdmovie utility.
AI>
AI> However, for every frame of the protein trajectory, I would also like to
AI> display an internal surface which is calculated by an external program
AI> (HOLE) and come sin the form of a file consisting of many "draw" statements.
AI>
AI> So is it possible to join all of these "draw" files together and give
AI> them each a frame ID (eg. MODEL X) and then when I play the trajectory a
AI> new surface will be drawn for each frame?

hi,
i don't think that this can be done in the way, you have in mind.
but there are alternative methods.

please check out
<http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/cpmd-vmd/part3.html>
to get an idea of one general strategy, which basically
consists of creating a small function that gets called
whenever a new frame is drawn.

in your specific case you can redraw the appropriate
graphics in several ways. first you delete the graphics
from the previous step (or just all that are attached
to the molecule) and then you could:

- have a set of files with the frame number encoded,
that contain the required draw statements for this
frame (e.g. draw-surf-000.tcl) and call 'source "draw-surf-$frame.tcl"'

- read in all draw statement into an array of lists of
  draw statements (draw_surf()) and then do something like

  foreach cmd $draw_surf($frame) {
    [ $cmd ]
  }

it requires a little bit of tcl/vmd scripting but it could be done.

if you need more help, feel free to contact me. that sounds like
an example that would fit in well with the collections of examples,
i already have on my vmd pages, so i would be willing to give
it a try and hack it in myself.

axel.

AI>
AI> Many thanks!
AI>
AI>

-- 
=======================================================================
Dr. Axel Kohlmeyer                        e-mail: axel.kohlmeyer_at_rub.de
Lehrstuhl fuer Theoretische Chemie          Phone: ++49 (0)234/32-26673
Ruhr-Universitaet Bochum - NC 03/53         Fax:   ++49 (0)234/32-14045
D-44780 Bochum  http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/
=======================================================================