Skip to content

Commit

Permalink
Merge pull request #56 from BOINC/vko_simplify_json
Browse files Browse the repository at this point in the history
[boinc-autodock-vina] Simplify json schema.
  • Loading branch information
AenBleidd authored Jun 16, 2022
2 parents 4b715c6 + c527f73 commit a8f95ad
Show file tree
Hide file tree
Showing 13 changed files with 438 additions and 583 deletions.
217 changes: 54 additions & 163 deletions boinc-autodock-vina/README.md

Large diffs are not rendered by default.

30 changes: 10 additions & 20 deletions boinc-autodock-vina/samples/basic_docking/1iep_vina.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
{
"input": {
"receptor": "1iep_receptor.pdbqt",
"ligands": [
"1iep_ligand.pdbqt"
]
},
"search_area": {
"center_x": 15.190,
"center_y": 53.903,
"center_z": 16.917,
"size_x": 20.0,
"size_y": 20.0,
"size_z": 20.0
},
"misc": {
"exhaustiveness": 4
},
"output": {
"out": "1iep_ligand_vina_out.pdbqt"
}
"receptor": "1iep_receptor.pdbqt",
"ligand": "1iep_ligand.pdbqt",
"center_x": 15.190,
"center_y": 53.903,
"center_z": 16.917,
"size_x": 20.0,
"size_y": 20.0,
"size_z": 20.0,
"exhaustiveness": 4,
"out": "1iep_ligand_vina_out.pdbqt"
}
32 changes: 10 additions & 22 deletions boinc-autodock-vina/samples/basic_docking_full/1iep_vina.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
{
"prepare_receptors": {
"receptors": [
"1iep_receptor.pdb"
]
},
"prepare_ligands": {
"ligand": "1iep_ligand.sdf"
},
"search_area": {
"center_x": 15.190,
"center_y": 53.903,
"center_z": 16.917,
"size_x": 20.0,
"size_y": 20.0,
"size_z": 20.0
},
"misc": {
"exhaustiveness": 4
},
"output": {
"out": "1iep_ligand_vina_out.pdbqt"
}
"receptor": "1iep_receptor.pdb",
"ligand": "1iep_ligand.sdf",
"center_x": 15.190,
"center_y": 53.903,
"center_z": 16.917,
"size_x": 20.0,
"size_y": 20.0,
"size_z": 20.0,
"exhaustiveness": 4,
"out": "1iep_ligand_vina_out.pdbqt"
}
Original file line number Diff line number Diff line change
@@ -1,25 +1,15 @@
{
"prepare_receptors": {
"receptors": [
"1iep_receptor.pdb",
"1iep_receptor_copy.pdb"
]
},
"prepare_ligands": {
"ligand": "1iep_ligand.sdf"
},
"search_area": {
"center_x": 15.190,
"center_y": 53.903,
"center_z": 16.917,
"size_x": 20.0,
"size_y": 20.0,
"size_z": 20.0
},
"misc": {
"exhaustiveness": 4
},
"output": {
"out": "1iep_ligand_vina_out.pdbqt"
}
"receptors": [
"1iep_receptor.pdb",
"1iep_receptor_copy.pdb"
],
"ligand": "1iep_ligand.sdf",
"center_x": 15.190,
"center_y": 53.903,
"center_z": 16.917,
"size_x": 20.0,
"size_y": 20.0,
"size_z": 20.0,
"exhaustiveness": 4,
"out": "1iep_ligand_vina_out.pdbqt"
}
Original file line number Diff line number Diff line change
@@ -1,25 +1,15 @@
{
"prepare_receptors": {
"receptors": [
"1iep_receptor.pdb",
"1iep_receptor_copy.pdb"
]
},
"prepare_ligands": {
"ligand": "1iep_ligand.sdf"
},
"search_area": {
"center_x": 15.190,
"center_y": 53.903,
"center_z": 16.917,
"size_x": 20.0,
"size_y": 20.0,
"size_z": 20.0
},
"misc": {
"exhaustiveness": 4
},
"output": {
"out": "1iep_ligand_vina_out.pdbqt"
}
"receptors": [
"1iep_receptor.pdb",
"1iep_receptor_copy.pdb"
],
"ligand": "1iep_ligand.sdf",
"center_x": 15.190,
"center_y": 53.903,
"center_z": 16.917,
"size_x": 20.0,
"size_y": 20.0,
"size_z": 20.0,
"exhaustiveness": 4,
"out": "1iep_ligand_vina_out.pdbqt"
}
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ int perform_docking(const std::string& in_zip, const std::string& out_zip) noexc
return 1;
}

if (!conf.validate()) {
if (!conf.validate(true)) {
std::cerr << boinc_msg_prefix(buf, sizeof(buf)) << "Config validation failed, cannot proceed further" << std::endl;
boinc_finish(1);
return 1;
Expand Down
6 changes: 3 additions & 3 deletions boinc-autodock-vina/src/boinc-autodock-vina/calculate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ bool calculator::calculate(const config& config, const int& ncpus, const std::fu
config.misc.seed, vina_verbosity, config.advanced.no_refine,
const_cast<std::function<void(double)>*>(&progress_callback));

if (!config.input.receptor.empty() || !config.input.flex.empty()) {
vina.set_receptor(config.input.receptor, config.input.flex);
if (!config.input.receptors.empty() || !config.input.flex.empty()) {
vina.set_receptor(config.input.receptors.front(), config.input.flex);
}

if (config.input.scoring == scoring::vina) {
Expand All @@ -53,7 +53,7 @@ bool calculator::calculate(const config& config, const int& ncpus, const std::fu
}

if (!config.input.ligands.empty()) {
vina.set_ligand_from_file(config.input.ligands);
vina.set_ligand_from_file(config.input.ligands.front());

if (config.input.scoring == scoring::vina || config.input.scoring == scoring::vinardo) {
if (!config.search_area.maps.empty()) {
Expand Down
Loading

0 comments on commit a8f95ad

Please sign in to comment.