ccsb-scripps / AutoDock-Vina

AutoDock Vina
http://vina.scripps.edu
Apache License 2.0
597 stars 210 forks source link

Bug in intramolecular and or unbound energy #200

Closed diogomart closed 1 year ago

diogomart commented 1 year ago

Using the vina or vinardo scoring functions, the unbound and intramolecular energy of the top pose should be equal. However, ligands with macrocycle closure atoms, which are CG0, G0, CG1, etc, show large discrepancies in these energies, sometimes leading to predicted free energies that are absurdely low, e.g. -50 kcal/mol.

REMARK VINA RESULT:   -17.786      0.000      0.000
REMARK INTER + INTRA:         -10.788
REMARK INTER:                 -10.720
REMARK INTRA:                  -0.068
REMARK UNBOUND:                17.397
diogomart commented 1 year ago

Fixed by c1217c1ac7f5cfdd5931eba01f187dd967969c16

May by related to #168, #172, #68.

@atillack I forgot to PR... could you take a look at c1217c1ac7f5cfdd5931eba01f187dd967969c16 just to make sure there's nothing obviously wrong?

Attaching plots of intramolecular vs unbound energies for the top pose of about 34k molecules, using flexible side chains. A few molecules are macrocycles (hence the number of glue pairs in the legend).

Before the fix: buggy

After the fix: fixed

atillack commented 1 year ago

@diogomart Looked over the commit - good work and glad you found the bug.

diogomart commented 1 year ago

Thank you @atillack

diogomart commented 1 year ago

Attaching plots of the free energy estimate from line "REMARK VINA RESULT" before and after the fix. The first plot is docking without flexible sidechains, and the second plot is for docking with flexible sidechains. This used high exhaustiveness (64) and the same random seed (42) in all runs. There are about 34k points (ligands) in each plot, of which about 570 have at least a macrocycle glue pair.

Here are some stats for these plots. It is possible that small grid boxes, large spacing between grid points (not recommended in any case), and large number of docked poses result in larger discrepancies.

flexible sidechains, which ligands, Kendall's tau,   r^2
                 no,           all,          0.90,  0.23
                 no, no glue pairs,          0.96,  0.99
                yes,           all,          0.87,  0.17
                yes, no glue pairs,          0.93,  0.87

vina-results-rigid vina-results-flex