Skip to content

Commit

Permalink
Merge pull request #45 from Electrostatics/nathan/pypi
Browse files Browse the repository at this point in the history
Support PyPI distribution
  • Loading branch information
Darren Curtis authored Jul 3, 2020
2 parents b45b1ab + 0b60356 commit 248970e
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 103 deletions.
89 changes: 6 additions & 83 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,88 +1,11 @@
pdb2pqr
PDB2PQR
============

This directory is the home for the [PDB2PQR software](http://www.poissonboltzmann.org/docs/structures-ready/).
This package contains the PDB2PQR software (http://www.poissonboltzmann.org/docs/structures-ready/).

Some useful information:
* See the [install notes](INSTALL.md) to build pdb2pqr.
* Using pdb2pqr [binaries](BINARY_README.md)
* Latest [changelog](ChangeLog.md)
For more information about PDB2PQR, please see

Please see the [user guide](http://www.poissonboltzmann.org/docs/pdb2pqr-algorithm-description/) for documentation and the [COPYING file](COPYING) for license information.
* Home page: http://www.poissonboltmzann.org/
* User guide: http://www.poissonboltzmann.org/docs/pdb2pqr-algorithm-description/
* Programmer guide: http://www.poissonboltzmann.org/docs/pdb2pqr-programmers/

Please see [programmer's guide](http://www.poissonboltzmann.org/docs/pdb2pqr-programmers/) for information on working with the PDB2PQR code.

# Binary Releases

Binary builds do not require python or numpy be installed to use. Everything needed to run PDB2PQR is included. Just unpack and use.

## OSX
+ Executable is called "pdb2pqr" and should already have the executable flag set
+ OSX binaries require OSX 10.6 or newer. The OSX binary is 64-bit.

## Linux
+ Executable is called "pdb2pqr" and should already have the executable flag set.
+ Linux binaries require CentOS 6 or newer and have been tested on Ubuntu 16.04 LTS and Linux Mint 13. If you are running 64-bit Linux use the 64-bit libraries.
# PDB2PQR Installation Instructions

Installation on most systems is rather straightforward - as the bulk of the PDB2PQR code is written in Python, the PDB2PQR code itself is architecture/compiler independent. PDB2PQR has been tested using Python versions 2.6 through 2.7 - problems will occur with other versions.

If you would like to enable pdb2pka or ligand support, then you must have Numpy installed.
http://numpy.scipy.org/

Networkx is now required for pdb2pka support.
https://networkx.github.io/

# Configuration and Build

Configuration and build happens from the top-level of the apbs-pdb2pqr repository; e.g.

```
$ mkdir build
$ cd build
$ cmake -DENABLE_PYTHON=ON -DCMAKE_C_FLAGS="-fPIC" ..
$ cmake --build .
```

# Testing

Testing can happen from this directory:

```
$ PYTHONPATH=propka31 python -m pytest
```

# Old documentation is that is probably no longer relevant

## Windows Support
Compilation of pdb2pka on Windows requires that VS2008 or VS Express 2008 and Windows SDK 10.0A installed in the default location.

## Numpy
If numpy cannot be installed directly on the python used to run pdb2pqr you can either install numpy for your local user account or use virtualenv. Homebrew may be an option on OSX.
http://docs.python.org/2/install/index.html#alternate-installation
http://stackoverflow.com/questions/7465445/how-to-install-python-modules-without-root-access
http://www.virtualenv.org

##Binary Builds
A PyInstaller spec file is included if a stand alone binary build (no python install or compile required to run) is desired.
http://www.pyinstaller.org/

PyInstaller 2.1 or newer installed as python library is required.
To create standalone build, first build the application as normal then run

pyinstaller pdb2pqr.spec

in the root archive folder. The distributable program will be in the dist/pdb2pqr folder.

Each supported platform has different needs when creating the binary build:

### Linux
The built binaries will dynamically link against the system standard libs.
For this reason the Linux binaries should be built on an older system to increase compatibility if needed.

### OSX
On the Mac you must use homebrew and use the python that it installs with <code>brew python</code>. See http://brew.sh/ and https://github.com/Homebrew/homebrew/wiki/Homebrew-and-Python
Once homebrew python is setup and configured correctly pyinstaller, numpy and networkx can be installed with <code>pip install numpy</code>, <code>pip install pyinstaller</code>, and <code>pip install networkx</code>.
If the global python is used the binary will fail when the <code>--ligand</code> option is used.
Similar to Linux, this binary is dynamically linked against the system libraries. The binary will not work on OSX older than the version built on.
We officially support OSX 10.6 or newer.
52 changes: 32 additions & 20 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
#!/usr/bin/python3

"""
The use of continuum solvation methods such as APBS requires accurate and complete
structural data as well as force field parameters such as atomic charges and radii.
Unfortunately, the limiting step in continuum electrostatics calculations is often
the addition of missing atomic coordinates to molecular structures from the Protein
Data Bank and the assignment of parameters to these structures. To adds this problem,
we have developed PDB2PQR. This software automates many of the common tasks of
preparing structures for continuum solvation calculations as well as many other types
of biomolecular structure modeling, analysis, and simulation. These tasks include:
The use of continuum solvation methods such as APBS requires accurate and
complete structural data as well as force field parameters such as atomic
charges and radii. Unfortunately, the limiting step in continuum electrostatics
calculations is often the addition of missing atomic coordinates to molecular
structures from the Protein Data Bank and the assignment of parameters to these
structures. To adds this problem, we have developed PDB2PQR. This software
automates many of the common tasks of preparing structures for continuum
solvation calculations as well as many other types of biomolecular structure
modeling, analysis, and simulation. These tasks include:
* Adding a limited number of missing heavy (non-hydrogen) atoms to biomolecular structures.
* Estimating titration states and protonating biomolecules in a manner consistent with favorable hydrogen bonding.
* Adding a limited number of missing heavy (non-hydrogen) atoms to biomolecular
structures.
* Estimating titration states and protonating biomolecules in a manner
consistent with favorable hydrogen bonding.
* Assigning charge and radius parameters from a variety of force fields.
* Generating "PQR" output compatible with several popular computational modeling and analysis packages.
* Generating "PQR" output compatible with several popular computational modeling
and analysis packages.
This service is intended to facilitate the setup and execution of electrostatics calculations for both experts and non-experts and thereby broaden the accessibility of
biomolecular solvation and electrostatics analyses to the biomedical community.
This service is intended to facilitate the setup and execution of electrostatics
calculations for both experts and non-experts and thereby broaden the
accessibility of biomolecular solvation and electrostatics analyses to the
biomedical community.
"""

import sys
Expand All @@ -26,11 +32,11 @@
raise RuntimeError("Python version >= 3.6 is required.")

with open("README.md", "r") as f:
long_description = f.read()
LONG_DESCRIPTION = f.read()

MAJOR = 3
MINOR = 0
MICRO = 0
MICRO = 1
VERSION = "%d.%d.%d" % (MAJOR, MINOR, MICRO)

setuptools.setup(
Expand All @@ -42,32 +48,38 @@
"Automates many of the common tasks of preparing structures for "
"continuum solvation calculations as well as many other types of "
"biomolecular structure modeling, analysis, and simulation."),
long_description=long_description,
long_description=LONG_DESCRIPTION,
install_requires=["propka >= 3.2", "pandas >= 1.0", "pytest>=5.4.1"],
url="https://github.com/Electrostatics/apbs-pdb2pqr/tree/master/pdb2pqr",
url="http://www.poissonboltzmann.org",
packages=setuptools.find_packages(
exclude=["pdb2pka", "*.pdb2pka", "pdb2pka.*", "*.pdb2pka.*"]),
package_data={"pdb2pqr": ["dat/*.xml", "dat/*.DAT", "dat/*.names"]},
python_requires=">=3.5",
license="BSD",
classifiers=[
"Development Status :: 4 - Beta",
"Development Status :: 2 - Pre-Alpha",
"Environment :: Console",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: Linux",
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Scientific/Engineering :: Chemestry"
"Topic :: Scientific/Engineering :: Chemistry"
],
project_urls={
'Documentation': 'http://www.poissonboltzmann.org',
'Get help': 'https://github.com/Electrostatics/pdb2pqr/issues',
'Publications': 'https://pubmed.ncbi.nlm.nih.gov/?term=R01+GM069702',
'Funding': 'https://bit.ly/apbs-funding',
'Source': 'https://github.com/Electrostatics/pdb2pqr',
},
keywords="science chemistry molecular biology",
entry_points={"console_scripts": "pdb2pqr30=pdb2pqr.main:main"}
)
7 changes: 7 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Testing can be performed from the parent directory via the following command:

```
$ python -m pytest
```

Note that some tests are very long and can take hours to complete.

0 comments on commit 248970e

Please sign in to comment.