# tiwarylab/alphafold2rave architecture

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

- Interactive diagram: https://gitdiagram.com/tiwarylab/alphafold2rave
- Repository: https://github.com/tiwarylab/alphafold2rave

## Overview

AlphaFold2-RAVE is a protein-ensemble workflow: it uses reduced-MSA AlphaFold2 predictions to generate structural diversity, learns collective variables with SPIB, then applies metadynamics to sample conformations and obtain Boltzmann-ranked results. The notebooks are documented as the workflow entry points; `ravefuncs.py` supplies clustering and OpenMM/PLUMED simulation helpers, while the lite module supports the no-simulation overview. Notebook internals were not sampled, so notebook-stage links reflect README documentation rather than inspected calls.

Main entry points: [`fullrunthrough_CSP.ipynb`](https://github.com/tiwarylab/alphafold2rave/blob/main/fullrunthrough_CSP.ipynb) (CSP run-through), [`rMSA_AF2_no_templates_no_relax.ipynb`](https://github.com/tiwarylab/alphafold2rave/blob/main/rMSA_AF2_no_templates_no_relax.ipynb) (Reduced-MSA AF2), [`CSP_data/structures.zip`](https://github.com/tiwarylab/alphafold2rave/blob/main/CSP_data/structures.zip) (Diverse structures), [`ravefuncs.py`](https://github.com/tiwarylab/alphafold2rave/blob/main/ravefuncs.py) (Unbiased MD)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prediction["Structure prediction"]
  node_rmsa["Reduced-MSA AF2"]
  node_colabfold["ColabFold AF2"]
  node_structures["Diverse structures<br/>[structures.zip]"]
end

subgraph group_learning["CV learning"]
  node_clustering["Regular-space clustering<br/>[ravefuncs.py]"]
  node_spib["SPIB CV learning"]
  node_spib_config["SPIB configuration<br/>[sample_config.ini]"]
  node_cv["Learned collective variables<br/>[COLVARS_AF2.dat]"]
end

subgraph group_sampling["Enhanced sampling"]
  node_plumed_gen["Bias input generation<br/>[ravefuncs.py]"]
  node_pdb_fix["PDB repair<br/>[ravefuncs.py]"]
  node_unbiased["Unbiased MD<br/>[ravefuncs.py]"]
  node_biased["Metadynamics MD<br/>[ravefuncs.py]"]
  node_openmm["OpenMM and PLUMED"]
  node_plumed_data["PLUMED inputs<br/>[plumed_AF2.dat]"]
end

subgraph group_results["Benchmark and results"]
  node_sampling_data["Sampling outputs"]
  node_workflow["CSP run-through"]
  node_lite["Light overview<br/>[ravefuncs_lite.py]"]
  node_benchmark[("CSP benchmark data")]
end

node_user(("Protein researcher"))

node_user -->|"provides sequence"| node_rmsa
node_rmsa -->|"modifies workflow"| node_colabfold
node_rmsa -.->|"generates structures"| node_structures
node_user -->|"runs protocol"| node_workflow
node_structures -->|"learns CVs from"| node_spib
node_spib_config -.->|"configures"| node_spib
node_spib -->|"produces CVs"| node_cv
node_structures -.->|"selects centers"| node_clustering
node_workflow -->|"prepares bias"| node_plumed_gen
node_cv -->|"defines bias coordinates"| node_plumed_gen
node_plumed_gen -->|"writes bias input"| node_plumed_data
node_workflow -->|"runs MD"| node_unbiased
node_unbiased -->|"repairs structure"| node_pdb_fix
node_unbiased -->|"simulates with"| node_openmm
node_workflow -->|"runs metadynamics"| node_biased
node_biased -->|"simulates with"| node_openmm
node_biased -.->|"writes structures"| node_sampling_data
node_sampling_data -->|"ranks conformations"| node_workflow
node_user -->|"views overview"| node_lite
node_benchmark -->|"supports demo"| node_workflow

click node_rmsa "https://github.com/tiwarylab/alphafold2rave/blob/main/rMSA_AF2_no_templates_no_relax.ipynb"
click node_structures "https://github.com/tiwarylab/alphafold2rave/blob/main/CSP_data/structures.zip"
click node_clustering "https://github.com/tiwarylab/alphafold2rave/blob/main/ravefuncs.py"
click node_spib "https://github.com/tiwarylab/alphafold2rave/blob/main/fullrunthrough_CSP.ipynb"
click node_spib_config "https://github.com/tiwarylab/alphafold2rave/blob/main/sample_config.ini"
click node_cv "https://github.com/tiwarylab/alphafold2rave/blob/main/CSP_data/COLVARS_AF2.dat"
click node_plumed_gen "https://github.com/tiwarylab/alphafold2rave/blob/main/ravefuncs.py"
click node_pdb_fix "https://github.com/tiwarylab/alphafold2rave/blob/main/ravefuncs.py"
click node_unbiased "https://github.com/tiwarylab/alphafold2rave/blob/main/ravefuncs.py"
click node_biased "https://github.com/tiwarylab/alphafold2rave/blob/main/ravefuncs.py"
click node_plumed_data "https://github.com/tiwarylab/alphafold2rave/blob/main/CSP_data/plumed_AF2.dat"
click node_sampling_data "https://github.com/tiwarylab/alphafold2rave/tree/main/CSP_data/example_result"
click node_workflow "https://github.com/tiwarylab/alphafold2rave/blob/main/fullrunthrough_CSP.ipynb"
click node_lite "https://github.com/tiwarylab/alphafold2rave/blob/main/ravefuncs_lite.py"
click node_benchmark "https://github.com/tiwarylab/alphafold2rave/tree/main/CSP_data"

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_rmsa,node_colabfold,node_structures toneBlue
class node_clustering,node_spib,node_spib_config,node_cv toneAmber
class node_plumed_gen,node_pdb_fix,node_unbiased,node_biased,node_openmm,node_plumed_data toneMint
class node_sampling_data,node_workflow,node_lite,node_benchmark toneRose
class node_user toneIndigo
```

## Components

### Structure prediction

- [Reduced-MSA AF2](https://github.com/tiwarylab/alphafold2rave/blob/main/rMSA_AF2_no_templates_no_relax.ipynb): `rMSA_AF2_no_templates_no_relax.ipynb`
- **ColabFold AF2**
- [Diverse structures](https://github.com/tiwarylab/alphafold2rave/blob/main/CSP_data/structures.zip): `CSP_data/structures.zip`

### CV learning

- [Regular-space clustering](https://github.com/tiwarylab/alphafold2rave/blob/main/ravefuncs.py): `ravefuncs.py`
- [SPIB CV learning](https://github.com/tiwarylab/alphafold2rave/blob/main/fullrunthrough_CSP.ipynb): `fullrunthrough_CSP.ipynb`
- [SPIB configuration](https://github.com/tiwarylab/alphafold2rave/blob/main/sample_config.ini): `sample_config.ini`
- [Learned collective variables](https://github.com/tiwarylab/alphafold2rave/blob/main/CSP_data/COLVARS_AF2.dat): `CSP_data/COLVARS_AF2.dat`

### Enhanced sampling

- [Bias input generation](https://github.com/tiwarylab/alphafold2rave/blob/main/ravefuncs.py): `ravefuncs.py`
- [PDB repair](https://github.com/tiwarylab/alphafold2rave/blob/main/ravefuncs.py): `ravefuncs.py`
- [Unbiased MD](https://github.com/tiwarylab/alphafold2rave/blob/main/ravefuncs.py): `ravefuncs.py`
- [Metadynamics MD](https://github.com/tiwarylab/alphafold2rave/blob/main/ravefuncs.py): `ravefuncs.py`
- **OpenMM and PLUMED**
- [PLUMED inputs](https://github.com/tiwarylab/alphafold2rave/blob/main/CSP_data/plumed_AF2.dat): `CSP_data/plumed_AF2.dat`

### Benchmark and results

- [Sampling outputs](https://github.com/tiwarylab/alphafold2rave/tree/main/CSP_data/example_result): `CSP_data/example_result`
- [CSP run-through](https://github.com/tiwarylab/alphafold2rave/blob/main/fullrunthrough_CSP.ipynb): `fullrunthrough_CSP.ipynb`
- [Light overview](https://github.com/tiwarylab/alphafold2rave/blob/main/ravefuncs_lite.py): `ravefuncs_lite.py`
- [CSP benchmark data](https://github.com/tiwarylab/alphafold2rave/tree/main/CSP_data): `CSP_data`

### Other components

- **Protein researcher**

## Connections

- Protein researcher → Reduced-MSA AF2: provides sequence (evidence: `README.md`)
- Reduced-MSA AF2 → ColabFold AF2: modifies workflow (evidence: `README.md`)
- Reduced-MSA AF2 → Diverse structures: generates structures
- Protein researcher → CSP run-through: runs protocol (evidence: `README.md`)
- Diverse structures → SPIB CV learning: learns CVs from (evidence: `README.md`)
- SPIB configuration → SPIB CV learning: configures
- SPIB CV learning → Learned collective variables: produces CVs (evidence: `README.md`)
- Diverse structures → Regular-space clustering: selects centers
- CSP run-through → Bias input generation: prepares bias (evidence: `README.md`)
- Learned collective variables → Bias input generation: defines bias coordinates (evidence: `README.md`)
- Bias input generation → PLUMED inputs: writes bias input (evidence: `ravefuncs.py`)
- CSP run-through → Unbiased MD: runs MD (evidence: `README.md`)
- Unbiased MD → PDB repair: repairs structure (evidence: `ravefuncs.py`)
- Unbiased MD → OpenMM and PLUMED: simulates with (evidence: `ravefuncs.py`)
- CSP run-through → Metadynamics MD: runs metadynamics (evidence: `README.md`)
- Metadynamics MD → OpenMM and PLUMED: simulates with (evidence: `ravefuncs.py`)
- Metadynamics MD → Sampling outputs: writes structures
- Sampling outputs → CSP run-through: ranks conformations (evidence: `README.md`)
- Protein researcher → Light overview: views overview (evidence: `README.md`)
- CSP benchmark data → CSP run-through: supports demo (evidence: `README.md`)
