[Cam's PyMOL Page]
What's available:
PyMOL Examples | Scripts, modules, patches, etc. | Electrostatics | Miscellaneous notes & links

PyMOL is a powerful and versatile program for molecular graphics, based on the Python scripting language (which you don't need to know in order to use the program!). It can be run interactively (using menu-driven commands and options) or via input scripts, but most efficiently by a combination of both approaches. Some PyMOL examples are illustrated here in the form of input scripts (.pml files) and their corresponding graphical outputs (.png files). These examples barely scrape the surface of what PyMOL is capable of -- one can nest PyMOL scripts within scripts, use the PyMOL API to write customized Python scripts that automate routine tasks and enable new functionalities, make animations such as the ones below (or above!), etc.… As an example, the animated "Cams PyMOL Page" logo at the top of this page was produced via a Python script that utilizes PyMOL's Compiled Graphics Objects (CGO; see below).

To get started with the examples below:


^ PyMOL Examples:
[Windows users may experience problems viewing full-size thumbnails due to incompatibilies between Internet Explorer, XHTML frames, and JavaScript. If so, click here for a non-frames version of this page. Note that this problem does not occur with Mozilla Firefox.]
Task Input files (click on filename) Output (click on thumbnail or text link)
[Ribbon diagrams!] The crystal structure of Pyrobaculum aerophilum (Pae) SurEα reveals a dimer in the asymmetric unit of a P3(1)21 cell. We want a simple ribbon diagram of the dimer, as viewed down the NCS 2-fold. PaeSurE_simple_ribbons.pml
[PyMOL script file with some descriptive comments]
PaeSurE_dimer.pdb
[PDB file in which SeMet's have been changed to MET, because I was too lazy to have PyMOL properly deal with METs]
[PaeSurE_simple_ribbons.png]
PaeSurE_simple_ribbons.png
[Surfaces!] The crystal structure of Pyrobaculum aerophilum (Pae) SmAP1 reveals a heptamer in the asymmetric unit of a C222(1) cell. A 14-mer is created by one of the crystallographic 2-folds. We want to display a ribbon diagram of the 14-mer, clearly illustrating the surface area that's buried in the heptamer···heptamer interface. PaeSmAP1_14mer_interface.pml
[PyMOL script file with lots of descriptive comments]
gpa14mer_buriedsurface.pdb
[PDB-format file with modified B-factors that describe whether the atom is part of the interface (B>0) or not (B=0)]
[PaeSmAP1_14mer_interface.png]
PaeSmAP1_14mer_interface.png
[Ribbons, spheres, etc.!] The crystal structure of Methanobacterium thermautotropicum (Mth) SmAP1 reveals a 14-mer in the asymmetric unit of a P2(1) cell. Several ligands (such as UMP, MPD, etc.) are bound to this 14-mer. We want to display a ribbon diagram of the 14-mer viewed down the 7-fold axis, illustrating the protein as ribbons and the ligands as color-coded CPK spheres. MthSmAP1_ribbons_and_ligands.pml
[PyMOL script file]
mth_p21.pdb
[PDB file for final, refined structure]
[MthSmAP1_ribbons_and_ligands.png]
MthSmAP1_ribbons_and_ligands.png
[Electron densities!] The crystal structure of Pyrobaculum aerophilum (Pae) SurEα reveals a dimer in the asymmetric unit of a P3(1)21 cell. We want a figure of two types of electron density, centered on Ser99 from chain 'B': {2Fo-Fc,Φcalc} electron density and experimentally-phased (MAD) density maps {FMAD; Φcalc}. One PyMOL script produces both maps as separate panels (overlaying them in one panel is messy). PaeSurE_densities_Ser99.pml
[PyMOL script file with some descriptive comments]
PaeSurE_fordensity.pdb
[PDB file in which SeMet's have been changed to MET, because I was too lazy to have PyMOL properly deal with METs]
dm_phex20_ncs.xplor
[XPLOR map file calculated with experimental/MAD phases]
map2fofc_nonds.xplor
[XPLOR 2Fo-Fc map calculated from model phases]
[PaeSurE_2fofc_Ser99.png]
PaeSurE_2fofc_Ser99.png

[PaeSurE_Fobs_Ser99.png]
PaeSurE_Fobs_Ser99.png

[Ligands, distances, etc.!] The crystal structure of Mth SmAP1 reveals a 14-mer in the asymmetric unit of a P2(1) cell. Several ligands (such as UMP, MPD, etc.) are bound to this 14-mer. We want to display the 14-mer and one of its 14 MPD-binding sites, showing: (i) Mth SmAP1 as sticks; (ii) electron density for MPD and proximal SmAP1 residues; (iii) distances between MPD···protein contacts (e.g., H-bonds). MthSmAP1_MPD_density.pml
[PyMOL script file with some descriptive comments]
mth_p21_ump.pdb
[PDB file containing Mth 14-mer, waters, MPDs, UMPs, uridines, etc.]
mth_map2fofc.xplor
[XPLOR map file calculated with 2Fo-Fc coefficients]
mth_mapfofc.xplor
[XPLOR XPLOR map file calculated with Fo-Fc coefficients]
[MthSmAP1_MPD_density.png]
MthSmAP1_MPD_density.png

[Sequence conservation!] An example of one way to display sequence conservation information on a protein 3D structure. We have done something like an MSA to get residue conservation scores, and now want to display these scores on a surface rendering of a representative 3D structure for this protein family. README.txt
[Explanation of how to go about this]
1L5X.pdb
[Sample PDB file]
1l5x_conserved_sites.txt
[Sample sequence conservation data for 1L5X (totally synthetic!); file format described in the header of the map_conservation_to_B.pl script.]
map_conservation_to_B.pl
[Perl script that processes 1L5X.pdb and 1l5x_conserved_sites.txt inputs to yield 1l5x_scores.pdb output file.]
1L5X_scores.pdb
[Output file in which B-factor fields are replaced by scores from 1l5x_conserved_sites.txt.]
color_b.py
[Robert Campbell's color_b Python module]
[SequConserv_example_1l5x.png]
SequConserv_example_1l5x.png
[Animations!] The crystal structure of Pae SurEα reveals a dimer in the asymmetric unit of a P3(1)21 cell. We want to render one of the monomers as a ribbon diagram and make a movie of it spinning about the y-axis. This animation uses frames which are anti-aliased and ray-traced, so the size may be unreasonable. Icannotfindit.sorry
[…but visit the PyMOL manual; movies are easy.]
[PaeSurE_movie.gif]
PaeSurE_movie.gif
[Sausages!] The crystal structure of Pae SmAP3 reveals a 28-mer in the asymmetric unit of a P2(1) cell, organized as tangential tetradecamers which are each composed of apical and equatorial heptamers. We want a "sausage"-style cartoon representation of the backbones for one of the 14-mers, with the tube diameter scaled by values in the B-factor field (which, in the case of this crystal structure, are actual B-factors). See the PyMOL v0.97 patch below for more information. pymol-0.97cam.patch.tgz
[See the description of this patch in the Scripts, modules, patches, etc. section below.]
1M5Q.pdb
[SmAP3 28-mer as PDB entry 1M5Q]
[PaeSmAP3_sausage.png]
PaeSmAP3_sausage.png

^ Perl scripts or Python modules for PyMOL (animations and other miscellaneity):

^ Electrostatics in PyMOL via Michael Lerner's APBS module: [outdated]