VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Mon Mar 22 2004 - 11:18:35 CST
- Next message: John Stone: "Re: Re: msms and vmd on amd athlon64."
- Previous message: Mike McCallum: "Re: VMD1.82 version with MacOS10.3.3 DO NOT WORK"
- In reply to: Cosmin ROMAN: "coloring method User"
- Next in thread: Cosmin ROMAN: "Re: coloring method User"
- Reply: Cosmin ROMAN: "Re: coloring method User"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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
- text/plain attachment: usercolor.vmd
- Next message: John Stone: "Re: Re: msms and vmd on amd athlon64."
- Previous message: Mike McCallum: "Re: VMD1.82 version with MacOS10.3.3 DO NOT WORK"
- In reply to: Cosmin ROMAN: "coloring method User"
- Next in thread: Cosmin ROMAN: "Re: coloring method User"
- Reply: Cosmin ROMAN: "Re: coloring method User"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]