From: Axel Kohlmeyer (
Date: Mon Jul 30 2007 - 19:00:55 CDT

On Mon, 30 Jul 2007, karan uppal wrote:

KU> Hi,
KU> How to change the color of a selection in TCL ? I want to color and
KU> represent the selected residues and chains differently than the default. I
KU> found documentation for changing the entire molecule and frames, but it's
KU> not working for the selection.


please note that what you want to do is not directly
possibe, since the color itself is not a property of
atoms, but created per representation based on the
selected coloring scheme.

one option would be to create a new representation
for each selection and select a color id.

another option could be to assign a different user
value to each selection and then do color by user,
but that would limit you to the available color schemes.

another option could be to modify some different,
otherwise unused property (atom type?) and then
assign new values based on the existing coloring
table for this property.

the first suggestion would be the most flexible
but also the most laborious option.


KU> Thanks in advance
KU> -Karan
KU> _________________________________________________________________
KU> Local listings, incredible imagery, and driving directions - all in one
KU> place!

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.