Metadata-Version: 2.4
Name: admet_ai
Version: 2.0.0
Summary: ADMET-AI
Author-email: Kyle Swanson <swansonk.14@gmail.com>
Maintainer-email: Kyle Swanson <swansonk.14@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/swansonk14/admet_ai
Project-URL: Issues, https://github.com/swansonk14/admet_ai/issues
Keywords: machine learning,drug design,ADMET,molecular property prediction
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: OS Independent
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: chemprop>=2.2.2
Requires-Dist: lightning
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: rdkit>=2025.9.5
Requires-Dist: seaborn
Requires-Dist: torch>=2.8.0
Requires-Dist: tqdm>=4.66.3
Requires-Dist: typed-argument-parser>=1.11.0
Provides-Extra: tdc
Requires-Dist: openpyxl; extra == "tdc"
Requires-Dist: PyTDC==1.1.15; extra == "tdc"
Provides-Extra: web
Requires-Dist: flask; extra == "web"
Requires-Dist: gunicorn>=22.0.0; extra == "web"
Dynamic: license-file

# ADMET-AI

[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/admet_ai)](https://badge.fury.io/py/admet_ai)
[![PyPI version](https://badge.fury.io/py/admet_ai.svg)](https://badge.fury.io/py/admet_ai)
[![Downloads](https://pepy.tech/badge/admet_ai)](https://pepy.tech/project/admet_ai)
[![license](https://img.shields.io/github/license/swansonk14/admet_ai.svg)](https://github.com/swansonk14/admet_ai/blob/main/LICENSE.txt)

This git repo contains the code for ADMET-AI, an ADMET prediction platform that
uses [Chemprop]((https://github.com/chemprop/chemprop)) models trained on ADMET datasets from the Therapeutics
Data Commons ([TDC](https://tdcommons.ai/)). ADMET-AI can be used to make ADMET predictions on new molecules via the
command line, via the Python API, or via a web server. A live web server hosting ADMET-AI is
at [admet.ai.greenstonebio.com](https://admet.ai.greenstonebio.com)

Please see the following paper and [this blog post](https://portal.valencelabs.com/blogs/post/admet-ai-a-machine-learning-admet-platform-for-evaluation-of-large-scale-QPEa0j5OTYYHTaA) for more
details, and please cite us if ADMET-AI is useful in your work.

[ADMET-AI: A machine learning ADMET platform for evaluation of large-scale chemical libraries](https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/btae416/7698030?utm_source=authortollfreelink&utm_campaign=bioinformatics&utm_medium=email&guestAccessKey=f4fca1d2-49ec-4b10-b476-5aea3bf37045)

## Versions

This repo contains ADMET-AI v2, whereas our [paper](https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/btae416/7698030?utm_source=authortollfreelink&utm_campaign=bioinformatics&utm_medium=email&guestAccessKey=f4fca1d2-49ec-4b10-b476-5aea3bf37045) and the ADMET-AI live [web server](https://admet.ai.greenstonebio.com) are based on ADMET-AI v1. The main difference is that ADMET-AI v2 uses Chemprop v2 (without RDKit fingerprints), which is faster and is compatible with more packages (e.g., recent versions of PyTorch). Note that since the models were retrained from scratch, the predictions of ADMET-AI v2 will not exactly match those of ADMET-AI v1. If you still need to use ADMET-AI v1 or want to view instructions for reproducing our paper, you can see ADMET-AI v1.4.0 at [this commit](https://github.com/swansonk14/admet_ai/tree/9c8430862b2afd997ff1d314b30bda4418fa9b33).


## Table of Contents

- [Installation](#installation)
- [Predicting ADMET properties](#predicting-admet-properties)
    * [Command line tool](#command-line-tool)
    * [Python module](#python-module)
    * [Web server](#web-server)

## Installation

ADMET-AI can be installed in a few minutes on any operating system using pip (optionally within a conda environment). If
a GPU is available, it will be used by default, but the code can also run on CPUs only.

Optionally, create a conda environment.

```bash
conda create -y -n admet_ai python=3.14
conda activate admet_ai
```

Install ADMET-AI via pip.

```bash
pip install admet-ai
```

Alternatively, clone the repo and install ADMET-AI locally.

```bash
git clone https://github.com/swansonk14/admet_ai.git
cd admet_ai
pip install -e .
```

By default, the pip installation only includes dependencies required for making ADMET predictions, either via the
command line or via the Python API. To install dependencies required for hosting the ADMET-AI web server,
run `pip install admet-ai[web]`.

If there are version issues with the required packages, create a conda environment with specific working versions of the
packages as follows.

```bash
pip install -r requirements_frozen.txt
pip install -e .
```

Note: If you get the issue `ImportError: libXrender.so.1: cannot open shared object file: No such file or directory`,
run `conda install -c conda-forge xorg-libxrender`.

## Predicting ADMET properties

ADMET-AI can be used to make ADMET predictions in three ways: (1) as a command line tool, (2) as a Python module, or (3)
as a web server.

### Command line tool

ADMET predictions can be made on the command line with the `admet_predict` command, as illustrated below.

```bash
admet_predict \
    --data_path data.csv \
    --save_path preds.csv \
    --smiles_column smiles
```

This command assumes that there exists a file called `data.csv` with SMILES strings in the column `smiles`. The
predictions will be saved to a file called `preds.csv`.

### Python module

ADMET predictions can be made using the `predict` function in the `admet_ai` Python module, as illustrated below.

```python
from admet_ai import ADMETModel

model = ADMETModel()
preds = model.predict(smiles="O(c1ccc(cc1)CCOC)CC(O)CNC(C)C")
```

If a SMILES string is provided, then `preds` is a dictionary mapping property names to values. If a list of SMILES
strings is provided, then `preds` is a Pandas DataFrame where the index is the SMILES and the columns are the
properties.

### Web server

ADMET predictions can be made using the ADMET-AI web server, as illustrated below. Note: Running the following command
requires additional web dependencies (i.e., `pip install admet-ai[web]`).

```bash
admet_web
```

Then navigate to http://127.0.0.1:5000 to view the website.

### Analysis plots

The DrugBank reference plot and radial plots displayed on the ADMET-AI website can be generated locally using the
`scripts/plot_drugbank_reference.py` and `scripts/plot_radial_summaries.py` scripts, respectively. Both scripts
take as input a CSV file with ADMET-AI predictions along with other parameters.
