From a647b80ae355a845340eeb4464e530c04e640a92 Mon Sep 17 00:00:00 2001 From: Nathan Baker Date: Sat, 23 May 2020 11:47:00 -0700 Subject: [PATCH 1/5] Add DOIs to references Make life easier for people. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b9cfbf8..c7ff2e7 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,9 @@ For proteins without ligands both version should produce the same result. The method is described in the following papers, which you should cite 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. DOI:[10.1021/ct200133y](https://doi.org/10.1021/ct200133y) -* 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. 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, using the [tutorial](http://propka.ki.ku.dk/~luca/wiki/index.php/PROPKA_3.1_Tutorial). From a00617e7a50827067a2ba1d18ddf5e5eab713bc6 Mon Sep 17 00:00:00 2001 From: Nathan Baker Date: Sat, 23 May 2020 13:04:41 -0700 Subject: [PATCH 2/5] Convert "DOI" to lower case --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c7ff2e7..81d7472 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,9 @@ For proteins without ligands both version should produce the same result. The method is described in the following papers, which you should cite 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. DOI:[10.1021/ct200133y](https://doi.org/10.1021/ct200133y) +* 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. doi:[10.1021/ct200133y](https://doi.org/10.1021/ct200133y) -* 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, using the [tutorial](http://propka.ki.ku.dk/~luca/wiki/index.php/PROPKA_3.1_Tutorial). From 46ae3d8251bcea103683571478da3ec659aa8585 Mon Sep 17 00:00:00 2001 From: Nathan Baker Date: Wed, 27 May 2020 07:38:34 -0700 Subject: [PATCH 3/5] Add __main__.py Makes it easier to run (and test) PROPKA as a module. --- propka/__main__.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 propka/__main__.py diff --git a/propka/__main__.py b/propka/__main__.py new file mode 100644 index 0000000..3aa53ea --- /dev/null +++ b/propka/__main__.py @@ -0,0 +1,8 @@ +"""Allow the PROPKA package to be run as a program. + +For example, `python -m propka` +""" +from .run import main + +if __name__ == "__main__": + main() From 959f978abb6f1b5beb2adbb2986de06aca09a050 Mon Sep 17 00:00:00 2001 From: Nathan Baker Date: Wed, 27 May 2020 07:39:41 -0700 Subject: [PATCH 4/5] Add default argument to loadOptions(). Fixes https://github.com/jensengroup/propka-3.1/issues/46 --- propka/lib.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/propka/lib.py b/propka/lib.py index cd25446..6a7958c 100644 --- a/propka/lib.py +++ b/propka/lib.py @@ -222,7 +222,7 @@ def build_parser(parser=None): return parser -def loadOptions(args): +def loadOptions(args=None): """ Load the arguments parser with options. Note that verbosity is set as soon as this function is invoked. @@ -232,9 +232,8 @@ def loadOptions(args): Returns: argparse namespace """ - # defining a 'usage' message - usage = "usage: %prog [options] filename" - + if args == None: + args = [] # loading the parser parser = build_parser() From 33493cc4d221e4d824bbe4c88cf6a0a3cdc51b4d Mon Sep 17 00:00:00 2001 From: Nathan Baker Date: Wed, 27 May 2020 08:25:46 -0700 Subject: [PATCH 5/5] Remove unnecessary args testing. Addresses https://github.com/jensengroup/propka-3.1/pull/47#discussion_r431224753 --- propka/lib.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/propka/lib.py b/propka/lib.py index 6a7958c..1988fd8 100644 --- a/propka/lib.py +++ b/propka/lib.py @@ -232,17 +232,11 @@ def loadOptions(args=None): Returns: argparse namespace """ - if args == None: - args = [] # loading the parser parser = build_parser() # parsing and returning options and arguments - if len(args) == 0: - # command line - options = parser.parse_args() - else: - options = parser.parse_args(args) + options = parser.parse_args(args) # adding specified filenames to arguments options.filenames.append(options.input_pdb)