From: Cosmin ROMAN (cosmin.roman_at_imag.fr)
Date: Mon Mar 22 2004 - 11:56:03 CST

Thanks John,

I blindly figured it out yesterday. You know, the "user" field in the
"atomselect" is not referenced in the user's guide, I had to guess it (and
look into vmd's code). Otherwise, it is very strange, my script looks very
much like yours except for the "fake trajectory" where I used a loop over
"animate dup frame 0 0"

A powerful feature this User color is ...

Thank you again,
Cosmin

:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:
:
   Cosmin ROMAN, Ph.D. Student.
:
   TIMA-INPG, MNS Group,
: 46 Avenue Félix Viallet,
   38031 Grenoble Cedex, FRANCE.
:
   Tel : 00 33 4 76 57 48 34
: Fax : 00 33 4 76 47 38 14
   e-mail : cosmin.roman_at_imag.fr
:
:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:
----- Original Message -----
From: "John Stone" <johns_at_ks.uiuc.edu>
To: "Cosmin ROMAN" <cosmin.roman_at_imag.fr>
Cc: <vmd-l_at_ks.uiuc.edu>
Sent: Monday, March 22, 2004 6:18 PM
Subject: Re: vmd-l: coloring method User

> Hi,
> I've included a simple Tcl script that illustrates how one would set
> the values of the "User" color field to animate something. Let me know
> if you need more examples/info on this. Basically, the "User" color field
> is a time-varying field (unlike all the others) and at present the only
way
> to get data there is to put it there with your own script (i.e. none of
the
> plugins read data for the "User" field presently).
>
> Enjoy,
> John Stone
> vmd_at_ks.uiuc.edu
>
> ##
> ## 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 Sun, Mar 21, 2004 at 04:05:23PM +0100, Cosmin ROMAN wrote:
> > Hello,
> >
> > I would like to know how is the "User" coloring method supposed to work.
I have been trying to read it from the user's guide but all it says there is
simply "Provides a single data value for each atom for each timestep". Can I
supply to vmd a procedure that computes the atom color at each time frame,
or I should provide it a kind of a list.
> >
> > Thank you,
> > Cosmin
> >
> > :*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:
> > :
> > Cosmin ROMAN, Ph.D. Student.
> > :
> > TIMA-INPG, MNS Group,
> > : 46 Avenue Félix Viallet,
> > 38031 Grenoble Cedex, FRANCE.
> > :
> > Tel : 00 33 4 76 57 48 34
> > : Fax : 00 33 4 76 47 38 14
> > e-mail : cosmin.roman_at_imag.fr
> > :
> > :*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:
>
> --
> 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
>