# yuanhang2024/rdpepper architecture

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

- Interactive diagram: https://gitdiagram.com/yuanhang2024/rdpepper
- Repository: https://github.com/yuanhang2024/rdpepper

## Overview

RDpepper reconstructs evidence-graded cyclic-peptide chemistry from protein-bound PDB/mmCIF structures or sequence/HELM/MAP/BILN notation, then offers conversion, validation, export, prediction, and docking services. The documented principal structure workflow proceeds through reconstruction routes and chemical graph construction; the shared application layer serves CLI and GUI users. The README documents several capabilities whose implementation details were not sampled, so those modules are shown as distinct service branches without asserting internal call sequences beyond documented responsibilities.

Main entry points: [`application.py`](https://github.com/yuanhang2024/rdpepper/blob/main/application.py) (Application services), [`paths`](https://github.com/yuanhang2024/rdpepper/tree/main/paths) (Routes A–H), [`pipeline.py`](https://github.com/yuanhang2024/rdpepper/blob/main/pipeline.py) (Pipeline), [`cli/main.py`](https://github.com/yuanhang2024/rdpepper/blob/main/cli/main.py) (CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_cli["CLI<br/>[main.py]"]
  node_gui["Desktop GUI<br/>[main_window.py]"]
  node_application["Application services<br/>[application.py]"]
  node_result["Service results<br/>[application.py]"]
end

subgraph group_reconstruction["Reconstruction"]
  node_reconstruction_entry["Reconstruction entry<br/>[reconstruction.py]"]
  node_pipeline["Pipeline<br/>[pipeline.py]"]
  node_routes["Routes A–H"]
  node_structure_parse["Structure parsing<br/>[structure_io.py]"]
  node_monomers["Monomer resolution"]
  node_graph_build["Peptide graph"]
  node_evidence["Evidence grading<br/>[rigor.py]"]
end

subgraph group_chemistry["Chemistry services"]
  node_notation["Notation conversion<br/>[sequence.py]"]
  node_mol2["MOL2 validation<br/>[mol2_format.py]"]
  node_export["Conformer export"]
end

subgraph group_preparation["Ligand preparation"]
  node_pdbqt["PDBQT preparation<br/>[workflow.py]"]
end

subgraph group_analysis["Analysis and docking"]
  node_compare["Structure comparison"]
  node_admet["ADMET prediction<br/>[predictor.py]"]
  node_docking["Vina docking<br/>[vina_wrapper.py]"]
end

node_researcher(("Researcher"))
node_structure_input["PDB/mmCIF"]
node_notation_input["Sequence / notation"]
node_vina_service["AutoDock Vina"]

node_researcher -->|"invokes"| node_cli
node_researcher -->|"opens"| node_gui
node_structure_input -->|"provides structure"| node_application
node_notation_input -->|"provides notation"| node_application
node_cli -->|"calls services"| node_application
node_gui -->|"calls services"| node_application
node_application -->|"requests reconstruction"| node_reconstruction_entry
node_application -->|"runs workflows"| node_pipeline
node_reconstruction_entry -->|"selects route"| node_routes
node_routes -->|"parses structure"| node_structure_parse
node_routes -->|"resolves residues"| node_monomers
node_routes -->|"assembles graph"| node_graph_build
node_graph_build -->|"grades evidence"| node_evidence
node_application -->|"converts notation"| node_notation
node_application -->|"reads and validates"| node_mol2
node_application -->|"exports conformers"| node_export
node_pipeline -->|"compares structures"| node_compare
node_pipeline -.->|"requests predictions"| node_admet
node_application -->|"prepares ligand"| node_pdbqt
node_application -->|"requests docking"| node_docking
node_docking -.->|"runs docking"| node_vina_service
node_application -->|"returns results"| node_result

click node_cli "https://github.com/yuanhang2024/rdpepper/blob/main/cli/main.py"
click node_gui "https://github.com/yuanhang2024/rdpepper/blob/main/gui/main_window.py"
click node_application "https://github.com/yuanhang2024/rdpepper/blob/main/application.py"
click node_reconstruction_entry "https://github.com/yuanhang2024/rdpepper/blob/main/reconstruction.py"
click node_pipeline "https://github.com/yuanhang2024/rdpepper/blob/main/pipeline.py"
click node_routes "https://github.com/yuanhang2024/rdpepper/tree/main/paths"
click node_structure_parse "https://github.com/yuanhang2024/rdpepper/blob/main/core/structure_io.py"
click node_monomers "https://github.com/yuanhang2024/rdpepper/blob/main/core/monomer_resolution.py"
click node_graph_build "https://github.com/yuanhang2024/rdpepper/blob/main/core/cyclic_peptide_graph.py"
click node_evidence "https://github.com/yuanhang2024/rdpepper/blob/main/core/rigor.py"
click node_notation "https://github.com/yuanhang2024/rdpepper/blob/main/sequence.py"
click node_mol2 "https://github.com/yuanhang2024/rdpepper/blob/main/core/mol2_format.py"
click node_export "https://github.com/yuanhang2024/rdpepper/blob/main/export/conformer_ensemble.py"
click node_compare "https://github.com/yuanhang2024/rdpepper/tree/main/compare"
click node_admet "https://github.com/yuanhang2024/rdpepper/blob/main/admet/predictor.py"
click node_pdbqt "https://github.com/yuanhang2024/rdpepper/blob/main/docking/workflow.py"
click node_docking "https://github.com/yuanhang2024/rdpepper/blob/main/docking/vina_wrapper.py"
click node_result "https://github.com/yuanhang2024/rdpepper/blob/main/application.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_cli,node_gui,node_application,node_result toneBlue
class node_reconstruction_entry,node_pipeline,node_routes,node_structure_parse,node_monomers,node_graph_build,node_evidence toneAmber
class node_notation,node_mol2,node_export toneMint
class node_pdbqt toneRose
class node_compare,node_admet,node_docking,node_researcher,node_structure_input,node_notation_input,node_vina_service toneIndigo
```

## Components

### User interfaces

- [CLI](https://github.com/yuanhang2024/rdpepper/blob/main/cli/main.py): `cli/main.py`
- [Desktop GUI](https://github.com/yuanhang2024/rdpepper/blob/main/gui/main_window.py): `gui/main_window.py`
- [Application services](https://github.com/yuanhang2024/rdpepper/blob/main/application.py): `application.py`
- [Service results](https://github.com/yuanhang2024/rdpepper/blob/main/application.py): `application.py`

### Reconstruction

- [Reconstruction entry](https://github.com/yuanhang2024/rdpepper/blob/main/reconstruction.py): `reconstruction.py`
- [Pipeline](https://github.com/yuanhang2024/rdpepper/blob/main/pipeline.py): `pipeline.py`
- [Routes A–H](https://github.com/yuanhang2024/rdpepper/tree/main/paths): `paths`
- [Structure parsing](https://github.com/yuanhang2024/rdpepper/blob/main/core/structure_io.py): `core/structure_io.py`
- [Monomer resolution](https://github.com/yuanhang2024/rdpepper/blob/main/core/monomer_resolution.py): `core/monomer_resolution.py`
- [Peptide graph](https://github.com/yuanhang2024/rdpepper/blob/main/core/cyclic_peptide_graph.py): `core/cyclic_peptide_graph.py`
- [Evidence grading](https://github.com/yuanhang2024/rdpepper/blob/main/core/rigor.py): `core/rigor.py`

### Chemistry services

- [Notation conversion](https://github.com/yuanhang2024/rdpepper/blob/main/sequence.py): `sequence.py`
- [MOL2 validation](https://github.com/yuanhang2024/rdpepper/blob/main/core/mol2_format.py): `core/mol2_format.py`
- [Conformer export](https://github.com/yuanhang2024/rdpepper/blob/main/export/conformer_ensemble.py): `export/conformer_ensemble.py`

### Ligand preparation

- [PDBQT preparation](https://github.com/yuanhang2024/rdpepper/blob/main/docking/workflow.py): `docking/workflow.py`

### Analysis and docking

- [Structure comparison](https://github.com/yuanhang2024/rdpepper/tree/main/compare): `compare`
- [ADMET prediction](https://github.com/yuanhang2024/rdpepper/blob/main/admet/predictor.py): `admet/predictor.py`
- [Vina docking](https://github.com/yuanhang2024/rdpepper/blob/main/docking/vina_wrapper.py): `docking/vina_wrapper.py`

### Other components

- **Researcher**
- **PDB/mmCIF**
- **Sequence / notation**
- **AutoDock Vina**

## Connections

- Researcher → CLI: invokes
- Researcher → Desktop GUI: opens
- PDB/mmCIF → Application services: provides structure
- Sequence / notation → Application services: provides notation
- CLI → Application services: calls services
- Desktop GUI → Application services: calls services
- Application services → Reconstruction entry: requests reconstruction
- Application services → Pipeline: runs workflows
- Reconstruction entry → Routes A–H: selects route
- Routes A–H → Structure parsing: parses structure
- Routes A–H → Monomer resolution: resolves residues
- Routes A–H → Peptide graph: assembles graph
- Peptide graph → Evidence grading: grades evidence
- Application services → Notation conversion: converts notation
- Application services → MOL2 validation: reads and validates
- Application services → Conformer export: exports conformers
- Pipeline → Structure comparison: compares structures
- Pipeline → ADMET prediction: requests predictions
- Application services → PDBQT preparation: prepares ligand
- Application services → Vina docking: requests docking
- Vina docking → AutoDock Vina: runs docking
- Application services → Service results: returns results
