Merge pull request #2239 from RosettaCommons/aleaverfay/faster_lkball_rpe
LK_Ball performance improvements
Two speedups for lk_ball in anticipation of it becoming part of the default score function.
First: Avoid construction/destruction of a count_pair object in the LK_BallEnergy evaluation
by using the "invoker" scheme where a stack-allocated object with the virtual function
"invoke" is handed a stack-allocated count-pair object by the CountPairFactory. This avoids
a call to new and delete. Stack allocation is much much faster than heap allocation. (The same thing could be done with the FA_ElecEnergy.)
This speeds up the off-rotamer packer by 1.18x when using lk_ball.
Second: Speed up lk-ball when using the linear-memory interaction graph by splitting RPE calculations for LK_BallEnergy into bb/bb, bb/sc, sc/bb, and sc/sc interactions. This drops LK-ball evaluation from being the largest single expense in the packer's deltaE calculation, to being the smallest of the atom-wise energy calculations. This is surely the result of the tighter bounding sphere pruning that allows the calculation to skip interaction calculations that it can prove are out of range.