Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help
Special pages
SBGrid Resources
SBGrid Consortium
SBGrid Data Bank
Software Webinars
PyMOL Webinar
PyMOL Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Slice
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== EXAMPLES == <source lang="python"> # Create a map slice plane perpendicular to current view slice a_new_slice, a_map # A more complicated example that shows how to create multiple slices # (in this case, 3 slices perpendicular to each other), each colored # with a different color ramp and different contour levels: # Reset the view, to align view on XYZ axes reset # (Optional: Adjust view direction to your liking) # Create a map slice *perpendicular* to the current view. # The slice seems to be in the center of the APBS (or other) volmap. Map "tracking" is off by default. slice slice_A, apbs_map # Rotate camera 90 degrees about the vertical axis turn y, 90 # Second, perpendicular, slice slice slice_B, apbs_map # Rotate again, this time about the horizontal turn x, 90 # Third slice slice slice_C, apbs_map # Define new color ramps: ramp_name, map_object, list of low/mid/hi values, 3 RGB triplets ramp_new ramp1010RWB, apbs_map, [-10,0,10], [ [1,0,0], [1,1,1], [0,0,1] ] ramp_new ramp11RYG, apbs_map, [-1,0,1], [ [1,0,0], [1,1,0], [0,1,0] ] ramp_new ramp55MltGO, apbs_map, [-5,0,5], [ [0,1,1], [0.5,1,0.5], [1,0.5,0.2] ] # Color the map slices color ramp1010RWB, slice_A color ramp11RYG, slice_B color ramp55MltGO, slice_C # Adjust the fineness of the slice color gradations: cmd.set('slice_grid',0.1) # normally at 0.3; much finer than 0.05 gets a bit slow # Map slices can be moved, relative to other fixed objects (e.g., your protein/DNA/RNA), # by turning tracking on (Action menu), and the using the Shift-MouseWheel to move # the slice forward in and backward in Z. Adjust fineness of this Z-motion with: # cmd.set('mouse_wheel_scale',0.05) # normally at 0.5 # The result is shown in the image above. </source>
Summary:
Please note that all contributions to PyMOL Wiki are considered to be released under the GNU Free Documentation License 1.2 (see
PyMOL Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Slice
(section)
Add topic