From: John Stone (johns_at_ks.uiuc.edu)
Date: Thu Aug 02 2012 - 14:01:18 CDT

Nate,
  An indirect way to color something by a color scale color index, is to
assign a floating point value to one of the per-atom fields, and set the
color scale data range values so that you can predict which color scale
index that the per-atom floating point values will map to. In the case of
the isosurface representation, things get a little more complex, because
the isosurface color is not associated with a per-atom field, so the analagous
trick is to make a 1x1x1 voxel volumetric dataset and set the voxel value
appropriately. The reason that VMD doesn't let you simply choose one of
the color scale color indices directly is because that goes beyond the
range of the GUI controls, and so the self-consistency checks in the code
won't let you do it. Let me know if you have further questions.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Thu, Aug 02, 2012 at 12:36:02PM -0600, Nate Hurley wrote:
> Hi all,
> I'm working on a script that displays both drawn objects and isosurfaces
> of molecules. I can color the drawn objects with colors within the color
> scale, but it seems that if I want to change the colors of the
> isosurfaces, I can only set the ColorID to a value in the range 0-32.
> For example:
> color scale method RGB
> graphics top color 1024
> graphics top sphere {0 0 0}
> graphics top color 33
> graphics top sphere {0 0 1}
> Draws a blue sphere, and then a red sphere. However, once I have drawn my
> Isosurface, typing
> mol modcolor 0 top ColorID 1024
> only sets the color to 32 (orange3).
> Is there a way to access the color scale when coloring my Isosurface?
> Thanks for your time.
> -Nate Hurley

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
http://www.ks.uiuc.edu/~johns/           Phone: 217-244-3349
http://www.ks.uiuc.edu/Research/vmd/       Fax: 217-244-6078