From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Apr 23 2003 - 15:01:05 CDT

Hi Paul, VMD-L,
  This is one of the things we're still working on documentation for,
but I've written a short example Tcl script that will do what you have
in mind. The docs for the beta version as we work on it are found here,
there's lots to do yet, but its getting there:
 http://www.ks.uiuc.edu/Research/vmd/vmd-new/ug/

Here's a simple example script that sets the "User" field and demonstrates
how you can use it to have time varying coloring with the 'mol modcolor'
and 'mol colupdate', 'mol scaleminmax'.

Let me know if you need help using this, I've only addressed the
"coloring over time" part of your question, getting the data into
VMD from multi-structure PDB's is a different question, and will
require us to work on the file loaders a bit.

##
## Example script that sets the "User" data field with time varying values
## which can be used to color over time
##

##
## load a fake "trajectory" by repeatedly loading the same PDB :-)
##
set file /Home/h2/johns/vmd/proteins/brH.pdb
if {[molinfo num] > 0} {
  mol delete all
}
mol new $file
for {set i 0} {$i<20} {incr i} {
  mol addfile $file
}

##
## Make an atom selection, set the "User" fields for all atoms
## in the selection ("all" in this case since I'm too lazy to do
## something more interesting)
##
set numframes [molinfo top get numframes]
set sel [atomselect top "all"]
for {set i 0} {$i<$numframes} {incr i} {
  animate goto $i
  $sel frame $i
  puts "Setting User data for frame [$sel frame] ..."
  $sel set user $i
}
$sel delete

##
## change the "color by" and "trajectory" tab settings so that
## the new color values, and start it animating...
##
mol modcolor 0 0 User
mol colupdate 0 0 1
mol scaleminmax 0 0 0.0 $numframes
animate forward

On Tue, Apr 22, 2003 at 06:44:35PM -0700, Paul Tangney wrote:
> Dear VMD-l,
>
> I have tried the new beta version of VMD.
> I have a long PDB trajectory from which I would like to color the atoms
> according to "beta" and I would like to update this coloring at each step.
>
> Apparently this is implemented in the new version but I can't seem to get it
> to work. Selecting "Update color every frame" under "Graphical
> Representations"
> doesn't seem to make any difference.
> Can anybody help me with this ?
>
> Thanks in advance,
>
> Paul

-- 
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