ADMET Predictor® User Manual

Python ecosystem

Python ecosystem

To enable the application of various analytical techniques available in the Python ecosystem, we created the pyADMETPredictor module. This simple Python library allows seamless integration with the RESTful and command line (CMD) APIs natively exposed by ADMET Predictor. It supports prototyping calls to ADMET Predictor, whether available as an executable or exposed as a RESTful API service. The majority of the functionalities provided by these interfaces can be accessed through pyADMETPredictor. However, as pyADMETPredictor is an evolving project, any potential gaps will be systematically addressed. Currently, pyADMETPredictor is tested with Python interpreter versions 3.9, 3.10, 3.11, and 3.12 on Windows and Linux operating systems.

Installation

The pyADMETPredictor can easily installed either from local file or from the PyPi repository:

    pip install path/to/pyADMETPredictor.whl

or

    pip install pyADMETPredictor

The pyADMETPredictor module has the following dependencies:

  • requests

  • pandas

  • rdkit

All of them are resolved by pip during the installation phase.

Running the Jupyter Notebook

Many of the pyADMETPredictor functionalities are illustrated in the provided Jupyter Notebook file pyADMETPredictor_demo.ipynb available in:

C:\Users\\<user_name>\AppData\Local\Simulations Plus, Inc\ADMET_Predictor13.0\pyADMETPredictor

To sucessfully run this notebook one needs to install the pyADMETPredictor as well as the other auxiliary dependencies which are included in the requirements.txt file. A convenient way of setting up the appropriately equipped Python environment is to use pip in the following way:

  • pip install -r requirements.txt

It is important to mention that the the requirements that are necessary to run the notebook involve analytical/ML Python modules (like Scikit-learn), and which are not automatically imported and installed with pyADMETPredictor.

The remaining necessary adjustments are related to the json configuration files and script file workflows. They are discussed in the following sections.

If you intend to use the RESTWrapper make sure the ADMET Predictor Service is running and accessible through the specified port. If not then certain Python scripts will show an error. Contact your computer administrator if you have detailed questions about ADMET Predictor Service.

RESTWrapper

The RESTWrapper class enables the consumption of endpoints exposed by ADMET Predictor Service. The configuration of the REST service is defined by the json file, which has the following form:

{

**    "protocol": "http",**

**    "host": "localhost",**

**    "port": "80"**

}

where protocol should be left with the default value "http" ("https" is not yet supported), "host" and "port" define, respectively, the host and the port where the REST service is available. RESTWrapper class offers a set of methods wrapping the REST calls to the ADMET Predictor Service.

CMDWrapper

The CMDWrapper class has been designed to interface the Python ecosystem with the command line capabilities of ADMET Predictor. The specification of the calculation is passed to the CMDWrapper by a dedicated json file. For instance, the json of the form:

{

"AP_executable": "C:/Program Files/Simulations Plus, Inc/ADMET_Predictor13.0/ADMET_Predictor.exe",

**    "script": null,**

**    "-t": "SMI",**

**    "-d": "2D",**

**    "-u": "DAT",**

**    "-m": ["PCB", "DSC"],**

**    "input_structures": "data/drugs_sample.smi"**

}

defined the application of the ADMETPredictor executable located in the path pointed to the "AP_executable" entry. The "script" entry is null, because the intention above is to perform the calculation defined by the command line parameters which are provided explicitly. The entries fully reflect the specification of the command line interface of ADMETPredictor, the only difference is that the location of the file with input structures is provided as a value of the "input structures" key. Important remark: it is necessary to provide the "input structures" as the last entry of the json file.

The other possibility is to apply one of the script file workflows, where the json configuration is simpler:

{

**    "AP_executable": "C:/Program Files/Simulations Plus, Inc/ADMET_Predictor13.0/ADMET_Predictor.exe",**

**    "script": "\<C:/FullPathToMyFolder>/ms_transform_compounds.txt"**

}

The entire calculation is defined by the script, thus no more information is required in the above json specifications.

To launch the calculation it is necessary to provide appropriate paths in the above json files. Additionally, in the case of the script file workflows, it might be also necessary to adjust the script file. Often it is convenient to set the filePathAlias to the location where all necessary files are placed for easy of reference. It is also worth mentioning that the output and log files (respectively the outputFile and logFile keywords in the script) are read by pyADMETPredictor after the calculation and are provided to the user as variables. The entire calculation is carried out in the temporary files area of the operating system, thus the user does not have access to the explicit form of these files. However, all of these information is retained on mentioned above variables. Thus, in the case of outputFile and logFile keywords it is advised to provide arbitrary file names, and to avoid including any paths, either absolute or relative in the file name. In the case of other keywords involving paths, like structureFile, transformsFile or many others, the users are encouraged to provide the paths reflecting the actual locations of these files, e.g.:

transformsFile [PATH]/Standardize.crf

with the previous definition of the filePathAlias

filePathAlias path/to/the/location

Finally, it is worth mentioning that the content of the script is read to the memory and kept as a Python dictionary. The user can arbitrarily modify this dictionary which will effectively overlay the initial content of the script file.