From: Nicholas Musolino (musolino_at_mit.edu)
Date: Thu Apr 22 2010 - 10:53:08 CDT

On Apr 22, 2010, at 9:51 AM, Bjoern Olausson wrote:

> Hi VMD users,
>
> does anyone know if it is possible to color, lets say all waters, based on a
> time-frame range selection?
>
> I would like to color my waters like this:
> Frame 000-100: RED
> Frame 101-300: BLUE
> Frame 301-500: GREEN

In the VMD GUI, under Graphical Representations, create three representations.

FIRST REPRESENTATION:
selected atoms: water
Coloring Method: ColorID, then choose value 1 (red)
Under "Trajectory" tab, "Draw Multiple Frames" field: 0:100

SECOND REPRESENTATION:
selected atoms: water
Coloring Method: ColorID, then choose color 2
Under "Trajectory" tab, "Draw Multiple Frames" field: 101:300

THIRD REPRESENTATION:
selected atoms: water
Coloring Method: ColorID, then choose color 3
Under "Trajectory" tab, "Draw Multiple Frames" field: 301:500

Note that depending how many waters there are, this will be a busy representaion, if you're looking at all of them at once in a single picture. Or were you thinking about a movie?

For scripting, see "mol addrep", "mol representation", and "mol drawframes" commands here: http://www.ks.uiuc.edu/Research/vmd/current/ug/node135.html