ccsb-scripps / AutoDock-GPU

AutoDock for GPUs and other accelerators
https://ccsb.scripps.edu/autodock
GNU General Public License v2.0
366 stars 101 forks source link

How do you save the lowest energy of a docking simulation? #223

Open mikelee-dev opened 1 year ago

mikelee-dev commented 1 year ago

I want to run a large number of docking simulations for many ligands, and want to save each ligand's best energy without needing to read the print statements outputted to the terminal. I haven't seen where in the documentation this can be done.

In addition, in the outputted .dlg file, the lowest binding energy in the clustering histogram table is not the same as the lowest binding energy outputted to the terminal when the docking finishes. Or am I interpreting the table incorrectly?

Thanks for the help!

atillack commented 1 year ago

@mikelee-dev The energy output at runtime is the scoring function energy which is minimized. The binding energy estimate in the dlg files is derived from the scoring function energy, the number of torsional degrees of freedom, and the bound energy of the ligand (calculated as shown in the dlg output behind each binding energy).

I use a little script like this to quickly get the best scoring function value in each dlg:

#!/bin/bash

for dlg in ./*.dlg; do
    awk 'BEGIN{best_energy=2e80}($5=="Intermolecular"){curr_energy=$8}($6=="Internal"){curr_energy+=$9; if(curr_energy<best_energy){ best_energy=curr_energy }}END{ print FILENAME": "best_energy }' $dlg
done

Hope this helps!

mikelee-dev commented 1 year ago

Thanks for the clear and helpful explanation!