Merge pull request #6521 from RosettaCommons/roccomoretti/tag_solutions
[Foldit] Upload snapshots of tagged solutions
Currently, every five minutes the Foldit client uploads the top scoring solution it saw in the last five minutes. This is broken out by puzzle id, but on certain puzzles it would be nice to be able to get finer-grained results. For example, on ligand design puzzles, it might be nice to have results for the top scoring structure per ligand identity, rather than for as the puzzle as a whole. (Such that you can get more diverse design approaches.) This is particularly true for the ligand puzzles which are more docking puzzle: we want results for all structures, not just the top scoring ones.
This PR adds an option to the puzzle_setup file. "post_solution_tag" -- this allows the puzzle creator to specify additional characteristics of the solution result to tag/separate them out. Currently the two options are "Smiles" (splitting the results by the chemical identity of the designable ligand) and "Sequence" (splitting the results by the [protein] sequence of the structure). The default behavior is set to "None", which results in the current one-per-puzzle behavior.
Additionally, I discovered that we're not pushing the results (including scores) to the server on client shutdown. It theoretically should be done in the Server destructor, but that's apparently not getting called, possibly due to details of how std::exit() works with destructors. I've also added facilities to GameApplication::handle_exit() to make sure that the pending solutions and scores are properly flushed on client closing.