Restrained electrostatic potential (RESP) fitting for PSI4
This is a partially-complete plugin for PSI4 that implements restrained electrostatic potential fitting (RESP) [1] to compute atomic partial charges, potentially for use in MD.
This plugin still probably needs to be verified against a known-good implementation of this method, such as the code in AmberTools.
RESP is really a pretty simple method, and PSI4 has a very nice plugin architecture for adding in new functionality that can make use of the core PSI4 objects (the Wavefunction, etc), without needing to recompile all of PSI4 as you change your plugin.
The basic structure of the calculation is:
- Generate a bunch of points in R^3 around the molecule.
- This requires computing points with a ~uniform density on the VdW surface -- see
src/vdwsurface.cc
- This requires computing points with a ~uniform density on the VdW surface -- see
- Calculate the QM ESP at these points from the wavefunction.
- Calculate the MM ESP at these points as a function of the atomic partial charges.
- Minimize some norm of the difference between these two sets of charges w.r.t the atomic partial charges.
For the minimzer, this code uses nlopt (cpp interface), so you'll need the headers / libraries for that.
- Install psi4 using conda
conda install -c psi4 psi4
- This requires having the Anaconda or Miniconda Python distribution installed.
- See http://www.psicode.org/psi4manual/master/conda.html#quick-installation
- You'll need psi4 >= 0.3.534.
- You'll need to install the nlopt library and its development headers
- On Debian-based distros, install the
libnlopt-dev
package - On RPM-based distros, I think it's
NLopt-devel
. - It's also very easy to compile from source, and in that case you'll get a static library by default which makes everything easier.
- On Debian-based distros, install the
- You need a C++11-capable compiler and boost.
- If you're using a cluster with an old linux, just run
conda install gcc boost
- If you're using a cluster with an old linux, just run
- Checkout this repository and run
./configure; make
in this directory - Run
psi4
in this directory to run the example input file.
See the build log on Travis-CI.
[1] Bayly, Cieplak, Cornell, and Kollman (1993) http://pubs.acs.org/doi/abs/10.1021/j100142a004
To the maximum extent possible, everything in this repository that is my (=rmcgibbo) own work is released under CC0 (see LICENSE file).