From: John Stone (johns_at_ks.uiuc.edu)
Date: Mon May 07 2007 - 10:09:23 CDT

Hi,
  I thought I should also mention that for the simple case of coloring
by frames, the color by "Timestep" feature is already built-in and should
work fine when draw multiple frames etc. That is probably worth trying
even before you begin writing various scripts!

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Mon, May 07, 2007 at 09:47:16AM -0400, Axel Kohlmeyer wrote:
> On Mon, 7 May 2007, andrea spitaleri wrote:
>
>
> hi andrea!
>
> AS> Hi all,
> AS> is there any way to colour the frames by different colour. For
> AS> instances, 10 frames and colour each
>
> i can imagine a number of ways of coloring by frame.
> the question is what exactly do you want to show?
> do you want to have a representation that gradually
> changes color with the frame number, or do you want
> to show multiple frames at the same time in (very)
> different colors?
>
> my suggested strategy would be to copy the frame number
> into the 'user' field of the relevant atoms and then
> either use a representation with with User colorization
> or multiple representations with different color ids and
> selections with 'user == x' to select frame x
> and activate Update Selection Every Frame.
> you can then set Draw Multiple Frames to whatever
> you need to display either only the current or multiple
> frames.
>
> hope that helps,
> axel
>
>
> AS> frame by its ID.
> AS> I tried this but it does not work:
> AS>
> AS> proc color_frame {ID} {
> AS> set n [molinfo $ID get numframes]
> AS> for { set i 0 } { $i < $n } { incr i } {
> AS> mol modcolor 0 0 ColorID $i
> AS> mol colupdate 0 0 1
> AS> animate next
> AS> display update
> AS> }
> AS> }
> AS>
> AS>
> AS>
> AS>
>
> --
> =======================================================================
> Axel Kohlmeyer akohlmey_at_cmm.chem.upenn.edu http://www.cmm.upenn.edu
> Center for Molecular Modeling -- University of Pennsylvania
> Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
> tel: 1-215-898-1582, fax: 1-215-573-6233, office-tel: 1-215-898-5425
> =======================================================================
> If you make something idiot-proof, the universe creates a better idiot.

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