From 7fbbc4ba2c4e3904d4c19101e134058abf7588c6 Mon Sep 17 00:00:00 2001 From: Alex Morehead Date: Sat, 25 May 2024 11:01:05 -0500 Subject: [PATCH] Enable generic DynamicBind ensemble inference --- configs/model/ensemble_generation.yaml | 10 ++-------- src/models/ensemble_generation.py | 1 + 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/configs/model/ensemble_generation.yaml b/configs/model/ensemble_generation.yaml index 0bea19a..b7ca956 100644 --- a/configs/model/ensemble_generation.yaml +++ b/configs/model/ensemble_generation.yaml @@ -1,11 +1,4 @@ -ensemble_methods: [ - diffdock, - dynamicbind, - neuralplexer, - rfaa, - vina, - tulip, - ] # the methods from which to gather predictions for ensembling - NOTE: must be one of (`diffdock`, `dynamicbind`, `neuralplexer`, `rfaa`, `vina`, `tulip`) +ensemble_methods: [diffdock, dynamicbind, neuralplexer, rfaa, vina, tulip] # the methods from which to gather predictions for ensembling - NOTE: must be one of (`diffdock`, `dynamicbind`, `neuralplexer`, `rfaa`, `vina`, `tulip`) generate_vina_scripts: false # whether to generate Vina scripts using other methods' binding site predictions - NOTE: `resume` must also be `true` when this is `true`, meaning other methods' predictions must have already been generated locally rank_single_method_intrinsically: true # whether to rank single-method predictions using either `consensus` or `vina` ranking (false) or instead using their intrinsic (explicit) rank assignment (true) output_bash_file_dir: ensemble_generation_scripts # the directory in which to save the generated Bash scripts @@ -66,6 +59,7 @@ diffdock_skip_existing: true # whether to skip existing predictions # DynamicBind inference arguments: dynamicbind_python_exec_path: ${oc.env:PROJECT_ROOT}/forks/DynamicBind/DynamicBind/bin/python3 # the Python executable to use dynamicbind_exec_dir: ${oc.env:PROJECT_ROOT}/forks/DynamicBind # the DynamicBind directory in which to execute the inference scripts +dynamicbind_dataset: ensemble # the dataset to use for inference - NOTE: must be one of (`ensemble`) dynamicbind_input_protein_data_dir: ${oc.env:PROJECT_ROOT}/forks/DynamicBind/inference/ensemble_esmfold_structures # the input protein-ligand complex directory to recursively parse for protein inputs dynamicbind_input_ligand_csv_dir: ${oc.env:PROJECT_ROOT}/forks/DynamicBind/inference/dynamicbind_ensemble_inputs # the input CSV directory with which to run inference dynamicbind_samples_per_complex: 40 # the number of samples to generate per complex diff --git a/src/models/ensemble_generation.py b/src/models/ensemble_generation.py index d56b1f8..65de7bf 100644 --- a/src/models/ensemble_generation.py +++ b/src/models/ensemble_generation.py @@ -246,6 +246,7 @@ def create_dynamicbind_bash_script( cuda_device_index={cfg.cuda_device_index} \\ python_exec_path={cfg.dynamicbind_python_exec_path} \\ dynamicbind_exec_dir={cfg.dynamicbind_exec_dir} \\ + dataset={cfg.dynamicbind_dataset} \\ input_data_dir={cfg.dynamicbind_input_protein_data_dir} \\ input_ligand_csv_dir={cfg.dynamicbind_input_ligand_csv_dir} \\ samples_per_complex={min(cfg.dynamicbind_samples_per_complex, cfg.max_method_predictions)} \\