Recent site activity

APBS‎ > ‎Examples‎ > ‎Visualization‎ > ‎

APBS electrostatics in PyMOL

The PyMOL molecular graphics software package provides support for both the execution of APBS and the visualization of the resulting electrostatic potentials. We will provide a basic demonstration of how go from a PDB entry to a plot of structure & potential in PyMOL using APBS.

Note: This tutorial was written using PyMOLX11Hybrid 0.99 on a Mac.

Generating the PQR

We'll perform this example with fasciculin-2 (PDB ID 1FAS), a snake neurotoxin which binds the negatively-charged acetylcholinesterase. Please generate the PQR file using the steps outlined in the How do I get my structures ready for electrostatics calculations? section.

Load the PQR file you created into PyMOL (File → Open...) and choose your favorite graphical representation of the molecular structure.

Performing the electrostatics calcuation

Go to the Plugin → APBS Tools... to open the APBS calculation plugin.
  1. Under the "Main" tab of the PyMOL APBS Tools window, select Use another PQR and either browse to (via the Choose Externally Generated PQR: button) or input the path to your PQR file. This step is necessary to ensure you use the radii and charges assigned by PDB2PQR.
  2. Under the "APBS Location" tab of the PyMOL APBS Tools window, either browse to (via the APBS binary location: : button) or input the path to your local APBS binary. It is not necessary to provide a path to the APBS binary for most biomolecules.
  3. Under the "Temporary File Locations" tab of the PyMOL APBS Tools window, customize the locations of the various temporary files created during the run. This can be useful if you want to save the generated files for later use.
  4. Under the "Configuration" tab of the PyMOL APBS Tools window, hit the Set grid to set the grid spacings. The default values are usually sufficient for all but the most highly charged biomolecules.
  5. Under the "Configuration" tab of the PyMOL APBS Tools window, customize the remaining parameters; the defaults are usually OK.
  6. Under the "Configuration" tab of the PyMOL APBS Tools window, hit the Run APBS button to start the APBS calculation. Depending on the speed of your computer, this could take a few minutes. The Run APBS button will become unselected when the calculation is finished.
Note that 0.150 M concentrations for the +1 and −1 ion species are often useful to ensure that electrostatic properties are not overly exaggerated.

Visualize the electrostatic potential

Before proceeding with the remaining steps, you must load the electrostatic potential data into PyMOL. Under the "Visualization" tab of the PyMOL APBS Tools window, hit the Update button.

Electrostatic isocontours

PyMOL makes this step very easy: adjust the positive and negative "Contour" fields to the desired values (usually ±1, ±5, or ±10 kT/e) and hit the Positive Isosurface and Negative Isosurface and Show buttons.

At this point, you probably have a figure that looks something like:

±1 kT/e electrostatic potential isocontours of FAS2 in PyMOL

If the colors are not as you expect, you can change the colors of the objects iso_neg and iso_pos in the main menu. By convention (for electrostatics in chemistry), red is negative (think oxygen atoms in carboxyl groups) and blue positive (think nitrogen atoms in amines).

Surface potentials

If you haven't already, hide the isocontours by hitting Positive Isosurface and Negative Isosurface and Hide buttons.
The surface potential is also straightforward to visualize. Set the "Low" and "High" values to the desired values (usually ±1, ±5, or ±10 kT/e) at which the surface colors are clamped at red (-) or blue (+). Check the "Solvent accessible surface" and "Color by potential on sol. acc. surf." buttons to plot the potential on the solvent-accessible (probe-inflated or Lee-Richards) surface. Hit the "Molecular Surface" Show button to load the surface potential.

±5 kT/e electrostatic potential of FAS2 in PyMOL plotted on the solvent-accessible surface.

In my opinion, the solvent-accessible surface tends to reveal more global features of the surface potential. Tighter surfaces (e.g., van der Waals and molecular or Connolly surfaces) provides more information about the shape of the biomolecule but otherwise tend to simply map atomic surface charges onto the biomolecular surface. Thankfully, PyMOL provides an excellent solution to the conflicting need to obtain geometric information from the molecular surface together with useful electrostatic potential information from the solvent-accessible surface. To visualize the molecule in this way, simply uncheck the "Solvent accessible surface" box and check the "Color by potential on sol. acc. surf." box on the "Visualization tab".

Visualization through the new APBS Tools2 plugin

There is a new (developmental) version of the PyMOL-APBS plugin called APBS Tools 2, developed by Michael Lerner. Following is a list of new features of APBS Tools2 over APBS Tools plugin of PyMOL:
  • It's been on tested on modern OS X, Windows and Linux systems and fixes several long-standing bugs.
  • It allows you to call through to PDB2PQR directly.
  • It has two visualization panels to aid in showing multiple potential surfaces at once.
That should give you a file called
Once you have the plugin, you can install it via PyMOL's plugin installer: Plugin → Manage Plugins → Install
Note that the plugin will be installed as "APBS Tools2" so that you can continue to use your old version.
Then, follow the same visualization steps above to visualize your biomolecule.
(PyMOL APBS Tools2 works with PyMOL 1.2 and/or newer versions.)