Difference between revisions of "Transparency"

From PyMOLWiki
Jump to: navigation, search
m (new page, needs help)
 
(slices)
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
'''Transparency''' is used to adjust the transparency of surfaces. To use try:
+
== Overview ==
 +
'''Transparency''' is used to adjust the transparency of '''[[Surface]]s''' and '''[[Slice]]s'''.  (For other transparencies in PyMOL, see [[cartoon_transparency |Cartoon Transparency]], [[sphere_transparency|Sphere Transparency]], and [[stick_transparency|Stick Transparency]].
  
set transparency, 0.5
+
==Usage==
 +
<source lang="python">
 +
set transparency, F, selection
 +
</source>
 +
where '''F''' is a floating point number in the range ''[0.0 - 1.0]'', where '''selection''' is the selected surface to apply the change to (for examples, see below). 
  
or
+
For the value of ''F'', 1.0 will be an invisible and 0.0 a completely solid surface.
  
set transparency=0.5, selection
 
  
Where 1.0 will be an invisible and 0.0 a completely solid surface.
+
==Examples==
 +
===Whole Surface===
 +
Change the transparency of the whole surface to 50%.
 +
<source lang="python">
 +
# show all surfaces with 50% transparency.
 +
set transparency, 0.5
 +
</source>
 +
 
 +
 
 +
<gallery>
 +
Image: Surf065.png | Image showing partial surface transparencies
 +
Image: Surfall_065.png | Image showing 100% of the surface with 65% transparency.
 +
</gallery>
 +
 
 +
===Selected Surface Elements===
 +
Simple example showing how to do partial surface transparency.  This allows different selections to have different transparencies on the same object (or also on different objects).
 +
 
 +
<source lang="python">
 +
# load a random protein
 +
fetch 1rty
 +
 
 +
# set the partial transparency for the selected residues
 +
set transparency, 0.65, i. 1-100
 +
</source>
 +
 
 +
<gallery widths="300px" heights="200px">
 +
Image:Diffy_transp.png|Different transparency settings on different objects.
 +
Image:Diffy_transp2.png|Different transparency settings on the same object.
 +
</gallery>
 +
 
 +
 
 +
 
 +
 
 +
 
 +
[[Category:Settings|Transparency]]
 +
[[Category:Publication_Quality|Transparency]]

Latest revision as of 10:30, 10 April 2012

Overview

Transparency is used to adjust the transparency of Surfaces and Slices. (For other transparencies in PyMOL, see Cartoon Transparency, Sphere Transparency, and Stick Transparency.

Usage

set transparency, F, selection

where F is a floating point number in the range [0.0 - 1.0], where selection is the selected surface to apply the change to (for examples, see below).

For the value of F, 1.0 will be an invisible and 0.0 a completely solid surface.


Examples

Whole Surface

Change the transparency of the whole surface to 50%.

# show all surfaces with 50% transparency.
set transparency, 0.5


Selected Surface Elements

Simple example showing how to do partial surface transparency. This allows different selections to have different transparencies on the same object (or also on different objects).

# load a random protein
fetch 1rty

# set the partial transparency for the selected residues
set transparency, 0.65, i. 1-100