This is a read-only mirror of pymolwiki.org

Difference between revisions of "Sphere scale"

From PyMOL Wiki
Jump to navigation Jump to search
m
m (8 revisions)
 
(6 intermediate revisions by 3 users not shown)
Line 4: Line 4:
  
 
==Syntax==
 
==Syntax==
 +
<source lang="python">
 +
# set the sphere scale to size for selection.
 +
cmd.set ("sphere_scale", size=1, selection='', state=0, updates=1, log=0, quiet=1)
 +
# generally it's simpler to use the console form
 +
set sphere_scale, size, selection
 +
# you can print the current value for sphere_scale
 +
get sphere_scale
 +
</source>
 +
''size'' can be any floating point number, ''selection'' is the name of a selection.
  
set sphere_scale, ''size''
+
==Examples==
 +
Using 0.25 gives a nice balls&sticks representation with both lines and spheres turned on.
 +
<source lang="python">
 +
set_bond stick_color, white, (all), (all)
 +
set_bond stick_radius, 0.14, (all), (all)
 +
set sphere_scale, 0.25, (all)
 +
show sticks
 +
show spheres
 +
</source>
  
''size'' can be any float number. Using 0.25 gives a nice balls&sticks representation with both lines and spheres turned on.
+
'''set sphere_scale''' by itself will revert to default. Here you'll get a simple VDW rapresentation.
 +
<source lang="python">
 +
set_bond stick_color, blue, (all), (all)
 +
set_bond stick_radius, 0.3, (all), (all)
 +
set sphere_transparency, 0.3
 +
set sphere_scale
 +
</source>
  
set sphere_scale by itself will revert to default.
+
==Related settings==
 +
*[[sphere_color]]
 +
*[[sphere_mode]]
 +
*[[sphere_point_max_size]]
 +
*[[sphere_point_size]]
 +
*[[sphere_quality]]
 +
*[[sphere_solvent]]
 +
*[[sphere_transparency]]
  
==Related settings==
+
[[Category:Settings]]
[[sphere_color]]
+
[[Category:Spheres]]
[[sphere_mode]]
 
[[sphere_point_max_size]]
 
[[sphere_point_size]]
 
[[sphere_quality]]
 
[[sphere_solvent]]
 
[[sphere_transparency]]
 

Latest revision as of 03:55, 28 March 2014

Overview

This setting affects the apparent radius of spheres in the sphere representation. Default scale is set to 1.0.

Syntax

# set the sphere scale to size for selection.
cmd.set ("sphere_scale", size=1, selection='', state=0, updates=1, log=0, quiet=1)
# generally it's simpler to use the console form
set sphere_scale, size, selection
# you can print the current value for sphere_scale
get sphere_scale

size can be any floating point number, selection is the name of a selection.

Examples

Using 0.25 gives a nice balls&sticks representation with both lines and spheres turned on.

set_bond stick_color, white, (all), (all)
set_bond stick_radius, 0.14, (all), (all)
set sphere_scale, 0.25, (all)
show sticks
show spheres

set sphere_scale by itself will revert to default. Here you'll get a simple VDW rapresentation.

set_bond stick_color, blue, (all), (all)
set_bond stick_radius, 0.3, (all), (all)
set sphere_transparency, 0.3
set sphere_scale

Related settings