Colorama: Difference between revisions

From PyMOLWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:
|type      = plugin
|type      = plugin
|filename  = plugins/colorama.py
|filename  = plugins/colorama.py
|author    = [[Users:Gha|Gregor Hagelueken]]
|author    = [[User:Gha|Gregor Hagelueken]]
|license  = -
|license  = -
}}
}}

Revision as of 19:30, 13 January 2012

Type PyMOL Plugin
Download plugins/colorama.py
Author(s) Gregor Hagelueken
License -
This code has been put under version control in the project Pymol-script-repo

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