---
title: DeepPurpose quickstart
description: Pick one of five DeepPurpose task types, a workflow preset and a drug and protein encoder pair, then run a model-zoo inference and export predictions.csv.
---

**DeepPurpose** is a comprehensive deep learning library for **drug-target interaction (DTI) prediction**, published in Bioinformatics. It implements **15+ compound encoders** and **7+ protein encoders** with over **50 combined neural architectures**.

## Webapp analysis tasks

The .bloom* webapp provides five analysis task types:

| Task Type | Description | Required Inputs |
|-----------|-------------|-----------------|
| **Drug-Target Interaction** | Predict binding affinity between compounds and proteins | Drug (SMILES), Target (protein sequence) |
| **Drug Property Prediction** | Predict ADMET and molecular properties | Drug compounds (one per line), Properties to predict |
| **Protein-Protein Interaction** | Predict protein binding interactions | Two protein sequences |
| **Drug-Drug Interaction** | Predict drug combination effects | Two drug compounds (SMILES) |
| **Protein Function Prediction** | Classify protein function | Protein sequence, Function class |

## Input source selection

For DTI analysis, select input sources for each field:

| Input Type | Description |
|------------|-------------|
| **Manual Entry** | Enter SMILES or protein sequences directly |
| **From Previous Job** | Import compounds/sequences from completed workflows |

Compatible upstream sources: AiZynthFinder, REINVENT, ZINC, ESMFold outputs.

## Research workflow presets

Click preset buttons to configure optimal settings for specific workflows:

| Preset | Task Type | Encodings | Use Case |
|--------|-----------|-----------|----------|
| **Virtual Screening** | DTI | Morgan + AAC | High-throughput library screening (~30s per 1000 compounds) |
| **Lead Optimization** | Drug Property | Transformer/CNN | SAR analysis, multi-parameter optimization (~2-5 min/compound) |
| **Target Discovery** | DTI | CNN + CNN | Drug repurposing, target deconvolution (~1-2 min/compound) |
| **ADMET Profiling** | Drug Property | Morgan | Safety screening, toxicity prediction (~15-30s/compound) |

## Encoder options

**Drug encodings**: CNN, CNN_RNN, Transformer, MPNN, Morgan, Pubchem, Daylight, rdkit_2d, ESPF, DGL_GCN, DGL_NeuralFP, DGL_GIN_AttrMasking, DGL_GIN_ContextPred, DGL_AttentiveFP

**Protein encodings**: CNN, CNN_RNN, Transformer, AAC, PseudoAAC, Conjoint_triad, Quasi-seq-order, ConjointTriadVec, CTD

## DTI prediction modes

| Mode | Description |
|------|-------------|
| **Single Prediction** | Analyze one drug-target pair |
| **Drug Repurposing** | Find new targets for existing drugs |
| **Virtual Screening** | Large-scale compound evaluation |

## Advanced options (expandable panel)

| Parameter | Range | Default | Description |
|-----------|-------|---------|-------------|
| **Pretrained Model** | Model zoo selection | None | Use pretrained weights or train from scratch |
| **Job Title** | Text | — | Optional job description |
| **Batch Size** | 1 - 512 | 32 | Processing batch size |
| **Output Format** | json, csv, tsv | json | Results file format |
| **Use CUDA** | Toggle | Enabled | GPU acceleration |

Available at https://github.com/kexinhuang12345/DeepPurpose

## Install

Use CUDA-matched torch. Example for CUDA 12.1:

```bash
pip install "torch==2.3.1" --index-url https://download.pytorch.org/whl/cu121
pip install "deeppurpose>=0.2.9" pandas scikit-learn
```

Check GPU access:

```bash
python - <<'PY'
import torch
print("CUDA available:", torch.cuda.is_available())
print("Device count:", torch.cuda.device_count())
PY
```

## Run a model zoo inference

```python
from deeppurpose import dataset, encoder_model, models

drug, target, y = dataset.load_process_DAVIS('./inputs', binary=False, device='cuda')

model = models.model_zoo("Davis_BindingDB_KD_GNN", device='cuda')
preds = model.predict(drug[:10], target[:10])
print("Predictions shape:", preds.shape)
print("First score:", preds[0])
```

## Minimal job layout

```
deeppurpose-job/
├─ inputs/
│  └─ davis/                # cached dataset
├─ outputs/
│  └─ predictions.csv
└─ scripts/
   └─ run_inference.py
```

## Export predictions

```python
import pandas as pd

pd.DataFrame({"score": preds}).to_csv("outputs/predictions.csv", index=False)
```

## Read next
