# pleiadian53/biomedical-app architecture

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

- Interactive diagram: https://gitdiagram.com/pleiadian53/biomedical-app
- Repository: https://github.com/pleiadian53/biomedical-app

## Overview

BindingAffinity2 is a command-line biomedical application that ranks protein–drug assignments by a name-derived binding-affinity score. The user supplies protein and drug files; preprocessing loads the names, affinity logic builds a score matrix, and the matching algorithm computes an optimal assignment that the CLI prints. Benchmarking also compares random and optimal assignments and times matching implementations. The graph follows explicit calls in sampled source; no broader capabilities are documented in the repository README.

Main entry points: [`BindingAffinity2/src/bipartite_match/affinity.py`](https://github.com/pleiadian53/biomedical-app/blob/master/BindingAffinity2/src/bipartite_match/affinity.py) (Assignment evaluation), [`BindingAffinity2/src/bipartite_match/match.py`](https://github.com/pleiadian53/biomedical-app/blob/master/BindingAffinity2/src/bipartite_match/match.py) (Match command), [`BindingAffinity2/src/bipartite_match/preprocess.py`](https://github.com/pleiadian53/biomedical-app/blob/master/BindingAffinity2/src/bipartite_match/preprocess.py) (Input preprocessing), [`BindingAffinity2/src/bipartite_match/maxWBiMatch.py`](https://github.com/pleiadian53/biomedical-app/blob/master/BindingAffinity2/src/bipartite_match/maxWBiMatch.py) (Bipartite solver)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Command-line entry"]
  node_cli["Match command<br/>[match.py]"]
  node_input["Input preprocessing<br/>[preprocess.py]"]
end

subgraph group_affinity["Affinity scoring"]
  node_scoring["Affinity weights<br/>[affinity.py]"]
  node_evaluation["Assignment evaluation<br/>[affinity.py]"]
end

subgraph group_matching["Matching and support"]
  node_solver["Bipartite solver<br/>[maxWBiMatch.py]"]
  node_timer["Match timer<br/>[timer.py]"]
  node_loop["Circular queue<br/>[datastruct.py]"]
end

node_user(("User"))

node_user -->|"runs with inputs"| node_cli
node_cli -->|"requests assignment"| node_evaluation
node_evaluation -->|"builds weights"| node_scoring
node_scoring -->|"loads names"| node_input
node_evaluation -->|"solves assignment"| node_solver
node_evaluation -->|"times matching"| node_timer
node_evaluation -->|"buffers comparisons"| node_loop
node_cli -->|"prints result"| node_user

click node_cli "https://github.com/pleiadian53/biomedical-app/blob/master/BindingAffinity2/src/bipartite_match/match.py"
click node_input "https://github.com/pleiadian53/biomedical-app/blob/master/BindingAffinity2/src/bipartite_match/preprocess.py"
click node_scoring "https://github.com/pleiadian53/biomedical-app/blob/master/BindingAffinity2/src/bipartite_match/affinity.py"
click node_evaluation "https://github.com/pleiadian53/biomedical-app/blob/master/BindingAffinity2/src/bipartite_match/affinity.py"
click node_solver "https://github.com/pleiadian53/biomedical-app/blob/master/BindingAffinity2/src/bipartite_match/maxWBiMatch.py"
click node_timer "https://github.com/pleiadian53/biomedical-app/blob/master/BindingAffinity2/src/bipartite_match/timer.py"
click node_loop "https://github.com/pleiadian53/biomedical-app/blob/master/BindingAffinity2/src/bipartite_match/datastruct.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_input,node_user toneBlue
class node_scoring,node_evaluation toneAmber
class node_solver,node_timer,node_loop toneMint
```

## Components

### Command-line entry

- [Match command](https://github.com/pleiadian53/biomedical-app/blob/master/BindingAffinity2/src/bipartite_match/match.py): `BindingAffinity2/src/bipartite_match/match.py`
- [Input preprocessing](https://github.com/pleiadian53/biomedical-app/blob/master/BindingAffinity2/src/bipartite_match/preprocess.py): `BindingAffinity2/src/bipartite_match/preprocess.py`

### Affinity scoring

- [Affinity weights](https://github.com/pleiadian53/biomedical-app/blob/master/BindingAffinity2/src/bipartite_match/affinity.py): `BindingAffinity2/src/bipartite_match/affinity.py`
- [Assignment evaluation](https://github.com/pleiadian53/biomedical-app/blob/master/BindingAffinity2/src/bipartite_match/affinity.py): `BindingAffinity2/src/bipartite_match/affinity.py`

### Matching and support

- [Bipartite solver](https://github.com/pleiadian53/biomedical-app/blob/master/BindingAffinity2/src/bipartite_match/maxWBiMatch.py): `BindingAffinity2/src/bipartite_match/maxWBiMatch.py`
- [Match timer](https://github.com/pleiadian53/biomedical-app/blob/master/BindingAffinity2/src/bipartite_match/timer.py): `BindingAffinity2/src/bipartite_match/timer.py`
- [Circular queue](https://github.com/pleiadian53/biomedical-app/blob/master/BindingAffinity2/src/bipartite_match/datastruct.py): `BindingAffinity2/src/bipartite_match/datastruct.py`

### Other components

- **User**

## Connections

- User → Match command: runs with inputs (evidence: `BindingAffinity2/src/bipartite_match/match.py`)
- Match command → Assignment evaluation: requests assignment (evidence: `BindingAffinity2/src/bipartite_match/match.py`)
- Assignment evaluation → Affinity weights: builds weights (evidence: `BindingAffinity2/src/bipartite_match/affinity.py`)
- Affinity weights → Input preprocessing: loads names (evidence: `BindingAffinity2/src/bipartite_match/affinity.py`)
- Assignment evaluation → Bipartite solver: solves assignment (evidence: `BindingAffinity2/src/bipartite_match/affinity.py`)
- Assignment evaluation → Match timer: times matching (evidence: `BindingAffinity2/src/bipartite_match/affinity.py`)
- Assignment evaluation → Circular queue: buffers comparisons (evidence: `BindingAffinity2/src/bipartite_match/affinity.py`)
- Match command → User: prints result (evidence: `BindingAffinity2/src/bipartite_match/match.py`)
