From: Axel Kohlmeyer (
Date: Mon May 07 2007 - 08:47:16 CDT

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

hope that helps,

AS> frame by its ID.
AS> I tried this but it does not work:
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> }

Axel Kohlmeyer
   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.