VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Fri Jan 21 2005 - 17:26:46 CST
- Next message: John Stone: "Re: Autoionize / SODIUM"
- Previous message: John Stone: "Re: python or Tcl/Tk"
- In reply to: Jay Lee: "dynamic coloring"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi,
You'll want to color by "user". In order to do this you'll first
need to populate the "user" field for each atom with a meaningful
scalar quantity at each timestep. I've included a very simple example
script that does something like this below:
##
## 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 Fri, Jan 21, 2005 at 10:36:39AM -0800, Jay Lee wrote:
> Hi, Gurus
>
> I have a question. Would you help me on this?
>
> Is there any way to color the system based on
> dynamics?
>
> If, for examples, there is a system of 100 atoms,
> properties of each of them (position, energy...) are
> changing while MD running.
> So I would like to make color of each atom in that
> system keep changing also!
>
> What should I do for that?
>
> Thank you.
>
> Regards,
>
> AZ
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - Helps protect you from nasty viruses.
> http://promotions.yahoo.com/new_mail
-- 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
- Next message: John Stone: "Re: Autoionize / SODIUM"
- Previous message: John Stone: "Re: python or Tcl/Tk"
- In reply to: Jay Lee: "dynamic coloring"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]