Merge aleaverfay/slim_lkball2 (PR #3729)
@JackMaguire noticed that the per-residue memory use has increased substantially and tracked it down to the arrays used to store the water coordinates and water-derivative matrices in the Residue data cache for the LK_BallEnergy. Previously the coordinates were held in natoms x max_waters_per_atom x 3 arrays, and the derivative matrices in three natoms x max_waters_per_atom x 3 x 3 arrays. In the case of TRP, this was nearly 15KB per Residue.
This memory allocation is 100% my fault from a few years back when trying to make LK_Ball faster, which it did, but not in the most space efficient format.
The new code allocates the coordinates in nwaters_actual x 3 arrays, and the derivative matrices in nwaters_actual x 3 x 3 arrays and only when derivatives are actually being calculated.
The memory use is now ~200 bytes per Residue in the context of the packer and ~2KB per Residue in the context of the minimizer.
Integration tests are clean except for one cosmetic test change.