Merge pull request #6557 from RosettaCommons/roccomoretti/add_smiles_to_ligand_prop
[Foldit] Add Formula and SMILES to ligand properties panel
There's been some persistent requests to get better information about the formula (number of atoms) and the SMILES string of the ligand. This PR re-works the Small Molecule Properties panel to add that information.
It also removes the need to click boxes to see the values. (With a little rewrite, actually computing properties does not add appreciably to time.)
Being able to export the SMILES for a ligand has also been a request. As a knowledgeable and determined person would be able to create a SMILES string from the visualization, there's no particular harm in allowing them to use a button to copy it to a clipboard. (The ability to input SMILES strings may be different.)
While I was at it, I also fixed an issue where the ligand properties and view panels were created overlapping.
RELEASE NOTES: Add ligand formula and SMILES string to Small Molecule Properties panel.
Merge pull request #6555 from RosettaCommons/roccomoretti/add_ligand_smiles_field
[Foldit] Add SMILES to the list of short data uploaded.
This will allow better data processing on the server-side. ( This is the client support for crowdgames/foldit-server-rails#674 )
This is tested to be robust to both proposed and existing Foldit server code. (With current server code, the extra payload is just ignored.)
RELEASE NOTES: (None)
Merge pull request #6559 from RosettaCommons/roccomoretti/fix_share_network_issues
[Foldit] Make server interactions more robust.
A traceback from [a bug report](https://fold.it/forum/bugs/copy-to-clipboard-crashes-foldit), indicates that there may be non-Foldit exceptions being thrown from Server calls. We should be able to catch that, and make sure that there's a handleable error which won't cause the client to crash.
(Note that due to indentation changes, the diff is more complicated that it really should be.)
RELEASE NOTES: Fix error handling in server interaction (copy-to-clipboard crashes)
Merge pull request #6556 from RosettaCommons/roccomoretti/fix_uploader_refresh
[Foldit] Fix issue with uploader/downloader refresh.
When I made the updates for #6537 and #6539 which added a downloader progress dialog, I moved the download/upload into a thread, but the refresh-after-download was left in the original thread. This meant that there was an inadvertent reordering, meaning that the refresh wasn't seeing the updated results (because it was being executed before the update in the thread completed.)
This PR moves those refreshes into a callback function which is called after the downloader completes.
RELEASE NOTES: Fix bug with solution upload/download where additional refreshes were needed to see the new state.
Merge pull request #6558 from RosettaCommons/interactive/petrides/fix_residue_mismatch_on_untrim
[Foldit] Update Untrim to Preserve New Residue Type on Mutation
Merge pull request #6549 from RosettaCommons/interactive/petrides/mac_build_fix
[Foldit] Update to XCode Project to Work with More Recent Apple Clang Versions
Merge pull request #6547 from RosettaCommons/interactive/petrides/fix_rephase_for_tracks
[Foldit] Fix Crash For Set Track in Density Refinement Puzzles
Merge pull request #6545 from RosettaCommons/roccomoretti/fix_autoupload
[Foldit] Address race condition in auto solution upload.
We're currently getting disk usage errors with the auto solution upload. It looks like the cause is a race condition where the main thread is adding to the same data structure that the solution thread is uploading from, which results in fresh solutions being immediately uploaded, rather than waiting for the next upload window.
We can move the to-upload data to a local data structure to avoid the race condition. (We just need to make sure to copy the not-yet-uploaded data back if we encounter a server error.)
Merge pull request #6543 from RosettaCommons/interactive/petrides/trim_untrim_lua_tweak
[Foldit] Fix Method Used to Error on Bad Conditions for Trim and Untrim in Lua
Merge pull request #6539 from RosettaCommons/roccomoretti/solutions_dialog
[Foldit] Add download dialog for solution list.
Player are complaining about not being able to fetch the list of shared solutions. This converts the solution list fetching to be behind the recently added Downloader dialog popup.
Merge pull request #6537 from RosettaCommons/roccmoretti/network_popup
[Foldit] Add loading/progress dialog popup for puzzle and solution loading
Automated timeouts seem to be an issue for some players. Instead of playing guess-and-check with the timeout thresholds (which were getting to be long from a UI perspective anyway), create a dialog box which allows users to cancel the download if the server is stalled.
The central clock is animated, to allow players to see that the Foldit client hasn't frozen. The clock will bounce left and right as data is received from the server, which allows players to know if something is happening, or if the server might be stuck. The cancel button will cancel the data transfer, returning the user to what they were doing before.
Puzzle download, solution download and solution upload (the actions which we have players complaining about devprev on) have been converted to use the new popup dialog.
Since the user has control over transfer cancellation, if we have a progress callback (i.e. we have a dialog box up), we don't have a timeout -- Foldit will sit at the dialog box until the transfer succeeds, gets a failure code from the server, or the user presses cancel.
One of the complications is that we can't be holding the GUI mutex while we're waiting for the download to complete. This would keep the dialog box from displaying and updating. The big complication here is that GUI button response callbacks have the GUI mutex held early on in the response chain. So we need to break out the download management into a separate thread.
We also need to update the Curl library calls to use a slightly different interface, to allow us to poll for cancellation during the transfer. (Otherwise the download will block until some sort of transfer happens.)
There's also some code to make server thread error handling more robust, as well as soft crash timeouts in automated solution uploading (so we can monitor for issues).