# ersilia-os/eos7w6n architecture

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

- Interactive diagram: https://gitdiagram.com/ersilia-os/eos7w6n
- Repository: https://github.com/ersilia-os/eos7w6n

## Overview

This repository packages the GROVER molecular-embedding model. The principal workflow accepts compound input, generates GROVER fingerprints and appends RDKit descriptors, then writes fixed-width 5,000-feature output. The framework also includes self-supervised pretraining and supervised fine-tuning/evaluation. Relationships are limited to README statements and SOURCE INDEX references; unsampled implementation details are not inferred.

Main entry points: [`model/framework/code/grover/data/moldataset.py`](https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/grover/data/moldataset.py) (Molecule dataset), [`model/framework/code/grover/model/models.py`](https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/grover/model/models.py) (GROVER encoder), [`model/framework/code/task/pretrain.py`](https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/task/pretrain.py) (Self-supervised pretraining), [`model/framework/code/task/fingerprint.py`](https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/task/fingerprint.py) (Fingerprint task)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Embedding runtime"]
  node_entry["CLI entry<br/>[main.py]"]
  node_fingerprints["Fingerprint task<br/>[fingerprint.py]"]
  node_descriptor["RDKit descriptors"]
  node_checkpoint[("GROVER checkpoint<br/>[grover_large.pt]")]
end

subgraph group_representation["Molecule representation"]
  node_features["Molecule features"]
  node_molecule_data["Molecule dataset<br/>[moldataset.py]"]
  node_molecule_graph["Molecule graph<br/>[molgraph.py]"]
  node_scaling["Feature scaling<br/>[scaler.py]"]
  node_task_labels["Task labels<br/>[task_labels.py]"]
  node_vocabulary["Atom bond vocabulary<br/>[torchvocab.py]"]
end

subgraph group_learning["Model learning"]
  node_encoder["GROVER encoder<br/>[models.py]"]
  node_transformer_layers["Transformer layers<br/>[layers.py]"]
  node_pretraining["Self-supervised pretraining<br/>[pretrain.py]"]
  node_trainer["Training engine<br/>[grovertrainer.py]"]
  node_finetuning["Fine-tuning<br/>[train.py]"]
  node_prediction["Prediction<br/>[predict.py]"]
end

subgraph group_support["Model support"]
  node_utilities["Training utilities"]
  node_arguments["Argument parsing<br/>[parsing.py]"]
end

node_user(("Compound caller"))

node_user -->|"submits compounds"| node_entry
node_entry -->|"dispatches fingerprinting"| node_fingerprints
node_entry -->|"parses options"| node_arguments
node_fingerprints -->|"loads molecules"| node_molecule_data
node_molecule_data -->|"generates features"| node_features
node_molecule_data -->|"uses scaler"| node_scaling
node_encoder -->|"uses graph batches"| node_molecule_graph
node_encoder -->|"uses layers"| node_transformer_layers
node_fingerprints -->|"generates embeddings"| node_encoder
node_checkpoint -->|"loads weights"| node_encoder
node_fingerprints -->|"appends descriptors"| node_descriptor
node_descriptor -->|"contributes 200 features"| node_user
node_fingerprints -->|"writes 5,000 features"| node_user
node_pretraining -->|"loads training data"| node_molecule_data
node_pretraining -->|"loads vocabularies"| node_vocabulary
node_pretraining -->|"trains encoder"| node_encoder
node_pretraining -->|"delegates training"| node_trainer
node_finetuning -->|"loads datasets"| node_molecule_data
node_finetuning -->|"uses metrics and scheduling"| node_utilities
node_prediction -->|"loads input molecules"| node_molecule_data
node_prediction -->|"runs model"| node_encoder
node_pretraining -->|"uses pretraining labels"| node_task_labels

click node_entry "https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/main.py"
click node_fingerprints "https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/task/fingerprint.py"
click node_checkpoint "https://github.com/ersilia-os/eos7w6n/blob/main/model/checkpoints/grover_large.pt"
click node_features "https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/grover/data/molfeaturegenerator.py"
click node_molecule_data "https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/grover/data/moldataset.py"
click node_molecule_graph "https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/grover/data/molgraph.py"
click node_scaling "https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/grover/data/scaler.py"
click node_task_labels "https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/grover/data/task_labels.py"
click node_vocabulary "https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/grover/data/torchvocab.py"
click node_encoder "https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/grover/model/models.py"
click node_transformer_layers "https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/grover/model/layers.py"
click node_pretraining "https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/task/pretrain.py"
click node_trainer "https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/task/grovertrainer.py"
click node_finetuning "https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/task/train.py"
click node_prediction "https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/task/predict.py"
click node_utilities "https://github.com/ersilia-os/eos7w6n/tree/main/model/framework/code/grover/util"
click node_arguments "https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/grover/util/parsing.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_entry,node_fingerprints,node_descriptor,node_checkpoint toneBlue
class node_features,node_molecule_data,node_molecule_graph,node_scaling,node_task_labels,node_vocabulary toneAmber
class node_encoder,node_transformer_layers,node_pretraining,node_trainer,node_finetuning,node_prediction toneMint
class node_utilities,node_arguments toneRose
class node_user toneIndigo
```

## Components

### Embedding runtime

- [CLI entry](https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/main.py): `model/framework/code/main.py`
- [Fingerprint task](https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/task/fingerprint.py): `model/framework/code/task/fingerprint.py`
- **RDKit descriptors**
- [GROVER checkpoint](https://github.com/ersilia-os/eos7w6n/blob/main/model/checkpoints/grover_large.pt): `model/checkpoints/grover_large.pt`

### Molecule representation

- [Molecule features](https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/grover/data/molfeaturegenerator.py): `model/framework/code/grover/data/molfeaturegenerator.py`
- [Molecule dataset](https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/grover/data/moldataset.py): `model/framework/code/grover/data/moldataset.py`
- [Molecule graph](https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/grover/data/molgraph.py): `model/framework/code/grover/data/molgraph.py`
- [Feature scaling](https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/grover/data/scaler.py): `model/framework/code/grover/data/scaler.py`
- [Task labels](https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/grover/data/task_labels.py): `model/framework/code/grover/data/task_labels.py`
- [Atom bond vocabulary](https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/grover/data/torchvocab.py): `model/framework/code/grover/data/torchvocab.py`

### Model learning

- [GROVER encoder](https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/grover/model/models.py): `model/framework/code/grover/model/models.py`
- [Transformer layers](https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/grover/model/layers.py): `model/framework/code/grover/model/layers.py`
- [Self-supervised pretraining](https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/task/pretrain.py): `model/framework/code/task/pretrain.py`
- [Training engine](https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/task/grovertrainer.py): `model/framework/code/task/grovertrainer.py`
- [Fine-tuning](https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/task/train.py): `model/framework/code/task/train.py`
- [Prediction](https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/task/predict.py): `model/framework/code/task/predict.py`

### Model support

- [Training utilities](https://github.com/ersilia-os/eos7w6n/tree/main/model/framework/code/grover/util): `model/framework/code/grover/util`
- [Argument parsing](https://github.com/ersilia-os/eos7w6n/blob/main/model/framework/code/grover/util/parsing.py): `model/framework/code/grover/util/parsing.py`

### Other components

- **Compound caller**

## Connections

- Compound caller → CLI entry: submits compounds (evidence: `README.md`)
- CLI entry → Fingerprint task: dispatches fingerprinting (evidence: `model/framework/code/main.py`)
- CLI entry → Argument parsing: parses options (evidence: `model/framework/code/main.py`)
- Fingerprint task → Molecule dataset: loads molecules (evidence: `model/framework/code/task/fingerprint.py`)
- Molecule dataset → Molecule features: generates features (evidence: `model/framework/code/grover/data/moldataset.py`)
- Molecule dataset → Feature scaling: uses scaler (evidence: `model/framework/code/grover/data/moldataset.py`)
- GROVER encoder → Molecule graph: uses graph batches (evidence: `model/framework/code/grover/model/models.py`)
- GROVER encoder → Transformer layers: uses layers (evidence: `model/framework/code/grover/model/models.py`)
- Fingerprint task → GROVER encoder: generates embeddings (evidence: `model/framework/code/task/fingerprint.py`)
- GROVER checkpoint → GROVER encoder: loads weights (evidence: `README.md`)
- Fingerprint task → RDKit descriptors: appends descriptors (evidence: `README.md`)
- RDKit descriptors → Compound caller: contributes 200 features (evidence: `README.md`)
- Fingerprint task → Compound caller: writes 5,000 features (evidence: `README.md`)
- Self-supervised pretraining → Molecule dataset: loads training data (evidence: `model/framework/code/task/pretrain.py`)
- Self-supervised pretraining → Atom bond vocabulary: loads vocabularies (evidence: `model/framework/code/task/pretrain.py`)
- Self-supervised pretraining → GROVER encoder: trains encoder (evidence: `model/framework/code/task/pretrain.py`)
- Self-supervised pretraining → Training engine: delegates training (evidence: `model/framework/code/task/pretrain.py`)
- Fine-tuning → Molecule dataset: loads datasets (evidence: `model/framework/code/task/train.py`)
- Fine-tuning → Training utilities: uses metrics and scheduling (evidence: `model/framework/code/task/train.py`)
- Prediction → Molecule dataset: loads input molecules (evidence: `model/framework/code/task/predict.py`)
- Prediction → GROVER encoder: runs model (evidence: `model/framework/code/task/predict.py`)
- Self-supervised pretraining → Task labels: uses pretraining labels (evidence: `model/framework/code/task/pretrain.py`)
