Skip to content

decisionintelligence/SculptDrug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧬 SculptDrug: A Spatial Condition-Aware Bayesian Flow Model for Structure-based Drug Design

SculptDrug is a novel spatial condition-aware generative model designed for structure-based drug design (SBDD). It leverages a Bayesian Flow Network (BFN) to integrate hierarchical structural information and spatial protein constraints, enabling the generation of high-affinity, geometry-consistent ligands.


πŸ–ΌοΈ Framework Overview

Model Framework


Code Availability

The implementation is under active reorganization.
We plan to release the full codebase shortly to support reproducibility and future research. For evaluation, we provide generated results in the meantime.

πŸš€ Getting Started

πŸ”¨ Clone the Repository

git clone https://github.com/decisionintelligence/SculptDrug.git
cd SculptDrug

Environment Setup

The following are the key dependencies required to run SculptDrug.

Library Version
Python 3.9.17
PyTorch 2.1.0+cu118
PyTorch Geometric 2.3.1
RDKit 2023.9.5
PyTorch Lightning 2.3.0

πŸ“ Dataset

1. CrossDocked Dataset

Download the processed CrossDocked dataset and split files from Google Drive, originally provided by TargetDiff.

Place the following files under the data/ directory:

  • crossdocked_v1.1_rmsd1.0_pocket10_processed_final.lmdb
  • crossdocked_pocket10_pose_split.pt

2. Protein Surface Extraction

To extract protein surface accessibility points:

conda create -n pymesh python=3.9.10
conda activate pymesh
conda install -c conda-forge/label/cf202003 pymesh2

# Run surface extraction
python ./profiles_extract/surface_extract_fast.py /path/to/crossdocked_v1.1_rmsd1.0_pocket10

The fully preprocessed dataset will be released after the camera-ready version of the paper. For now, we provide a test subset for reproducibility.


πŸ‹οΈβ€β™‚οΈ Training

To train SculptDrug from scratch:

python ./train_bfn.py --config_file configs/default.yaml --exp_name train_model --revision 0 --devices 0

πŸ§ͺ Generation

To generate ligands using a trained model checkpoint:

python train_bfn.py --test_only --num_samples 100 --sample_steps 100 --ckpt_path ./checkpoints/checkpoint.ckpt

Output will be saved to:

./outputs/generated.pt

Visualize the generated ligands:

Generation Result


πŸ“Š Evaluation

To evaluate the generated ligands, run:

bash script/test_baseline.sh --generated_file outputs/generated.pt --exhaustiveness 16

The evaluation log will be saved to:

outputs/log.txt

Acknowledgements

This project builds upon ideas and code from:

We thank the original authors for their excellent contributions.
The code and datasets are released under MIT, CC BY-NC-SA 4.0, and GPL-3.0 licenses where applicable.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published