Ramp New: Difference between revisions

From PyMOLWiki
Jump to navigation Jump to search
(Created page with '= Overview = ramp_new creates a color ramp based on a map potential value or based on proximity to a molecular object. Color ramps are extremely powerful but complicated to ...')
 
No edit summary
Line 59: Line 59:




[[Category:Commands]]
[[Category:Commands|Ramp new]]

Revision as of 08:36, 20 June 2009

Overview

ramp_new creates a color ramp based on a map potential value or based on proximity to a molecular object.

Color ramps are extremely powerful but complicated to use.

In the simplest case, they can be used to color representations based on the potential values found in a map object at the corresponding positions in space. In another simple case, representations can be colored based on proximity to a target. Note that since ramp targets must themselves be real objects (not merely selections), the "create" command may be needed in order to generate an appropriate target. In more complicated cases, they can be used to color representations on one object based atoms found in another. Ramps can operate recursively. In other words, the output color from one ramp can be used as the input color for another. For example, you could color by map potential within a certain distance of the target object, beyond which, a uniform color is applied.

Usage

 
# normal PyMOL usage
ramp_new name, map_name [, range [, color [, state [, selection [,
        beyond [, within [, sigma [, zero ]]]]]]]]


# in the API
cmd.ramp_new(string name, string map_name, list range, list color, 
  int state, string selection, float beyond, float
  within, float sigma, int zero, int quiet)
  • name = string: name of the ramp object
  • map_name = string: name of the map (for potential) or molecular object (for proximity)
  • range = list: values corresponding to slots in the ramp
  • color = list: colors corresponding to slots in the ramp
  • state = integer: state identifier
  • selection = selection: for automatic ranging
  • beyond = number: with automatic ranging, are we excluding values beyond a certain distance from the selection?
  • within = number: with automatic ranging, are we only including valuess within a certain distance from the selection?
  • sigma = number: with automatic ranging, how many standard deviations from the mean do we go?
  • zero = integer: with automatic ranging, do we force the central value to be zero?

Example

Simple Example

ramp_new e_pot_color, e_pot_map, [-10,0,10], [red,white,blue]

Normal Usage

load pdbset1.pqr
load pdbset_1.dx

load pdbset3.pqr
load pdbset_3.dx

ramp_new ramp1, pdbset_1, [ -3, 0, 3]
ramp_new ramp3, pdbset_3, [ -3, 0, 3]

show surface

set surface_ramp_above_mode

set surface_color, ramp1, pdbset1
set surface_color, ramp3, pdbset3

See Also

load, color, create, slice, gradient