Skip to content

Commit 299edac

Browse files
committed
Rename plots/ to analysis/ and add README with embedded figures
- Rename directory from plots/ to analysis/ - Add README.md with inline PNG figures and narrative text - Update cache paths in comparison_workflow - Remove stale file references from model_benchmarks/README.md
1 parent b41713b commit 299edac

17 files changed

Lines changed: 70 additions & 20100 deletions

analysis/README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Analysis
2+
3+
Scripts and data for visualising the deltahf training set and comparing predicted heats of formation across chemical domains.
4+
5+
---
6+
7+
## Training Data Distribution
8+
9+
**Script:** `plot_training_data.py`
10+
11+
```bash
12+
python plot_training_data.py
13+
```
14+
15+
The training data (`deltahf/data/training_data.csv`) contains 313 molecules split into energetic (n=45) and non-energetic (n=268) categories. The histograms below show absolute ΔHf°, ΔHf° per heavy atom, and ΔHf° per atom (including H). The energetic molecules are notably shifted toward positive ΔHf° values, and the per-atom normalisation reveals a clearer separation between the two groups.
16+
17+
![Training data ΔHf° distributions](training_data_histogram.png)
18+
19+
---
20+
21+
## ZINC vs Cawkwell Comparison
22+
23+
**Script:** `plot_zinc_vs_cawkwell.py`
24+
25+
This script compares predicted ΔHf° distributions for two molecule sets:
26+
27+
- **Cawkwell training set** (531 molecules) — the full deltahf training data
28+
- **ZINC drug-like sample** (1,000 molecules) — randomly sampled from the ZINC 250k drug-like dataset, filtered to supported elements and neutralised
29+
30+
The comparison assesses whether the training set covers the chemical space of typical drug-like molecules and how the predicted ΔHf° distributions differ.
31+
32+
### Usage
33+
34+
```bash
35+
# Full pipeline: prepare inputs, run predictions, plot
36+
python plot_zinc_vs_cawkwell.py
37+
38+
# Plot only (if predictions already exist)
39+
python plot_zinc_vs_cawkwell.py --plot-only
40+
```
41+
42+
By default the script uses gXTB + `bondorder_ext`. The `comparison_workflow` file contains commands for running the xTB variant separately.
43+
44+
### gXTB predictions
45+
46+
Using gXTB + `bondorder_ext`, the ZINC drug-like molecules tend toward more negative predicted ΔHf° than the training set. When normalised per heavy atom, the distributions overlap more substantially, suggesting the atom equivalent model can extrapolate reasonably to drug-like chemical space.
47+
48+
![gXTB: ZINC vs Cawkwell ΔHf° distributions](zinc_vs_cawkwell_gxtb_histogram.png)
49+
50+
### xTB predictions
51+
52+
The same comparison using xTB + `bondorder_ext` shows a similar pattern. The distributions are broader due to the lower accuracy of xTB energies, but the relative shift between training set and drug-like molecules is consistent.
53+
54+
![xTB: ZINC vs Cawkwell ΔHf° distributions](zinc_vs_cawkwell_xtb_histogram.png)
55+
56+
---
57+
58+
## Data Files
59+
60+
| File | Description |
61+
|------|-------------|
62+
| `250k_rndm_zinc_drugs_clean_3.csv` | ZINC 250k drug-like dataset (source data) |
63+
| `zinc_sample_1000.csv` | 1,000-molecule random sample (neutralised, supported elements only) |
64+
| `cawkwell_input.csv` | Cawkwell training set formatted for prediction |
65+
| `cawkwell_gxtb_predictions.csv` | gXTB + bondorder_ext predictions for Cawkwell set |
66+
| `zinc_gxtb_predictions.csv` | gXTB + bondorder_ext predictions for ZINC sample |
67+
| `comparison_workflow` | Shell commands for the xTB comparison workflow |
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ conda activate deltahf
33
python -m deltahf predict \
44
-i cawkwell_input.csv \
55
--model bondorder_ext \
6-
--cache-dir plots/.cache_zinc_cawkwell/cawkwell \
6+
--cache-dir analysis/.cache_zinc_cawkwell/cawkwell \
77
-o cawkwell_xtb_predictions.csv
88

99
python -m deltahf predict \
1010
-i zinc_sample_1000.csv \
1111
--model bondorder_ext \
12-
--cache-dir plots/.cache_zinc_cawkwell/zinc \
12+
--cache-dir analysis/.cache_zinc_cawkwell/zinc \
1313
-o zinc_xtb_predictions.csv
1414

1515
python plot_zinc_vs_cawkwell.py --plot-only

0 commit comments

Comments
 (0)