Metadata-Version: 2.4
Name: pyqsartoolbox
Version: 0.1.0
Summary: Python client for the local QSAR Toolbox Web API
Author-email: "Ali A. Eftekhari" <e.eftekhari@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/USEtox/PyQSARToolbox
Project-URL: Documentation, https://usetox.github.io/PyQSARToolbox/
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Chemistry
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.31.0
Requires-Dist: pandas>=1.5.0
Provides-Extra: dev
Requires-Dist: pytest>=8.2; extra == "dev"
Requires-Dist: pytest-cov>=5.0; extra == "dev"
Requires-Dist: mkdocs>=1.5; extra == "dev"
Requires-Dist: mkdocs-material>=9.5; extra == "dev"
Requires-Dist: mkdocstrings[python]>=0.25; extra == "dev"
Requires-Dist: ruff>=0.5.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: mkdocs>=1.5; extra == "docs"
Requires-Dist: mkdocs-material>=9.5; extra == "docs"
Requires-Dist: mkdocstrings[python]>=0.25; extra == "docs"
Provides-Extra: test
Requires-Dist: pytest>=8.2; extra == "test"
Requires-Dist: pytest-cov>=5.0; extra == "test"

[![Documentation](https://img.shields.io/badge/docs-PyQSARToolbox-blue.svg)](https://usetox.github.io/PyQSARToolbox/)

# PyQSARToolbox
A Python interface to the [OECD](https://www.oecd.org/en.html) [QSAR Toolbox](https://qsartoolbox.org/download/). It only works on Windows since it is the only operating system for which QSAR Toolbox is released.

# Installation
Install it with `pip`:
```
pip install git+https://github.com/USEtox/PyQSARToolbox.git
```
For developers, you can clone the repository, and run
```
pip install -e .
```

The main dependency is the `requests` package. Other dependencies (now and in the future) are the usual scientific Python packages, e.g. `numpy`, `pandas`, etc.  
The `QSAR Toolbox` can be [downloaded for free](https://qsartoolbox.org/download/). I recommend installing `VEGA` and `OPERA` add-ons, which can be downloaded via the toolbox. They will need a working `Java` installation. I have Java on my system and everything worked out of the box. If you encounter any problems, contact me. 

# Calling QSAR Toolbox from Python
The class `QSARToolbox` provides an interface to the web API of the `QSAR Toolbox`. It can be used locally by running the `QSAR Toolbox WebSuite` program that is installed with the `QSAR Toolbox`. After running it, the user can connect to a local host at `http://127.0.0.1:[port]` where the port can be a different value given by the program in the following message:
  > WebAPI running on port [port]  

where [port] is a 4 or 5 digit integer (may be different on your system).

![websuite screenshot](./docs/Screenshot_QSAR_Toolbox_WebSuite.png)

Using the API is quite straightforward with some practical issues that I have discovered and try to clarify in this notebook.

# Getting started
Start the `QSAR Toolbox WebSuite` and wait for the port number to appear. Then load the class `QSARTooolbox` and create a `QSARToolbox` object:
```python
from pyqsartoolbox import QSARTooolbox
qs = QSARToolbox(port=51946)
api_version = qs.webapi_version()
toolbox_version = qs.toolbox_version()
print(f"API version: {api_version}")
print(f"Toolbox version: {toolbox_version}")
```

# Documents
API documents are [here](https://usetox.github.io/PyQSARToolbox/). You can also look at the [notebooks folder](./notebooks) to find notebooks with extensive examples of the usage of this package for real world problems.

# Citations
Please cite it as  
```
Eftekhari, Ali A., PyQSARToolbox: a Python interface to the OECD QSAR Toolbox, https://usetox.github.io/PyQSARToolbox/, 2025
```

# Endpoints
You can obtain experimental data and estimations for many physicochemical properties, environmental health, fate, and transport, and ecotoxicological information, as depicted in the following graph:

![endpoints graph](./docs/endpoints_tree.png)
