Skip to content
StackTox
Documentation

Everything you need to run a screen

StackTox takes molecular structures, computes RDKit descriptors on an HPC node, scores them with a stacking ensemble, and returns a toxicity probability alongside a drug-likeness and absorption profile for each molecule.

Quick start

  1. Open the Predict page and add structures — draw one, paste a list, upload a file, or click an example.
  2. Type the security code and press Run prediction (or Ctrl + Enter).
  3. Watch the progress bar. The job runs on the cluster, so you can close the tab — the job id in the address bar brings the results back.
  4. Click any row for the full molecule profile, or download the whole batch as CSV or JSON.

One job accepts up to 5,000 molecules and results are kept on the server for 30 days. Bookmark the page while a job is running and the id travels with the bookmark.

Input formats

Four input routes, all ending in the same place: one structure per record.

  • SMILES text — one per line. Anything after the first space is kept as the molecule name, so CCO ethanol labels the row ethanol.
  • .smi / .txt — the same thing as a file. Blank lines, # comments and a SMILES header line are ignored.
  • .csv — the first column named SMILES is used, and a column named ID, Name or Compound supplies labels.
  • .sdf / .mol — passed to the cluster untouched and parsed by RDKit, which keeps the title line of each record as the name.

Duplicate SMILES are dropped before submission and reported in a notice. The structure editor (JSME) produces a SMILES string that lands in the same queue.

# a valid input file
CCO                                   ethanol
c1ccccc1                              benzene
CC(=O)Oc1ccccc1C(=O)O                 aspirin
CN1C=NC2=C1C(=O)N(C(=O)N2C)C          caffeine

Reading the results

Each row carries a verdict, a probability, and a violation count.

  • Probability — the ensemble's output between 0 and 1. The verdict flips to Toxic at the tuned decision threshold (0.404), not at 0.5. That threshold was chosen during cross-validation to favour recall, so a molecule scoring 0.45 is a weak toxic call, not a strong one.
  • Confidence — shown in the detail panel: how far the probability sits from the threshold, scaled to the distance available on that side. It describes decisiveness, not accuracy.
  • Violations — the total number of failed drug-likeness criteria across all five filters. Zero means the molecule passes every one.
  • Invalid — RDKit could not parse the structure. The detail panel gives the parser's reason.

Drug-likeness filters

FilterCriteriaWhat it screens for
Lipinski (Ro5) MW ≤ 500 · cLogP ≤ 5 · HBD ≤ 5 · HBA ≤ 10 oral bioavailability
Ghose MW 160–480 · cLogP −0.4–5.6 · MR 40–130 · 20–70 heavy atoms drug-like property ranges
Veber rotatable bonds ≤ 10 · TPSA ≤ 140 oral absorption by flexibility and polarity
Egan cLogP ≤ 5.88 · TPSA ≤ 131.6 passive intestinal permeation
Muegge MW 200–600 · cLogP −2–5 · TPSA ≤ 150 · rings ≤ 7 · C > 4 · heteroatoms > 1 · rot. bonds ≤ 15 · HBA ≤ 10 · HBD ≤ 5 pharmacophore-point drug-likeness

A filter violation is not a toxicity signal. It tells you the molecule is unusual for an oral drug, which is useful context when you decide what to do with a toxic prediction.

BOILED-Egg absorption map

The plot places every molecule by TPSA (x) and WLOGP (y), where WLOGP is the RDKit Crippen MolLogP value — the same quantity the previous version of this tool plotted, so older figures stay comparable. Two regions matter:

  • inside the white ellipse → high passive gastrointestinal absorption;
  • inside the yolk → likely to cross the blood–brain barrier.

Molecules sitting on an ellipse boundary can flip between high and low with a small change in either axis; treat the edge as a grey zone rather than a line. Points are coloured by the toxicity verdict, so a cluster of red dots in the yolk is a CNS-exposure flag worth looking at closely. Hover any point for its values, click it to open the molecule, and export the panel as a PNG for figures. The same geometry is used server-side to fill the GI_Absorption and BBB_Permeant columns, so the picture and the table always agree.

Pipeline

What happens between pressing the button and seeing a table:

  1. The browser posts the batch to api/submit.php, which validates the captcha, de-duplicates the input and writes JOBS/<id>/input.smi.
  2. The input file is copied to the cluster over SSH and run_job.sh <id> is launched there (directly, or through sbatch when SLURM is enabled).
  3. On the node, stacktox_predict.py computes descriptors, loads the joblib model, scores in chunks and writes status.json as it goes, then result.json and result.csv.
  4. The browser polls api/status.php, which reads status.json from the cluster and shows real progress. On completion the server copies the outputs back and serves them from its own disk, so re-opening a job never touches the cluster again.

HTTP API

Every endpoint returns JSON and is usable from a script. Submission needs the captcha, so automated pipelines should run the predictor directly on the cluster instead (see Reproducing this).

Submit a batch

POST api/submit.php
curl -b cookies.txt -F "smiles=CCO
c1ccccc1" -F "captcha=AB3DE" https://<host>/stacktox/api/submit.php

{ "ok": true, "job_id": "1768403555868", "total": 2, "duplicates": 0,
  "poll_ms": 2000, "mode": "ssh2" }

Fields: smiles (text) or file (multipart upload), captcha, optional name.

Poll status

GET api/status.php?job_id=<id>
{ "ok": true, "state": "running", "done": 120, "total": 500, "percent": 24,
  "message": "Scored 120 of 500 molecules", "elapsed": 37,
  "summary": { "toxic": 61, "non_toxic": 59, "invalid": 0 },
  "node": "compute-0-7" }

state is one of queued, running, completed, failed, not_found.

Fetch results

GET api/result.php?job_id=<id>&format=json|csv|log
{ "job_id": "1768403555868", "threshold": 0.404, "n_features": 61,
  "summary": { "total": 2, "valid": 2, "toxic": 2, "non_toxic": 0, "invalid": 0 },
  "molecules": [
    { "id": "Molecule_1", "input_smiles": "CCO", "smiles": "CCO", "ok": true,
      "toxicity": "Toxic", "probability": 0.6035, "confidence": 0.329,
      "properties": { "mw": 46.07, "logp": -0.0014, "tpsa": 20.23, "hbd": 1, "hba": 1,
                      "rotb": 0, "qed": 0.407, "formula": "C2H6O" },
      "druglikeness": { "lipinski": { "violations": 0, "detail": [], "pass": true },
                        "ghose": { "violations": 3, "detail": ["MW 46.07 outside 160-480"], "pass": false } },
      "gi": true, "bbb": true, "total_violations": 6 }
  ] }

Health check

GET api/health.php · add ?deep=1 to verify the model on the cluster
{ "ok": true, "state": "online", "latency_ms": 3,
  "transport": { "mode": "ssh2", "host": "10.209.96.203", "home": "/scf-data/<account>/STACK-TOX" },
  "cluster": { "model_present": true, "predictor_present": true, "jobs_on_cluster": 184 } }

CSV columns

The downloadable CSV is wider than the on-screen table. Columns, in order:

ID, SMILES, Canonical_SMILES, Formula, Status,
Toxicity, Probability, Confidence, Threshold,
MW, LogP, TPSA, HBD, HBA, RotB, MolMR, HeavyAtoms, Rings, AromaticRings, QED,
GI_Absorption, BBB_Permeant,
Lipinski_Violations, Lipinski_Detail, Ghose_Violations, Ghose_Detail,
Veber_Violations,  Veber_Detail,  Egan_Violations,  Egan_Detail,
Muegge_Violations, Muegge_Detail, Total_Violations, Error

Limits and caveats

  • Binary, single-endpoint. The model answers one question — toxic or not — and does not distinguish hepatotoxicity from cardiotoxicity, dose, route or species.
  • Applicability domain. Training data were drug-like organic small molecules. Inorganics, organometallics, polymers, mixtures and salts are out of scope.
  • Threshold matters. At 0.404 the ensemble favours recall; expect false positives. If you need precision, re-rank by probability rather than by verdict.
  • Not a regulatory tool. Use it to prioritise which compounds get made and tested, and keep the experiment as the arbiter.

Citing StackTox

StackTox: a stacking ensemble for small molecule toxicity prediction, SCFBio, IIT Delhi (2026).

Source code and the trained model: https://github.com/rpaduri/StackTox. Questions and bug reports are welcome on the contact page.