# danielgarzonotero/pepmnet architecture

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

- Interactive diagram: https://gitdiagram.com/danielgarzonotero/pepmnet
- Repository: https://github.com/danielgarzonotero/pepmnet

## Overview

PepMNet is a peptide-property prediction project with two user-facing tasks: antimicrobial-peptide classification (AMP) and chromatographic retention-time prediction (RT). Users supply sequence CSVs for independent prediction, or use the training entry points to retrain models; both workflows encode sequences as hierarchical graph data and run task-specific graph models. The README also documents pretrained weights, multiple RT models, and AMP/RT evaluation. Edges follow excerpted imports/calls or README statements; unsampled implementation details and result-writing links are omitted where not evidenced.

Main entry points: [`src/data.py`](https://github.com/danielgarzonotero/pepmnet/blob/main/src/data.py) (Graph Dataset), [`amp_main.py`](https://github.com/danielgarzonotero/pepmnet/blob/main/amp_main.py) (AMP Training), [`amp_tester.py`](https://github.com/danielgarzonotero/pepmnet/blob/main/amp_tester.py) (AMP Testing), [`rt_tester.py`](https://github.com/danielgarzonotero/pepmnet/blob/main/rt_tester.py) (RT Testing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflows["User Workflows"]
  node_amp_train["AMP Training<br/>[amp_main.py]"]
  node_amp_test["AMP Testing<br/>[amp_tester.py]"]
  node_rt_train["RT Training<br/>[rt_main.py]"]
  node_rt_test["RT Testing<br/>[rt_tester.py]"]
end

subgraph group_encoding["Graph Encoding"]
  node_dataset["Graph Dataset<br/>[data.py]"]
  node_sequence_features["Sequence Features"]
  node_feature_utils["Graph Utilities<br/>[utils.py]"]
  node_device["Compute Device<br/>[device.py]"]
end

subgraph group_models["Prediction Models"]
  node_amp_model["AMP Graph Model<br/>[amp_model.py]"]
  node_rt_model["RT Graph Model<br/>[rt_model.py]"]
  node_amp_process["AMP Processing<br/>[amp_process.py]"]
  node_rt_process["RT Processing<br/>[rt_process.py]"]
  node_pretrained["Pretrained Weights"]
end

subgraph group_evaluation["Evaluation and Analysis"]
  node_amp_metrics["AMP Metrics"]
  node_amp_analysis["AMP Feature Analysis<br/>[distribution.py]"]
end

node_user(("Researcher"))

node_user -->|"trains AMP"| node_amp_train
node_user -->|"tests sequences"| node_amp_test
node_user -->|"trains RT"| node_rt_train
node_user -->|"tests sequences"| node_rt_test
node_amp_train -->|"loads graphs"| node_dataset
node_amp_train -->|"trains model"| node_amp_model
node_amp_train -.->|"calls processing"| node_amp_process
node_amp_train -.->|"evaluates predictions"| node_amp_metrics
node_amp_train -->|"selects device"| node_device
node_amp_test -->|"loads graphs"| node_dataset
node_amp_test -->|"creates model"| node_amp_model
node_amp_test -->|"predicts with"| node_amp_process
node_amp_test -->|"selects device"| node_device
node_rt_train -->|"loads graphs"| node_dataset
node_rt_train -->|"trains model"| node_rt_model
node_rt_train -.->|"trains and tests"| node_rt_process
node_rt_train -->|"selects device"| node_device
node_rt_test -->|"loads graphs"| node_dataset
node_rt_test -->|"creates model"| node_rt_model
node_rt_test -->|"predicts with"| node_rt_process
node_rt_test -->|"selects device"| node_device
node_dataset -->|"gets graph features"| node_feature_utils
node_dataset -->|"gets amino features"| node_sequence_features
node_dataset -->|"gets device"| node_device
node_amp_test -.->|"loads weights"| node_pretrained
node_rt_test -.->|"loads weights"| node_pretrained

click node_amp_train "https://github.com/danielgarzonotero/pepmnet/blob/main/amp_main.py"
click node_amp_test "https://github.com/danielgarzonotero/pepmnet/blob/main/amp_tester.py"
click node_rt_train "https://github.com/danielgarzonotero/pepmnet/blob/main/rt_main.py"
click node_rt_test "https://github.com/danielgarzonotero/pepmnet/blob/main/rt_tester.py"
click node_dataset "https://github.com/danielgarzonotero/pepmnet/blob/main/src/data.py"
click node_sequence_features "https://github.com/danielgarzonotero/pepmnet/blob/main/src/aminoacids_features.py"
click node_feature_utils "https://github.com/danielgarzonotero/pepmnet/blob/main/src/utils.py"
click node_device "https://github.com/danielgarzonotero/pepmnet/blob/main/src/device.py"
click node_amp_model "https://github.com/danielgarzonotero/pepmnet/blob/main/src/amp_model.py"
click node_rt_model "https://github.com/danielgarzonotero/pepmnet/blob/main/src/rt_model.py"
click node_amp_process "https://github.com/danielgarzonotero/pepmnet/blob/main/src/amp_process.py"
click node_rt_process "https://github.com/danielgarzonotero/pepmnet/blob/main/src/rt_process.py"
click node_amp_metrics "https://github.com/danielgarzonotero/pepmnet/blob/main/src/amp_evaluation_metrics.py"
click node_pretrained "https://github.com/danielgarzonotero/pepmnet/tree/main/weights"
click node_amp_analysis "https://github.com/danielgarzonotero/pepmnet/blob/main/results/figures/distributions/distribution.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_amp_train,node_amp_test,node_rt_train,node_rt_test toneBlue
class node_dataset,node_sequence_features,node_feature_utils,node_device toneAmber
class node_amp_model,node_rt_model,node_amp_process,node_rt_process,node_pretrained toneMint
class node_amp_metrics,node_amp_analysis toneRose
class node_user toneIndigo
```

## Components

### User Workflows

- [AMP Training](https://github.com/danielgarzonotero/pepmnet/blob/main/amp_main.py): `amp_main.py`
- [AMP Testing](https://github.com/danielgarzonotero/pepmnet/blob/main/amp_tester.py): `amp_tester.py`
- [RT Training](https://github.com/danielgarzonotero/pepmnet/blob/main/rt_main.py): `rt_main.py`
- [RT Testing](https://github.com/danielgarzonotero/pepmnet/blob/main/rt_tester.py): `rt_tester.py`

### Graph Encoding

- [Graph Dataset](https://github.com/danielgarzonotero/pepmnet/blob/main/src/data.py): `src/data.py`
- [Sequence Features](https://github.com/danielgarzonotero/pepmnet/blob/main/src/aminoacids_features.py): `src/aminoacids_features.py`
- [Graph Utilities](https://github.com/danielgarzonotero/pepmnet/blob/main/src/utils.py): `src/utils.py`
- [Compute Device](https://github.com/danielgarzonotero/pepmnet/blob/main/src/device.py): `src/device.py`

### Prediction Models

- [AMP Graph Model](https://github.com/danielgarzonotero/pepmnet/blob/main/src/amp_model.py): `src/amp_model.py`
- [RT Graph Model](https://github.com/danielgarzonotero/pepmnet/blob/main/src/rt_model.py): `src/rt_model.py`
- [AMP Processing](https://github.com/danielgarzonotero/pepmnet/blob/main/src/amp_process.py): `src/amp_process.py`
- [RT Processing](https://github.com/danielgarzonotero/pepmnet/blob/main/src/rt_process.py): `src/rt_process.py`
- [Pretrained Weights](https://github.com/danielgarzonotero/pepmnet/tree/main/weights): `weights`

### Evaluation and Analysis

- [AMP Metrics](https://github.com/danielgarzonotero/pepmnet/blob/main/src/amp_evaluation_metrics.py): `src/amp_evaluation_metrics.py`
- [AMP Feature Analysis](https://github.com/danielgarzonotero/pepmnet/blob/main/results/figures/distributions/distribution.py): `results/figures/distributions/distribution.py`

### Other components

- **Researcher**

## Connections

- Researcher → AMP Training: trains AMP (evidence: `README.md`)
- Researcher → AMP Testing: tests sequences (evidence: `README.md`)
- Researcher → RT Training: trains RT (evidence: `README.md`)
- Researcher → RT Testing: tests sequences (evidence: `README.md`)
- AMP Training → Graph Dataset: loads graphs (evidence: `amp_main.py`)
- AMP Training → AMP Graph Model: trains model (evidence: `amp_main.py`)
- AMP Training → AMP Processing: calls processing (evidence: `amp_main.py`)
- AMP Training → AMP Metrics: evaluates predictions (evidence: `amp_main.py`)
- AMP Training → Compute Device: selects device (evidence: `amp_main.py`)
- AMP Testing → Graph Dataset: loads graphs (evidence: `amp_tester.py`)
- AMP Testing → AMP Graph Model: creates model (evidence: `amp_tester.py`)
- AMP Testing → AMP Processing: predicts with (evidence: `amp_tester.py`)
- AMP Testing → Compute Device: selects device (evidence: `amp_tester.py`)
- RT Training → Graph Dataset: loads graphs (evidence: `rt_main.py`)
- RT Training → RT Graph Model: trains model (evidence: `rt_main.py`)
- RT Training → RT Processing: trains and tests (evidence: `rt_main.py`)
- RT Training → Compute Device: selects device (evidence: `rt_main.py`)
- RT Testing → Graph Dataset: loads graphs (evidence: `rt_tester.py`)
- RT Testing → RT Graph Model: creates model (evidence: `rt_tester.py`)
- RT Testing → RT Processing: predicts with (evidence: `rt_tester.py`)
- RT Testing → Compute Device: selects device (evidence: `rt_tester.py`)
- Graph Dataset → Graph Utilities: gets graph features (evidence: `src/data.py`)
- Graph Dataset → Sequence Features: gets amino features (evidence: `src/data.py`)
- Graph Dataset → Compute Device: gets device (evidence: `src/data.py`)
- AMP Testing → Pretrained Weights: loads weights (evidence: `README.md`)
- RT Testing → Pretrained Weights: loads weights (evidence: `README.md`)
