ccsb-scripps / AutoDock-GPU

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

Energy score difference between dlg/xml output and stdout output #178

Closed shouti-fredchang closed 2 years ago

shouti-fredchang commented 2 years ago

Describe the bug When you run autodockgpu the stdout displays convergence of the energy terms and displays 'Best energy' over the generations.

However when you look in the dlg or xml file, I can not map 'Best energy' term from stdout to the energy terms within these output files. Neither free_NRG_binding, final_intermol_NRG, etc. match the stdout energy terms.

Question (or Bug?) what energy term is stdout printing?

Below are the outputs:

--STDOUT------------------------- AutoDock-GPU version: v1.5.2-1-ga917c4828b612310fd9319eb1c95aa65133d6c52

Running 1 docking calculation

Cuda device: Tesla K80 Available memory on device: 11380 MB (total: 11441 MB)

CUDA Setup time 0.159015s

Running Job #1 Using heuristics: (capped) number of evaluations set to 1613968 Local-search chosen method is: ADADELTA (ad)

Rest of Setup time 0.019470s

Executing docking runs, stopping automatically after either reaching 0.15 kcal/mol standard deviation of the best molecules of the last 4 * 5 generations, 42000 generations, or 1613968 evaluations:

Generations | Evaluations | Threshold | Average energy of best 10% | Samples | Best energy ------------+--------------+------------------+------------------------------+---------+------------------- 0 | 150 | 7202.74 kcal/mol | 2331.32 +/- 1299.05 kcal/mol | 4 | 1187.14 kcal/mol 5 | 38742 | 7202.74 kcal/mol | 747.52 +/- 1121.11 kcal/mol | 692 | -8.20 kcal/mol 10 | 81134 | 771.82 kcal/mol | -11.51 +/- 0.18 kcal/mol | 4 | -11.80 kcal/mol 15 | 127329 | -10.83 kcal/mol | -11.64 +/- 0.21 kcal/mol | 8 | -11.84 kcal/mol 20 | 176807 | -11.24 kcal/mol | -11.54 +/- 0.18 kcal/mol | 11 | -11.87 kcal/mol 25 | 228675 | -11.30 kcal/mol | -11.77 +/- 0.13 kcal/mol | 10 | -11.92 kcal/mol 30 | 282194 | -11.58 kcal/mol | -11.77 +/- 0.11 kcal/mol | 23 | -11.94 kcal/mol 35 | 336417 | -11.69 kcal/mol | -11.84 +/- 0.07 kcal/mol | 17 | -11.95 kcal/mol 40 | 393667 | -11.71 kcal/mol | -11.84 +/- 0.08 kcal/mol | 22 | -11.95 kcal/mol 45 | 451665 | -11.79 kcal/mol | -11.90 +/- 0.04 kcal/mol | 20 | -11.95 kcal/mol ------------+--------------+------------------+------------------------------+---------+-------------------

                               Finished evaluation after reaching
                              -11.83 +/-    0.10 kcal/mol combined.
                            82 samples, best energy   -11.95 kcal/mol.

Docking time 7.641588s

Shutdown time 0.000436s

Job #1 took 7.662 sec after waiting 0.494 sec for setup

Run time of entire job set (1 file): 8.243 sec Processing time: 0.087 sec

All jobs ran without errors.

-----XML output----------- <?xml version="1.0" ?>

v1.5.2-1-ga917c4828b612310fd9319eb1c95aa65133d6c52 -L ob-GSBR-1002859R.pdbqt --gbest 1 -M ../grid/6x1a_prepped_dHet.maps.fld -N ob-GSBR-1002859R-gpudocked ../grid/6x1a_prepped_dHet.maps.fld ob-GSBR-1002859R.pdbqt 1643738599 11344 ad yes yes 20 -8.00 -10.39 -1.56 2.39 19.284109 14.931024 12.331568 -0.73783792 0.67207844 0.06249613 172.227982 8 200.173889 214.949631 177.946823 276.824768 218.018829 333.163818 155.610107 271.751190 -8.00 -10.38 -1.59 2.39 21.072251 15.439766 11.701437 -0.65655556 0.75153447 -0.06427088 186.751465 8 38.071114 231.912262 189.876968 261.287750 184.107788 296.017395 159.463501 309.531097 -7.99 -10.38 -1.59 2.39 20.944377 15.393787 11.784851 0.66395349 -0.74548609 0.05844875 177.340393 8 39.491718 229.252869 189.740967 260.362152 189.829620 299.250336 161.388168 303.151306 -7.99 -10.37 -1.58 2.39 19.498823 15.760056 10.331765 -0.70070818 0.70966951 -0.07332964 211.788528 8 215.506897 211.705124 178.929382 259.381439 180.844376 288.859009 158.205032 336.849030 -7.97 -10.36 -1.61 2.39 21.164536 15.478552 11.601812 -0.65287727 0.75385157 -0.07388566 186.980011 8 229.592743 234.167206 190.972168 256.583588 187.908539 294.466125 160.287415 311.156860 -7.96 -10.34 -1.61 2.39 21.038280 15.431891 11.880082 0.65926691 -0.74925462 0.06312406 175.855347 8 223.985565 240.307098 190.154144 259.352631 188.885986 293.548645 159.781235 305.001648 -7.92 -10.31 -1.56 2.39 19.550915 15.880111 9.966114 -0.69250042 0.71433224 -0.10085936 216.708939 8 29.159330 206.366379 181.031937 257.161530 177.532318 106.258919 151.547348 350.701263 -7.86 -10.24 -1.63 2.39 19.450607 15.820405 9.784910 -0.69008775 0.71559161 -0.10820144 217.660614 8 37.685043 204.290848 181.027161 254.289749 177.123169 212.540573 342.560822 60.913258 -7.81 -10.20 -1.61 2.39 21.221123 15.715585 9.993311 0.65748913 -0.74996518 0.07252778 131.637817 8 184.000366 204.875305 184.353027 286.146301 128.646561 168.390732 11.356843 97.896545 -7.80 -10.19 -1.58 2.39 21.487656 15.839693 10.600262 -0.65179685 0.75408442 -0.08073140 210.366531 8 219.576645 229.514999 189.615417 264.316956 161.095490 105.883568 138.573669 350.303375 -7.66 -10.05 -1.68 2.39 18.884143 14.364929 12.470813 -0.74536606 0.65755402 0.10978228 156.741516 8 203.083603 213.866394 177.885010 273.179871 235.765564 311.142975 113.491386 235.250092 -7.49 -9.88 -1.68 2.39 21.676299 15.681942 9.989594 -0.63778777 0.76619503 -0.07856171 225.829559 8 46.501106 231.080887 189.542328 269.555969 143.282318 178.611771 13.890181 67.953087 -7.42 -9.81 -1.87 2.39 20.924928 15.446873 11.763000 0.65496255 -0.75032704 0.08962915 178.992798 8 41.401146 228.088654 190.785629 256.077240 192.956100 302.587830 112.592804 279.184448 -6.54 -8.93 -1.12 2.39 18.200007 10.403461 8.030363 0.70114678 0.45039429 -0.55275507 273.814850 8 61.827873 126.509811 222.897568 180.184677 62.857716 3.877677 358.754150 240.768219 -6.34 -8.73 -1.50 2.39 17.642475 10.737096 10.407054 -0.98387769 -0.09140641 0.15371907 110.277252 8 168.239822 140.960205 208.721558 188.981583 15.284373 329.170441 16.357250 135.423813 -6.33 -8.72 -1.19 2.39 16.902627 10.395177 9.146150 -0.93916635 -0.19739743 0.28107086 96.170914 8 235.232651 10.847622 175.693451 184.402161 26.340117 290.922058 128.122894 120.152153 -6.20 -8.58 -1.12 2.39 18.671534 14.062493 14.098051 -0.40887929 -0.91229710 -0.02305933 287.547760 8 10.600327 340.796265 19.151209 95.277748 229.258865 254.927521 179.039978 221.290176 -5.37 -7.75 -1.27 2.39 17.387662 10.975529 9.906079 -0.19430875 -0.98094038 0.00027684 179.770828 8 15.035855 132.504639 222.520020 61.100426 345.600922 329.639008 225.646713 289.899750 -5.35 -7.74 -2.26 2.39 20.481651 12.589953 11.517474 -0.89493190 0.35120522 -0.27523042 165.758179 8 354.227081 180.895416 1.748853 211.525635 351.247406 331.094818 141.116211 234.461609 -5.20 -7.58 -1.76 2.39 16.970531 10.584629 11.952149 0.53275938 -0.00678121 -0.84623960 220.768539 8 148.944977 352.716888 333.188660 244.809219 202.357590 215.885895 344.260315 3.570147
atillack commented 2 years ago

@shouti-fredchang This is fortunately not a bug :-)

The "best energy" displayed in the AutoStop table is the scoring function as calculated on the GPU - which is the sum of final_intermol_NRG and internal_ligand_NRG.

P.S. It is possible for final_intermol_NRG + internal_ligand_NRG to differ minutely from the AutoStop table (on the order of 0.01 kcal/mol) due to both rounding as well implementation differences between CPU and GPU math (dlg and xml numbers are recalculated on CPU).

shouti-fredchang commented 2 years ago

Confirmed, thanks for the clarification.