Official implementation for "[Bridging the Gap between Learning and Inference for Diffusion-Based Molecule Generation]".
To create the virtual environment, use the following command.
conda env create -f gapdiff.yml
Or do it step by step following the modified guidance in TargetDiff Installation
Python<3.10 is a must for Vina's compatibility.
The data preparation follows TargetDiff. For more details, please refer to the repository of TargetDiff.
We use pipeline.py
to wrap the whole pipeline of training, sampling, and evaluation for both projects.
python -m pipeline <configs> <sampling_results> [train|sample|eval] [-c resume_from_checkpoint_for_training]
# python -m pipeline configs/training.yml sampling_results/reproduce # for whole pipeline
# python -m pipeline configs/sampling.yml sampling_results/reproduce sample # for pipeline starts from sampling
# python -m pipeline "no matter" sampling_results/reproduce eval # for pipeline for evaluation
Or you can manually run the script for each stage like TargetDiff or BindDM.
We remove the
{train,sample,evaluate}.py
in BindDM because they are just the copies of the{train,sample,evaluate}_diffusion.py
inscripts
.
It is worth noting that we provide script for plotting and metrics calculation like High Affinity and Diversity which is just based on the metrics_-1.pt (meta file) generated by evaluation.
These meta files and checkpoints are coming soon after published.
@misc{liu2024gapdiff,
title={Bridging the Gap between Learning and Inference for Diffusion-Based Molecule Generation},
author={Peidong Liu and Wenbo Zhang and Xue Zhe and Jiancheng Lv and Xianggen Liu},
year={2024},
eprint={2411.05472},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2411.05472},
}