--- title: Anyone Can Dock emoji: πŸ”¬ colorFrom: red colorTo: blue sdk: docker app_port: 7860 pinned: false --- # nyone can dock, everyone can do! **Anyone docking: Browser-based molecular docking β€” no installation required.** [![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](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/assets/colab-badge.svg)](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). | Feature | Detail | |---|---| | **8 interaction types** | H-bond (distance shown on line), hydrophobic, Ο€-Ο€ stacking, cation-Ο€, ionic, metal coordination, halogen bond, H-bond to halogen | | **Geometry-based detection** | All interactions detected from 3D coordinates β€” no server, works on Streamlit Cloud | | **ACS ChemDraw bond style** | Bond widths, double-bond spacing, and wedge geometry follow ACS publication standards | | **Smart layout** | Residue circles placed radially by natural interaction angle; simultaneous-delta push-apart prevents overlap | | **Interactive drag mode** | Click πŸ–± 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. | Feature | Detail | |---|---| | **Interaction types** | H-bond / polar (blue) Β· Hydrophobic (green) Β· Other (pink) | | **Layout** | RDKit's own force-field layout β€” residue pseudo-atoms added as `BondType.ZERO` bonds, no manual placement needed | | **Side-by-side** | Docked pose (left) + co-crystal reference (right) | | **Export** | PNG + SVG download under each diagram | | **AI prompt** | Auto-filled prompt adapts to single diagram vs. comparison | ### ⬇ PoseView Download-only tab β€” no API calls made from this app. | File | Description | |---|---| | `receptor.pdb` | Cleaned receptor (hydrogens added) | | `docked_pose.sdf` | Selected docked pose | | `cocrystal.sdf` | Co-crystal ligand (converted from PDB if needed) | Upload these files manually at [proteins.plus/poseview](https://proteins.plus/help/poseview) to generate a server-side PoseView diagram. --- ## πŸ€– AI Prompt Section Located below the 2D diagram. The prompt auto-adapts to the session state: | Scenario | Prompt content | |---|---| | **Docked ligand only** | Plain-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 | Platform | Vina binary | OpenBabel | Status | |---|---|---|---| | **Linux x86_64** | βœ… Auto-download | `apt install openbabel` | Fully supported (primary) | | **macOS Intel** | βœ… Auto-download | `brew install open-babel` | Fully supported | | **macOS Apple Silicon** (M1–M4) | βœ… Native arm64 | `brew install open-babel` | Fully supported | | **Windows x86_64** | βœ… Auto-download | [Installer](https://openbabel.org/wiki/Category:Installation) | Supported (WSL2 recommended) | | **Streamlit Cloud** | βœ… Auto-download | via `packages.txt` | Fully supported | | **Google Colab** | βœ… Auto-download | `!apt install openbabel` | Fully supported | > **Easiest option:** Use the [hosted Streamlit app](https://nyelidl.github.io/anyone-docking/) β€” no installation needed. --- ## πŸ—οΈ Receptor input formats | Format | Source | Notes | |---|---|---| | **PDB** | Upload `.pdb` or download from RCSB | Standard format, works for most entries | | **mmCIF** | Upload `.cif` / `.mmcif` or download from RCSB | Recommended for large structures or newer PDB entries that lack `.pdb` files | CIF files are automatically converted to PDB using a multi-strategy cascade: **gemmi** β†’ **OpenBabel** β†’ **ProDy**. If PDB download from RCSB fails, the app automatically falls back to CIF format. --- ## πŸ–₯️ Ligand input modes | Mode | Description | |---|---| | **SMILES string** | Type or paste any valid SMILES | | **Upload file** | `.pdb` β€” converted automatically | | **Draw in Ketcher** | Full 2D chemical sketcher in the browser β†’ SMILES exported automatically | --- ## ♻️ Redocking validation Available in **both single and batch** docking modes: | Feature | Description | |---|---| | **Co-crystal reference docking** | Dock the known co-crystal ligand alongside your candidate(s) | | **RMSD vs crystal** | Heavy-atom RMSD calculated against the original crystal pose | | **Reference score line** | Dashed line on the affinity plot for quick visual comparison | | **Pose confirmation** | Browse reference poses, confirm which one to use as the baseline | | **Download** | Export reference poses as SDF/PDBQT | --- ## πŸ”­ 3D visualization layers | Viewer | What you see | |---|---| | **Receptor prep** | Protein cartoon Β· co-crystal ligand (magenta) Β· docking grid box (cyan wireframe) Β· XYZ axis arrows | | **Animated pose viewer** | All poses swept as frames Β· protein surface Β· co-crystal overlay | | **Interactive pose selector** | Single selected pose Β· protein cartoon + surface Β· co-crystal overlay | | **Binding pocket view** | Faint full-protein cartoon Β· docked pose (cyan) Β· interacting residues (orange sticks) Β· optional residue labels | | **Redocking browser** | Reference 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](https://learn.microsoft.com/en-us/windows/wsl/) with Ubuntu and follow the Linux instructions above β€” it's the simplest and most reliable path. For native Windows, install dependencies manually first: 1. **OpenBabel** β€” download the installer from [openbabel.org](https://openbabel.org/wiki/Category:Installation) and add it to PATH 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](https://gemmi.readthedocs.io/): ```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.