# irfanhaider71/graph-stack architecture

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

- Interactive diagram: https://gitdiagram.com/irfanhaider71/graph-stack
- Repository: https://github.com/irfanhaider71/graph-stack

## Overview

Graph-Stack is a research workflow for predicting physicochemical properties of oncology-relevant compounds from molecular representations. Compound SMILES and property measurements form the input data; degree-based indices are either computed analytically or estimated from molecular descriptors, then used for property prediction. Similarity-based analog groups support grouped validation, while direct descriptor, fingerprint, and neural models provide comparisons. The README also documents Y-scrambling and applicability-domain analysis. The graph combines README-level capabilities with sampled source; unsampled subsystem wiring is shown only where explicitly documented.

Main entry points: [`data/dataset smiles.py`](https://github.com/irfanhaider71/graph-stack/blob/main/data/dataset%20smiles.py) (Compound SMILES), [`results`](https://github.com/irfanhaider71/graph-stack/tree/main/results) (Prediction and metrics), [`code/compute_analytical_indices.py`](https://github.com/irfanhaider71/graph-stack/blob/main/code/compute_analytical_indices.py) (Analytical indices), [`code/stacking_property_prediction_analytical_indices.py`](https://github.com/irfanhaider71/graph-stack/blob/main/code/stacking_property_prediction_analytical_indices.py) (Analytical-index prediction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Compound data"]
  node_smiles["Compound SMILES<br/>[dataset smiles.py]"]
  node_properties["Property data"]
  node_analogs["Analog groups<br/>[AnalogGroup.py]"]
end

subgraph group_indices["Index generation"]
  node_analytical["Analytical indices"]
  node_estimated["Estimated indices"]
  node_estimate_model["Index surrogate models"]
end

subgraph group_prediction["Prediction and validation"]
  node_analytical_predict["Analytical-index prediction"]
  node_estimated_predict["Estimated-index prediction"]
  node_group_validation["Grouped validation"]
end

subgraph group_analysis["Comparisons and analysis"]
  node_baseline_classical["Classical baselines"]
  node_baseline_direct["RDKit and Morgan baselines"]
  node_baseline_gin["GIN baseline"]
  node_baseline_cnn["SMILES-CNN baseline"]
  node_baseline_mlp["Descriptor MLP baseline"]
  node_similarity["Similarity analysis"]
  node_correlation["Index correlations"]
  node_robustness["Robustness analyses"]
  node_results["Prediction and metrics"]
end

node_researcher(("Researcher"))

node_researcher -->|"provides"| node_smiles
node_researcher -->|"provides"| node_properties
node_smiles -->|"describes molecules"| node_analytical
node_smiles -->|"descriptor input"| node_estimate_model
node_estimate_model -->|"predicts indices"| node_estimated
node_smiles -->|"fingerprint input"| node_analogs
node_analytical -->|"index features"| node_analytical_predict
node_estimated -->|"index features"| node_estimated_predict
node_properties -->|"target values"| node_analytical_predict
node_properties -->|"target values"| node_estimated_predict
node_analogs -->|"group labels"| node_group_validation
node_group_validation -->|"validates"| node_analytical_predict
node_group_validation -->|"validates"| node_estimated_predict
node_analytical -->|"index features"| node_baseline_classical
node_estimated -->|"index features"| node_baseline_classical
node_smiles -->|"molecular input"| node_baseline_direct
node_smiles -->|"graph input"| node_baseline_gin
node_smiles -->|"sequence input"| node_baseline_cnn
node_smiles -->|"descriptor input"| node_baseline_mlp
node_smiles -->|"similarity input"| node_similarity
node_analytical -->|"index values"| node_correlation
node_analytical_predict -->|"writes predictions"| node_results
node_estimated_predict -->|"writes predictions"| node_results
node_baseline_classical -->|"writes metrics"| node_results
node_baseline_direct -->|"writes metrics"| node_results
node_baseline_gin -->|"writes metrics"| node_results
node_baseline_cnn -->|"writes metrics"| node_results
node_baseline_mlp -->|"writes metrics"| node_results
node_similarity -.->|"informs grouping"| node_analogs
node_researcher -->|"requests analysis"| node_robustness
node_robustness -->|"records outputs"| node_results

click node_smiles "https://github.com/irfanhaider71/graph-stack/blob/main/data/dataset%20smiles.py"
click node_properties "https://github.com/irfanhaider71/graph-stack/blob/main/data/build_physicochemical_properties_csv.py"
click node_analogs "https://github.com/irfanhaider71/graph-stack/blob/main/data/AnalogGroup.py"
click node_analytical "https://github.com/irfanhaider71/graph-stack/blob/main/code/compute_analytical_indices.py"
click node_estimated "https://github.com/irfanhaider71/graph-stack/blob/main/code/compute_extimated_indices.py"
click node_estimate_model "https://github.com/irfanhaider71/graph-stack/blob/main/code/compute_extimated_indices.py"
click node_analytical_predict "https://github.com/irfanhaider71/graph-stack/blob/main/code/stacking_property_prediction_analytical_indices.py"
click node_estimated_predict "https://github.com/irfanhaider71/graph-stack/blob/main/code/stacking_property_prediction_estimated_indices.py"
click node_group_validation "https://github.com/irfanhaider71/graph-stack/blob/main/code/stacking_property_prediction_analytical_indices.py"
click node_baseline_classical "https://github.com/irfanhaider71/graph-stack/blob/main/code/classical_baselines_analytical_indices.py"
click node_baseline_direct "https://github.com/irfanhaider71/graph-stack/blob/main/code/direct_rdkit_morgan_baselines.py"
click node_baseline_gin "https://github.com/irfanhaider71/graph-stack/blob/main/code/Graph%20Isomorphism%20Network%20(GIN)%20baseline.py"
click node_baseline_cnn "https://github.com/irfanhaider71/graph-stack/blob/main/code/SMILES-CNN%20baseline.py"
click node_baseline_mlp "https://github.com/irfanhaider71/graph-stack/blob/main/code/Descriptor-based%20MLP%20baseline.py"
click node_similarity "https://github.com/irfanhaider71/graph-stack/blob/main/code/similarity_grouping_dendrogram_threshold_analysis.py"
click node_correlation "https://github.com/irfanhaider71/graph-stack/blob/main/code/correlation%20coefficients%20using%20analytical%20.py"
click node_robustness "https://github.com/irfanhaider71/graph-stack/tree/main/code"
click node_results "https://github.com/irfanhaider71/graph-stack/tree/main/results"

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_smiles,node_properties,node_analogs toneBlue
class node_analytical,node_estimated,node_estimate_model toneAmber
class node_analytical_predict,node_estimated_predict,node_group_validation toneMint
class node_baseline_classical,node_baseline_direct,node_baseline_gin,node_baseline_cnn,node_baseline_mlp,node_similarity,node_correlation,node_robustness,node_results toneRose
class node_researcher toneIndigo
```

## Components

### Compound data

- [Compound SMILES](https://github.com/irfanhaider71/graph-stack/blob/main/data/dataset%20smiles.py): `data/dataset smiles.py`
- [Property data](https://github.com/irfanhaider71/graph-stack/blob/main/data/build_physicochemical_properties_csv.py): `data/build_physicochemical_properties_csv.py`
- [Analog groups](https://github.com/irfanhaider71/graph-stack/blob/main/data/AnalogGroup.py): `data/AnalogGroup.py`

### Index generation

- [Analytical indices](https://github.com/irfanhaider71/graph-stack/blob/main/code/compute_analytical_indices.py): `code/compute_analytical_indices.py`
- [Estimated indices](https://github.com/irfanhaider71/graph-stack/blob/main/code/compute_extimated_indices.py): `code/compute_extimated_indices.py`
- [Index surrogate models](https://github.com/irfanhaider71/graph-stack/blob/main/code/compute_extimated_indices.py): `code/compute_extimated_indices.py`

### Prediction and validation

- [Analytical-index prediction](https://github.com/irfanhaider71/graph-stack/blob/main/code/stacking_property_prediction_analytical_indices.py): `code/stacking_property_prediction_analytical_indices.py`
- [Estimated-index prediction](https://github.com/irfanhaider71/graph-stack/blob/main/code/stacking_property_prediction_estimated_indices.py): `code/stacking_property_prediction_estimated_indices.py`
- [Grouped validation](https://github.com/irfanhaider71/graph-stack/blob/main/code/stacking_property_prediction_analytical_indices.py): `code/stacking_property_prediction_analytical_indices.py`

### Comparisons and analysis

- [Classical baselines](https://github.com/irfanhaider71/graph-stack/blob/main/code/classical_baselines_analytical_indices.py): `code/classical_baselines_analytical_indices.py`
- [RDKit and Morgan baselines](https://github.com/irfanhaider71/graph-stack/blob/main/code/direct_rdkit_morgan_baselines.py): `code/direct_rdkit_morgan_baselines.py`
- [GIN baseline](https://github.com/irfanhaider71/graph-stack/blob/main/code/Graph%20Isomorphism%20Network%20(GIN)%20baseline.py): `code/Graph Isomorphism Network (GIN) baseline.py`
- [SMILES-CNN baseline](https://github.com/irfanhaider71/graph-stack/blob/main/code/SMILES-CNN%20baseline.py): `code/SMILES-CNN baseline.py`
- [Descriptor MLP baseline](https://github.com/irfanhaider71/graph-stack/blob/main/code/Descriptor-based%20MLP%20baseline.py): `code/Descriptor-based MLP baseline.py`
- [Similarity analysis](https://github.com/irfanhaider71/graph-stack/blob/main/code/similarity_grouping_dendrogram_threshold_analysis.py): `code/similarity_grouping_dendrogram_threshold_analysis.py`
- [Index correlations](https://github.com/irfanhaider71/graph-stack/blob/main/code/correlation%20coefficients%20using%20analytical%20.py): `code/correlation coefficients using analytical .py`
- [Robustness analyses](https://github.com/irfanhaider71/graph-stack/tree/main/code): `code`
- [Prediction and metrics](https://github.com/irfanhaider71/graph-stack/tree/main/results): `results`

### Other components

- **Researcher**

## Connections

- Researcher → Compound SMILES: provides
- Researcher → Property data: provides
- Compound SMILES → Analytical indices: describes molecules
- Compound SMILES → Index surrogate models: descriptor input
- Index surrogate models → Estimated indices: predicts indices
- Compound SMILES → Analog groups: fingerprint input
- Analytical indices → Analytical-index prediction: index features
- Estimated indices → Estimated-index prediction: index features
- Property data → Analytical-index prediction: target values
- Property data → Estimated-index prediction: target values
- Analog groups → Grouped validation: group labels
- Grouped validation → Analytical-index prediction: validates
- Grouped validation → Estimated-index prediction: validates
- Analytical indices → Classical baselines: index features
- Estimated indices → Classical baselines: index features
- Compound SMILES → RDKit and Morgan baselines: molecular input
- Compound SMILES → GIN baseline: graph input
- Compound SMILES → SMILES-CNN baseline: sequence input
- Compound SMILES → Descriptor MLP baseline: descriptor input
- Compound SMILES → Similarity analysis: similarity input
- Analytical indices → Index correlations: index values
- Analytical-index prediction → Prediction and metrics: writes predictions
- Estimated-index prediction → Prediction and metrics: writes predictions
- Classical baselines → Prediction and metrics: writes metrics
- RDKit and Morgan baselines → Prediction and metrics: writes metrics
- GIN baseline → Prediction and metrics: writes metrics
- SMILES-CNN baseline → Prediction and metrics: writes metrics
- Descriptor MLP baseline → Prediction and metrics: writes metrics
- Similarity analysis → Analog groups: informs grouping
- Researcher → Robustness analyses: requests analysis
- Robustness analyses → Prediction and metrics: records outputs
