Skip to content

Commit

Permalink
Clean up inference script builder for Vina
Browse files Browse the repository at this point in the history
  • Loading branch information
amorehead committed Aug 13, 2024
1 parent 2580c5d commit c23b888
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion configs/scripts/build_inference_script.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dataset: astex_diverse # the dataset to use - NOTE: must be one of (`posebusters
repeat_index: 1 # the repeat index which was used for inference
cuda_device_index: 0 # the CUDA device index to use for inference (for all methods except AutoDock-Vina)
output_script_dir: ${oc.env:PROJECT_ROOT}/scripts/inference # the directory in which to save the output script
export_hpc_headers: false # whether to insert HPC headers into the output script
export_hpc_headers: false # whether to insert high-performance computing (by default, SLURM) headers into the output script
# sweep arguments:
sweep: false # whether to build all combinations of method-dataset run scripts
methods_to_sweep: [
Expand Down
6 changes: 5 additions & 1 deletion scripts/build_inference_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,13 @@ def build_inference_script(
return

os.makedirs(output_script_dir, exist_ok=True)
vina_binding_site_method_suffix = (
f"_{vina_binding_site_method}" if method in ["vina", "ensemble"] else ""
)
hpc_suffix = "_hpc" if export_hpc_headers else ""
output_script = os.path.join(
output_script_dir,
f"{method}_{dataset}{'_hpc' if export_hpc_headers else ''}_inference_{repeat_index}.sh",
f"{method}{vina_binding_site_method_suffix}_{dataset}{hpc_suffix}_inference_{repeat_index}.sh",
)

# Build script in sections
Expand Down

0 comments on commit c23b888

Please sign in to comment.