# patrickbryant1/umol architecture

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

- Interactive diagram: https://gitdiagram.com/patrickbryant1/umol
- Repository: https://github.com/patrickbryant1/umol

## Overview

##### Main Components

a. Input Processing Layer:
- Multiple Sequence Alignment (MSA) processing
- SMILES string processing for ligands
- Protein pocket information processing

b. Core Neural Network Architecture:
- Feature extraction modules
- Common modules layer
- Folding modules
- Model components from src/net/model/
- This as the central processing unit

c. Output Processing Layer:
- Structure prediction output
- Relaxation pipeline
- Visualization components

##### Component Relationships

- Data flow from input processors to the neural network
- Internal connections between network modules
- Flow from network to structure prediction
- Connection to the relaxation pipeline

##### Specific Implementation Details

**Input Processing:**
- MSA Features (src/make_msa_seq_feats.py)
- Ligand Features (src/make_ligand_feats.py)
- Pocket Processing (src/parse_pocket.py)

**Core Network (src/net/):**
- Model Configuration (model/config.py)
- Feature Processing (model/features.py)
- Core Model (model/model.py)
- Folding Logic (model/folding.py)

**Output Processing:**
- Structure Prediction (src/predict.py)
- OpenMM Relaxation (src/relax/openmm_relax.py)

##### Technical Details

- CUDA dependency
- OpenMM integration
- Data format transformations
- Model parameter handling

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles
    classDef input fill:#a8d1f0,stroke:#000
    classDef core fill:#90EE90,stroke:#000
    classDef output fill:#FFB347,stroke:#000
    classDef common fill:#FFE5B4,stroke:#000
    classDef data fill:#E6E6FA,stroke:#000

    %% Input Processing Layer
    subgraph InputLayer
        MSA["MSA Processing"]:::input
        LigandFeats["Ligand Feature Processing"]:::input
        PocketInfo["Pocket Information Processing"]:::input
        DataParsing["Data Parsing"]:::input
    end

    %% Core Neural Network Architecture
    subgraph CoreNetwork
        ModelConfig["Model Configuration"]:::core
        FeatureExtraction["Feature Extraction"]:::core
        CoreModel["Core Model Architecture"]:::core
        FoldingModule["Folding Module"]:::core
        CommonModules["Common Modules"]:::core
        InputPipeline["Input Pipeline"]:::core
        ProteinFeatures["Protein Features"]:::core
    end

    %% Common Utils and Processing
    subgraph CommonUtils
        ProteinUtils["Protein Common Utils"]:::common
    end

    %% Output Processing Layer
    subgraph OutputLayer
        StructurePred["Structure Prediction"]:::output
        RelaxPipeline["Relaxation Pipeline"]:::output
        LigandAlign["Ligand Conformer Alignment"]:::output
    end

    %% Connections
    MSA --> DataParsing
    LigandFeats --> DataParsing
    PocketInfo --> DataParsing
    DataParsing --> InputPipeline
    InputPipeline --> FeatureExtraction
    FeatureExtraction --> CoreModel
    ModelConfig --> CoreModel
    CoreModel --> FoldingModule
    CommonModules --> CoreModel
    ProteinUtils --> CoreModel
    ProteinFeatures --> CoreModel
    FoldingModule --> StructurePred
    StructurePred --> RelaxPipeline
    RelaxPipeline --> LigandAlign

    %% Click Events
    click MSA "https://github.com/patrickbryant1/Umol/blob/master/src/make_msa_seq_feats.py"
    click LigandFeats "https://github.com/patrickbryant1/Umol/blob/master/src/make_ligand_feats.py"
    click PocketInfo "https://github.com/patrickbryant1/Umol/blob/master/src/parse_pocket.py"
    click CoreModel "https://github.com/patrickbryant1/Umol/blob/master/src/net/model/model.py"
    click FeatureExtraction "https://github.com/patrickbryant1/Umol/blob/master/src/net/model/features.py"
    click FoldingModule "https://github.com/patrickbryant1/Umol/blob/master/src/net/model/folding.py"
    click ModelConfig "https://github.com/patrickbryant1/Umol/blob/master/src/net/model/config.py"
    click CommonModules "https://github.com/patrickbryant1/Umol/blob/master/src/net/model/common_modules.py"
    click StructurePred "https://github.com/patrickbryant1/Umol/blob/master/src/predict.py"
    click RelaxPipeline "https://github.com/patrickbryant1/Umol/blob/master/src/relax/openmm_relax.py"
    click ProteinUtils "https://github.com/patrickbryant1/Umol/blob/master/src/net/common/protein.py"
    click DataParsing "https://github.com/patrickbryant1/Umol/blob/master/src/net/data/parsers.py"
    click InputPipeline "https://github.com/patrickbryant1/Umol/blob/master/src/net/model/tf/input_pipeline.py"
    click ProteinFeatures "https://github.com/patrickbryant1/Umol/blob/master/src/net/model/tf/protein_features.py"
    click LigandAlign "https://github.com/patrickbryant1/Umol/blob/master/src/relax/align_ligand_conformer.py"
```
