Tony,

This isn't possible with normal objects, but it is with discrete ones.
Normal states are efficient because they only have coordinate information,
not atomic properties such as color.  With "discrete" objects, each state
has its own atom information.

Assuming that you're using version 0.95 and that you are creating states
from PDB files, you can do the following:

first load states into a discrete object:

   load $PYMOL_PATH/test/dat/pept.pdb, discrete=1
   load $PYMOL_PATH/test/dat/pept.pdb, discrete=1
   load $PYMOL_PATH/test/dat/pept.pdb, discrete=1
   load $PYMOL_PATH/test/dat/pept.pdb, discrete=1

then color each state uniquely:

   color red, state 1 and elem c
   color blue, state 2 and elem c
   color green, state 3 and elem c
   color yellow, state 4 and elem c

Prior to 0.95, the state selection operator was partially broken -- this was
one of the many of the things that have been fixed.

Note that the "discrete" approach also makes it possible to show the
evolution of atomic properties such as B-factors, over time:

first load states into a discrete object:

   load ref1.pdb, ref, discrete=1
   load ref2.pdb, ref, discrete=1
   load ref3.pdb, ref, discrete=1
   load ref4.pdb, ref, discrete=1

then apply the overall coloring:
 
   spectrum b, selection=ref

Cheers,
Warren

> -----Original Message-----
> From: Tony
> Sent: Monday, April 05, 2004 2:08 PM
> To: Warren DeLano
> Subject: colors and states
> 
> Warren,
> 
> I have figured out how to move ("rotate") my domains in a 
> random order.
> However, I am unable to find any reference to being able to 
> change the color of a selection in a state-dependent way.  
> For example, I want
> selection1 to change from red in state 1 to pink in states 2-8 and
> selection2 to change from violet in states 1-7 to purple in state 8.
> Another solution would be to define a state-dependent color map.
> 
> Can I do this?
> 
> Please email me the invoice fro an academic verion of Pymol.
> 
> Tony 



Reply via email to