This is a read-only mirror of pymolwiki.org

Difference between revisions of "Volume color"

From PyMOL Wiki
Jump to navigation Jump to search
m (1 revision)
 
m (1 revision)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Coming soon.
+
[[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 ==
 +
 
 +
* [[volume]]
  
 
[[Category:Commands]] [[Category:Volume]]
 
[[Category:Commands]] [[Category:Volume]]

Latest revision as of 03:15, 5 March 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