New Lua functions, any suggestions?

Started by Timo van der Laan

jeff101 Lv 1

More ideas:

(1) A LUA way to band between residues in different symmetric subunits.
Like in a trimer, how do you make a band between a residue on monomer 1
& a residue on monomer 2 from within a recipe? I think right now,
you can only do this manually.

(2) Read what residue #'s and atom #'s are at one or both ends of a particular band.
Perhaps use the Smart Bands idea (https://fold.it/portal/node/2002640) to encode this.

(3) A LUA way to get/set the residue pairs selected in the Contact Map.
See https://fold.it/portal/node/998342 for more details.

(4) Let players download from the website two or more recipes at once
by entering their recipe #'s in a dialog box (http://fold.it/portal/node/997032).

brow42 Lv 1

Wow, there were so many things I wanted but I won't be able to think of them now.

I'd really like to get atom-atom distances without banding, although this might provide too much information.

I'd like the functionality of my atom tables script to be replaced with queries into rosetta. It's basically luck that my script works at all. The rosetta query would always be correct, even if a weird molecule / AA / nucleoside shows up, or the pH or salinity is non-standard.

#1 game changer: a way to identify existing h-bonds, and the atoms they pair, so that we can band them, or count them, or something. disulfide bonds should also be detectable in the same way. Anticipate other kinds of bonds that might appear in future puzzles so the scripts don't crash, such as bonds to metal ion. Salt bridges are probably the same as H-bonds. Stretch goal: a way to find potential hbonds. Currently I would select AA in a radius, then do a pairwise check of atom distances by banding. This is so ridiculous I don't even have a script that does this (well, maybe one).

Reading the endpoint information of existing bands as Jeff101 suggests allows bands to be a proper user input method.

We definitely need more methods to query and band mirror residues in symmetry puzzles. Perhaps a one way is to just make these addressable above 1 to N (watch out for ligands in the numbering sequence though). There might need to be a function to map real id -> mirror ids.

There are many LUA functions that might be better returning a list for the entire protein or residue, things that we ALWAYS have to loop over. Just off the top of my head: all SS, all AA, all pair-wise AA contact values, all donor atoms in residue i. But if we just end up looping over the list, then it doesn't matter. I'd have to think hard to find a use case.

This looping paradigm for i=1,GetCount do GetProperty(i) has a problem: a lot of things are potentially invalidated by wiggle, shake, undo, quickload, user actions etc. Examples: rotamers, atom count, hbonds, bands. Perhaps iterators? Perhaps we just need a definitive list of that they are so that we are aware. The existing API is pretty ingrained.

There may be other interesting things in rosetta that would be interesting to expose: if foldit could give us a void, maybe we could collapse it.

More control over valid mutations. Crazy idea: let us dynamically change the residue subscore temporarily (this violates a condition obviously)

Susume Lv 1

Most of these are mentioned above - just throwing in my vote.

Function to get band endpoints (seg num and atom num).

Get/set contacts in the contact map (so highlighting contacts in the map becomes a form of input rather than just a way to view things).

Find out which residues are causing filter penalties.

Functions to get what SS foldit thinks a residue is (the auto structure if that's the best we can get, but I really want to know what SS the design filters consider it to be) and whether it considers the residue core, borderline, or surface.

Tweak, specifically the straighten portion of the tweak tool - this would allow us to gradually move backbone shapes closer to the ideal SS shape without being as destructive as moving them all the way to ideal SS. I never use tweak manually any more (I just drag the rama dots), but it would be useful in scripts.

A way to limit the list of allowed AAs for a given residue (thereby limiting the AAs the mutate tool will pick from). Use case: foldit has buried a polar atom; limit the allowed AAs for that residue to orange, then let mutate tool try to find a good combination for that residue and its neighbors. Another use case: you have an H bond to the ligand that you don't want to give up; limit the AA for that residue to what it currently is and then let a mutate script run to find good alternatives for the other residues.

I love the idea of getting from Rosetta the endpoints of existing hydrogen bonds. This could be used in conjunction with filter violations and SS to add bands to protect sheet bonds that are getting lost during wiggle, or to add bands and/or limit allowed AAs to protect bonds to the ligand.

Bletchley Park Lv 1

functions that will:

  • release the currently loaded files on disk, so that they can be overwritten by the OS
  • reload specific files whose handles were released by the function requested above. (quicksaves, autosaves etc)
  • an option to start the client without having to maneuver through the user interface
  • an option to start a default script upon starting the client
  • an option to save the cookbook without exiting the client.
  • an option to release the cookbook so it can be overwritten by the OS
  • an option to reload the cookbook from disk (latest version)

Thanks and good luck !
BP

Bletchley Park Lv 1

  • the possibility to have 9999 quicksaves instead of just 99
  • quicksave numbering in the four digit format 0001, 0200 etc instead of 1,4,7,10,12 etc.

LociOiling Lv 1

Treat condition (filter) penalty/bonus as scorepart?

Looking at some of these suggestions, it might make sense to extend puzzle.GetPuzzleSubscoreNames to include the conditions which affect the score. Ideally, all subscores would add up to the current score. Some of the accounting might be complicated. The accounting might differ depending on whether there's a penalty or bonus.

Here are the conditions in effect for puzzle 1437, with a suggestion of how a segment's subscore might be calculated:

  • Residue IE Score

This condition is local to a segment, and is a penalty only. A segment's subscore for this condition is just the penalty. (May be zero!)

  • Core Existence

This condition applies a global penalty or bonus. The penalty could be averaged across all segments. The bonus could be averaged across the segments regarded as core. (Backdoor method for determining the core.)

  • Secondary Structure

This condition usually applies a penalty if there are too many segments in helixes, and a bonus otherwise. The penalty or bonus could be averaged across all helix segments. (Alternately, substitute "sheet" for "helix" if we get another one like that.)

  • Secondary Structure Design

This condition applies a penalty for certain residues depending on the secondary structure. There's a bonus if there are no penalties. The bonus could be averaged across all segments. The penalty could be averaged across the segments that are violating the condition.

  • Residue Count

This condition penalizes added segments. The penalty could either be averaged across all segments or just across the "added" segments, based on segment number.

  • Ideal Loops

This condition applies a penalty for each section of non-ideal loop. Normally, the penalty is 100 points. The penalty could be averaged across the segments in each section, corresponding to the red spheres revealed by the "show" option. (This is another backdoor method to get something shown in the UI.) So a bad loop with three red spheres would have a -33.333 subscore for the marked segments, four spheres would yield -25.

This method seems workable to me, having carefully considered it for the time it took to write it down.

Alternatively or additionally, we could have:

  • a new function puzzle.GetPuzzleConditionNames to return the conditions.

  • a new function puzzle.GetPuzzleConditionValue ( condname ) to return the global boolean or numeric value for the condition.

This approach doesn't give you the backdoor information that the segment-by-segment approach does, but it lends itself to include the boolean conditions like "solution was evolved" and "cutpoints need closing".

bertro Lv 1

If you are also touching the UI?

  • Make the Recipe Output window resizable
  • Update the handling of the Recipe Output window text with string.format capabilities
  • Save changes to options.txt as they are made, not just when the client closes. Right now when a crash occurs, any changes are lost.
  • open the main menu in selection interface over all other objects
  • add [B] to the Behavior main button (to harmonize with the other buttons)
  • make the Score "window" moveable
  • open recipe editor in new ScriptV2 mode instead of new GUI mode
  • open the Segment Information window with full required height to show everything the first time it is open

LociOiling Lv 1

The function structure.IsLocked should return two booleans, similar to freeze.IsFrozen.

Currently, there's no way for a recipe to tell whether a sidechain is locked. That shows up on puzzle 1443, where the backbone is completely unlocked, but most of the sidechains are locked. On 1443, it seems like the only unlocked sidechains are the ones where structure.IsMutable is true, but that's not 100% clear.