Colorama

From PyMOLWiki
Revision as of 13:38, 7 December 2011 by Tlinnet (talk | contribs) (→‎Download)
Jump to navigation Jump to search

COLORAMA

COLORAMA is a PyMOL plugin which allows to color objects using adjustable scale bars.

Program features

In RGB mode, each color R, G, B is represented by one scale bar which can be manually adjusted while the selected object is colored in real time. For convenience, it is as well possible to switch to the HSV color system.

Additionally, a color gradient with user-defined start- and end-colors can be created for the selected molecule.

Screenshot

COLORAMA-screenshot.jpg

Usage

This plugin is included in the project Pymol-script-repo.

Manual install the plugin by copying the code below into an empty text file (e.g. "colorama.py") located in the \Pymol\modules\pmg_tk\startup directory. After PyMOL has been started, the program can be launched from the PLUGINS menu. COLORAMA has not been tested with PyMOL versions older than 1.0.

Single color

  1. Type the name of a PyMOL object to be colored into the COLORAMA entry field.
  2. Push the "Set" button.
  3. The scales are adjusted to the current color which is additionally visualized in a field left to the scales.
  4. If one of the scales is moved, the color of the selected object will change in real-time.
  5. Pushing the RGB or HSV buttons on the left allows to switch between both color systems.

Color gradients

  1. After an object has been selected, push the "G" button (gradient).
  2. Select the start color by pushing "C1" and adjusting it using the scales.
  3. Select the end color "C2" in the same way.
  4. To create the gradient, push "Set gradient".

A new object will be created which is called "dummy-OLD_OBJECT". The B-factor column of this object is overwritten and now contains the number of each residue. The original object is left unchanged. The gradient mode can be left by pushing "M" (monochrome). This part of the program uses a modified version of the color_b script by Robert L. Campbell & James Stroud.

Contact

Gregor Hagelueken, gh50@st-andrews.ac.uk

Python Code

Download: /plugins/colorama.py
This code has been put under version control in the project Pymol-script-repo