From PyMOLWiki
Revision as of 18:06, 20 July 2009 by Wayne461 (talk | contribs) (Nucleic Acid Representation)
Jump to: navigation, search

Cartoon Command


cartoon changes the default cartoon for a set of atoms.


 cartoon type, (selection)


  1. skip
  2. automatic
  3. loop
  4. rectangle
  5. oval
  6. tube
  7. arrow
  8. dumbbell


cmd.cartoon(string type, string selection )


cartoon rectangle,(chain A)
cartoon skip,(resi 145:156)



Adjusting width of cartoon

Try varying the following.

For β-strands:


For α-helices:


For loops:


For "fancy" α-helices:

cartoon_dumbell_radius  (radius of cylinder at edge of helix ribbon)


Cartoon Representation Example

Forcing Exact Boundaries in Coloring Secondary Structures

To force PyMol to respect secondary structural elements color-wise (PyMol smooths out colors near color chagnes for a prettier image) use the following PyMol command: set cartoon_discrete_colors, on

Discrete Coloring Off
Discrete Coloring On

Sausage Representation

The familiar sausage representation in PyMol is called, "putty". To enable the putty/sausage view simply do,

show cartoon
cartoon putty
unset cartoon_smooth_loops
unset cartoon_flat_sheets


Example of B-factor Putty

Black and White Representation


  2. Save the image
  3. Load the image in GIMP.
    Black BG Ribbon
  4. Desaturate or Grayscale the image.
    Edge Detect
  6. Select: Layers->Color->Invert.
    Invert Color


CA (Alpha Carbon) Trace


set cartoon_trace,1
show cartoon


Various Transparency Levels


One can make different cartoon selections have different transparency values, in PyMol. The trick here is to use "create" instead of "select". Create makes new objects that can have independent settings.

load mol_obj.pdb

# transfer a piece of the molecule into a new object

create new_obj, chain A
remove mol_obj in new_obj

# adjust trasparency for the new object

set cartoon_transparency, 0.5, new_obj

Nucleic Acid Representation

Showing Nucleic Acids

To control radius of nucleic acids default backbone cartoon:

set cartoon_tube_radius,0.8

To show nucleic acids in a nicer format do:

 set cartoon_ring_mode,1
 show cartoon

Other Nucleic Acids & Cartoon Settings

Here are some things to try:

set cartoon_ring_mode, 1   # (or 2 or 3)

set cartoon_side_chain_helper

set cartoon_ring_transparency, 0.5

set cartoon_ladder_mode, 0 # or 1

set cartoon_ladder_color, color-name
set cartoon_nucleic_acid_color, color-name

cartoon oval
set cartoon_oval_width, 0.8

cartoon rect

cartoon dumbbell
set cartoon_dumbbell_width, 0.4
set cartoon_dumbbell_radius, 0.4

Overview of nucleic acid cartoons

Examples of nucleic acid cartoons

See Also