|
| 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 | + |
| 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 | + |
| 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 | + |
| 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 | |
0 commit comments