Disclaimer: All the contributions displayed on this page were made by subscribers of the PyMOL mailing list at
sourceforge.net and Warren L. DeLano himself. Although i have checked most of the things listed here, i cannot guarantee
that everythings works well. I cannot even guarantee that i have understood everything written on this page. Please be cautious.
Examples:
color red, ss h color yellow, ss s color green, ss l+''When "the colour bleeds from the ends of helices and sheets into loops," try setting cartoon_discrete_colors to 'on' (or 1).
set cartoon_discrete_colors, 1or from the the "Cartoon" menu of the external GUI find "Discrete Colors" as the last item in the menu.
The "util" module contains a number of functions that color the atoms according to type, with different colors for the C atoms. For instance,
util.cbay threein a .pml script will color object "three" by atom type, with the carbon atoms in yellow ("color by atom yellow").
Some RGB triplets do have equivalents in CMYK space, and as a
result, a figure that looks great on a screen can come out with unpredictable
colors when printed.
Most applications do a good job with RGB-to-CMYK conversions
for photos, but do not do such a good job with graphics that use pure primary
colors. For example, reds are generally OK, but pure blues and greens
do not translate very well.
Here are some RGB values that are within the CMYK gamut (i.e. are "CMYK-safe"). In general, colors in PyMOL can be assigned manually:
set_color green= [0.00 , 0.53 , 0.22]
set_color carbon= [0.00 , 0.53 , 0.22]
Robert Campbell has a color_b.py python script on his PyMOL web page that you can use.
it has a number of options including the selection and two types of
colouring schemes (rainbow versus a blue-magenta-red gradient) and
two types of binning of the colours (equal number of atoms in each
colour or equal spacing of colours along the B-factor range).
See http://biophysics.med.jhmi.edu/rlc/work/pymol to download.
There are other scripts there as well.
To show a vertical/horizontal color bar indiacting the b-factor variation, use the script pseudobar.pml on the structure pseudobar.pdb, or do the following:
1. Create a pdb-file which contains CA positions only, whereas the numbers
correspond to your wanted increments of colors. Be sure that CA's are
separated by a contant value, say 5 Angstroem.
2. Load this new pseudobar-pdb file into PyMOL, make bonds between increment
1 and increment 2 [increment 2 and increment 3 and so on...], define/assign
a smooth color for each increment (copy colors definition from automatically
created colors made by b-factor script) and show the b-factor bar as lines (or sticks).
Q: does anyone know how to color the inside of helices a different color than the outsides?
A:
set cartoon_highlight_color, red
Q: Is there a simple way to colour each object currently loaded, with a
different colour?
A: There is a script color_obj.py that does the job.
The script is also available at
http://www.ebi.ac.uk/~gareth/misc
USAGE
color_obj(rainbow=0)
This function colours each object currently in the PyMOL heirarchy
with a different colour. Colours used are either the 22 named
colours used by PyMOL (in which case the 23rd object, if it exists,
gets the same colour as the first), or are the colours of the rainbow
To retrieve the color for a residue as identified in an expression, you can either iterate over a selection from the PyMOL command line
iterate all, print colorAlternatively, this can be done from a Python script.
Rubor : http://www.rubor.de
Post an Kristian Rother:
kristian.rother@charite.de
Last modified: Wed Apr 28 07:24:35 CEST 2004