This repository is the implementation of Latent TargetDiff, for my CPSC 483 final project. The final paper can be found here.
This repository is based off of the following two repositories:
https://github.com/guanjq/targetdiff
https://github.com/MinkaiXu/GeoLDM
To run the notebook, download all baselines from the folder linked below (in "sampling_results").
Files to download are located here.
The code has been tested in the following environment:
Create Mamba environment
mamba env create -f environment.yaml
conda activate latenttargetdiff # note: one still needs to use `conda` to (de)activate environments
The data used for training / evaluating the model are organized in the data Google Drive folder.
To train the model from scratch, you need to download the preprocessed lmdb file and split file:
crossdocked_v1.1_rmsd1.0_pocket10_processed_final.lmdb
crossdocked_pocket10_pose_split.pt
To evaluate the model on the test set, you need to download and unzip the test_set.zip
. It includes the original PDB files that will be used in Vina Docking.
python scripts/train_diffusion.py configs/training.yml
python scripts/sample_diffusion.py configs/sampling.yml --data_id {i} # Replace {i} with the index of the data. i should be between 0 and 99 for the testset.
python scripts/evaluate_diffusion.py {OUTPUT_DIR} --docking_mode vina_score --protein_root data/test_set
The docking mode can be chosen from {qvina, vina_score, vina_dock, none}
Note: It will take some time to prepare pqdqt and pqr files when you run the evaluation code with vina_score/vina_dock docking mode for the first time.