PyMOL + APBS Plugin
apbs_tools.py
|
This is a PyMOL plugin which lets you run APBS from within PyMOL.
To install it,
- Make sure you have PyMOL version 0.96 or higher.
- Make sure you have APBS version 4.0 or higher installed.
- At this point, try it out. Current versions of PyMOL usually ship with current versions of this plugin. If it doesn't work, continue on to the next step.
- Download a copy of apbs_tools.py
and place it in $PYMOL_PATH/modules/pmg_tk/startup/.
- The PyMOL Plugins page has instructions for installing plugins on different operating systems, including OS X.
- You do not need any of the other plugins on this page to make this work
Now, you'll see "APBS Tools..." under the Plugins menu. This
plugin allows fairly complete configuration of APBS, but it's
very easy to set up a standard electrostatic potential calculation:
- Load your molecule into PyMOL
- Load the plugin
- Click on "Set grid"
- Click on "Run APBS"
- Use the plugin's "Visualization" tab to look at the results
This will use PyMOL's new ability to assign AMBER charges and radii.
If you wish to use your own externally-generated PQR file, you can
set that up on the plugin's main page.
The plugin should auto-detect the location of the APBS binary on your
system, but you can set it manually under the "APBS Location" tab.
My plugin can calculate appropriate grid lengths and spacings. It
ensures that the grid spacing is 0.5A or finer. If you have APBS's
psize.py installed and you wish to use it, you can set that up on
the plugin's "APBS Location" tab.
Finally, it's worth noting that the plugin's "Visualization" tab
can be used for easy visualization of any electrostatic
potential, not just things generated by APBS.
|
PyMOL Rendering Plugin
rendering.py
|
This is a PyMOL plugin to aid in publication-quality rendering.
To install it,
- Make sure you have PyMOL version 0.99 or higher.
- Download a copy of rendering.py
and place it in $PYMOL_PATH/modules/pmg_tk/startup/.
- The PyMOL Plugins page has instructions for installing plugins on different operating systems, including OS X.
Now, you'll see "Rendering..." under the Plugins menu. Enjoy.
|
Sidechain Checking Wizard
sidechain_check.py
|
The electron densities of Carbon, Nitrogen and Oxygen look
basically the same to crystallographers. So, sometimes they get
them confused in crystal structures. In particular, one often has
to flip the orientation of the side chains in Asn or Gln. Also,
this means that the Nitrogens may be placed incorrectly in His
side chains. Similarly, since x-ray crystallographers cannot see
Hydrogens, the crystal structure may not tell you which
Nitrogen(s) in the His residue should be protonated. If you're
going to use the crystal structure in, for example, a molecular
dynamics calculation, it is critical that you get this stuff
right. The easiest way to do this is to try out each possibility
and see which one looks best with respect to Hydrogen bonding.
Since PyMOL is so easy to script, I wrote a little bit of code to
automate this process. Here's how you use it:
A word of warning on Histidine protonation: your His
residues should be listed as HID, HIE or HIP rather than HIS.
If you list them as HIS, we'll assume they're HIP.
- Running it as a PyMOL wizard (recommended)
- Grab sidechain_check.py.
- Put it in pymol/modules/pymol/wizard
- Open up pymol/modules/pmg_tk/skins/normal/__init__.py
- Look for the 'Wizard' section .. you should see
lines like this:
self.menuBar.addmenuitem('Wizard', 'command', 'Sculpting',
label='Sculpting',
command = lambda s=self: s.cmd.do("_ wizard sculpting"))
- Add the following code:
self.menuBar.addmenuitem('Wizard', 'command', 'Check Side-chains',
label='Check Side-chains',
command = lambda s=self: s.cmd.do("_ wizard sidechain_check"))
- Start PyMOL
- Load up a pdb file (e.g. 'load 1ra1.pdb').
- Use the wizard.
- All Asn, Gln and His residues will be shown in
sticks.
- Carbons will be green, except on the residue that
you're editing. There, they will be purple.
- Hydrogen bonds will be shown as dotted yellow
lines
- Note that you can type 'next' 'flip' 'chp' 'mgzoom'
and 'mgstart' from the PyMOL command line in addition
to using the wizard buttons.
- Here's what it looks like in action:
- Running as a stand alone script
- Grab mgzoom.py, my little
script. It may be out of date, and I recommend using the
wizard version instead.
- Start up PyMOL
- Type 'run scripts/mgzoom.py' (or whatever you've called it)
- Load a pdb file (e.g. 'load 1ra1.pdb').
- Type 'mgstart' to begin
- Type 'next' to move to the next interesting residue. PyMOL
will zoom in on an Asn, Gln or His, showing the current
residue with purple Carbons and Hydrogen bonds as yellow
dotted lines.
- If you're looking at a Histidine, typing 'chp' will cycle
between the different protonation states (HIE, HID and
HIP)
- When you're satisfied that you have the correct
orientation/protonation state, type 'next' again to go to the
next residue. Rinse. Repeat.
- If you like, you can zoom in on a particular residue by
number using, e.g., 'mgzoom(141)' or 'mgz(141)'.
|
Various scripts launched from my .pymolrc
mg_pymol_utils.py
|
These are various utility functions that I set up via my
.pymolrc. Save the file somewhere and launch it via the
"run" command in your .pymolrc. Only tested on Linux, etc.
|
Electrostatics wizard
electrostatics.py
Note that this has been mostly superseded by the APBS plugin above.
|
This is a wizard I wrote to help examine electrostatics potentials in PyMOL.
It's easy to use
- Grab electrostatics.py.
- Put it in pymol/modules/pymol/wizard
- Open up pymol/modules/pmg_tk/skins/normal/__init__.py
- Look for the 'Wizard' section .. you should see
lines like this:
self.menuBar.addmenuitem('Wizard', 'command', 'Sculpting',
label='Sculpting',
command = lambda s=self: s.cmd.do("_ wizard sculpting"))
- Add the following code:
self.menuBar.addmenuitem('Wizard', 'command', 'Electrostatics',
label='Electrostatics',
command = lambda s=self: s.cmd.do("_ wizard electrostatics"))
- Start PyMOL
- Load up a molecule and a map and then start the Electrostatics wizard from the Wizard menu.
|