Wikia

Foldit Wiki

Watchlist Recent changes

Lua Functions That Should Be Implemented

This is a place to brainstorm and figure out what functions should be added to foldit by the foldit team to allow you to create scripts that imitate the actions that you perform as a human.

With the release of the Lua V2 interface, functions that are now available have been removed from the list. Check the history of the page to see stuff that once was here.

Contents

Protein Manipulation Functions Edit

Threshold parameters, which automatically stops wiggle and shake when the score goes outside of a delta range. For example, do_global_wiggle_backbone(1,10,3) would perform the normal do_global_wiggle_backbone(1) operation, but would stop the wiggle if the score went down by 10 points or more, or up by 3 or more. If these parameters were nil, then foldit would perform the current functionality. Many scripts need to put the protein into a higher energy state to get them out of a local minimum, but not distort the protein structure excessively. One iteration frequently is too much change in the protein, which causes the current entire structure layout to be lost.

We need the ability to tweak sheets and helices, with all of the operations available from the user interface.

We need the ability to move and rotate the ligand in a protein design puzzle.

We need the ability to insert and remove protein segments in a protein design puzzle.

Banding Functions Edit

We need the ability to find the segment numbers of the endpoints of a band.

We need the ability to modify the strength and length of all existing bands, and affect all future created bands.

We need the ability to retrieve all the existing bands.

We need either the ability to save the current bands to a named object, or we need enough functions to be able to enumerate everything about every band and be able to reconstruct them ourselves. I need to be able to remove all the bands to the guide I have in place, run a script that uses bands, then reapply the bands to the guide.

We need the ability to band to the equivalent segment in the guide. This could be disabled in QTTN puzzles, if desired.

Freezing Functions Edit

Alignment Functions Edit

We need the ability to determine the total number of available templates.

We need the ability to select/deselect a template.

We need the ability to determine the length of a template.

We need the ability to retrieve the template score.

We need the ability to shift/offset a letter (designation).

We need the ability to detect a gap (absence of a letter designation) in a template.

We need the ability to determine if a template is threadable.

We need the ability to determine which AAs and or sequences were threaded from which templates.

Guide Functions Edit

We need tools to manipulate the guide tool.

Investigative Functions Edit

We need structure.GetDistance() to take optional atom numbers.

We need the ability to get_aa_codon (), this information could be very vital, since an aa can be instantiated from more than one codon.

We need the ability to retrieve the entire group and solo rank lists to a lua table. This is important for a script trying to increase rank. If there is a 30 point difference between me and the person above me, a different part of the script may run than if there is .03 points between us. Also, some scripts may execute different strategies based on the score between me and the person in first place.

We need the ability to retrieve the date and time a puzzle was posted.

We need the ability to retrieve the date and time that a puzzle was first worked on. Early in the working on a puzzle, one might use a completely different strategy than later.

We need the ability to retrieve the names of all the current saves for a given puzzle.

We need the ability to find out where voids are located. This needs to happen in such a way that we can identify protein segments that are around the void.

We need the ability to get a rating of each segment on how well it aligns to the guide. This corresponds to the color of segments when View Color Relative to Guide is checked.

User Input Functions Edit

It would be nice to have the type of point and click input that is possible in (non-lua) scripts. The one I miss most is the ability to have the user select an amino acid or range along the backbone. I can have the user mark a range with a band before starting, which is ugly. But there is no way to ask a user for input in the middle of execution. (As an example, ask which sheet or helix to try straightening next.) RIEachus

Other Functions Edit

We need the ability of a recipe to be able to call another recipe.

We need the ability to scale the viewport (the equivalent of scrolling the mouse wheel).

We need the ability to alter all of the options.

We need the ability to save and restore saves.

We need at least one of these two features:

  • We need the ability to maintain a stack of savesets. A saveset here is defined as all of the quicksave slots, plus the recent best. We need a saveset_push() and saveset_pop() function. A saveset_push() would take the current savesets and copy them to the top of a stack. When a saveset_pop() occurs, the top of the stack would overwrite all of the current saveset slots. The purpose is to make parts of a complex script not have to worry about what slots have been used. So at the start of a function, it can call saveset_push(), and before it returns, it can call saveset_pop().
  • We need the ability to save savesets by name. saveset_save('foo'), saveset_restore('foo'), would save and restore the current savesets to the name 'foo'. These do not have to be persisted across runs of a script. These could again be used to save a saveset at the beginning of a function and restore it at the end.

Tweak function Edit

  • We need Tweak straighten secondary structure
  • We need Tweak rotate secondary structure

Lua Functions Edit

Many of the Lua standard library functions need to be implemented. A discussion of which functions and their impact can be found at Lua Standard Libraries

ipairs / pairs -- index an array of strings Edit

I would like the following code to work:

   local _n = {["1"]=0,["2"]=0,["3"]=0,["4"]=0,}
   local function _s (n)
       for i,v in pairs (_n) do
           v = 1
       end
       return _n
   end
   _s(_n)
   print ( _n["3"] ) -- should print 1

Editor Edit

  • We need the ability to call an external editor, possibly set by user preferences

LUA =Edit

  • It would be nice to be able to run "compiled" lua code (luac) so it would run faster
  • It would be nice to implement meta-tables (to allow things like read-only variables)
  • We need the ability to save recipes themselves to a file in Linux (cut/paste not working). External editor would address this

Recipes Edit

  • We need the problem with large all.macro files crashing the client resolved
  • We need a button to reload the all.macro file into the cookbook. This would facilitate editing the recipes outside of foldit; the painful workaround is to close and reopen foldit.
  • We need the ability to add folders to the Cookbook
  • We need the ability to sort recipes within the Cookbook
  • We need the ability to assign recipes to hotkeys
  • Showing 0 most recent

0 comments

 
10.8.56.52Anonymous User
Log in?
  Loading editor

Pages on Foldit Wiki

Add a Page
498pages on
this wiki
Advertisement | Your ad here

Latest Photos

Add a Photo
2,143photos on this wiki
See more >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki