Spaces:
Sleeping
Sleeping
|
Download README.md from kowith-2/anyone-docking: direct link, hf CLI and curl.
- Browser
- Download file 11.4 kB
-
https://huggingface.co/spaces/kowith-2/anyone-docking/resolve/main/README.md
- Command line
-
hf download hf://spaces/kowith-2/anyone-docking/README.md
-
curl -L -o README.md https://huggingface.co/spaces/kowith-2/anyone-docking/resolve/main/README.md
11.4 kB
| title: Anyone Can Dock | |
| emoji: π¬ | |
| colorFrom: red | |
| colorTo: blue | |
| sdk: docker | |
| app_port: 7860 | |
| pinned: false | |
| # <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.** | |
| [](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: [](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. |