CoolFace
Apppublic

kowith/anyone-docking

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes
App README

<img src="https://raw.githubusercontent.com/nyelidl/anyone-docking/main/any-L.svg" width="32"> nyone can dock, everyone can do!

Anyone docking: Browser-based molecular docking — no installation required.

![Streamlit App](https://nyelidl.github.io/anyone-docking/)

Paste a SMILES, draw a structure, or upload a file. Pick a PDB or CIF. Dock in seconds.

Batch docking with 4 docking engines: ![Open In Colab](https://colab.research.google.com/drive/1e23e0145ja6zJi0HibA6_JBO7p78Xvyw?usp=sharing)


✨ What it does

🔬Single & batch docking via AutoDock Vina 1.2.7
🏗️Automatic receptor prep — download any PDB/CIF, strip solvent, add hydrogens
📄PDB & mmCIF support — upload .pdb or .cif files, or download either format from RCSB (auto-fallback to CIF for large/newer entries)
🎯Auto grid detection from co-crystal ligand centroid with XYZ axis & box overlay
✏️3-way ligand input — SMILES text, file upload (.pdb), or draw in Ketcher
♻️Redocking validation in both single & batch mode — dock the co-crystal ligand as a reference with RMSD vs crystal, score comparison, and reference line in plots
🧪Bond-order correction — fixes PDBQT aromaticity artifacts before visualization
🗺️Three 2D diagram engines in separate tabs — see below for full details
🖱️Interactive drag mode — freely reposition residue labels in real time, export PNG (up to 600 dpi) or SVG
🔭Binding pocket viewer — interacting residues (orange sticks) around the docked ligand, with toggleable residue labels and adjustable distance cutoff
🤖AI-ready prompt — auto-filled context for GPT, Claude, Gemini, or DeepSeek; adapts based on whether redocking was performed
📊3D viewers — animated multi-pose sweep, interactive pose selector, and dedicated binding pocket view
📁One-click ZIP — all poses, bond-order-corrected SDFs, 2D diagrams, and score plot

🗺️ 2D Interaction Diagrams

Three tabs — each with a different rendering engine:

🧬 Anyone Can Dock 2D Diagram (default)

A custom PoseView-style SVG diagram rendered entirely locally (no server required).

FeatureDetail
8 interaction typesH-bond (distance shown on line), hydrophobic, π-π stacking, cation-π, ionic, metal coordination, halogen bond, H-bond to halogen
Geometry-based detectionAll interactions detected from 3D coordinates — no server, works on Streamlit Cloud
ACS ChemDraw bond styleBond widths, double-bond spacing, and wedge geometry follow ACS publication standards
Smart layoutResidue circles placed radially by natural interaction angle; simultaneous-delta push-apart prevents overlap
Interactive drag modeClick 🖱 Interactive to reposition any residue circle — lines and distance labels update in real time
Export↓ SVG (vector) · ↓ PNG at Screen (1×) / 150 dpi (2×) / 300 dpi (3×) / 600 dpi (4×)

🔬 RDKit 2D Diagram

Classic RDKit MolDraw2DSVG highlight-circle style.

FeatureDetail
Interaction typesH-bond / polar (blue) · Hydrophobic (green) · Other (pink)
LayoutRDKit's own force-field layout — residue pseudo-atoms added as BondType.ZERO bonds, no manual placement needed
Side-by-sideDocked pose (left) + co-crystal reference (right)
ExportPNG + SVG download under each diagram
AI promptAuto-filled prompt adapts to single diagram vs. comparison

⬇ PoseView

Download-only tab — no API calls made from this app.

FileDescription
receptor.pdbCleaned receptor (hydrogens added)
docked_pose.sdfSelected docked pose
cocrystal.sdfCo-crystal ligand (converted from PDB if needed)

Upload these files manually at proteins.plus/poseview to generate a server-side PoseView diagram.


🤖 AI Prompt Section

Located below the 2D diagram. The prompt auto-adapts to the session state:

ScenarioPrompt content
Docked ligand onlyPlain-language explanation of interactions + ready-to-use summary paragraph
With co-crystal reference (no redocking)Comparison prompt · Reference: ligand co-crystallised in PDB ID (see 2D diagram)
With co-crystal reference (redocking performed)Comparison prompt · Reference binding energy from re-docking included

Copy the prompt + a screenshot of your diagram into Claude, GPT-4o, or Gemini to get a plain-English explanation of your results. The prompt ends with a "Ready-to-use summary:" section — a 3–4 sentence paragraph ready to paste into a report or slide.


💻 Platform compatibility

PlatformVina binaryOpenBabelStatus
Linux x86_64✅ Auto-downloadapt install openbabelFully supported (primary)
macOS Intel✅ Auto-downloadbrew install open-babelFully supported
macOS Apple Silicon (M1–M4)✅ Native arm64brew install open-babelFully supported
Windows x86_64✅ Auto-downloadInstallerSupported (WSL2 recommended)
Streamlit Cloud✅ Auto-downloadvia packages.txtFully supported
Google Colab✅ Auto-download!apt install openbabelFully supported
Easiest option: Use the hosted Streamlit app — no installation needed.

🏗️ Receptor input formats

FormatSourceNotes
PDBUpload .pdb or download from RCSBStandard format, works for most entries
mmCIFUpload .cif / .mmcif or download from RCSBRecommended for large structures or newer PDB entries that lack .pdb files

CIF files are automatically converted to PDB using a multi-strategy cascade: gemmiOpenBabelProDy. If PDB download from RCSB fails, the app automatically falls back to CIF format.


🖥️ Ligand input modes

ModeDescription
SMILES stringType or paste any valid SMILES
Upload file.pdb — converted automatically
Draw in KetcherFull 2D chemical sketcher in the browser → SMILES exported automatically

♻️ Redocking validation

Available in both single and batch docking modes:

FeatureDescription
Co-crystal reference dockingDock the known co-crystal ligand alongside your candidate(s)
RMSD vs crystalHeavy-atom RMSD calculated against the original crystal pose
Reference score lineDashed line on the affinity plot for quick visual comparison
Pose confirmationBrowse reference poses, confirm which one to use as the baseline
DownloadExport reference poses as SDF/PDBQT

🔭 3D visualization layers

ViewerWhat you see
Receptor prepProtein cartoon · co-crystal ligand (magenta) · docking grid box (cyan wireframe) · XYZ axis arrows
Animated pose viewerAll poses swept as frames · protein surface · co-crystal overlay
Interactive pose selectorSingle selected pose · protein cartoon + surface · co-crystal overlay
Binding pocket viewFaint full-protein cartoon · docked pose (cyan) · interacting residues (orange sticks) · optional residue labels
Redocking browserReference ligand poses · crystal overlay · RMSD per pose

🖥️ Run locally

Linux (Ubuntu / Debian)

bash
sudo apt install python3.11 python3.11-venv openbabel libcairo2-dev libpangocairo-1.0-0 && \
git clone https://github.com/nyelidl/anyone-docking-local.git && \
cd anyone-docking-local && \
python3.11 -m venv venv && \
source venv/bin/activate && \
pip install -r requirements.txt && \
streamlit run app.py

macOS

bash
brew install python@3.11 open-babel cairo pango && \
git clone https://github.com/nyelidl/anyone-docking-local.git && \
cd anyone-docking-local && \
python3.11 -m venv venv && \
source venv/bin/activate && \
pip install -r requirements.txt && \
streamlit run app.py
Apple Silicon (M1/M2/M3/M4): Fully supported — the app auto-downloads the correct aarch64 Vina binary.

Windows

Recommended: Use WSL2 with Ubuntu and follow the Linux instructions above — it's the simplest and most reliable path.

For native Windows, install dependencies manually first:

  1. 1.OpenBabel — download the installer from openbabel.org and add it to PATH
  2. 2.Cairo & Pango — easiest via conda: conda install -c conda-forge cairo pango

Then:

bash
git clone https://github.com/nyelidl/anyone-docking-local.git && \
cd anyone-docking-local && \
python -m venv venv && \
venv\Scripts\activate && \
pip install -r requirements.txt && \
streamlit run app.py

All platforms

  • Python 3.10+ required
  • AutoDock Vina 1.2.7 binary is downloaded automatically on first launch (Linux, macOS Intel/ARM, Windows)
  • The app auto-detects your OS and CPU architecture

Optional: CIF support

For best mmCIF → PDB conversion quality, install gemmi:

bash
pip install gemmi

Without gemmi, the app falls back to OpenBabel and ProDy (both already in the dependency stack).

Streamlit Cloud deployment

Place these files in your repo root:

anyone-docking/
├── app.py
├── core.py
├── requirements.txt   # Python packages
└── packages.txt       # System apt packages (openbabel, libcairo2-dev, …)

📄 Citation

If you use this tool in research, please cite the relevant software and resources used in this workflow:

AutoDock Vina 1.2.7 Eberhardt et al., Journal of Chemical Information and Modeling, 2021 DOI: https://doi.org/10.1021/acs.jcim.1c00203
Anyone Can Dock Hengphasatporn, K.; Bunchuay T.; Duan, L.; Shigeta, Y., Journal of Chemical Information and Modeling, 2026 https://github.com/nyelidl/anyone-docking/
RDKit Landrum, G. (2023). RDKit: Open-source cheminformatics. https://www.rdkit.org
ProDy Bakan et al., Bioinformatics, 2011 DOI: https://doi.org/10.1093/bioinformatics/btr168
stmol Nápoles-Duarte et al., Frontiers in Molecular Biosciences, 2022 DOI: https://doi.org/10.3389/fmolb.2022.990846
Dimorphite-DL Ropp et al., Journal of Cheminformatics, 2019 DOI: https://doi.org/10.1186/s13321-019-0336-9
pKaNET Cloud Hengphasatporn, K. et al., J. Chem. Inf. Model. 2026, 66 (4), 1955–1963 DOI: https://doi.org/10.1021/acs.jcim.5c02852
gemmi (optional, for CIF support) Wojdyr, M., Journal of Open Source Software, 2022 DOI: https://doi.org/10.21105/joss.04200

📜 License

This project is licensed under the MIT License. See the LICENSE file for details.