This is a read-only mirror of pymolwiki.org

Difference between revisions of "Slice"

From PyMOL Wiki
Jump to navigation Jump to search
(Created page with "slice creates a slice object from a map object representations. == USAGE == <source lang="python"> slice name, map, [opacity, [resolution, [sta...")
 
Line 1: Line 1:
[[slice]] creates a slice object from a map object [[:Category:Representations|representations]].
+
[[slice]] creates a slice object from a [[:Category:Maps|map]] object.
  
 
== USAGE ==
 
== USAGE ==
 +
<source lang="python">
 +
slice_new name, map, [opacity, [resolution, [state, [source_state]]]]
 +
</source>
 +
 +
''or''
 +
 
<source lang="python">
 
<source lang="python">
 
slice name, map, [opacity, [resolution, [state, [source_state]]]]
 
slice name, map, [opacity, [resolution, [state, [source_state]]]]
 
</source>
 
</source>
+
 
 
== ARGUMENTS ==
 
== ARGUMENTS ==
 
*'''name''' = the name for the new slice object (string)
 
*'''name''' = the name for the new slice object (string)
 
*'''map''' = the name of the map object to use for computing the slice (string)
 
*'''map''' = the name of the map object to use for computing the slice (string)
*'''opacity''' = opacity of the new slice (default=1)
+
*'''opacity''' = opacity of the new slice (default=1 [opaque])
 
*'''resolution''' = the number of pixels per sampling (default=5)
 
*'''resolution''' = the number of pixels per sampling (default=5)
 
*'''state''' = the state into which the object should be loaded (default=1; set state=0 to append new mesh as a new state)
 
*'''state''' = the state into which the object should be loaded (default=1; set state=0 to append new mesh as a new state)
Line 16: Line 22:
 
== EXAMPLES ==
 
== EXAMPLES ==
 
<source lang="python">  
 
<source lang="python">  
# show the backbone as lines
+
# Create a map slice plane perpendicular to current view
show_as lines, name ca or name c or name n
+
slice_new my_new_slice_1, my_map
 +
</source>
  
# show everything as a ribbon
 
show_as ribbon
 
</source>
 
 
== PYMOL API ==
 
== PYMOL API ==
 
<source lang="python">  
 
<source lang="python">  
cmd.show_as(string representation, string selection)
+
cmd.slice_new(string slice_name, string map_name, integer opacity=1, integer resolution=5, integer state=0, integer source_state=0)
 
</source>
 
</source>
 
   
 
   
 
== NOTES ==
 
== NOTES ==
Often mis-identified as "slice_map" in the help. [[slice] is the correct command.
+
Occasionally mis-identified as "slice_map" in documentation. [[slice_new|slice]] or [[slice]]is the correct command.
 
   
 
   
 
== SEE ALSO ==
 
== SEE ALSO ==

Revision as of 17:27, 16 March 2011

slice creates a slice object from a map object.

USAGE

slice_new name, map, [opacity, [resolution, [state, [source_state]]]]

or

slice name, map, [opacity, [resolution, [state, [source_state]]]]

ARGUMENTS

  • name = the name for the new slice object (string)
  • map = the name of the map object to use for computing the slice (string)
  • opacity = opacity of the new slice (default=1 [opaque])
  • resolution = the number of pixels per sampling (default=5)
  • state = the state into which the object should be loaded (default=1; set state=0 to append new mesh as a new state)
  • source_state = the state of the map from which the object should be loaded (default=0)

EXAMPLES

 
# Create a map slice plane perpendicular to current view
slice_new my_new_slice_1, my_map

PYMOL API

 
cmd.slice_new(string slice_name, string map_name, integer opacity=1, integer resolution=5, integer state=0, integer source_state=0)

NOTES

Occasionally mis-identified as "slice_map" in documentation. slice or sliceis the correct command.

SEE ALSO

isomesh, isodot, load

References

  • PyMOL Source code