|
What's available: |
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:
| Task | Input files (click on filename) | Output (click on thumbnail or text link) | |
|
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 |
|
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 |
|
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 |
|
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_Fobs_Ser99.png |
|
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 |
|
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 |
|
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 |
|
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 |
$] tr -d '\r' < somefile.pml | cat > somefile.pml
or, if you have something like noclobber set:$] tr -d '\r' < infile.pml > outfile.pml; mv outfile.pml infile.pml
By the way, PyMOL uses an RGB color space. Because the CMYK
color space (used for printing) is a subset of RGB (which is generally used for viewing on screen), there are some
RGB colors that aren't CMYK-safe. If you go to the PyMOL users mailing list
("http://sourceforge.net/mailarchive/forum.php?forum_id=60") and search with the query "CMYK" in the box @ upper
left-hand corner, you'll see what I'm talking about -- check the bottom 4-5 emails. In particular, check Gil Prive's
list of RGB colors that are safe for CMYK (which is the color space used by printers and is why the SDSC person you
mentioned is concerned about having "100% blacK" (the "K" in CMYK, so you don't get distortion of hues relative to
one another)). Dredging through my bookmarks, I also found a very useful explanation of RGB vs. CMYK at
"http://www.sketchpad.net/basics4.htm".
One last note: PyMOL's "ray XXXX, YYYY" command means that a ray-traced image of size XXXX-by-YYYY dots will be produced.
So if you want a 300 dpi, 10" x 6" image, then you'd do "ray 3000,1800" (which is typically overkill).
Cam
| [XHTML 1.0] | |
| © 2004 Cameron Mura (<cmura |at| mccammon |dot| ucsd |dot| edu>) | [CSS] |