# -*- coding: utf-8 -*-
from setuptools import setup

package_dir = \
{'': 'src'}

packages = \
['prodigy_lig']

package_data = \
{'': ['*']}

install_requires = \
['biopython>=1.79,<2.0', 'numpy>=2,<3']

entry_points = \
{'console_scripts': ['prodigy_lig = prodigy_lig.prodigy_lig:main']}

setup_kwargs = {
    'name': 'prodigy-lig',
    'version': '1.1.4',
    'description': 'Calculate protein-small molecule binding affinities.',
    'long_description': "# PRODIGY-LIG / Small Molecule Binding Affinity Prediction\n\n![PyPI - Version](https://img.shields.io/pypi/v/prodigy-lig)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/prodigy-lig)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/prodigy-lig)\n\n[![ci](https://github.com/haddocking/prodigy-lig/actions/workflows/ci.yml/badge.svg)](https://github.com/haddocking/prodigy-lig/actions/workflows/ci.yml)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/fbf5e21772f74ff498492d74389a0525)](https://www.codacy.com/gh/haddocking/prodigy-lig/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=haddocking/prodigy-lig&amp;utm_campaign=Badge_Grade)\n[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/fbf5e21772f74ff498492d74389a0525)](https://www.codacy.com/gh/haddocking/prodigy-lig/dashboard?utm_source=github.com&utm_medium=referral&utm_content=haddocking/prodigy-lig&utm_campaign=Badge_Coverage)\n\n![PyPI - License](https://img.shields.io/pypi/l/prodigy-lig)\n[![fair-software.eu](https://img.shields.io/badge/fair--software.eu-%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F-green)](https://fair-software.eu)\n\nPRODIGY-LIG (**PRO**tein bin**DI**ng ener**GY** prediction - **LIG**ands) is a structure-based method for the prediction of binding affinity in protein-small ligand (such as drugs or metabolites) complexes.\n\nIt's also available as a web service @ [wenmr.science.uu.nl/prodigy-lig](https://wenmr.science.uu.nl/prodigy-lig)\n\n## Installation\n\n```text\npip install prodigy-lig\n```\n\n## TL:DR\n\nYou can fetch a structure from the PDB and start using the code immediately. The following two lines should do the trick:\n\n```text\nwget https://files.rcsb.org/download/1A0Q.pdb\n```\n\n```text\n$ prodigy_lig -c H,L H:HEP -i 1A0Q.pdb\n\nJob name        DGprediction (low refinement) (Kcal/mol)\n1a0q    -8.49\n```\n\nYou can read more about the usage of `prodigy_lig` in the next section\n\n## Usage\n\nRunning `prodigy_lig -h` will list some basic information about the code.\n\n```text\nusage: prodigy_lig [-h] -c CHAINS CHAINS -i INPUT_FILE [-e ELECTROSTATICS]\n                   [-d DISTANCE_CUTOFF] [-o] [-v] [-V]\n\nCalculate the Binding Affinity score using the PRODIGY-LIG model\n\nprodigy_lig dependes on biopython for the structure manipulations\nand only requires a single structure file (in mmCIF or PDB format)\nas input.\n\nprodigy_lig is licensed under the Apache License 2.0 included in\nthe LICENSE file of this repository or at the following URL\n\nhttps://github.com/haddocking/prodigy-lig/blob/master/LICENSE\n\nIf you use prodigy_lig in your research please cite the following\npapers:\n\n1. to be submitted\n2. https://doi.org/10.1007/s10822-017-0049-y\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -c CHAINS CHAINS, --chains CHAINS CHAINS\n                        Which chains to use. Expects two sets of arguments.\n                        The first set refers to the protein selection and\n                        multiple chains can be specified by separating the\n                        chain identifiers with commas. The second set refers\n                        to the ligand and requires one chain and the residue\n                        identifier of the ligand. A typical use case could be\n                        the following: prodigy_lig.py -c A,B A:LIG\n  -i INPUT_FILE, --input_file INPUT_FILE\n                        This is the PDB/mmcif file for which the score will be\n                        calculated.\n  -e ELECTROSTATICS, --electrostatics ELECTROSTATICS\n                        This is the electrostatics energy as calculated during\n                        the water refinement stage of HADDOCK.\n  -d DISTANCE_CUTOFF, --distance_cutoff DISTANCE_CUTOFF\n                        This is the distance cutoff for the Atomic Contacts\n                        (def = 10.5Å).\n  -o, --output_file     Store the processed file. The filename will be the\n                        name of the input with -processed appended just before\n                        the file ending.\n  -v, --verbose         Include the calculated contact counts in the output.\n  -V, --version         Print the version and exit.\n\nAuthors: Panagiotis Koukos, Anna Vangone, Joerg Schaarschmidt\n```\n\nFor all the examples mentioned below the following two caveats apply:\n\n> **prodigy_lig only considers contacts between the ligand and residues of the protein**. Any cofactors, ions or solvent molecules that might be present, are not included in the distances that are calculated.\n\nAdditionaly, prodigy_lig **only works on single model structures**. That means that if your structure of interest contains multiple models (e.g. NMR conformers) only the first model will be used for the calculations.\n\n### Command line arguments\n\nThe command line arguments belong to one of two categories; required and optional. The two required arguments are the input structure file and the specification of the chain and residue identifiers of the interactors.\n\n### Required arguments\n\n#### Input file\n\nThe input structure file can be specified with the `-i` flag (or `--input_file`) and it should be the path to the input PDB/mmCIF file.\n\n#### Chain specification\n\nThe `-c` flag (or `--chains`) must be used to specify the chain identifiers for the interactors, and for the ligand the residue identifier as well. The first argument allows to specify the protein chains to be used in the analysis. Multiple chains can be specified by comma separating them. The second argument needs to specify the chain and residue identifier of the ligand of interest separated by a colon (`:`).\n\nFor the next examples we will be using the structure from the quickstart, 1A0Q.\n\n If you didn't do so before you can fetch the PDB file with the following line of\n code from the command line.\n\n ```text\n wget https://files.rcsb.org/download/1A0Q.pdb\n ```\n\nAfter examining the file with your favourite molecular viewer you will note that this is a Fab fragment with a small molecule ligand embedded between the heavy and light chains. The chain identifiers of the heavy and light chains are H and L, and the small molecule of interest has the residue identifier `HEP` and is part of chain H.\n\nThe simplest analysis we can do is to include both chains\n\n```text\nprodigy_lig -c H,L H:HEP -i 1A0Q.pdb\n```\n\nwhich produces the following output.\n\n```text\nJob name        DGprediction (low refinement) (Kcal/mol)\n1a0q    -8.49\n```\n\nIn this case, atomic distances from the ligand to residues of both chains have been calculated.\n\nIf we wanted to only include the heavy chain (`H`) in the analysis we would use this command instead.\n\n```text\nprodigy_lig -c H H:HEP -i 1A0Q.pdb\n```\n\nwhich would produce this output\n\n```text\nJob name        DGprediction (low refinement) (Kcal/mol)\n1a0q    -6.69\n```\n\n#### Optional arguments\n\nThe first two optional arguments will affect your results, whereas the latter ones will only impact the formatting and content of your output.\n\n##### Electrostatics Energy\n\nIn addition to the contact information prodigy_lig can make use of the electrostatic energy of the interaction as well. This refers to the intermolecular electrostatic energy as calculated by [HADDOCK](https://wenmr.science.uu.nl/haddock2.4).\n\nIf you know this energy because you have refined your complex through HADDOCK then you can specify this using the `-e` flag (`--electrostatics`). Additionaly, if your PDB file is coming from HADDOCK, `prodigy_lig` will automatically extract the relevant information from the input file and make use of it.\n\n##### Distance cutoff\n\nThis is the cutoff used when calculating the atomic contacts. By default it has a value of 10.5 Angstrom, which was identified when training the model. You can modify this with the `-d` flag (`--distance_cutoff`).\n\n##### Processed output file\n\nIf you would like a copy of the structure that was used to calculate the atomic contacts you can use the `-o` flag (`--output_file`). This might be useful if you have chosen to exclude some chains from the analysis. The file will be created in the current working directory and its filename will be `input_name-processed.pdb`.\n\n##### Verbosity\n\nIf you specify the `-v` flag (`--verbose`), in addition to the DG values / scores, the output will include the contact counts and, if defined, electrostatics as well. Once again using the same example as above.\n\n```text\nprodigy_lig -c H,L H:HEP -i 1A0Q.pdb -v\n```\n\nWill produce the following output\n\n| Job name | DGprediction (low refinement) (Kcal/mol) | CC | CN | CO | CX | NN | NO | NX | OO | OX | XX\n| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---\n| 1A0Q | -8.49 | 1838 | 589 | 1010 | 124 | 27 | 175 | 30 | 132 | 24 | 0\n\n## Citing us\n\nIf our predictive model or any scripts are useful to you, consider citing them in your\npublications:\n\n- **Vangone A, Schaarschmidt J, Koukos P, Geng C, Citro N, Trellet M, Xue L, Bonvin A.**: [Large-scale prediction of binding affinity in protein-small ligand complexes: the PRODIGY-LIG web server.](https://doi.org/10.1093/bioinformatics/bty816) *Bioinformatics*\n\n- **Kurkcuoglu Z, Koukos P, Citro N, Trellet M, Rodrigues J, Moreira I, Roel-Touris J, Melquiond A, Geng C, Schaarschmidt J, Xue L, Vangone A, Bonvin AMJJ.**: [Performance of HADDOCK and a simple contact-based protein-ligand binding affinity predictor in the D3R Grand Challenge 2](https://link.springer.com/article/10.1007/s10822-017-0049-y). *J Comput Aided Mol Des* 32(1):175-185 (2017).\n",
    'author': 'BonvinLab',
    'author_email': 'bonvinlab.support@uu.nl',
    'maintainer': 'None',
    'maintainer_email': 'None',
    'url': 'None',
    'package_dir': package_dir,
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'entry_points': entry_points,
    'python_requires': '>=3.9,<4.0',
}


setup(**setup_kwargs)
