YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

The Code for "MurJ Inhibitor Generation" Project


1. Installation

1.1 Dependency for main experiment

The code has been tested in the following environment:

Package Version
Python 3.8.13
PyTorch 1.12.1
CUDA 11.0
PyTorch Geometric 2.5.2
RDKit 2021.03.1b1

Install via Conda and Pip:

conda create -n "sbdd" python=3.8.13
conda activate sbdd
conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch
pip install torch_geometric
pip install https://data.pyg.org/whl/torch-1.12.0%2Bcu113/pyg_lib-0.3.1%2Bpt112cu113-cp38-cp38-linux_x86_64.whl
pip install https://data.pyg.org/whl/torch-1.12.0%2Bcu113/torch_cluster-1.6.0%2Bpt112cu113-cp38-cp38-linux_x86_64.whl
pip install https://data.pyg.org/whl/torch-1.12.0%2Bcu113/torch_scatter-2.1.0%2Bpt112cu113-cp38-cp38-linux_x86_64.whl
pip install https://data.pyg.org/whl/torch-1.12.0%2Bcu113/torch_sparse-0.6.16%2Bpt112cu113-cp38-cp38-linux_x86_64.whl
pip install https://data.pyg.org/whl/torch-1.12.0%2Bcu113/torch_spline_conv-1.2.1%2Bpt112cu113-cp38-cp38-linux_x86_64.whl
conda install -c conda-forge "rdkit=2023.09.6"
conda install openbabel tensorboard pyyaml easydict python-lmdb -c conda-forge
pip install wandb
pip install pytorch-lightning==2.1.3
pip install biopython==1.83
pip install matplotlib
pip install numpy==1.23
pip install accelerate
pip install transformers
pip install gdown
pip install sympy==1.12
pip install networkx==2.8.5


# For Vina Docking
pip install meeko==0.1.dev3 scipy pdb2pqr vina==1.2.2
python -m pip install git+https://github.com/Valdes-Tresanco-MS/AutoDockTools_py3
conda install -c conda-forge autodock-vina -y

The code should work with PyTorch >= 1.9.0 and PyG >= 2.0. You can change the package version according to your need.


2. Universal Inference for a Specified Protein Pocket

Use sample_for_specific_protein.py to generate ligands for an arbitrary single protein pocket PDB.

2.1 Input Preparation

  1. Prepare a pocket PDB centered at the binding site (e.g., 10 Å around thGoue ligand or binding residues).
    You may reuse the script in 4.1: ./data_preprocess/extract_pockets.py.

  2. Example pocket file: ./specific_protein/3cl_ligand_pocket10.pdb.

  3. The pretrained Benchmarked models are organized in the SBDD_Checkpoint Google Drive folder. Please download the checkpoints using the below script:

## NucleusDiff
gdown --fuzzy https://drive.google.com/file/d/1kA2ygcWKEcne0mMJM3lirmXKnhQnns14/view?usp=drive_link
## TargetDiff
gdown --fuzzy https://drive.google.com/file/d/1feT84RrmQcRJPVFsUfq7ZJHX_vIZWxdl/view?usp=drive_link

, and save it to ./checkpoints.

2.2 Inference (sampling)

python sample_for_pocket.py \
        --model_type nucleusdiff \
        --checkpoint ./checkpoints/nucleusdiff_pretrained_model.pt \
        --pdb_path ./specific_protein/3cl_ligand_pocket10.pdb \
        --result_path ./results_specific_protein \
        --sample_num_atoms real_world_testing \
        --inference_num_atoms 30 \
        --num_samples 1000 \
        --num_steps 1000 \
        --device cuda:0

Key arguments:

  • --model_type: the model we use to do inference, [targetdiff, nucleusdiff].
  • --checkpoint: path to a NucleusDiff checkpoint (.pt).
  • --pdb_path: pocket PDB for your target protein.
  • --result_path: output directory.
  • --sample_num_atoms: set to real_world_testing to use a fixed atom count.
  • --inference_num_atoms: atoms per generated ligand when using real_world_testing.
  • --num_samples: number of ligands to generate.
  • --num_steps: diffusion steps (trade-off between quality and speed).
  • --device: GPU device, e.g., cuda:0.

2.3 Outputs

  • ${result_path}/sample_{test_time}.pt: raw tensors and sampling trajectories.
  • ${result_path}/sdf/*.sdf: reconstructed molecules in SDF format.

Run python sample_for_specific_protein.py --help for the complete list of options and defaults.


3. Binding Affinity Evaluation of Given Peptide

Note: For peptides (with many rotatable bonds), using Vina via the command-line interface is more robust and reproducible than through a Python wrapper because:

  • You explicitly control preparation and parameters (box, exhaustiveness, seed).
  • You avoid hidden defaults in wrappers that peptides are sensitive to (conformer generation, box sizing).
  • Dependencies and errors are more transparent, making debugging easier.
  • It’s easier to tweak individual steps (protonation, box size, conformers) as needed.

3.1 Dependencies (required; already satisfied if you're using our recommended environment)

vina, obabel, pdb2pqr30, AutoDockTools

3.2 Bash Scripts

bash ./scripts/step_04_run_vina_chainB.sh

4. Evaluation for DiffBP

4.1 Training data

gdown --fuzzy https://drive.google.com/file/d/1HGzwpqZGoBaosPGEnn3Lb_b-iNLTbGVO/view?usp=drive_link
gdown --fuzzy https://drive.google.com/file/d/1bFR5IfnV5HGAF58XjXfn-xiVKoV83kfB/view?usp=drive_link
gdown --fuzzy https://drive.google.com/file/d/1KD3MGbcsJ2Q5Cn7rZ7ghkOAr-pxgyarm/view?usp=drive_link

4.2 Inference

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support