From: John Stone (johns_at_ks.uiuc.edu)
Date: Fri Dec 09 2005 - 10:57:18 CST

Lubos,
  I think the best way to accomplish what you have in mind is to write
a script that analyzes your structure water-by-water, frame-by-frame,
for the criteria you've specified, and sets the "user" field for each
atom to 0 or 1 depending on its water/ice status for that frame.
Once you've done this, you can simply use two reps with the selection
"water and (user < 1)" (for water), and "water and (user > 0)" (for ice)
coloring the water normally, and the ice differently as you suggest.
I'd start by using color by ColorID and get that working, then you can
worry about getting the precise coloring you have in mind once the
everything else is done. You'll need to enable the update selection
checkbox in the trajectory tab for this so that the ice/water selections
are updated every frame as you animate.

  John Stone
  vmd_at_ks.uiuc.edu

On Fri, Dec 09, 2005 at 05:41:37PM +0100, Mgr. Lubos Vrbka wrote:
> hi guys,
>
> i would like to use vmd to analyze a trajectory of water freezing. the
> desired 'output' is the following:
> 1) water molecules in the liquid phase would be colored normally (i.e.
> oxygen red, hydrogen white)
> 2) water molecules incorporated into the ice lattice would be colored
> differently (e.g., dark blue and light blue for oxygen and hydrogen,
> respectively)
>
> i'd like to distinguish between liquid and solid by means of hydrogen
> bonds (or coordination number) - water with 4 neighbors tetrahedrally
> oriented in proper distance (with some tolerance, of course) would be
> regarded as ice.
>
> if it will work, it would be nice to have one more feature. the color
> would be changed to 'ice' when a water would have 4 tetrahedrally
> oriented neighbors for some time, let's say 10 frames (and vice versa).
>
> the question is - is there something already written i could use? if
> not, what would be the best way to do it?
>
> thank you in advance for help. regards,
> lubos
>
> --
> .....................................................
> Mgr. Lubos Vrbka
>
> Center for Biomolecules and Complex Molecular Systems
> Institute of Organic Chemistry and Biochemistry
> Academy of Sciences of the Czech Republic
> Prague, Czech Republic
>
> http://www.molecular.cz/~vrbka
> .....................................................

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