← back to projects
PyTorchTransformersMaterials ScienceInverse Design

QM9-GPT

Deep learning platform for inverse molecular design — start with a desired property, generate the chemical structure that satisfies it.

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

PropertyMAE (test)
HOMO0.041 eV
LUMO0.038 eV
Gap0.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