# nyelidl/anyone-docking architecture

> Architecture diagram of the GitHub repository nyelidl/anyone-docking, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nyelidl/anyone-docking
- Repository: https://github.com/nyelidl/anyone-docking

## Overview

Anyone Can Dock is a molecular-docking product with browser/local interfaces and documented CLI and Colab workflows. Users prepare a receptor and docking box, choose a docking mode, then inspect and export poses and analyses. The sampled sources establish the Streamlit-to-computation boundary and several supporting modules; other documented capabilities are represented at the broader core-module level because their implementation was not sampled. The many numbered files under st appear to be app copies, so they are not modeled as separate runtime stages.

Main entry points: [`core.py`](https://github.com/nyelidl/anyone-docking/blob/main/core.py) (Docking computation), [`app.py`](https://github.com/nyelidl/anyone-docking/blob/main/app.py) (Browser interface), [`redock_ui.py`](https://github.com/nyelidl/anyone-docking/blob/main/redock_ui.py) (Redock interface), [`shared_receptor.py`](https://github.com/nyelidl/anyone-docking/blob/main/shared_receptor.py) (Shared receptor state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_web_ui["Browser interface<br/>[app.py]"]
  node_local_ui["Local interface<br/>[app_st.py]"]
  node_cli["CLI workflow<br/>[core.py]"]
  node_colab["Colab workflow<br/>[core.py]"]
end

subgraph group_prep["Structure preparation"]
  node_receptor["Receptor preparation<br/>[core.py]"]
  node_ligand["Ligand preparation<br/>[pKaNET.py]"]
  node_heme["Heme handling<br/>[heme_state.py]"]
end

subgraph group_docking["Docking workflows"]
  node_compute["Docking computation<br/>[core.py]"]
  node_single_batch["Single and batch<br/>[core.py]"]
  node_codock["Co-docking<br/>[simultaneous_ui.py]"]
  node_redock_ui["Redock interface<br/>[redock_ui.py]"]
  node_redock["Redock workflow<br/>[redock_workflow.py]"]
  node_flex_ui["Flexibility controls<br/>[flexible_ui.py]"]
  node_flex["Flexible docking"]
end

subgraph group_analysis["Results and analysis"]
  node_visual["Pose visualization<br/>[app.py]"]
  node_interactions["Interaction analysis<br/>[core.py]"]
  node_properties["Molecular properties<br/>[core.py]"]
  node_results["Exports and results<br/>[core.py]"]
end

subgraph group_support["Shared support"]
  node_shared["Shared receptor state<br/>[shared_receptor.py]"]
  node_pocket["Pocket completeness"]
end

node_user(("Docking user"))
node_pubchem["PubChem"]
node_vina["Vina engine"]

node_user -->|"uses"| node_web_ui
node_user -->|"uses"| node_local_ui
node_user -->|"uses"| node_cli
node_user -->|"uses"| node_colab
node_web_ui -->|"delegates computation"| node_compute
node_local_ui -->|"uses core"| node_compute
node_compute -.->|"prepares receptor"| node_receptor
node_compute -.->|"prepares ligand"| node_ligand
node_compute -.->|"runs docking"| node_single_batch
node_compute -.->|"invokes engine"| node_vina
node_web_ui -->|"uses shared state"| node_shared
node_web_ui -->|"uses workflow"| node_codock
node_web_ui -->|"uses workflow"| node_redock_ui
node_redock_ui -->|"calls inspection"| node_redock
node_redock_ui -->|"assesses pocket"| node_pocket
node_shared -->|"inspects ligand"| node_redock
node_shared -->|"assesses missing residues"| node_pocket
node_web_ui -->|"uses controls"| node_flex_ui
node_flex_ui -->|"reads metadata"| node_flex
node_web_ui -->|"uses state"| node_heme
node_web_ui -->|"renders poses"| node_visual
node_compute -.->|"supports analysis"| node_interactions
node_compute -.->|"supports descriptors"| node_properties
node_compute -.->|"produces outputs"| node_results
node_codock -.->|"joint search"| node_vina
node_user -.->|"searches compounds"| node_pubchem

click node_web_ui "https://github.com/nyelidl/anyone-docking/blob/main/app.py"
click node_local_ui "https://github.com/nyelidl/anyone-docking/blob/main/app_st.py"
click node_cli "https://github.com/nyelidl/anyone-docking/blob/main/core.py"
click node_colab "https://github.com/nyelidl/anyone-docking/blob/main/core.py"
click node_compute "https://github.com/nyelidl/anyone-docking/blob/main/core.py"
click node_receptor "https://github.com/nyelidl/anyone-docking/blob/main/core.py"
click node_ligand "https://github.com/nyelidl/anyone-docking/blob/main/pKaNET.py"
click node_shared "https://github.com/nyelidl/anyone-docking/blob/main/shared_receptor.py"
click node_heme "https://github.com/nyelidl/anyone-docking/blob/main/heme_state.py"
click node_single_batch "https://github.com/nyelidl/anyone-docking/blob/main/core.py"
click node_codock "https://github.com/nyelidl/anyone-docking/blob/main/simultaneous_ui.py"
click node_redock_ui "https://github.com/nyelidl/anyone-docking/blob/main/redock_ui.py"
click node_redock "https://github.com/nyelidl/anyone-docking/blob/main/redock_workflow.py"
click node_pocket "https://github.com/nyelidl/anyone-docking/blob/main/pocket_completeness.py"
click node_flex_ui "https://github.com/nyelidl/anyone-docking/blob/main/flexible_ui.py"
click node_flex "https://github.com/nyelidl/anyone-docking/blob/main/flexible_docking.py"
click node_visual "https://github.com/nyelidl/anyone-docking/blob/main/app.py"
click node_interactions "https://github.com/nyelidl/anyone-docking/blob/main/core.py"
click node_properties "https://github.com/nyelidl/anyone-docking/blob/main/core.py"
click node_results "https://github.com/nyelidl/anyone-docking/blob/main/core.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_web_ui,node_local_ui,node_cli,node_colab,node_user toneBlue
class node_receptor,node_ligand,node_heme toneAmber
class node_compute,node_single_batch,node_codock,node_redock_ui,node_redock,node_flex_ui,node_flex toneMint
class node_visual,node_interactions,node_properties,node_results toneRose
class node_shared,node_pocket,node_pubchem,node_vina toneIndigo
```

## Components

### User interfaces

- [Browser interface](https://github.com/nyelidl/anyone-docking/blob/main/app.py): `app.py`
- [Local interface](https://github.com/nyelidl/anyone-docking/blob/main/app_st.py): `app_st.py`
- [CLI workflow](https://github.com/nyelidl/anyone-docking/blob/main/core.py): `core.py`
- [Colab workflow](https://github.com/nyelidl/anyone-docking/blob/main/core.py): `core.py`

### Structure preparation

- [Receptor preparation](https://github.com/nyelidl/anyone-docking/blob/main/core.py): `core.py`
- [Ligand preparation](https://github.com/nyelidl/anyone-docking/blob/main/pKaNET.py): `pKaNET.py`
- [Heme handling](https://github.com/nyelidl/anyone-docking/blob/main/heme_state.py): `heme_state.py`

### Docking workflows

- [Docking computation](https://github.com/nyelidl/anyone-docking/blob/main/core.py): `core.py`
- [Single and batch](https://github.com/nyelidl/anyone-docking/blob/main/core.py): `core.py`
- [Co-docking](https://github.com/nyelidl/anyone-docking/blob/main/simultaneous_ui.py): `simultaneous_ui.py`
- [Redock interface](https://github.com/nyelidl/anyone-docking/blob/main/redock_ui.py): `redock_ui.py`
- [Redock workflow](https://github.com/nyelidl/anyone-docking/blob/main/redock_workflow.py): `redock_workflow.py`
- [Flexibility controls](https://github.com/nyelidl/anyone-docking/blob/main/flexible_ui.py): `flexible_ui.py`
- [Flexible docking](https://github.com/nyelidl/anyone-docking/blob/main/flexible_docking.py): `flexible_docking.py`

### Results and analysis

- [Pose visualization](https://github.com/nyelidl/anyone-docking/blob/main/app.py): `app.py`
- [Interaction analysis](https://github.com/nyelidl/anyone-docking/blob/main/core.py): `core.py`
- [Molecular properties](https://github.com/nyelidl/anyone-docking/blob/main/core.py): `core.py`
- [Exports and results](https://github.com/nyelidl/anyone-docking/blob/main/core.py): `core.py`

### Shared support

- [Shared receptor state](https://github.com/nyelidl/anyone-docking/blob/main/shared_receptor.py): `shared_receptor.py`
- [Pocket completeness](https://github.com/nyelidl/anyone-docking/blob/main/pocket_completeness.py): `pocket_completeness.py`

### Other components

- **Docking user**
- **PubChem**
- **Vina engine**

## Connections

- Docking user → Browser interface: uses
- Docking user → Local interface: uses
- Docking user → CLI workflow: uses
- Docking user → Colab workflow: uses
- Browser interface → Docking computation: delegates computation (evidence: `app.py`)
- Local interface → Docking computation: uses core (evidence: `app_st.py`)
- Docking computation → Receptor preparation: prepares receptor (evidence: `core.py`)
- Docking computation → Ligand preparation: prepares ligand
- Docking computation → Single and batch: runs docking (evidence: `core.py`)
- Docking computation → Vina engine: invokes engine
- Browser interface → Shared receptor state: uses shared state (evidence: `app.py`)
- Browser interface → Co-docking: uses workflow (evidence: `app.py`)
- Browser interface → Redock interface: uses workflow (evidence: `app.py`)
- Redock interface → Redock workflow: calls inspection (evidence: `redock_ui.py`)
- Redock interface → Pocket completeness: assesses pocket (evidence: `redock_ui.py`)
- Shared receptor state → Redock workflow: inspects ligand (evidence: `shared_receptor.py`)
- Shared receptor state → Pocket completeness: assesses missing residues (evidence: `shared_receptor.py`)
- Browser interface → Flexibility controls: uses controls (evidence: `app.py`)
- Flexibility controls → Flexible docking: reads metadata (evidence: `flexible_ui.py`)
- Browser interface → Heme handling: uses state
- Browser interface → Pose visualization: renders poses (evidence: `app.py`)
- Docking computation → Interaction analysis: supports analysis (evidence: `core.py`)
- Docking computation → Molecular properties: supports descriptors (evidence: `core.py`)
- Docking computation → Exports and results: produces outputs (evidence: `core.py`)
- Co-docking → Vina engine: joint search
- Docking user → PubChem: searches compounds
