diff --git a/unidock/src/main/vina_cuda_worker.h b/unidock/src/main/vina_cuda_worker.h index 911243b..f53005c 100644 --- a/unidock/src/main/vina_cuda_worker.h +++ b/unidock/src/main/vina_cuda_worker.h @@ -185,6 +185,14 @@ class vina_cuda_worker : public Vina default_output(get_filename(ligand_name), out_dir)); write_poses_gpu(gpu_out_name, num_modes, energy_range); + // write best score + if (!m_poses_gpu.empty()) + { + std::string score_file_name = default_score_output(get_filename(ligand_name)); + ofile f(make_path(out_dir + '/' + score_file_name)); + f << "affinity(kcal/mol)[0]=" << m_poses_gpu[0][0].e << "\n"; + } + return 0; }