Merge pull request #5748 from RosettaCommons/vmullig/fix_pnear_calculator_for_extreme_energies
Fix the PNear calculator for cases in which absolute values of energies are large.
The PNear calculator can encounter floating point range errors if energy values are either very positive or very negative. If all energies are very positive, the partition function, `Z = sum_i(exp(-E_i/kbt))`, ends up being zero, and this produces divide-by-zero errors. If the energies are very negative, then the same sum ends up being infinite. The correction for this is to subtract off the smallest energy before doing the sum. This requires slightly more memory (we need a vector of energy and RMSD values, instead of just accumulating values), but it's safer.
Tasks:
- [x] Check unit and integration tests.
- [x] Check simple_cycpep_predict and pnear_vs_ic50 scientific tests.