# pombertlab/3dfi architecture

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

- Interactive diagram: https://gitdiagram.com/pombertlab/3dfi
- Repository: https://github.com/pombertlab/3dfi

## Overview

a. Primary Flow:
- FASTA files → Structure Prediction
- Predicted structures → Homology Search
- Search results → Visualization

b. Database Connections:
- RCSB PDB database connection
- Local database storage
- Prediction model databases

##### Specific Implementation Details

a. File Formats:
- Input: FASTA (.fasta)
- Intermediate: PDB (.pdb)
- Results: Various (.cxs, .gesamt, etc.)

b. Tool Integration:
- Docker containers
- External dependencies
- Environment variables

##### Additional Elements

- Version information
- System requirements
- Error handling paths
- Optional workflow paths

##### Technical Details to Note

- GPU requirements (>= 24GB VRAM)
- Database size requirements (4TB+ storage)
- Memory requirements (64GB+ RAM)
- I/O intensive operations

- Multiple prediction tools
- Different homology search methods
- Various visualization options
- Flexible input handling
- Scalable processing

Remember to maintain a balance between detail and clarity, focusing on the key architectural components while providing enough technical information for implementation understanding.

This design should accurately represent the 3DFI pipeline's capability to automate protein structure predictions, structural homology searches, and alignments at a genome-wide scale, while clearly showing the integration of various tools and databases in the process.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Input
        FASTA[FASTA Files]
        Split_FASTA[FASTA Splitter]:::input
        Split_PDB[PDB Splitter]:::input
    end

    subgraph "Structure Prediction"
        AF2[AlphaFold2]:::predictor
        RTF[RoseTTAFold]:::predictor
        RPX[RaptorX]:::predictor
    end

    subgraph "Homology Search"
        FS[Foldseek]:::search
        GS[GESAMT]:::search
        RP[Results Processing]:::search
    end

    subgraph "Visualization"
        CX[ChimeraX Integration]:::vis
        RI[Results Inspector]:::vis
        VP[Visualization Preparation]:::vis
    end

    subgraph "Storage"
        DB[(RCSB PDB)]:::storage
        LDB[(Local DB)]:::storage
        TEMP[("Temporary Storage")]:::storage
    end

    subgraph "Pipeline Control"
        MAIN[Pipeline Entry]:::control
        SETUP[Setup]:::control
        DBC[DB Creation]:::control
        VISPIPE[Visualization Pipeline]:::control
    end

    %% Connections
    FASTA --> Split_FASTA
    Split_FASTA --> AF2
    Split_FASTA --> RTF
    Split_FASTA --> RPX
    Split_PDB --> FS
    Split_PDB --> GS

    AF2 & RTF & RPX --> FS
    AF2 & RTF & RPX --> GS
    
    FS --> RP
    GS --> RP
    
    RP --> CX
    RP --> RI
    RP --> VP

    DB --> FS
    DB --> GS
    LDB --> FS
    LDB --> GS

    %% Click events
    click Split_FASTA "https://github.com/PombertLab/3DFI/blob/master/Misc_tools/split_Fasta.pl"
    click Split_PDB "https://github.com/PombertLab/3DFI/blob/master/Misc_tools/split_PDB.pl"
    click AF2 "https://github.com/PombertLab/3DFI/blob/master/Prediction/AlphaFold2/alphafold.pl"
    click RTF "https://github.com/PombertLab/3DFI/blob/master/Prediction/RoseTTAFold/rosettafold.pl"
    click RPX "https://github.com/PombertLab/3DFI/blob/master/Prediction/RaptorX/raptorx.pl"
    click FS "https://github.com/PombertLab/3DFI/blob/master/Homology_search/run_foldseek.pl"
    click GS "https://github.com/PombertLab/3DFI/blob/master/Homology_search/run_GESAMT.pl"
    click RP "https://github.com/PombertLab/3DFI/blob/master/Homology_search/descriptive_matches.pl"
    click CX "https://github.com/PombertLab/3DFI/blob/master/Visualization/Helper_Scripts/chimerax_session_creator.py"
    click RI "https://github.com/PombertLab/3DFI/blob/master/Visualization/inspect_3D_structures.pl"
    click VP "https://github.com/PombertLab/3DFI/blob/master/Visualization/prepare_visualizations.pl"
    click MAIN "https://github.com/PombertLab/3DFI/blob/master/run_3DFI.pl"
    click SETUP "https://github.com/PombertLab/3DFI/blob/master/setup_3DFI.pl"
    click DBC "https://github.com/PombertLab/3DFI/blob/master/create_3DFI_db.pl"
    click VISPIPE "https://github.com/PombertLab/3DFI/blob/master/run_visualizations.pl"

    %% Styling
    classDef input fill:#87CEEB
    classDef predictor fill:#90EE90
    classDef search fill:#FFD700
    classDef vis fill:#DDA0DD
    classDef storage fill:#B8860B
    classDef control fill:#FF6347

    %% Legend
    subgraph Legend
        L1[Input Processing]:::input
        L2[Structure Prediction]:::predictor
        L3[Homology Search]:::search
        L4[Visualization]:::vis
        L5[(Storage)]:::storage
        L6[Pipeline Control]:::control
    end
```
