Volume color: Difference between revisions

From PyMOLWiki
Jump to navigation Jump to search
(1.7.2 updates)
(see also)
 
Line 1: Line 1:
[[volume_color]] set or get the volume colors.
[[volume_color]] set or get the [[volume]] colors.


== Usage ==
== Usage ==
Line 36: Line 36:
     ])
     ])
  ### cut above here and paste into script ###
  ### cut above here and paste into script ###
== See Also ==
* [[volume]]


[[Category:Commands]] [[Category:Volume]]
[[Category:Commands]] [[Category:Volume]]

Latest revision as of 03:35, 7 February 2018

volume_color set or get the volume colors.

Usage

volume_color name [, ramp ]

Arguments

  • name = str: volume object name
  • ramp = str, list or empty: named ramp, space delimited string or list with (x, color, alpha, ...) or (x, r, g, b, alpha, ...) values. If empty, get the current volume colors.

Examples

Setting volume colors with one line:

fetch 1a00, map, type=2fofc, async=0
volume vol, map
volume_color vol, .8 cyan 0. 1. blue .3 2. yellow .3 

Using a named color ramp:

volume_ramp_new cyanblueyellow, \
    .8 cyan 0. \
    1. blue .3 \
    2. yellow .3
volume_color vol, cyanblueyellow

Getting the current volume ramp:

PyMOL>volume_color vol
### cut below here and paste into script ###
cmd.volume_ramp_new('ramp399', [\
     0.80, 0.00, 1.00, 1.00, 0.00, \
     1.00, 0.00, 0.00, 1.00, 0.30, \
     2.00, 1.00, 1.00, 0.00, 0.30, \
   ])
### cut above here and paste into script ###

See Also