From: John Stone (johns_at_ks.uiuc.edu)
Date: Mon Feb 24 2003 - 10:49:00 CST

Dear Paul,
  All version of VMD released to date (though this is about to change..)
have only one set of "beta" values for all timesteps. In order to change
it on-the-fly for displaying a trajectory you need to re-set the values in
the beta fields of your atoms at each timestep by hooking on the frame
callback. The first part of this is done easily as in the "betacolor_distance"
script at the bottom of this page of the User's guide:
  http://www.ks.uiuc.edu/Research/vmd/vmd-1.8/ug/node180.html

In order to rewrite the values when the displayed trajectory frame
changes, you'll need to use the vmd_frame Tcl callback discussed
here:
  http://www.ks.uiuc.edu/Research/vmd/vmd-1.8/ug/node143.html#7065

I don't have an example script for what you want to do, but it shouldn't
be too difficult to write one after reading the betacolor_distance
example and the several callback/picking examples.

VMD 1.8.1 and later versions will have a much easier mechanism for doing
this which will not require the use of callbacks etc.

Thanks,
  John Stone
  vmd_at_ks.uiuc.edu

On Sun, Feb 23, 2003 at 06:34:51PM -0800, Paul Tangney wrote:
> Hello,
> I am trying to make movies from pdb-file trajectories where the
> colors of the atoms are defined by the 'beta' index and are updated at
> each step.
> I can't get them to update at each step.
>
> I found a previous posting about this problem but I couldn't find the
> example
> script mentioned in the reply (below). Do I need to learn
> Tcl or is there a quick-fix ? Does anybody have an example script ?
>
> Thanks for help,
>
> Paul Tangney
>
>
> P.S : Great program, by the way. I just started using it.
>
>
> >Dear Christopher,
> > Yes, you can write a script that lets you change coloring as a movie
> >progresses, though its sometimes a bit tricky to make it fast too..
> >There's a "beta color" example script in the VMD manual here:
> > http://www.ks.uiuc.edu/Research/vmd/current/ug/node182.html
> >
> > You could re-color the molecule every frame by doing a Tcl trace
> > on the active VMD frame, etc. You could also do it by driving
> > it in a loop with animate goto and setting the colors explicitly.
> > I think this question has come up enough that perhaps its time for
> > me to write an easy-to-read example of the various ways of doing
> > this. Let us know if you need more information about this.
> > Otherwise, I'll see if I can take some time and write up a nice
> > example of how to do this.
> >
> > Thanks,
> > John Stone
>
> --
> Paul Tangney
> OoOo-------------------------------------------------------------
> University of California at Berkeley / Phone : (510) 642-2635
> Physics Department #7300 / Home Phone : (510) 883-1259
> 366 Le Conte Hall / Fax : (510) 643-9473
> Berkeley, CA 94720 / Email : tangney_at_civet.berkeley.edu
> Home page : http://civet.berkeley.edu/tangney/
> -----------------------------------------------------------------
>
>

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349              
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078