Overview
QM9-GPT is a transformer-based platform for inverse molecular design. Instead of the traditional forward problem (structure → property), it solves the inverse: given a desired molecular property, generate a valid chemical structure.
Trained on the QM9 dataset — 134k organic molecules with computed quantum-chemical properties.
Architecture
- Backbone: GPT-style autoregressive transformer
- Tokenisation: SMILES string character-level tokenisation
- Conditioning: Target property value fed as a continuous prefix token
- Properties: U₀, HOMO, LUMO, gap, dipole moment, polarisability
Key Results
| Property | MAE (test) |
|---|---|
| HOMO | 0.041 eV |
| LUMO | 0.038 eV |
| Gap | 0.052 eV |
Generated molecules pass RDKit validity check at ~87% rate.
Usage
from qm9_gpt import generate
smiles = generate(target_homo=-6.2, target_lumo=-1.8)
print(smiles) # e.g. "CC1=CC=CC=C1N"
References
- Ramakrishnan et al., Scientific Data 2014 (QM9 dataset)
- Radford et al., GPT — language model backbone inspiration