Remove duplicated calculation of coordinates. #278
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In function
quasi_newton::operator()
, the model coordinates are always updated with the conformer searched from BFGS optimization.AutoDock-Vina/src/lib/quasi_newton.cpp
Lines 43 to 51 in 350bb7f
Thus, there is no need to calculate model coordinates in function
monte_carlo::operator()
.AutoDock-Vina/src/lib/monte_carlo.cpp
Lines 59 to 74 in 350bb7f
To ensure consistency, a test is executed between the base commit and the updated one. Bash commands are pasted below:
It can be verified that generated files
solution/1iep_ligand_out.pdbqt
are exactly alike.With this pull request merged, we are convinced that CPU cost will be reduced slightly. My CPU type is
Intel(R) Xeon(R) Platinum 8336C CPU @ 2.30GHz
and average time of 10 runs are: