Skip to content

anushkrish/pygbe

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyGBe: Python GPU code for Boundary elements

This is a boundary element method code that does molecular electrostatics calculations with a continuum approach. It calculates solvation energies for proteins modeled with any number of dielectric regions. We use the formulation presented in the paper by Yoon and Lenhoff: "A Boundary Element Method for Molecular Electrostatics with Electrolyte Effects", Journal of Computational Chemistry, Vol. 11, No. 9, 1990. Proper user guide is under development.

This code is accelerated using the Barnes-Hut treecode so that each GMRES iteration scales as O(NlogN). The code is written in Python putting the most computationally intensive parts on the GPU, interfacing with PyCUDA, and some parts are wrapped in C++ using SWIG.

Installation

The following instructions assume that the operating system is Ubuntu. Run the corresponding commands in your flavor of Linux to install.

Dependencies

  • Python
  • Numpy
  • SWIG
  • NVCC
  • PyCUDA

Python

Python is available by default on Ubuntu.

Numpy and SWIG

Install numpy and SWIG by running the following in the command line:

> sudo apt-get install python-numpy swig

NVCC

Download and install the CUDA Toolkit.

PyCUDA

PyCUDA must be installed from source. Follow the instructions on the PyCUDA website. We summarize the commands to install PyCUDA on Ubuntu here:

> cd $HOME
> mkdir src
> cd src
> wget https://pypi.python.org/packages/source/p/pycuda/pycuda-2013.1.1.tar.gz
> tar -xvzf pycuda-2013.1.1.tar.gz
> cd pycuda-2013.1.1
> python configure.py --cuda-root=/usr/local/cuda
> make
> sudo make install

Test the installation by running the following:

> cd test
> python test_driver.py

PyGBe has been run and tested on Ubuntu 12.04 and 13.10. The versions of the dependencies used were python 2.7, numpy 1.6 and 1.7, swig 2.0, nvcc 5.5 and pycuda 1.1.

Compiling PyGBe

Create a clone of the repository on your machine:

> cd $HOME/src
> git clone https://github.com/barbagroup/pygbe.git
> cd pygbe

To compile the C++ code, type make all in the ./bem_pycuda directory:

> cd bem_pycuda
> make all

Run PyGBe

To run a case, type ./main.py <file1.param> <file2.config> in the folder ./bem_pycuda. Replace file1 and file2 with the corresponding names of the input files. As an example, run the following:

> ./main.py input_files/lys.param input_files/lys.config

Mesh

In ./geometry, we provide the meshes and .pqr files for a spherical molecule and the Lysozyme protein. To plug in your own protein data, download the corresponding .pdb file from the Protein Data Bank, then get its .pqr file using any PDB to PQR converter (there are online tools available for this). Our code interfaces with meshes generated using MSMS (Michel Sanner's Molecular Surface code).

Input files

In ./bem_pycuda/input_files, we provide example input files. For a run you need two input files: a "parameters" file and a "config" file. Documentation on the format of these files is provided in the file README_input_format.

Let us know if you have any questions/feedback.

Enjoy!

Christopher (cdcooper@bu.edu)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 99.9%
  • Other 0.1%