Chimera Commands Index

Usage:
[ rangecolor | rangecolour ] attr_name[,a][,r][,s][,v][,l][,la][,lr] value1 color1 value2 color2 [... valueN colorN] atom-spec

Rangecolor colors over a range according to the values of an attribute such as atomic B-factor or residue hydrophobicity. The attribute, which must be numerical, is specified by attr_name; it can be built-in (see the attribute lists for atoms, residues and molecule models) or custom (see Define Attribute).

Render by Attribute is a related tool that provides a graphical interface for coloring (and scaling atom and "worm" radii) by attribute values.

The coloring can be restricted with one or more specifiers:

In the absence of a specifier, all of the above are affected. Other kinds of surfaces, 2D Labels, and bond labels are not affected.

At least two value/color-name pairs must be supplied. Pairs do not need to be ordered by value. Values (value1, value2, etc.) can be specified directly or with the special words:

value indicator meaning
min minimum value
max maximum value
mid average of min and max
novalue no value assigned for the attribute

A pair specified with novalue does not contribute toward the minimum of two pairs because the corresponding color is not involved in any ranges; it is only used to color items with no value for the specified attribute (for example, nucleic acid residues do not have kdHydrophobicity values). When an atom attribute is used to color ribbons, the ribbon segment for each residue is colored according to the average of the values for atoms in the residue. In all cases, the reported min, mid, and max values describe the original attribute rather than any derived quantity such as an average.

Each color name (color1, color2, etc.) can be any color name that can be used with the command color, except byatom or byelement.

The atom-spec indicates which atoms (and/or associated labels, surfaces, or ribbon) are to be colored. If no atom-spec is given, all atoms (and/or their associated labels, surfaces, or ribbon) are affected.

In Chimera, visible color is determined by a hierarchy. Rangecolor sets atom, atom label, and surface colors at the atom level, and ribbon and residue label colors at the residue level.

Examples:

rangecol bfactor,s min blue 20 white 40 red
- color the molecular surface (only) by atomic B-factor, from blue for the minimum value, to white for 20, to red for 40 and above
range kdHydrophobicity min lime green max orange novalue magenta
- color from lime green to orange according to Kyte-Doolittle hydrophobicity; color any residues without hydrophobicity assignments magenta

See also: color, colordef, rainbow, ribcolor, Define Attribute, Render by Attribute