# volkamerlab/maxsmi architecture

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

- Interactive diagram: https://gitdiagram.com/volkamerlab/maxsmi
- Repository: https://github.com/volkamerlab/maxsmi

## Overview

##### Main Components

a) Data Processing Layer:
- SMILES Input Processing
- Augmentation Strategies Module
- Data Encoding Module

b) Model Layer:
- Deep Learning Models (CONV1D, CONV2D, RNN)
- Training Pipeline
- Early Stopping Module
- Ensemble Learning Component

c) Prediction/Evaluation Layer:
- Model Evaluation
- Prediction Pipeline
- Results Analysis
- Confidence Estimation

**[Data Processing Layer] → [Model Layer] → [Prediction/Evaluation Layer]**

**[SMILES Input] → [Augmentation Strategies]**
- No augmentation
- With duplication
- Without duplication
- Reduced duplication
- Estimated maximum

**[Encoded Data] → [Neural Networks]**
- CONV1D
- CONV2D
- RNN

##### Important Connections

- Data flow between augmentation strategies and model training
- Model training pipeline connection to evaluation
- Ensemble learning integration points
- Prediction pipeline for new compounds

##### Additional Elements

- Dataset handlers (ESOL, FreeSolv, lipophilicity, EGFR kinase)
- PyTorch utilities
- Model persistence (prediction_models directory)
- Results storage (output_ directory)

##### Technical Details to Highlight

- Integration with external libraries (DeepChem, PyTorch)
- Where configuration parameters are injected
- Evaluation metrics collection points
- Where model weights are saved/loaded

##### Specific Implementation Notes

- Training workflow (full_workflow.py)
- Early stopping workflow (full_workflow_earlystopping.py)
- Prediction workflow (prediction_unlabeled_data.py)

Use standardized symbols:
- Diamonds for decision points
- Rectangles for processes

This architecture should emphasize the project's unique aspects: SMILES augmentation strategies, multiple deep learning model support, and the confidence estimation feature of the Maxsmi approach.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Data_Processing
        SMILES[SMILES Input Processing]
        AugStrat[Augmentation Strategies]
        DataEnc[Data Encoding]
        
        SMILES --> AugStrat
        AugStrat --> DataEnc
        
        subgraph AugmentationTypes
            NoAug[No augmentation]
            WithDup[With duplication]
            WoDup[Without duplication]
            RedDup[Reduced duplication]
            EstMax[Estimated maximum]
        end
        
        AugStrat --> AugmentationTypes
    end
    
    subgraph Model_Layer
        DL[Deep Learning Models]
        Train[Training Pipeline]
        Early[Early Stopping]
        Ensemble[Ensemble Learning]
        
        subgraph ModelTypes
            CONV1D[CONV1D Network]
            CONV2D[CONV2D Network]
            RNN[RNN Network]
        end
        
        DL --> ModelTypes
        ModelTypes --> Train
        Train --> Early
        Early --> Ensemble
    end
    
    subgraph Evaluation_Layer
        Eval[Model Evaluation]
        Pred[Prediction Pipeline]
        Results[Results Analysis]
        Conf[Confidence Estimation]
        
        Eval --> Results
        Pred --> Results
        Results --> Conf
    end
    
    DataEnc --> DL
    Ensemble --> Eval
    
    subgraph Storage
        ModelStore[Model Storage]
        ResultStore[Results Storage]
    end
    
    subgraph Utils
        DataHandle[Dataset Handling]
        PyUtils[PyTorch Utilities]
        EvalUtils[Evaluation Utils]
    end
    
    Train --> ModelStore
    Results --> ResultStore
    DataHandle --> Train
    PyUtils --> Train
    EvalUtils --> Eval
    
    %% Click events for component mapping
    click SMILES "https://github.com/volkamerlab/maxsmi/blob/main/maxsmi/utils/utils_smiles.py"
    click AugStrat "https://github.com/volkamerlab/maxsmi/blob/main/maxsmi/augmentation_strategies.py"
    click DataEnc "https://github.com/volkamerlab/maxsmi/blob/main/maxsmi/utils/utils_encoding.py"
    click DL "https://github.com/volkamerlab/maxsmi/blob/main/maxsmi/pytorch_utils/pytorch_models.py"
    click Train "https://github.com/volkamerlab/maxsmi/blob/main/maxsmi/pytorch_utils/pytorch_training.py"
    click Early "https://github.com/volkamerlab/maxsmi/blob/main/maxsmi/full_workflow_earlystopping.py"
    click ModelStore "https://github.com/volkamerlab/maxsmi/tree/main/maxsmi/prediction_models/"
    click Eval "https://github.com/volkamerlab/maxsmi/blob/main/maxsmi/pytorch_utils/pytorch_evaluation.py"
    click Pred "https://github.com/volkamerlab/maxsmi/blob/main/maxsmi/prediction_unlabeled_data.py"
    click Results "https://github.com/volkamerlab/maxsmi/tree/main/maxsmi/results_analysis/"
    click DataHandle "https://github.com/volkamerlab/maxsmi/blob/main/maxsmi/pytorch_utils/pytorch_data.py"
    click ResultStore "https://github.com/volkamerlab/maxsmi/tree/main/maxsmi/output_/"
    click EvalUtils "https://github.com/volkamerlab/maxsmi/blob/main/maxsmi/utils/utils_evaluation.py"
    
    classDef processing fill:#a8d1ff,stroke:#333,stroke-width:2px
    classDef model fill:#90EE90,stroke:#333,stroke-width:2px
    classDef evaluation fill:#FFB347,stroke:#333,stroke-width:2px
    classDef storage fill:#D3D3D3,stroke:#333,stroke-width:2px
    classDef utils fill:#E6E6FA,stroke:#333,stroke-width:2px
    
    class SMILES,AugStrat,DataEnc,AugmentationTypes processing
    class DL,Train,Early,Ensemble,ModelTypes model
    class Eval,Pred,Results,Conf evaluation
    class ModelStore,ResultStore storage
    class DataHandle,PyUtils,EvalUtils utils
```
