|
|
(4 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
− | == Introduction ==
| |
| [[Image:Rna_surface_apbs.png|thumb|APBS-generated electrostatic surface displayed in PyMOL]] | | [[Image:Rna_surface_apbs.png|thumb|APBS-generated electrostatic surface displayed in PyMOL]] |
− | [http://www.poissonboltzmann.org/ APBS], the Adaptive Poisson-Boltzmann Solver, is a [http://www.oreilly.com/openbook/freedom/ freely] available macromolecular electrostatics calculation program released under the [http://www.gnu.org/copyleft/gpl.html GPL]. It is a cost-effective but uncompromised alternative to [http://trantor.bioc.columbia.edu/grasp/ GRASP], and it can be used within PyMOL. PyMOL can display the results of the calculations as an electrostatic potential molecular surface. | + | [http://www.poissonboltzmann.org/ APBS], the Adaptive Poisson-Boltzmann Solver, is a |
| + | [http://www.oreilly.com/openbook/freedom/ freely] |
| + | available macromolecular electrostatics calculation program released under a |
| + | [http://apbs-pdb2pqr.readthedocs.io/en/latest/apbs/license.html BSD license]. |
| + | PyMOL can display the results of the calculations as an electrostatic potential molecular surface. |
| | | |
− | == APBS Plugin with New Features == | + | == APBS Plugins for PyMOL == |
− | === Pre-release version ===
| |
− | See also [[apbsplugin]] for the version control in the project [[Git_intro | Pymol-script-repo.]]
| |
| | | |
− | There is often a more current pre-release version available on my user page. If you're experiencing bugs, please test the pre-release version to see if they've already been fixed. Thanks! --[[User:Mglerner|michael]] 19:43, 29 October 2010 (UTC)
| + | * [[APBS Electrostatics Plugin]], included in [https://pymol.org/ Incentive PyMOL 2.0] |
− | ----
| + | * [[apbsplugin|APBS Tools 2.1]], based on the original version by [[User:Mglerner|Michael Lerner]]. |
− | PyMol currently supports the '''APBS plugin''' written by [http://pymolwiki.org/index.php/User:Mglerner Michael Lerner]. This plugin makes it possible to run APBS from within PyMOL, and then display the results as a color-coded electrostatic surface (units <math>K_bT/e_c</math>) in the molecular display window (as with the image to the right). This wiki page has updated instructions on how to download, install and use the plugin.
| |
| | | |
− | '''Nucleic acids may prove problematic for the apbs plugin.''' If so, use the [http://pdb2pqr.sourceforge.net/ pdb2pqr] command-line tool to create a pqr file manually, instead of using the plugin to generate it. Then direct the APBS GUI on the [http://www-personal.umich.edu/~mlerner/PyMOL/images/main.png main menu] to read the pqr file you '''externally generated.'''
| + | Both plugins make it possible to run APBS from within PyMOL, and then display |
− | | + | the results as a color-coded electrostatic surface (units <math>K_bT/e_c</math>) |
− | There is a new version of the PyMOL-APBS plugin and it's now ready for pre-release. There are several big advantages of the new version:
| + | in the molecular display window (as with the image to the right). |
− | | |
− | * It's been tested modern OS X, Windows and Linux systems and fixes several long-standing bugs.
| |
− | * It allows you to call through to PDB2PQR directly.
| |
− | * It allows you to show the electric field lines.
| |
− | * It has two visualization panels to aid in showing multiple potential surfaces at once.
| |
− | * It defaults to using PDB2PQR for PQR generation and APBS's psize.py for grid sizing/spacing.
| |
− | * It has also an increased default maximum allowed memory since typical users have bigger and faster computers these days.
| |
− | * It calls on the correct paths and binaries for multi-threaded APBS (apbs-mpi-openmpi).
| |
− | | |
− | The main reason it is not included in the latest PyMOL release is to receive bug reports. Once it's shown to be stable, it'll be included in the next PyMOL release. See [http://pymolwiki.org/index.php/User:Mglerner Michael Lerner]'s page.
| |
− | | |
− | ==== How to get it ====
| |
− | | |
− | There are two ways to get the new plugin
| |
− | | |
− | * If you have subversion installed, you can always get the latest version via
| |
− | | |
− | <source lang="bash"> | |
− | svn co http://pymolapbsplugin.svn.sourceforge.net/viewvc/pymolapbsplugin/trunk/src/apbsplugin.py
| |
− | </source> | |
− | | |
− | * You can download it from http://pymolapbsplugin.svn.sourceforge.net/viewvc/pymolapbsplugin/trunk/src/apbsplugin.py
| |
− | | |
− | That should give you a file called apbsplugin.py
| |
− | | |
− | Once you have the plugin, you can install it via PyMOL's plugin installer: Plugin --> Manage Plugins --> Install
| |
− | | |
− | You may have to run PyMOL with sudo privileges.
| |
− | | |
− | Note that the plugin will be installed as "APBS Tools2.1" so that you can continue to use your old version.
| |
− | | |
− | Further details, as well as screen shots, are given [http://www.pymolwiki.org/index.php/MAC_Install#Install_APBS_and_friends_with_fink elsewhere in this wiki].
| |
| | | |
| ==Required Dependencies== | | ==Required Dependencies== |
− | [http://apbs.sourceforge.net APBS] and its dependencies like [http://pdb2pqr.sourceforge.net pdb2pqr] and [http://scicomp.ucsd.edu/~mholst/codes/maloc/ maloc] are [http://www.oreilly.com/openbook/freedom/ freely] available under the [http://www.gnu.org/copyleft/gpl.html GPL]. The author of the software however [http://agave.wustl.edu/apbs/download/ asks that users register] with him to aid him in obtaining grant funding.
| |
− |
| |
− | ----
| |
− | ===Installing the Dependencies on OS X===
| |
− | #First, [http://agave.wustl.edu/apbs/download/ register] your use of the software. This will keep everyone happy.
| |
− | #Second, if you don't already have the [http://fink.sourceforge.net fink package management system], now is a good time to get it. Here is a [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/Quick_Start quick-start set of instructions] for getting X-windows, compilers, and fink all installed.
| |
− | #Once you are up and going, [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/How_to_Activate_the_Unstable_Branch activate the unstable branch in fink], and then issue the commands
| |
− | <source lang="bash">
| |
− | fink self-update
| |
− | fink install apbs
| |
− | </source>
| |
− | or if you want to use the multi-processor version, issue
| |
− | <source lang="bash">
| |
− | fink self-update
| |
− | fink install apbs-mpi-openmpi
| |
− | </source>
| |
− | Then install the X-windows based version of pymol using the command
| |
− | <source lang="bash">
| |
− | fink install pymol-py25
| |
− | </source>
| |
− | It is recommended to install the latest pdb2pqr as well as the APBS plugin makes use of it
| |
− | <source lang="bash">
| |
− | fink install pdb2pqr
| |
− | </source>
| |
− | Note that the fink version of PyMOL as of 1.3-4 does not have the latest version of the APBS plugin. Make sure you get the new version!
| |
− |
| |
− | ===Installing the Dependencies on Linux===
| |
− |
| |
− | ====From Scratch====
| |
− | Note that this tutorial assumes you're using the bash shell and have root privileges
| |
− | <OL><LI>
| |
− | Obtain APBS and MALOC from...<br>
| |
− | APBS = http://apbs.sourceforge.net (currently 0.4)<br>
| |
− | MALOC = http://www.fetk.org/codes/maloc/index.html#download (currently 0.1-2)<BR>
| |
− | <LI>Set up some environment variables & directories (temporary for building)
| |
− | <source lang="bash">
| |
− | $ export FETK_SRC=/<building directory>/temp_apbs
| |
− | $ export FETK_PREFIX=/usr/local/apbs-0.4.0 (or wherever you want it to live)
| |
− | $ export FETK_INCLUDE=${FETK_PREFIX}/include
| |
− | $ export FETK_LIBRARY=${FETK_PREFIX}/lib
| |
− | $ mkdir -p ${FETK_SRC} ${FETK_INCLUDE} ${FETK_LIBRARY}
| |
− | </source></LI>
| |
− | <LI>Unpack the source packages
| |
− | <source lang="bash">
| |
− | $ cd ${FETK_SRC}
| |
− | $ gzip -dc maloc-0.1-2.tar.gz | tar xvf -
| |
− | $ gzip -dc apbs-0.4.0.tar.gz | tar xvf -
| |
− | </source>
| |
− | </LI>
| |
− | <LI>Compile MALOC
| |
− | <source lang="bash">
| |
− | $ cd ${FETK_SRC}/maloc
| |
− | $ ./configure --prefix=${FETK_PREFIX}</source>
| |
− | If everything went well, then
| |
− | <source lang="bash">
| |
− | $ make; make install</source></LI>
| |
− | <LI>Go get a coffee. Compilation/installation takes about 15 minutes on a 3GHz computer with 1GB of RAM.</LI>
| |
− | <LI>Now on to compiling APBS itself
| |
− | <source lang="bash">
| |
− | $ cd ${FETK_SRC}/apbs-0.4.0
| |
− | $ ./configure --prefix=${FETK_PREFIX}</source>
| |
− | If all goes well:
| |
− | <source lang="bash">
| |
− | $ make all; make install</source></LI>
| |
− | <LI>No time for coffee. Takes about 5 minutes on that fast computer.</LI>
| |
− | <LI> There will now be an APBS binary at
| |
− | <source lang="bash">/usr/local/apbs-0.4.0/bin/i686-intel-linux/apbs</source></LI>
| |
− | <LI> Make appropriate links
| |
− | <source lang="bash">
| |
− | $ ln -s /usr/local/apbs-0.4.0/bin/i686-intel-linux/apbs /usr/local/bin/apbs
| |
− | </source></LI>
| |
− | <LI> Get rid of /<building directory dir>/temp_apbs
| |
− | <LI> Open PyMOL and make sure that the APBS plugin points to /usr/local/bin/apbs
| |
− | <LI> Rock and or Roll.
| |
− | </OL>
| |
− |
| |
− | ====Pre-Packaged====
| |
− | =====RPMs=====
| |
− |
| |
− | A variety of RPMs are available from the [http://sourceforge.net/project/showfiles.php?group_id=148472&package_id=163734&release_id=378273 APBS downloads website]. Again, please [http://agave.wustl.edu/apbs/download/ register] your use of the software if you have not yet done so.
| |
| | | |
− | =====Debian packages=====
| + | The plugins require '''apbs''' and '''pdb2pqr'''. |
| | | |
− | For ubuntu and other debian linux distributions, probably the simplest thing is to download a promising looking rpm, convert it with the program [http://kitenet.net/programs/alien/ alien], and then install the [http://xanana.ucsc.edu/linux newly generated debian package] with the command
| + | * [https://pymol.org Incentive PyMOL] ships preconfigured with apbs and pdb2pqr |
− | <source lang="bash">
| + | * [https://github.com/Electrostatics/apbs-pdb2pqr/releases Official release downloads] for all platforms |
− | sudo dpkg -i apbs*.deb
| + | * Precompiled packages are also available in Ubuntu, Debian, Gentoo, [https://www.macports.org/ MacPorts], [http://www.finkproject.org/ Fink], and many other Unix-like distributions. Example for installation on Ubuntu: |
− | </source>
| |
| | | |
− | =====Gentoo=====
| + | apt-get install apbs pdb2pqr |
| | | |
− | You have to install apbs and pdb2pqr. Both are masked via keywords atm. Type as root:
| + | After all components are installed, open the plugin and browse for apbs and pdb2pqr on the "Program Locations" tab (if they haven't been found automatically). |
− | <source lang="bash">
| |
− | echo sci-chemistry/pdb2pqr >> /etc/portage/package.keywords
| |
− | echo sci-chemistry/apbs >> /etc/portage/package.keywords
| |
− | emerge -av sci-chemistry/apbs sci-chemistry/pdb2pqr
| |
− | </source>
| |
− | | |
− | ===Installing the dependencies on Windows===
| |
− | * Register to use the software [http://goo.gl/LGVU5j here].
| |
− | | |
− | ====APBS====
| |
− | * Download the zip file for APBS on 64-bit Windows 7 (unfortunately versions for other versions of Windows are unavailable) from [http://sourceforge.net/projects/apbs/files/latest/download here] (size: 9.10 MB).
| |
− | * Unzip the zip file (extract it to any directory, it does not matter exactly where you extract it to), run the file entitled <code>setup.exe</code> in the extracted directory. This executable program should install APBS into the directory <code>C:\APBS</code>, by default, on your system. Be warned, however, if you plan to install the program to <code>C:\Program Files\</code> there are known issues associated with this installation locale. The installation directory should contain two files that are crucial to the functioning of the APBS plugin: <code>apbs.exe</code> and <code>psize.py</code>.
| |
− | | |
− | ====PDB2PQR====
| |
− | * Download the zip file for PDB2PQR on Windows that is specifically designed for PyMOL use from [https://github.com/Electrostatics/apbs-pdb2pqr/releases/download/pdb2pqr-2.0.0_release/pdb2pqr-2.0.0-win-bin64-for-pymol.zip here]. It is important that this zip file is used as the APBS plugin requires a pdb2pqr.py file in order to work and the binaries provided by the developers of PDB2PQR at SourceForge do not contain such a file.
| |
− | * Unzip the directory, extracting all contents into a single new directory. The location of the extracted contents does not matter, so long as you remember it, as you will need to specify it for the APBS plugin whenever you run it.
| |
| | | |
| == Troubleshooting == | | == Troubleshooting == |
− | * If the B-factor is <math>\geq 100,</math> then APBS doesn't properly read in the PDB file and thus outputs garbage (or dies). To fix this, set all b factors to be less than 100. <source lang="python">alter all, b=min(b,99.9)</source> The problem stems from how to parse a PDB file. The PDB file originally was written when most people used FORTRAN programs, and so the file format was specified by columns, not by the more modern comma separated value format we tend to prefer today. For the latest on the PDB format see the [http://www.wwpdb.org/docs.html new PDB format docs]. | + | * ''(this might be outdated information):'' If the B-factor is <math>\geq 100,</math> then APBS doesn't properly read in the PDB file and thus outputs garbage (or dies). To fix this, set all b factors to be less than 100. <source lang="python">alter all, b=min(b,99.9)</source> The problem stems from how to parse a PDB file. The PDB file originally was written when most people used FORTRAN programs, and so the file format was specified by columns, not by the more modern comma separated value format we tend to prefer today. For the latest on the PDB format see the [http://www.wwpdb.org/docs.html new PDB format docs]. |
− | * APBS has problems, sometimes, in reading atoms with alternate conformations. You can remove the alternate locations with a simple script [[removeAlt]]. | + | * APBS has problems, sometimes, in reading atoms with '''alternate conformations'''. You can remove the alternate locations with a simple script [[removeAlt]]. |
− | * ObjectMapLoadDXFile-Error: as of this writing (9-23-2008) a known problem exists, and the Baker lab is working on it. It is typically caused by the use of directories with spaces in their names under Windows. | + | * For pdb2pqr, '''RNA''' resdiue names must be RA, RC, RG, and RU.<source lang="python">alter polymer & resn A+C+G+U, resn = "R" + resn</source> |
− | | + | * Incomplete Residues: Some truncated PDB files include a single backbone atom of the next residue, e.g. [https://www.rcsb.org/structure/2xwu 2xwu] chain B residue 954 atom N. '''pdb2pqr''' reports: ''Error encountered: Too few atoms present to reconstruct or cap residue LEU B 954 in structure!''. The easiest solution is to remove that atom:<source lang="python">remove /2xwu//B/954</source> |
− | == Problems with the bundled version of APBS ==
| |
− | There is an issue with the freemol version of APBS shipped with PyMOL 1.2r2 for OS X.
| |
− | | |
− | === Leopard and Snow Leopard (10.5 and 10.6) ===
| |
− | There are three fairly easy ways to resolve it
| |
− | | |
− | 1. Download and install the most recent (post Dec. 1 2009) version of APBS from [http://www.poissonboltzmann.org/apbs/downloads]. Then copy the apbs binary into the freemol directory (mv it to /Applications/PyMOLX11Hybrid.app/pymol/freemol/bin/apbs.exe, overwriting the version that comes installed with PyMOL).
| |
− | | |
− | 2. Download [[File:Libgfortran.3.dylib.bz2]], unzip it ("bunzip2 libgfortran.3.dylib.gz2") and move it to /usr/local/lib ("mv libgfortran.3.dylib /usr/local/lib" ... on some machines, you may need "sudo mv libgfortran.3.dylib /usr/local/lib").
| |
− | | |
− | <source lang="bash"> | |
− | bunzip2 libgfortran.3.dylib.gz2
| |
− | mv libgfortran.3.dylib /usr/local/lib
| |
− | </source>
| |
− | | |
− | 3. Use macports to install gcc 4.4.2 and link the appropriate library ("ln -s /opt/local/lib/gcc44/libgfortran.3.dylib /usr/local/lib/libgfortran.3.dylib" ... on some machines, you may need "sudo ln -s /opt/local/lib/gcc44/libgfortran.3.dylib /usr/local/lib/libgfortran.3.dylib").
| |
− | | |
− | <source lang="bash">
| |
− | ln -s /opt/local/lib/gcc44/libgfortran.3.dylib /usr/local/lib/libgfortran.3.dylib
| |
− | sudo ln -s /opt/local/lib/gcc44/libgfortran.3.dylib /usr/local/lib/libgfortran.3.dylib
| |
− | </source> | |
− | | |
− | If you're curious, the problem is that APBS is dynamically linked, but Apple does not provide FORTRAN libraries.
| |
− | | |
− | The version of libgfortran above is covered by the GNU General Public License (GPL). A copy of the GPL may be found at [http://www.gnu.org/licenses/licenses.html], and the source may be obtained from MacPorts ([http://www.macports.org/]).
| |
− | | |
− | === Tiger (10.4) ===
| |
− | You'll need to install APBS yourself via MacPorts or via fink. Fink instructions may be found on the [[APBS]] page. Installation via MacPorts requires first installing MacPorts from [http://www.macports.org/] and then typing
| |
− | | |
− | <source lang="bash"> | |
− | sudo port install apbs
| |
− | </source> | |
− | | |
− | from the command line. This process could easily take several hours on an older machine, as MacPorts will recompile gcc, gfortran, and several other packages along the way.
| |
| | | |
| [[Image:Apbs_ex.png|thumb|right|300px|PyMOL visualizing two maps at once]] | | [[Image:Apbs_ex.png|thumb|right|300px|PyMOL visualizing two maps at once]] |
| | | |
| ==Using APBS== | | ==Using APBS== |
− | There is a nice tutorial on the APBS homepage: [http://www.poissonboltzmann.org/apbs/examples/visualization/apbs-electrostatics-in-pymol] For further help, there is a mailing list [https://lists.sourceforge.net/lists/listinfo/apbs-users] with the corresponding archive [http://sourceforge.net/mailarchive/forum.php?forum_name=apbs-users]
| |
− |
| |
| | | |
− | ==Further contributions and edits are needed.==
| + | See [[APBS Electrostatics Plugin]] and [[apbsplugin|APBS Tools2.1]]. |
| | | |
| [[Category:Electrostatics]] | | [[Category:Electrostatics]] |
| [[Category:Biochemical_Properties]] | | [[Category:Biochemical_Properties]] |
| [[Category:Plugins]] | | [[Category:Plugins]] |