Highlight scaffold decoration and add five-metric evaluation tables
Browse filesAdd separate collapsible tables for all 10 unconditional checkpoints and GEOM scaffold decoration. Report only novelty, PoseBusters validity, diversity, uniqueness, and connected-sanitization validity as mean +/- sample SD across seeds 42, 43, and 44. Document sample counts, metric populations, and the distinct scaffold PoseBusters protocol.
README.md
CHANGED
|
@@ -3,6 +3,7 @@ library_name: pytorch
|
|
| 3 |
tags:
|
| 4 |
- chemistry
|
| 5 |
- molecular-generation
|
|
|
|
| 6 |
- flow-matching
|
| 7 |
- qm9
|
| 8 |
- geom-drugs
|
|
@@ -11,16 +12,18 @@ tags:
|
|
| 11 |
- arxiv:2606.07239
|
| 12 |
---
|
| 13 |
|
| 14 |
-
# Morph: 3D molecular generation
|
| 15 |
|
| 16 |
-
|
| 17 |
-
and **ChEMBL3D**,
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
| 20 |
|
| 21 |
See our [paper](https://arxiv.org/abs/2606.07239), *Generative Molecular Morphing for Flexible-Size Design via Unbalanced Optimal Transport*.
|
| 22 |
|
| 23 |
-
##
|
| 24 |
|
| 25 |
| Dataset | Model name | Hydrogen representation | Completed epochs | Files |
|
| 26 |
| --- | --- | --- | --- | --- |
|
|
@@ -35,14 +38,105 @@ Checkpoints are original training files containing current weights, EMA weights
|
|
| 35 |
and optimizer state.
|
| 36 |
|
| 37 |
The [catalog](https://huggingface.co/maltefranke/morph/blob/main/catalog.json)
|
| 38 |
-
is the source of truth for
|
| 39 |
immutable release revision so its weights and supporting files stay together.
|
| 40 |
New catalog entries are discovered without updating the Python package.
|
| 41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
## Install and authenticate
|
| 43 |
|
| 44 |
The runtime bundled with GEOM includes the shared inference interface and catalog
|
| 45 |
-
discovery for all models in the table. Install it in a Python environment:
|
| 46 |
|
| 47 |
```bash
|
| 48 |
python -m pip install 'huggingface_hub>=1.0,<2'
|
|
@@ -138,11 +232,11 @@ and `--offline`.
|
|
| 138 |
|
| 139 |
The root `sample.py` remains available as the archived ChEMBL3D sampling entry
|
| 140 |
point with its corresponding bundled runtimes. The shared interface above
|
| 141 |
-
supports all four published model variants.
|
| 142 |
|
| 143 |
## Reproducibility
|
| 144 |
|
| 145 |
-
Each model has a **training bundle** with its original training configuration,
|
| 146 |
launch settings, frozen source, dependency versions and data references.
|
| 147 |
The bundles live alongside the corresponding model files on Hugging Face:
|
| 148 |
|
|
@@ -184,8 +278,8 @@ started from scratch, validates every epoch and retains checkpoints every 25 epo
|
|
| 184 |
|
| 185 |
The GEOM-Drugs epoch 50 and 100 checkpoints come from the run resumed from the
|
| 186 |
best checkpoint after 48 completed epochs. The resumed run validates every epoch and retains
|
| 187 |
-
checkpoints every fifth epoch.
|
| 188 |
-
|
| 189 |
|
| 190 |
Explicit-H models generate H atoms as graph vertices. Every model uses its own
|
| 191 |
ordered vocabularies, distributions and saved configuration; keep those files
|
|
@@ -194,7 +288,7 @@ a hard atom-count limit during generation.
|
|
| 194 |
|
| 195 |
## Bundle contents and verification
|
| 196 |
|
| 197 |
-
Each model directory contains:
|
| 198 |
|
| 199 |
- `epoch_NNN.ckpt`: the published original training checkpoints.
|
| 200 |
- `config.yaml`: portable inference configuration with dataset loading disabled.
|
|
@@ -210,8 +304,9 @@ Each model directory contains:
|
|
| 210 |
portable training recipe; `training_bundle.json` records its checksum and provenance.
|
| 211 |
- `validation.json`: results of checkpoint loading and sampling checks.
|
| 212 |
|
| 213 |
-
The published bundles were checked for strict current/EMA weight loading
|
| 214 |
-
end-to-end sampling. These
|
|
|
|
| 215 |
The GEOM and QM9 releases also passed remote file-size and hash verification.
|
| 216 |
|
| 217 |
The [ChEMBL3D release manifest](https://huggingface.co/maltefranke/morph/blob/main/manifest.json)
|
|
|
|
| 3 |
tags:
|
| 4 |
- chemistry
|
| 5 |
- molecular-generation
|
| 6 |
+
- scaffold-decoration
|
| 7 |
- flow-matching
|
| 8 |
- qm9
|
| 9 |
- geom-drugs
|
|
|
|
| 12 |
- arxiv:2606.07239
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# Morph: 3D molecular generation and scaffold decoration
|
| 16 |
|
| 17 |
+
Checkpoints for **unconditional 3D molecular generation** on **QM9**,
|
| 18 |
+
**GEOM-Drugs** and **ChEMBL3D**, plus **GEOM-Drugs scaffold decoration** with
|
| 19 |
+
rank-16 LoRA after 25 fine-tuning epochs. The releases include the configurations,
|
| 20 |
+
vocabularies and training distributions needed for their inference workflows.
|
| 21 |
+
Unconditional generation requires no training dataset; scaffold decoration uses
|
| 22 |
+
a supplied scaffold and the dedicated [scaffold bundle](#scaffold-decoration).
|
| 23 |
|
| 24 |
See our [paper](https://arxiv.org/abs/2606.07239), *Generative Molecular Morphing for Flexible-Size Design via Unbalanced Optimal Transport*.
|
| 25 |
|
| 26 |
+
## Unconditional checkpoints
|
| 27 |
|
| 28 |
| Dataset | Model name | Hydrogen representation | Completed epochs | Files |
|
| 29 |
| --- | --- | --- | --- | --- |
|
|
|
|
| 38 |
and optimizer state.
|
| 39 |
|
| 40 |
The [catalog](https://huggingface.co/maltefranke/morph/blob/main/catalog.json)
|
| 41 |
+
is the source of truth for unconditional model names and epochs. Each entry pins an
|
| 42 |
immutable release revision so its weights and supporting files stay together.
|
| 43 |
New catalog entries are discovered without updating the Python package.
|
| 44 |
|
| 45 |
+
## Scaffold decoration
|
| 46 |
+
|
| 47 |
+
**GEOM-Drugs scaffold decoration is also available:** the
|
| 48 |
+
[`geom-scaffold-murcko-substituent-lora-r16` bundle](https://huggingface.co/maltefranke/morph/tree/main/geom/scaffold_murcko_substituent_lora_r16)
|
| 49 |
+
contains the checkpoint after **25 fine-tuning epochs**, initialized from the
|
| 50 |
+
GEOM explicit-H epoch-100 EMA weights. It uses **rank-16 LoRA**, trainable output
|
| 51 |
+
heads and substituent-constrained insertion supervision.
|
| 52 |
+
|
| 53 |
+
| Model | Hydrogen representation | Completed fine-tuning epochs | Checkpoint |
|
| 54 |
+
| --- | --- | ---: | --- |
|
| 55 |
+
| `geom-scaffold-murcko-substituent-lora-r16` | Explicit H atoms | 25 | [epoch_025.ckpt](https://huggingface.co/maltefranke/morph/resolve/main/geom/scaffold_murcko_substituent_lora_r16/epoch_025.ckpt) |
|
| 56 |
+
|
| 57 |
+
The model generates decorations conditioned on a Murcko scaffold. Scaffold atom
|
| 58 |
+
identities, internal bonds and charges are preserved; scaffold positions can move.
|
| 59 |
+
This conditional checkpoint requires the scaffold bundle's saved configuration and
|
| 60 |
+
runtime. It is loaded through that workflow, outside the unconditional `morph generate`
|
| 61 |
+
interface and catalog.
|
| 62 |
+
|
| 63 |
+
The bundle includes the original checkpoint, training configuration and source,
|
| 64 |
+
portable configuration, vocabularies, distributions, evaluation runtime and fixed
|
| 65 |
+
validation/test scaffold panels. See its [usage and reproduction instructions](https://huggingface.co/maltefranke/morph/blob/main/geom/scaffold_murcko_substituent_lora_r16/README.md).
|
| 66 |
+
|
| 67 |
+
## Evaluation results
|
| 68 |
+
|
| 69 |
+
Values are **mean ± sample standard deviation** across seeds **42, 43 and 44**
|
| 70 |
+
(`ddof=1`). Rates are percentages; diversity is on a 0–1 scale.
|
| 71 |
+
Both evaluations use EMA weights and 100 integration steps.
|
| 72 |
+
|
| 73 |
+
<details>
|
| 74 |
+
<summary><strong>Unconditional generation — all 10 checkpoints</strong></summary>
|
| 75 |
+
|
| 76 |
+
**10,000 generation attempts per seed and checkpoint** (30,000 per checkpoint).
|
| 77 |
+
PoseBusters uses the full offline `mol` checks, including flatness and internal energy,
|
| 78 |
+
on the generated structures.
|
| 79 |
+
|
| 80 |
+
| Model | Completed epochs | Novelty (%) | PoseBusters validity (%) | Diversity (0–1) | Uniqueness (%) | Connected-sanitization validity (%) |
|
| 81 |
+
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
|
| 82 |
+
| QM9 · explicit H | 1,000 | 24.99 ± 0.50 | 93.19 ± 0.30 | 0.8969 ± 0.0003 | 94.77 ± 0.19 | 98.99 ± 0.14 |
|
| 83 |
+
| QM9 · explicit H | 1,500 | 22.96 ± 0.23 | 93.53 ± 0.19 | 0.8966 ± 0.0001 | 94.91 ± 0.11 | 99.14 ± 0.08 |
|
| 84 |
+
| GEOM-Drugs · explicit H | 50 | 99.77 ± 0.02 | 88.21 ± 0.39 | 0.8855 ± 0.0004 | 100.00 ± 0.00 | 95.22 ± 0.35 |
|
| 85 |
+
| GEOM-Drugs · explicit H | 100 | 99.75 ± 0.07 | 88.30 ± 0.24 | 0.8848 ± 0.0001 | 100.00 ± 0.00 | 95.46 ± 0.31 |
|
| 86 |
+
| ChEMBL3D · explicit H | 200 | 99.69 ± 0.05 | 91.46 ± 0.24 | 0.8953 ± 0.0002 | 99.99 ± 0.02 | 95.80 ± 0.17 |
|
| 87 |
+
| ChEMBL3D · explicit H | 300 | 99.75 ± 0.05 | 91.38 ± 0.16 | 0.8956 ± 0.0005 | 100.00 ± 0.00 | 95.72 ± 0.15 |
|
| 88 |
+
| ChEMBL3D · explicit H | 400 | 99.73 ± 0.02 | 91.21 ± 0.37 | 0.8953 ± 0.0001 | 100.00 ± 0.00 | 95.41 ± 0.16 |
|
| 89 |
+
| ChEMBL3D · implicit H | 100 | 99.72 ± 0.04 | 94.61 ± 0.43 | 0.9141 ± 0.0002 | 100.00 ± 0.00 | 98.60 ± 0.08 |
|
| 90 |
+
| ChEMBL3D · implicit H | 200 | 99.64 ± 0.10 | 95.27 ± 0.16 | 0.9140 ± 0.0002 | 100.00 ± 0.01 | 98.87 ± 0.18 |
|
| 91 |
+
| ChEMBL3D · implicit H | 300 | 99.61 ± 0.04 | 95.32 ± 0.09 | 0.9142 ± 0.0001 | 100.00 ± 0.00 | 98.80 ± 0.07 |
|
| 92 |
+
|
| 93 |
+
Novelty is measured against each checkpoint's training split. Novelty and uniqueness
|
| 94 |
+
use canonical, H-stripped molecular identities with stereochemistry ignored.
|
| 95 |
+
|
| 96 |
+
</details>
|
| 97 |
+
|
| 98 |
+
<details>
|
| 99 |
+
<summary><strong>Scaffold decoration — GEOM-Drugs, 25 fine-tuning epochs</strong></summary>
|
| 100 |
+
|
| 101 |
+
**512 held-out test scaffolds × 8 generation attempts per scaffold per seed**
|
| 102 |
+
(4,096 per seed; 12,288 total), using the fixed released Murcko scaffold panel.
|
| 103 |
+
The generated coordinates are not relaxed.
|
| 104 |
+
|
| 105 |
+
| Model | Completed epochs | Novelty (%) | PoseBusters validity (%) | Diversity (0–1) | Uniqueness (%) | Connected-sanitization validity (%) |
|
| 106 |
+
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
|
| 107 |
+
| GEOM-Drugs · scaffold decoration (LoRA r16) | 25 (fine-tuning) | 97.52 ± 0.10 | 94.10 ± 0.19 | 0.9076 ± 0.0004 | 63.54 ± 0.59 | 97.99 ± 0.20 |
|
| 108 |
+
|
| 109 |
+
**PoseBusters protocol:** the native scaffold evaluation checks chemistry and distance
|
| 110 |
+
geometry, excluding the full offline energy and flatness checks. The value above is
|
| 111 |
+
`posebusters/validity`, the strict all-check pass rate for that configuration; it does
|
| 112 |
+
not apply the scaffold-aware inherited-clash exemption. It is therefore **not directly
|
| 113 |
+
comparable** to the full offline PoseBusters scores in the unconditional table.
|
| 114 |
+
Novelty, diversity and uniqueness describe the pooled generated molecules within each
|
| 115 |
+
seed, across all 512 scaffolds; uniqueness is not averaged per scaffold.
|
| 116 |
+
|
| 117 |
+
See the [scaffold bundle documentation](https://huggingface.co/maltefranke/morph/blob/main/geom/scaffold_murcko_substituent_lora_r16/README.md)
|
| 118 |
+
for the saved evaluation runtime and test panel.
|
| 119 |
+
|
| 120 |
+
</details>
|
| 121 |
+
|
| 122 |
+
Metric definitions:
|
| 123 |
+
|
| 124 |
+
- **Novelty:** fraction of generated, SMILES-convertible molecules absent from the
|
| 125 |
+
corresponding training reference, retaining duplicates in the denominator.
|
| 126 |
+
- **PoseBusters validity:** fraction of all generation attempts passing every enabled
|
| 127 |
+
PoseBusters check; missing checks and failed molecule conversions count as failures.
|
| 128 |
+
- **Diversity:** mean pairwise Tanimoto distance between ECFP6 fingerprints (radius 3,
|
| 129 |
+
2,048 bits), retaining duplicates among fingerprintable molecules.
|
| 130 |
+
- **Uniqueness:** distinct canonical molecular identities divided by all
|
| 131 |
+
SMILES-convertible molecules within a seed.
|
| 132 |
+
- **Connected-sanitization validity:** fraction of all attempts producing connected,
|
| 133 |
+
RDKit-sanitizable molecules, with no additional charge or radical restriction
|
| 134 |
+
(`connected-sanitization-validity`).
|
| 135 |
+
|
| 136 |
## Install and authenticate
|
| 137 |
|
| 138 |
The runtime bundled with GEOM includes the shared inference interface and catalog
|
| 139 |
+
discovery for all models in the unconditional checkpoint table. Install it in a Python environment:
|
| 140 |
|
| 141 |
```bash
|
| 142 |
python -m pip install 'huggingface_hub>=1.0,<2'
|
|
|
|
| 232 |
|
| 233 |
The root `sample.py` remains available as the archived ChEMBL3D sampling entry
|
| 234 |
point with its corresponding bundled runtimes. The shared interface above
|
| 235 |
+
supports all four published unconditional model variants.
|
| 236 |
|
| 237 |
## Reproducibility
|
| 238 |
|
| 239 |
+
Each unconditional model has a **training bundle** with its original training configuration,
|
| 240 |
launch settings, frozen source, dependency versions and data references.
|
| 241 |
The bundles live alongside the corresponding model files on Hugging Face:
|
| 242 |
|
|
|
|
| 278 |
|
| 279 |
The GEOM-Drugs epoch 50 and 100 checkpoints come from the run resumed from the
|
| 280 |
best checkpoint after 48 completed epochs. The resumed run validates every epoch and retains
|
| 281 |
+
checkpoints every fifth epoch. The published unconditional epochs are listed in the catalog. The scaffold-decoration
|
| 282 |
+
checkpoint adds 25 fine-tuning epochs on top of the epoch-100 model.
|
| 283 |
|
| 284 |
Explicit-H models generate H atoms as graph vertices. Every model uses its own
|
| 285 |
ordered vocabularies, distributions and saved configuration; keep those files
|
|
|
|
| 288 |
|
| 289 |
## Bundle contents and verification
|
| 290 |
|
| 291 |
+
Each unconditional model directory contains:
|
| 292 |
|
| 293 |
- `epoch_NNN.ckpt`: the published original training checkpoints.
|
| 294 |
- `config.yaml`: portable inference configuration with dataset loading disabled.
|
|
|
|
| 304 |
portable training recipe; `training_bundle.json` records its checksum and provenance.
|
| 305 |
- `validation.json`: results of checkpoint loading and sampling checks.
|
| 306 |
|
| 307 |
+
The published unconditional bundles were checked for strict current/EMA weight loading
|
| 308 |
+
and end-to-end sampling. These functionality checks are separate from the
|
| 309 |
+
[generation benchmarks above](#evaluation-results).
|
| 310 |
The GEOM and QM9 releases also passed remote file-size and hash verification.
|
| 311 |
|
| 312 |
The [ChEMBL3D release manifest](https://huggingface.co/maltefranke/morph/blob/main/manifest.json)
|