40 replies [Last post]
Tlaloc's picture
User offline. Last seen 11 weeks 14 hours ago. Offline
Joined: 08/04/2008
Groups: Mojo Risin'

I have been employed by the foldit team to add features that are missing to allow more powerful scripts (aka recipes or macros). After a week of getting up to speed, I am now starting to slowly get some of those long-missing features in. They only have me for a limited time, so here is your big chance to get that feature into foldit scripting you have always wanted.

First, let me put a limit on the requests that you make...I will be adding functions to lua scripting, or in some minor cases changing how they operate (for example, relaxing the 20 unit band length). The features I will be working on need to already be implemented in the foldit user interface, as I am mainly only adding lua wrappers to existing functionality (with a few exceptions).

I have looked through the forum and feedback posts. As far as I can tell, this is a pretty comprehensive list, and what I will be working from:

http://foldit.wikia.com/wiki/Lua_Functions_That_Should_Be_Implemented
http://foldit.wikia.com/wiki/Lua_Standard_Libraries
http://fold.it/portal/node/987880

The best way to make a request is to modify the wiki page at the URL above. Posting here also works, and acts as a vote for a feature. I will be working with Seth and Zoran to triage the requests, work out a spec, and get as many of them in as I can. Some requests are much easier to implement than others, of course. The more specific on how you want that function to operate, the more likely it is that we can get it in. Try to explain exactly what you want, what the arguments are, what it should return, and what operations it should perform.

The things that Zoran is particularly interested in are features that allow more exploration. How can you create a script that will make a radically different shaped protein? What is keeping you from doing that?

infjamc's picture
User offline. Last seen 2 years 45 weeks ago. Offline
Joined: 02/20/2009
Groups: Contenders
This is more of a "meta" request, but...

A command-line option would be nice, as this would allow the user to enter Lua functions directly and change parameters without having to edit the scripts.

jeff101's picture
User offline. Last seen 39 min 52 sec ago. Offline
Joined: 04/20/2012
Groups: Go Science
command-line option

I like infjamc's command-line option idea. It would let people try out sequences of commands on the fly before formalizing them into recipes. It would also let people who enjoy scripting be able to use scripting commands during manual interventions. It might also make script-writing easier to learn.

In Matlab, the command-line option is called the Command Window. The same commands that work in scripts can also be executed directly within the Command Window, you can even set/view/change variables and execute loops within the Command Window. Matlab also has commands like the following:

  • x -- If you type the name of a variable, here x, you can see what value it has.

  • who, whos -- List all the variables presently declared.

  • keyboard -- Used inside a script to break out into the Command Window (called keyboard mode).
    It is very helpful for debugging. You can also use it in error-handling routines in your scripts.

  • return -- Lets you return from a break to the Command Window (return from keyboard mode).
    The script that was broken out of will then continue executing,
    now with new variables if you change any during keyboard mode.
    If you don't change any variables during keyboard mode,
    the script will continue executing as if the break to keyboard mode had never occurred.

  • type x -- Lists the asci file named x. Handy for viewing the contents of scripts.

  • clear -- Lets you clear certain variables from memory.

  • save x -- Lets you save all variables into a file named x.
    In Foldit, this could help if you just made a complicated LUA table, for example, and wanted to save it for later.

  • load x -- Lets you load previously saved variables from the file named x.

  • !x -- Lets you execute DOS or other operating system commands (here the one named x) from within Matlab.

  • diary -- I think this one records into a file all the Command Window things you type.
    If you made a similar thing in Foldit, you could let diary's output file be used as a recipe.

  • help x -- Gives you a brief description of a certain command (here the one named x) and its syntax.

  • arrows -- Hitting the up or down arrows retypes previous commands in the Command Window.
    Once you find the previous command you want, you can edit it before pressing enter to execute it.
    Also, if you type the first few letters of a command before hitting the arrow keys,
    it will only pick previous commands that start with these same letters.

For more details, see http://www.mathworks.com/help/techdoc/matlab_env/f0-32574.html.

Joined: 12/27/2010
Groups: None
This is the most exciting

This is the most exciting news since I started with foldit. Your wish list is highly comprehensive but it is unlikely that you will be able to implement more than a small fraction in a month. For me the following would make the greatest difference.

1. Script output to file
2. External script editor enabled
3. Save protein from script
4. Load saved protein from script
5. Script input from file

spvincent's picture
User offline. Last seen 1 hour 32 min ago. Offline
Joined: 12/07/2007
Groups: Contenders
My wish list. 1) The ability

My wish list.

1) The ability to write to a file (the name could even be hard-coded if necessary)
2) Finer control over wiggling: the ability to stop at or near a particular score would be particularly useful.
3) Add math library
4) The functionality of the tweak tool made accessible via the API (except maybe the register shift tool: don't care about that)
5) get_xyz. Return the position of a particular residue (the alpha carbon I suppose) in whatever coordinate system is convenient.
6) get_sidechain_snap. Return the current snap position. Low priority for me but may be low-hanging fruit.

And an improved development environment would not come amiss.

Joined: 06/17/2010
InputBox and CookBook

On my "dream target" inputbox is on first place:

string intputbox('Comment string','default value')

Why return string? We not always need numerical value and lua translating it into int or float anyway if need :)

Why inputbox? Most of my scripts is very customizable. I always try to post in on best (imo) options but sometimes it need tweaking anyway (depends on puzzle, mood, time of day... ;]). That way we can kill zillions of customized scripts in book.
But saving customized script would be nice too (overwrite default value/s in script and save on different name).

My second best is cookbook:
- sorting (by name, number of uses, author...)
- folders (at least depth of 2, ie walkers/mine/script )
- rename
- good working delete and adding in selection interface :)
- tag showing that script is downloaded, changed, shared to me/group/all
- unshare any script I made (to clean site a bit form old script, I have some old scripts deleted form book and want to remove them from site/shared to me/shared to group. So I download recipe, unshare, delete for good)
- normal access to scripts code - not "all.macro" odd encoded file but plain text .lua files.

Rest I (we?) want/need posted there: http://fold.it/portal/node/987880#comment-11192

Joined: 08/24/2011
normal access to scripts code

normal access to scripts code - not "all.macro" odd encoded file but plain text .lua files.

THIS

cjmarsh's picture
User offline. Last seen 2 years 26 weeks ago. Offline
Joined: 05/21/2011
Groups: Go Science
A few things I'd like to have

A few things I'd like to have in the toolbox:
-- import/using options for CLR-compliant dynamically linked libraries (.dlls)
-- higher precision parameters for iterations of methods such as Wiggle and Shake
-- exposure of the inner workings of fold.it's proprietary methods (provided the IP rights are secure)
-- GUI creation with input status getters and simple button implementation
-- methods for xml or database conversion to image type and 2D rendering to screen coordinates

Some of the items on my wishlist would no doubt be easier to implement than others, but any number of them would certainly be helpful. Thanks for putting the time in to improve the overall scripting process, I appreciate it.

Joined: 06/17/2010
Coobook to fix

To use scripts we need *working* cookbook.
Reminder about feedback threads (major issues):
http://fold.it/portal/node/988001 - cookbook in new interface not updating
http://fold.it/portal/node/988007 - position of scripts in cookbook

Joined: 06/24/2008
Groups: Void Crushers
MAC

Being able to copy&paste on a MAC; I am a bad typist and do not want to keep typing the same commands in.

Joined: 12/27/2010
Groups: None
Constraints info

amongst the information functions required is one giving the origin and insertion of constraints - perhaps a table of constraints

cjmarsh's picture
User offline. Last seen 2 years 26 weeks ago. Offline
Joined: 05/21/2011
Groups: Go Science
Constraints info

I second this request, if the constraints are known, then 'wiggle', 'shake', 'tweak' and the rest can be combined with 'restore recent best' to obtain the minimum constraints with the maximum score.

Joined: 12/27/2010
Groups: None
Wiggle

I believe there is a missing command for a wiggle of an unselected protein. do_global_wiggle_all(num) works only on a selected protein and produces a different effect and score from the wiggle from the interface of an unselected protein. This makes it very difficult to reproduce by script a procedure which works by hand.

Joined: 06/17/2010
GUI buttons

Looks like pressing one of GUI buttons making another things than lua functions.
It is very wisible on 425 where gui wiggle button on unselected is much better than select_all() go_global_wiggle_all() in lua.

We need:
gui_wiggle_all(n)
gui_local_wiggle(n)
Not sure about shake and mutate, if are different we should have ability to call them too.

Joined: 12/27/2010
Groups: None
Clashing importance

How easy would it to be to extend the upper limit of clashing importance? I don't know what the limit should be because it will depend on effect - perhaps 2, perhaps 100?

If it is easy to accomplish, it would be something else we could try.

Joined: 12/27/2010
Groups: None
Clean up on cancel

Is it possible to have a routine run on pressing the cancel button to allow us to return the environment to a desired state? Currently cancellation can leave clashing importance set wrong and bands lying about etc.

Joined: 06/17/2010
CI only

leave bands alone!
I often use bands created by one script to use in another (ie quake + GAB).
CI can be set to initial or "just" to 1.0 after break.

Maybe "pause script" button to mess between commands or share/screen shoot current state?

Joined: 12/27/2010
Groups: None
re CI only

The intention would be for the programmer who wrote the script to be able to specify what was cleaned up and what was not. In other words, have an on_exit() function which will do nothing by default but in which cleanup can be done if desired.

B_2's picture
User offline. Last seen 4 years 25 weeks ago. Offline
Joined: 11/29/2008
Groups: None
Maybe for you

Maybe you like to leave bands lying around, but some of us like to have the bands cleared, Clashing Importance re-set to 1.0, and Structures Restored when a recipe/script is cancelled.

infjamc's picture
User offline. Last seen 2 years 45 weeks ago. Offline
Joined: 02/20/2009
Groups: Contenders
Re: B_2

Surely an even better option is to allow the user the option to designate the exact actions to take when a recipe/script is canceled (which can be set to "do nothing" by default)?

B_2's picture
User offline. Last seen 4 years 25 weeks ago. Offline
Joined: 11/29/2008
Groups: None
I agree

But that didn't sound like where rav3n_pl was heading.

Joined: 06/17/2010
I`m not talking

about "normal" script end, but about situation when user breaks it.

bertro's picture
User offline. Last seen 7 weeks 5 days ago. Offline
Joined: 05/02/2011
Groups: Beta Folders
Script PAUSE button

A script PAUSE button would be welcome on the UI. Upon PAUSE, the running script would «pause» until the PAUSE (now RESUME) button is clicked again.

This would alloy, for instance, to regain some CPU capacity (<100%) for doing some other things on my PC without having to «cancel» a script on one of my running clients.

Joined: 06/17/2010
Read band ends?

No read bands ends in wiki list?
table band.getEndpoints(int band_num)
should return table of 2 digits: start and end segment.

It would be useful for reading user bands.

Joined: 01/03/2008
Groups: Frost And Flame
Genetic programming tools

I'd love to see methods to allow recombination from different structures, so that with that and random intervention, we could apply genetic programming / evolution right within Foldit. I don't mean evolution on the AA sequence but on the 3D structure, with the fitness function just being energy after a shake/wiggle.

Joined: 06/17/2010
we have

At least 3 generic sctipts around. 2 on bandband one on fuze. Is that what you searching for?

Joined: 06/17/2010
In v2 missing

global band SetStrength ?
Tried first argument as nil, 0, true, false but it wants only band number. ONE band number :(
We still have iterate all bands to set them one strength.

rws's picture
User offline. Last seen 3 years 45 weeks ago. Offline
Joined: 08/13/2008
Groups: SETI.Germany
A function to delete segments

A function to delete segments or segment ranges, as exists via GUI in Design Mode.

And an Inputbox, as already requested.

Regards,
rws

Joined: 09/14/2008
Groups: Void Crushers
band.GetCount(),

band.GetCount(), band.SetStrength (integer bandIndex, number strength) and a loop should do the try Rav3n_pl

Joined: 06/17/2010
Yes,

I know that. But in GUI scripts this is ONE command that change ALL bands at once. No iterating.
In Quake type scripts we changing all bands at once and iterating taking long time (ie on 50 bands).

Joined: 06/17/2010
It works

Ctrl+X in cookbook editor to cut all code
Ctrl+V in cookbook editor to paste code

I`m using external editor all the time: just make change, cut from cookbook, copy from external editor, paste to cookbook.

Joined: 12/27/2010
Groups: None
band.GetLength() needed

We have band.GetGoalLength() but we also need the actual length of the band.

Tlaloc's picture
User offline. Last seen 11 weeks 14 hours ago. Offline
Joined: 08/04/2008
Groups: Mojo Risin'
band.GetLength

I added band.GetLength() last week. You should see it on the next update.

Joined: 12/27/2010
Groups: None
band.BandEnd()?

Thanks for band.GetLength(). Can we also have information on the start and end segments of a band? This is especially needed because if a band is placed by hand we don't know where it is.

Tlaloc's picture
User offline. Last seen 11 weeks 14 hours ago. Offline
Joined: 08/04/2008
Groups: Mojo Risin'
Info on a band endpoint is a little tough.

There are two kinds of bands:

1) Bands that terminate at another segment
2) Bands that terminate at a point in space

Have to represent that in Lua using table structures. Furthermore, the current position is that foldit shouldn't give the XYZ coordinates of the endpoints of bands in space (it allows a kind of copying that isn't conducive to a fun game).

Joined: 12/27/2010
Groups: None
Re Band End

I was more interested in the position of bands between segments rather than those banding to space. A function that takes a band number and returns the segment numbers of boths ends would be useful.

jeff101's picture
User offline. Last seen 39 min 53 sec ago. Offline
Joined: 04/20/2012
Groups: Go Science
Why can't the Foldit site be like this more often?

I like the tone of this Forum.
Was this the last big Foldit upgrade?
I notice many functions that I use now were discussed here.
Having links to this and other nodes like it would be good for helping new folks
know what not to post Feedbacks about.
I wish I had found this Forum sooner.

Right now, I can only vote up or down on tlaloc's initial post.
Is this the same for everyone else?
I wonder if this Forum went so smoothly because folks couldn't vote up or down about things.
I wonder how much more pleasant the whole site would be without having anonymous down voting.
Might make the Feedbacks gauntlet more pleasant to navigate.

Joined: 04/15/2012
Groups: Beta Folders
It would be nice to be able

It would be nice to be able to select anthing in foldit at all. YOu can, but you can't see it.

Joined: 06/17/2010
Use selection interface

if it is what you have in mind.

Joined: 04/15/2012
Groups: Beta Folders
Er, actually I mean text,

Er, actually I mean text, like in lua when you script, and you click and drag the curser.

Joined: 06/17/2010
This is an

EDITOR bug then, not a LUA request.
Just don`t use internal editor...

Sitemap

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, RosettaCommons