This is the repository for the paper: Using GNN property predictors as molecule generators.
You can use DIDgen (Direct Inverse Design generator) to generate diverse molecules with a specific property by inverting a GNN that predicts that property.
pip install git+https://github.com/ftherrien/inv-design
If you have trouble using or installing DIDgen please create an issue or ask a question. I will be happy to help!
didgenerate [-h] [-n N] [-c CONFIG] [-o OUTDIR]
The results are organized in OUTDIR
as such
OUTDIR
├── drawings
│ └── generated_mol_0.png # An image(s) of the generated graph(s)
├── final_performance_data.pkl
├── final_performance.png
├── initial_mol.png
├── model_weights.pth
├── property_value_list.txt # A list of smiles strings and corresponding predicted property
├── qm9/
└── xyzs/
├── generated_mol_0.pickle # A RDKit mol object
└── generated_mol_0.xyz # A molecular conformer with 3D positions
from didgen import generate
out = generate(number_of_samples, outdir, config_dict)
This creates the same output directory as the cli. out
is a list of python dictionaries containing the generated graphs, their corresponding smiles and the predicted property.
You can find a list of parameters and their description in the documentation.
@misc{therrien2024using,
title={Using GNN property predictors as molecule generators},
author={Félix Therrien and Edward H. Sargent and Oleksandr Voznyy},
year={2024},
eprint={2406.03278},
archivePrefix={arXiv},
primaryClass={cs.LG}
}