# inpacdb/pepvis architecture

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

- Interactive diagram: https://gitdiagram.com/inpacdb/pepvis
- Repository: https://github.com/inpacdb/pepvis

## Overview

#### Purpose and entry point
PepVis is a desktop Python GUI for large-scale peptide structure modeling and protein–peptide virtual screening. Its sole visible application entry point is `PepVis.py`, launched with `python PepVis.py`. The GUI collects workflow options and generates Bash scripts for execution in a terminal rather than running a hosted service.

Paths: `PepVis.py`, `README.md`, `PepVis_manual.pdf`

#### GUI-to-script orchestration boundary
The central architectural role of the application is workflow composition: users supply peptide, protein, tool-path, and execution settings through the GUI; PepVis emits customized shell commands/scripts. This creates a clear boundary between interactive configuration in Python and computational execution by external command-line software.

Paths: `PepVis.py`, `PepVis_manual.pdf`

#### Peptide modeling and optimization stage
PepVis supports peptide structure generation from sequence and subsequent structural optimization. The documented modeling stack combines ModPep for peptide modeling with Gromacs for optimization. These tools are external runtime dependencies, not repository-contained implementations.

Paths: `PepVis.py`, `README.md`, `PepVis_manual.pdf`

#### Virtual-screening engines
The screening pipeline can prepare and run multiple protein–peptide docking campaigns through three alternative engines: AutoDock Vina, ZDOCK, and AutoDock CrankPep (ADCP). Generated scripts likely encode engine-specific input preparation, invocation, and output handling, while PepVis provides the common user-facing configuration layer.

Paths: `PepVis.py`, `README.md`

#### Post-docking ranking and refinement
Docked protein–peptide complexes may move through downstream quality-improvement stages: ZRANK2 rescoring and optional flexible refinement with Rosetta FlexPepDock. FlexPepDock/Rosetta is conditional infrastructure, required only when flexible complex refinement is selected.

Paths: `PepVis.py`, `README.md`, `PepVis_manual.pdf`

#### Batch and parallel execution
Large-scale workload execution is delegated to GNU Parallel through the generated Bash scripts. This means scalability and scheduling are shell/process based: PepVis defines jobs and command lines, while GNU Parallel fans work out across local execution resources. Users must configure installation paths for the external tools once.

Paths: `PepVis.py`, `README.md`

#### Runtime and distribution model
The repository is a minimal distributable application: one Python program, documentation, and license/copyright material. It has no indicated server, database, packaged Python dependency manifest, or embedded docking binaries. Required infrastructure is a Python runtime, terminal/Bash environment, GNU Parallel, and locally installed scientific docking/modeling tools.

Paths: `PepVis.py`, `README.md`, `License.txt`, `Copyright.txt`

Main entry points: [`PepVis.py`](https://github.com/inpacdb/pepvis/blob/master/PepVis.py) (Workflow composer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["PepVis application"]
  node_gui["GUI configuration<br/>Python GUI<br/>[PepVis.py]"]
  node_composer["Workflow composer<br/>script generator<br/>[PepVis.py]"]
  node_scripts["Generated Bash scripts<br/>shell scripts<br/>[PepVis.py]"]
end

subgraph group_modeling["Modeling workflow"]
  node_modpep["ModPep<br/>peptide modeler"]
  node_gromacs["Gromacs<br/>structure optimizer"]
end

subgraph group_screening["Screening workflow"]
  node_vina["AutoDock Vina<br/>docking engine"]
  node_zdock["ZDOCK<br/>docking engine"]
  node_adcp["AutoDock CrankPep<br/>docking engine"]
  node_zrank["ZRANK2<br/>complex rescorer"]
  node_flexpepdock["Rosetta FlexPepDock<br/>flexible refiner"]
end

subgraph group_runtime["Execution runtime"]
  node_bash["Terminal / Bash<br/>shell runtime"]
  node_parallel{{"GNU Parallel<br/>parallel executor"}}
end

node_gui -->|"workflow settings"| node_composer
node_composer -->|"emits"| node_scripts
node_scripts -->|"runs in"| node_bash
node_bash -->|"dispatches jobs"| node_parallel
node_parallel -->|"modeling jobs"| node_modpep
node_modpep -->|"peptide structures"| node_gromacs
node_parallel -->|"docking campaign"| node_vina
node_parallel -->|"docking campaign"| node_zdock
node_parallel -->|"docking campaign"| node_adcp
node_vina -.->|"docked complexes"| node_zrank
node_zdock -.->|"docked complexes"| node_zrank
node_adcp -.->|"docked complexes"| node_zrank
node_zrank -.->|"optional refinement"| node_flexpepdock

click node_gui "https://github.com/inpacdb/pepvis/blob/master/PepVis.py"
click node_composer "https://github.com/inpacdb/pepvis/blob/master/PepVis.py"
click node_scripts "https://github.com/inpacdb/pepvis/blob/master/PepVis.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_gui,node_composer,node_scripts toneBlue
class node_modpep,node_gromacs toneAmber
class node_vina,node_zdock,node_adcp,node_zrank,node_flexpepdock toneMint
class node_bash,node_parallel toneRose
```

## Components

### PepVis application

- [GUI configuration](https://github.com/inpacdb/pepvis/blob/master/PepVis.py): Python GUI · Collects peptide, protein, tool-path, and execution settings. · `PepVis.py`
- [Workflow composer](https://github.com/inpacdb/pepvis/blob/master/PepVis.py): script generator · Builds customized Bash commands for selected workflows. · `PepVis.py`
- [Generated Bash scripts](https://github.com/inpacdb/pepvis/blob/master/PepVis.py): shell scripts · Execution boundary between the GUI and scientific tools. · `PepVis.py`

### Modeling workflow

- **ModPep**: peptide modeler
- **Gromacs**: structure optimizer

### Screening workflow

- **AutoDock Vina**: docking engine
- **ZDOCK**: docking engine
- **AutoDock CrankPep**: docking engine
- **ZRANK2**: complex rescorer
- **Rosetta FlexPepDock**: flexible refiner · Optional downstream complex refinement.

### Execution runtime

- **Terminal / Bash**: shell runtime
- **GNU Parallel**: parallel executor · Fans generated jobs across local resources.

## Connections

- GUI configuration → Workflow composer: workflow settings
- Workflow composer → Generated Bash scripts: emits
- Generated Bash scripts → Terminal / Bash: runs in
- Terminal / Bash → GNU Parallel: dispatches jobs
- GNU Parallel → ModPep: modeling jobs
- ModPep → Gromacs: peptide structures
- GNU Parallel → AutoDock Vina: docking campaign
- GNU Parallel → ZDOCK: docking campaign
- GNU Parallel → AutoDock CrankPep: docking campaign
- AutoDock Vina → ZRANK2: docked complexes
- ZDOCK → ZRANK2: docked complexes
- AutoDock CrankPep → ZRANK2: docked complexes
- ZRANK2 → Rosetta FlexPepDock: optional refinement
