Merge branch 'master' into pytest-ci
This commit is contained in:
11
INSTALL
11
INSTALL
@@ -1,11 +0,0 @@
|
|||||||
## Installation
|
|
||||||
|
|
||||||
Clone repository or unpack the tar ball and install with
|
|
||||||
[pip](https://pip.pypa.io):
|
|
||||||
|
|
||||||
pip install propka-3.1/
|
|
||||||
|
|
||||||
This will install the `propka31` script in your executable
|
|
||||||
directory. The `propka` Python module will also become available for
|
|
||||||
import.
|
|
||||||
|
|
||||||
89
README.md
89
README.md
@@ -1,10 +1,10 @@
|
|||||||
# PROPKA 3.1
|
# PROPKA 3
|
||||||
|
|
||||||
PROPKA predicts the pKa values of ionizable groups in proteins
|
PROPKA predicts the pKa values of ionizable groups in proteins
|
||||||
(version 3.0) and protein-ligand complexes (version 3.1)
|
(version 3.0) and protein-ligand complexes (version 3.1 and later)
|
||||||
based on the 3D structure.
|
based on the 3D structure.
|
||||||
|
|
||||||
For proteins without ligands both version should produce the same result.
|
For proteins without ligands, both version should produce the same result.
|
||||||
|
|
||||||
The method is described in the following papers, which you should cite
|
The method is described in the following papers, which you should cite
|
||||||
in publications:
|
in publications:
|
||||||
@@ -13,58 +13,68 @@ in publications:
|
|||||||
|
|
||||||
* Olsson, Mats HM, Chresten R. Sondergaard, Michal Rostkowski, and Jan H. Jensen. "PROPKA3: consistent treatment of internal and surface residues in empirical pKa predictions." Journal of Chemical Theory and Computation 7, no. 2 (2011): 525-537. doi:[10.1021/ct100578z](https://doi.org/10.1021/ct100578z)
|
* Olsson, Mats HM, Chresten R. Sondergaard, Michal Rostkowski, and Jan H. Jensen. "PROPKA3: consistent treatment of internal and surface residues in empirical pKa predictions." Journal of Chemical Theory and Computation 7, no. 2 (2011): 525-537. doi:[10.1021/ct100578z](https://doi.org/10.1021/ct100578z)
|
||||||
|
|
||||||
See [propka.ki.ku.dk](http://propka.ki.ku.dk/) for the PROPKA web server,
|
## PROPKA versions
|
||||||
using the [tutorial](http://propka.ki.ku.dk/~luca/wiki/index.php/PROPKA_3.1_Tutorial).
|
|
||||||
|
|
||||||
|
The code in this repository is named _PROPKA 3_ and it is based on the original PROPKA 3.1 release (described in the papers above). It has undergone various changes, which is reflected in the version numbering. For instance, version 3.2 contains a number of API changes and code refactoring that introduce incompatibilities between the original 3.1 release and the more recent versions. In the future, we will increase the minor version number to indicate further changes to the code base (e.g., release 3.3 or 3.4). The major release number is not expected to change unless major changes to the underlying algorithms are implemented.
|
||||||
## Installation
|
|
||||||
|
|
||||||
Clone repository or unpack the tar ball and install with
|
|
||||||
[setuptools](http://pythonhosted.org/setuptools/index.html) (note: if
|
|
||||||
you don't have setuptools installed you will need an internet
|
|
||||||
connection so that the installation procedure can download the
|
|
||||||
required files):
|
|
||||||
|
|
||||||
cd propka-3.1
|
|
||||||
python setup.py install --user
|
|
||||||
|
|
||||||
This will install the `propka31` script in your executable directory,
|
|
||||||
as configured for setuptools, for instance `~/.local/bin`. You can
|
|
||||||
change the bin directory with the `--install-scripts` option. For
|
|
||||||
example, in order to install in my `bin` directory in my home
|
|
||||||
directory:
|
|
||||||
|
|
||||||
python setup.py install --user --install-scripts ~/bin
|
|
||||||
|
|
||||||
For the purposes of testing or development, you may prefer to install PROPKA as
|
|
||||||
an editable module via PIP by running
|
|
||||||
```
|
|
||||||
pip install -e .
|
|
||||||
```
|
|
||||||
from within a virtual environment (e.g., via [virtualenv](https://pypi.org/project/virtualenv/)).
|
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
* Python 3.5 or higher
|
PROPKA 3 requires Python 3.6 or higher. Additional requirements are specified in the `requirements.txt` file and automatically satisfied when installing with [pip](https://pip.pypa.io).
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### PIP-based installation
|
||||||
|
|
||||||
|
The easiest way to install PROPKA is via the [PyPI archive](https://pypi.org/project/PROPKA/) with the command
|
||||||
|
|
||||||
|
pip install propka
|
||||||
|
|
||||||
|
This installation will install the `propka` Python module and the `propka3` executable script.
|
||||||
|
As always, a virtual environment (e.g., via [virtualenv](https://pypi.org/project/virtualenv/)) is recommended when installing packages.
|
||||||
|
|
||||||
|
### Source-based installation
|
||||||
|
|
||||||
|
The source code can be installed by cloning the repository or unpacking from a source code archive and running
|
||||||
|
|
||||||
|
pip install .
|
||||||
|
|
||||||
|
in the source directory.
|
||||||
|
For the purposes of testing or development, you may prefer to install PROPKA as an editable module via PIP by running
|
||||||
|
|
||||||
|
pip install -e .
|
||||||
|
|
||||||
|
in the source directory.
|
||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
|
|
||||||
1. Clone the code from GitHub
|
PROPKA can be used either as a module or via the installed script; i.e., either
|
||||||
2. `python setup.py install --user`
|
|
||||||
2. Run `propka31` with a .pdb file (see Examples)
|
|
||||||
|
|
||||||
## Examples
|
propka3
|
||||||
|
|
||||||
Calculate using pdb file
|
or
|
||||||
|
|
||||||
propka31 1hpx.pdb
|
python -m propka
|
||||||
|
|
||||||
|
works for invoking PROPKA.
|
||||||
|
|
||||||
|
A brief list of available options can be obtained by running PROPKA with no options:
|
||||||
|
|
||||||
|
propka3
|
||||||
|
|
||||||
|
A longer list of options and descriptions is available using the `--help` option:
|
||||||
|
|
||||||
|
propka3 --help
|
||||||
|
|
||||||
|
Most users run PROPKA by invoking the program with a PDB file as its argument; e.g.,
|
||||||
|
|
||||||
|
propka3 1hpx.pdb
|
||||||
|
|
||||||
## Testing (for developers)
|
## Testing (for developers)
|
||||||
|
|
||||||
Please see [`tests/README.md`](tests/README.md) for testing instructions.
|
Please see [`tests/README.md`](tests/README.md) for testing instructions.
|
||||||
Please run these tests after making changes to the code and _before_ pushing commits.
|
Please run these tests after making changes to the code and _before_ pushing commits.
|
||||||
|
|
||||||
|
|
||||||
## References / Citations
|
## References / Citations
|
||||||
|
|
||||||
Please cite these references in publications:
|
Please cite these references in publications:
|
||||||
@@ -72,6 +82,3 @@ Please cite these references in publications:
|
|||||||
* Sondergaard, Chresten R., Mats HM Olsson, Michal Rostkowski, and Jan H. Jensen. "Improved Treatment of Ligands and Coupling Effects in Empirical Calculation and Rationalization of pKa Values." Journal of Chemical Theory and Computation 7, no. 7 (2011): 2284-2295.
|
* Sondergaard, Chresten R., Mats HM Olsson, Michal Rostkowski, and Jan H. Jensen. "Improved Treatment of Ligands and Coupling Effects in Empirical Calculation and Rationalization of pKa Values." Journal of Chemical Theory and Computation 7, no. 7 (2011): 2284-2295.
|
||||||
|
|
||||||
* Olsson, Mats HM, Chresten R. Sondergaard, Michal Rostkowski, and Jan H. Jensen. "PROPKA3: consistent treatment of internal and surface residues in empirical pKa predictions." Journal of Chemical Theory and Computation 7, no. 2 (2011): 525-537.
|
* Olsson, Mats HM, Chresten R. Sondergaard, Michal Rostkowski, and Jan H. Jensen. "PROPKA3: consistent treatment of internal and surface residues in empirical pKa predictions." Journal of Chemical Theory and Computation 7, no. 2 (2011): 525-537.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
"""PROPKA 3.1
|
"""PROPKA 3
|
||||||
|
|
||||||
See https://github.com/jensengroup/propka-3.1 for more information.
|
See https://github.com/jensengroup/propka-3.1 for more information.
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ def read_parameter_file(input_file, parameters):
|
|||||||
try:
|
try:
|
||||||
ifile = resource_filename(__name__, input_file)
|
ifile = resource_filename(__name__, input_file)
|
||||||
input_ = open_file_for_reading(ifile)
|
input_ = open_file_for_reading(ifile)
|
||||||
except (IOError, FileNotFoundError, ValueError):
|
except (IOError, FileNotFoundError, ValueError, KeyError):
|
||||||
input_ = open_file_for_reading(input_file)
|
input_ = open_file_for_reading(input_file)
|
||||||
for line in input_:
|
for line in input_:
|
||||||
parameters.parse_line(line)
|
parameters.parse_line(line)
|
||||||
|
|||||||
@@ -363,7 +363,7 @@ def get_propka_header():
|
|||||||
string
|
string
|
||||||
"""
|
"""
|
||||||
today = date.today()
|
today = date.today()
|
||||||
str_ = "propka3.1 {0!s:>93s}\n".format(today)
|
str_ = "propka3.2 {0!s:>93s}\n".format(today)
|
||||||
str_ += """
|
str_ += """
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
-- --
|
-- --
|
||||||
@@ -381,6 +381,9 @@ def get_propka_header():
|
|||||||
-- VERSION 3.1, 07/01/2011, COPENHAGEN --
|
-- VERSION 3.1, 07/01/2011, COPENHAGEN --
|
||||||
-- BY CHRESTEN R. SONDERGARD AND MATS H.M. OLSSON --
|
-- BY CHRESTEN R. SONDERGARD AND MATS H.M. OLSSON --
|
||||||
-- --
|
-- --
|
||||||
|
-- VERSION 3.2, 06/17/2020, PLANET EARTH --
|
||||||
|
-- SEE ABOVE FOR AUTHORS --
|
||||||
|
-- --
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
"""
|
"""
|
||||||
return str_
|
return str_
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
"""PROPKA script.
|
|
||||||
|
|
||||||
This is the original propka script. However, this distribute-based
|
|
||||||
installation moved the main() function into propka.run.main and just
|
|
||||||
generates a script called propka31 from the setup.py installation
|
|
||||||
script. You should not need to use this script.
|
|
||||||
|
|
||||||
(Also note that there can be import problems because the script name
|
|
||||||
is the same as the module name; that's why the new script is called
|
|
||||||
propka31.)
|
|
||||||
"""
|
|
||||||
from propka.lib import loadOptions
|
|
||||||
from propka.input import read_parameter_file, read_molecule_file
|
|
||||||
from propka.parameters import Parameters
|
|
||||||
from propka.molecular_container import MolecularContainer
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
"""Read in structure files, calculates pKa values, and prints pKa files."""
|
|
||||||
# loading options, flaggs and arguments
|
|
||||||
options = loadOptions([])
|
|
||||||
pdbfiles = options.filenames
|
|
||||||
parameters = read_parameter_file(options.parameters, Parameters())
|
|
||||||
|
|
||||||
for pdbfile in pdbfiles:
|
|
||||||
my_molecule = MolecularContainer(parameters, options)
|
|
||||||
my_molecule = read_molecule_file(pdbfile, my_molecule)
|
|
||||||
my_molecule.calculate_pka()
|
|
||||||
my_molecule.write_pka()
|
|
||||||
if options.generate_propka_input:
|
|
||||||
my_molecule.write_propka()
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
||||||
75
setup.py
75
setup.py
@@ -1,19 +1,16 @@
|
|||||||
#! /usr/bin/python
|
#! /usr/bin/python
|
||||||
# PROPKA 3.1
|
# PROPKA 3
|
||||||
#
|
|
||||||
#
|
|
||||||
# setuptools installation of PROPKA 3.1
|
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
VERSION = "3.1.1"
|
VERSION = "3.2.0"
|
||||||
|
|
||||||
setup(name="PROPKA",
|
setup(
|
||||||
version=VERSION,
|
name="propka",
|
||||||
description="Heuristic pKa calculations with ligands",
|
version=VERSION,
|
||||||
long_description="""
|
description="Heuristic pKa calculations with ligands", long_description="""
|
||||||
PROPKA predicts the pKa values of ionizable groups in proteins (version 3.0) and
|
PROPKA predicts the pKa values of ionizable groups in proteins (version 3.0) and
|
||||||
protein-ligand complexes (version 3.1) based on the 3D structure.
|
protein-ligand complexes (version 3.1 and later) based on the 3D structure.
|
||||||
|
|
||||||
For proteins without ligands both version should produce the same result.
|
For proteins without ligands both version should produce the same result.
|
||||||
|
|
||||||
@@ -32,31 +29,33 @@ in publications:
|
|||||||
|
|
||||||
See http://propka.org/ for the PROPKA web server.
|
See http://propka.org/ for the PROPKA web server.
|
||||||
""",
|
""",
|
||||||
author="Jan H. Jensen",
|
author="Jan H. Jensen",
|
||||||
author_email="jhjensen@chem.ku.dk",
|
author_email="jhjensen@chem.ku.dk",
|
||||||
license="LGPL v2.1",
|
maintainer="Nathan Baker",
|
||||||
url="http://propka.org",
|
maintainer_email="nathanandrewbaker@gmail.com",
|
||||||
keywords="science",
|
license="LGPL v2.1",
|
||||||
classifiers=[
|
url="http://propka.org",
|
||||||
'Development Status :: 6 - Mature',
|
keywords="science",
|
||||||
'Environment :: Console',
|
classifiers=[
|
||||||
'Intended Audience :: Science/Research',
|
'Development Status :: 6 - Mature',
|
||||||
'License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)',
|
'Environment :: Console',
|
||||||
'Operating System :: POSIX',
|
'Intended Audience :: Science/Research',
|
||||||
'Programming Language :: Python',
|
'License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)',
|
||||||
'Topic :: Scientific/Engineering :: Bio-Informatics',
|
'Operating System :: POSIX',
|
||||||
'Topic :: Scientific/Engineering :: Chemistry',
|
'Operating System :: MacOS :: MacOS X',
|
||||||
],
|
'Operating System :: Microsoft :: Windows',
|
||||||
packages=find_packages(exclude=['scripts']),
|
'Programming Language :: Python',
|
||||||
package_data = {'propka': ['*.dat', '*.cfg']},
|
'Programming Language :: Python :: 3.6',
|
||||||
#scripts = ["scripts/propka31.py"], # use entry point below
|
'Programming Language :: Python :: 3.7',
|
||||||
entry_points = {
|
'Programming Language :: Python :: 3.8',
|
||||||
'console_scripts': [
|
'Topic :: Scientific/Engineering :: Bio-Informatics',
|
||||||
'propka31 = propka.run:main',
|
'Topic :: Scientific/Engineering :: Chemistry',
|
||||||
],
|
],
|
||||||
},
|
packages=find_packages(exclude=['scripts']),
|
||||||
zip_safe=True,
|
package_data={'propka': ['*.dat', '*.cfg', '*.json']},
|
||||||
python_requires='>=3.5',
|
entry_points={'console_scripts': ['propka3 = propka.run:main', ]},
|
||||||
tests_require=["pandas", "numpy"],
|
zip_safe=True,
|
||||||
test_suite="tests",
|
python_requires='>=3.6',
|
||||||
)
|
tests_require=["pandas", "numpy", "pytest"],
|
||||||
|
test_suite="tests",
|
||||||
|
)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
"""Tests for PROPKA 3.1"""
|
"""Tests for PROPKA"""
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|||||||
Reference in New Issue
Block a user