Skip to content

Commit

Permalink
Added exhaustiveness flag to autodock_vina_run
Browse files Browse the repository at this point in the history
  • Loading branch information
gbayarri committed Mar 5, 2024
1 parent 0df7432 commit 8d90ddf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions biobb_vs/docs/source/command_line.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Syntax: input_parameter (datatype) - (default_value) Definition

Config parameters for this building block:
* **cpu** (*integer*): (1) the number of CPUs to use..
* **exhaustiveness** (*integer*): (8) exhaustiveness of the global search (roughly proportional to time)..
* **binary_path** (*string*): (vina) path to vina in your local computer..
* **remove_tmp** (*boolean*): (True) Remove temporal files..
* **restart** (*boolean*): (False) Do not execute if output files exist..
Expand Down
9 changes: 9 additions & 0 deletions biobb_vs/json_schemas/autodock_vina_run.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,15 @@
"max": 1000,
"step": 1
},
"exhaustiveness": {
"type": "integer",
"default": 8,
"wf_prop": false,
"description": "exhaustiveness of the global search (roughly proportional to time).",
"min": 1,
"max": 10000,
"step": 1
},
"binary_path": {
"type": "string",
"default": "vina",
Expand Down
3 changes: 3 additions & 0 deletions biobb_vs/vina/autodock_vina_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class AutoDockVinaRun(BiobbObject):
output_log_path (str) (Optional): Path to the log file. File type: output. `Sample file <https://github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/reference/vina/ref_output_vina.log>`_. Accepted formats: log (edam:format_2330).
properties (dic - Python dictionary object containing the tool parameters, not input/output files):
* **cpu** (*int*) - (1) [1~1000|1] the number of CPUs to use.
* **exhaustiveness** (*int*) - (8) [1~10000|1] exhaustiveness of the global search (roughly proportional to time).
* **binary_path** (*string*) - ('vina') path to vina in your local computer.
* **remove_tmp** (*bool*) - (True) [WF property] Remove temporal files.
* **restart** (*bool*) - (False) [WF property] Do not execute if output files exist.
Expand Down Expand Up @@ -74,6 +75,7 @@ def __init__(self, input_ligand_pdbqt_path, input_receptor_pdbqt_path, input_box

# Properties specific for BB
self.cpu = properties.get('cpu', 1)
self.exhaustiveness = properties.get('exhaustiveness', 8)
self.binary_path = properties.get('binary_path', 'vina')
self.properties = properties

Expand Down Expand Up @@ -126,6 +128,7 @@ def launch(self) -> int:
'--center_x=' + x0, '--center_y=' + y0, '--center_z=' + z0,
'--size_x=' + sidex, '--size_y=' + sidey, '--size_z=' + sidez,
'--cpu', str(self.cpu),
'--exhaustiveness', str(self.exhaustiveness),
'--out', self.stage_io_dict["out"]["output_pdbqt_path"],
'--verbosity', '1',
'>', self.stage_io_dict["out"]["output_log_path"]]
Expand Down

0 comments on commit 8d90ddf

Please sign in to comment.