Allow current.GetScore() to return values lower than -999,999

Case number:699969-2009375
Opened by:Pikamander2
Opened on:Sunday, April 5, 2020 - 03:08
Last modified:Sunday, April 5, 2020 - 03:08

Consider a Lua function that continuously wiggles the protein until it's no longer showing any significant improvement:

function wiggle_until_done(min_improvement)
if (min_improvement == nil or min_improvement == 0) then
min_improvement = 1;

wiggle_improvement = nil;

score_before_wiggle = current.GetScore();


wiggle_improvement = current.GetScore() - score_before_wiggle;

print("Wiggle improvement: " .. wiggle_improvement);

until (wiggle_improvement < min_improvement)

This function normally works great, but it runs into a problem when the protein's score is below -999,999 because current.GetScore() returns -999,999 instead.

So, for example, let's say that the protein's score is -1,753,728 and one wiggle iteration improves that score to -1,234,168. That's a significant improvement, but current.GetScore() returns -999,999 for both values, so the function thinks that no improvement has been made and stops wiggling.

It would be nice if current.GetScore() reported the true value rather than the capped value. The capped value makes some sense for the GUI so that the text doesn't overflow, but it serves zero purpose when Lua scripting.

(Sun, 04/05/2020 - 03:08  |  0 comments)


Developed by: UW Center for Game Science, UW Institute for Protein Design, Northeastern University, Vanderbilt University Meiler Lab, UC Davis
Supported by: DARPA, NSF, NIH, HHMI, Amazon, Microsoft, Adobe, Boehringer Ingelheim, RosettaCommons