In default, m_no_refine is false and the behavior of function non_cache.eval() is correct. However, this is not true in function cache.eval().
Since ligand-receptor energy is calculated from all_grids minus flex_grids, this fix is necessary for a correct energy report when no_refine option is enabled in Vina.
Since both non_cache.eval() and cache.eval() are called only when scoring a model, search & optimization procedures won't be affected.
We can quickly verify the behavior change in Vina's score_only mode:
According to vina.cpp#L719-L722, function
igrid.eval()
should return energy between receptor and ligand whenvina
/vinardo
score function is selected.In default,
m_no_refine
is false and the behavior of functionnon_cache.eval()
is correct. However, this is not true in functioncache.eval()
.Since ligand-receptor energy is calculated from
all_grids
minusflex_grids
, this fix is necessary for a correct energy report whenno_refine
option is enabled in Vina.Since both
non_cache.eval()
andcache.eval()
are called only when scoring a model, search & optimization procedures won't be affected.We can quickly verify the behavior change in Vina's
score_only
mode:Inserting extra log lines in
vina.cpp
, value delta ofall_grids
between unfixed and fixed equals exactly the value offlex_grids
.