Links for Molecular Structure Analysis and Graphics in Biomedical Sciences

This is a five week course (15 hours) offered in the Spring Semester at OUHSC every year since 2010. The purpose of the course is to build the competence of gradute students in interpreting molecular strutures of proteins. We use PyMOL to visualize molecular strutures and other software to analyze the structures. All of the software listed on this webpage is free to academics. We do not do any programming. However, the skills gained and principles understood by working with the software will transfer to other biomolecular software that the students will encounter later in their research careers. We use the book Structural Bioinformatics edited by Gu and Bourne as a textbook.

1 Introduction and PyMOL Installation
2 PDB files and PyMOL Basics
3 Heteroatoms and Molecular Surfaces
4 Structure Evaluation
5 Protein Evolution and Prediction of Protein-Protein Interations
6 Structure Superposition and Identifying Molecular Motion from Static Models
7 Modeling and Dynamics
8 Using Rosetta with PyMOL
9 Ligand Docking and Designing Mutants
10 Molecular Movies and Journal Cover Art

Lecture 1: Introduction and PyMOL installation

PyMOL was developed by Warren Delano starting in 1998 until his untimely death in 2009. PyMOL is now maintianed by Schrödinger Inc. The program is written in C for fast execution. The users interact with the PyMOL binary through a Python-based interface, hence the Py in PyMOL. The current binaries are available to subscribers who pay an annual subscription fee. New binaries are released about once every four months. The improvements are minor and incremental and sometimes break existing features. It is a good idea to hang onto several earlier versions. A version number greater than 1.72 is current enough for most purposes. The subscribers also get access to on-line documentation and to personalized technical support from the developers of PyMOL. The latter is helpful if you want to do something that is not available already through existing commands or scripts.

The large and active community of users have added a lot of functionality to PyMOL by contributing scripts and plugins and suggestions for better or new features. To acknowledge the contributions of the user community contributions, the penultimate and older binaries are available for free from other sources. I suggest using the other sources until you know that you will be using PyMOL frequently. The source code is available at However, it is a challenge to install PyMOL from source because you have to have a number of other dependent software already installed. I have succeeded in compiling PyMOL from the source code only on Ubuntu Linux. See the Linux install link below.

Free, unsupported sources of PyMOL

Official source of PyMOL binaries

Customizing your pymolrc file

The pymolrc is an optional file in your home diretory that is read on startup by PyMOL. You put PyMOL Scripting Language commands or Python commands or settings in this file that are executed on startup. For example, it is useful to startup with a white background, so add the line bg_color white. Add one command per line (a vertical script) or join the commands with semicolons on one line (a horizontal scirpt).

Quick starts in PyMOL

There are dozens of the videos about PyMOL on YouTube, if you are patient enough to sit through them. Below at are some guides that may be a faster way to get going.

Sources of answers to frequently asked questions

PyMOL commands, settings, and colors: the Nuts-and-Bolts of getting stuff done

The real power of PyMOL is in the exquisite control of the image provided by its commands and settings. For example, the ray command has over 50 settings! There is also exquisite control over the colors and the spectra used. You can string these commands and settings together on the command line with semicolons to form a horizontal script (watch this 4 minute video video and vist this webpage, which explains horizontal scripting) that is easy to edit after recalling the executed code with the up arrow key. Try it! You will like it! But be careful. Horizontal scripting can be addictive!

The PyMOL Scripting Language syntax may seem strange at first. The syntax is simply Python function calls without the parentheses and double quotes. If you do not know Python, you can still figure out the syntax quite quickly.

Scripts and Plugins

The PyMOL commands are written in a user readable syntax. They are stored in plain text files with the file extension pml. They can be run by entering @ followed immediately by the name of the script file (e.g, @first.pml). I use this kind of script to make and edit figures for publication and movies for presnentations. The script enables me to tweak the figure at a later time or to use it as a template to make a similar figure with a new structure. The regulaur use of scripts enables the practice of reproducible research, so their use is a good habit to adopt, just like the keeping of laboratory notebook.

The pml scripts are limited in their ability to call external programs and modules. Python scripts (they have the file extension py) are used for this purpose. Fortunately, the PyMOL commands can be included directly into Python scripts as arguments to the pymol.cmd() function. Python scripts are not as easy for nonprogrammers to interpret as the pml scripts.

Python scripts extend what can be done with PyMOL. Some Python scripts run external programs. You may have to install these external programs separately.

Plugins are Python scripts dressed up with graphical user interfaces (GUIs). The GUIs ease the initial exploratory use of a script. For this reason, they are required by the reviewers of papers about scripts. Plugins are not useful for large scale comparative studies due to the tedium and errors that occur with manual entry of parameter values for each structure.

A collection of user-supplied scripts and plugins are stored in a repository on GitHub. You can install of these scripts and plugins locally by using the program git. Git is installed on the macOS with the Xcode command line tools. It can be invoked from the command line. It is used retrieve software from and to track updates to documents in plain text locally. On other operating systems, you may have to install git; use the link to the left to learn more. After installing git on your computer, you type git clone git:// in the folder where you want to store the plugins. This command will create the subfolder Pymol-script-repo. You can then use in PyMOL the very powerful built-in plugin manager developed by Dr. Thomas Holder to load these scripts and plugins into PyMOL. Later, you can go to the Pymol-script-repo folder and type git pull origin master to update your collection of plugins and scripts with new versions of the scripts and plugins and with new scripts and plugins that have been added to the repository since your last update. The use of git to retrieve and update your collection of plugins saves many hours of manual work. The plugin manager has also saved countless of hours of frustration with plugin installation. Unfortunately, not all scripts and plug-ins are stored in the git repository. Use PubMed, Google, or both to find additional PyMOL scripts and plugins.

If you want to write your own plugin, there is a simple tutorial on the PyMOL Wiki. PyMOL uses the Python module Tkinter for plugin GUI development.

Text editors

Text editors are used to look inside PDB coordinate files and to edit PyMOL script files. PyMOL lacks a built-in text editor, although the text box in the command line of the external GUI does allow the copying and pasting of commands. PDB coordinate files and script files are written in plain text. MS Word (and TextEdit on macOS) write out documents to binary files by defualt. They are not really appropriate for editing plain text files. The following links are to free text editors that have GUIs. Just pick one to install if you do not have a favorite one already. I recommend Sublime Text 3 because it is intuitive and has sharp color contrast with syntax highlighting that eases the editing of script files. The simple command line editors nanoand pico may already be installed on your computer. They work well enough to get the job done, but they lack color highlighting. The command line editors vim and emacs are very powerful, but they take months of daily practice to master.

Platform Independent, GUI-based Text Editors:

Text Editors For Windows:

Text Editors For Mac:

Why PyMOL?

Good alternatives to PyMOL

There are many molecular graphics packages beyond PyMOL. I have listed ones that have caught my attention. Jump back to top

Lecture 2: PDB files and PyMOL Basics

Chapter 10 in Gu and Bourne: PDB, mmCIF and other data formats

Chapter 11: The Worldwide Protein Data Bank

This chapter explains the organization of the the Protein Data Bank.

Molecular Visualization

Physical Molecular Models

Molecular Models as Art

Jump back to top

Lecture 3: Heteroatoms and Molecular Surfaces


Molecular and Electrostatic Surfaces

Jump back to top

Lecture 4: Structure Evaluation

Jump back to top

Lecture 5: Protein Evolution and Prediction of Protein-Protein Interations

Protein-Protein Interaction Databases:

Jump back to top

Lecture 6: Structure Superposition and Identifying Molecular Motion from Static Models

The overlaying or superposing of molecular structures has to be done thoughtfully to lead to meaningful interpretations.

Jump back to top

Lecture 7: Modeling and Dynamics

Links cited in lectures

Homology Modeling Software

Homology Model Quality Checking

Related links about molecular dynamics, not covered in course

Jump back to top

Lecture 8: Using Rosetta with PyMOL

Rosetta Commons

Rosetta Webservers




Extending the PyMol Viewer

Other Rosetta Labs

Lecture 9: Ligand Docking and Designing Mutants

Jump back to top

Lecture 10: Molecular Movies and Journal Cover Art

Cover Art Related Sites

Moleuclar Movies

Jump back to top