LUA request

Case number:845813-987105
Topic:Game: Tools
Opened by:Steven Pletsch
Status:Closed
Type:Suggestion
Opened on:Friday, December 11, 2009 - 09:12
Last modified:Wednesday, February 18, 2015 - 00:56

It's been a while since I've had the time to really spend on foldit, but now that I have a bit more, I'm going through the info and figuring out the LUA language. I saw a post from when it was introduced asking for suggestions on additional commands, however it has been quite a while since it was posted, and rather than risk it not being seen, I am submitting my suggestions list here.

//--- Reference/Interface related functions ---//

These are function which would be extremely helpful in debugging scripts, setting visual indicators for oneself, asking for user input, or relaying data to the user running the script.

1) set_color(segment, color) // a function to set the color of a backbone segment.

2) restore_default_colors() // a function which restores normal coloring of the backbone.

3) message(message, color, duration, position) // a function to post a message to the screen (similar to the evolved or bonds broken messages) which would appear over the protein in the specified color, for duration seconds at the position given.

4) dialog_box(note) {} //a box which would pop up displaying text which could be read/scrolled, and would act as a function waiting for user input based off the following two commands:

A] integer display_button(text) // would display an option button containing (text) which would return true/false if clicked (to allow multiple option buttons and figure out which was clicked) clicking a dialogue button would return all fields from the dialogue box to the script and close the box.

B] integer display_radio_button(text) // would display a checkable option that would return true/false whether it was selected (could be usable with a dialog button to submit the options)

//--- Position related functions ---//

For making decision about what to do, I think that it would be valuable to have some sort of positioning and rotation system accessible from the script. Whether this is strictly the absolute positions like would be found in a .pdb file, or some other system which could be used, I think it would be beneficial to have this info to base decisions off of. Ideally it would be nice to have either a coordinate system set up with positions for each atom in the amino acid, like how the .pdb file is set up, or have a reference table for each type, and return them relative to the backbone segment. The minimal amount of data desired would be enough to figure out what that sidechains position and rotation are relative to the backbone, the center of the protein, and other sidechains around it. (Is it pointing in or out?, how far out is it?)

1) get_center() // a function that returns a position of the center of the protein. (perhaps similar to home key ?)

2) table get_position(segment) returns a table with the position of a sidechain data.

3) free_band(segment, position) would set a band from the specified segment to the specified position. (which is not a segment)

//--- other ---//

integer/table bond_count(atom) //If given the ability to check individual atoms, it may be beneficial to see whether they are bonded, how many times, and to what other atoms.

table get_sidechain_config(segment) //Would return the the rotamer positions for segments. (perhaps as a bitmask for each type of sidechain?)

set_sidechain_config(segment, table) ..Would set the sidechain to the specified position.

I'm sure as I start using the language and trying some scripts, more ideas will come to me, but for nwo these were things that initially popped up as "I wish it had..."

(Fri, 12/11/2009 - 09:12  |  8 comments)


Joined: 09/18/2009
Groups: SETI.Germany

Sounds good!

If you are interested in Lua scripting, maybe you want to participate here to get some ideas?
http://fold.it/portal/node/986986

Themarquis also made some Wikis:
http://foldit.wikia.com/wiki/Lua_Scripting

For known bugs read here:
http://fold.it/portal/node/986954

regards,
Alex

mat747's picture
User offline. Last seen 15 weeks 1 day ago. Offline
Joined: 10/15/2008
Groups: Void Crushers

Sounds good too

Joined: 05/26/2008
Groups: Hold My Beer

I see also that there was a get_aa() command, but that it was removed. May I ask why this was removed, and whether or not you intend to reintroduce it ?

Joined: 04/19/2008
Groups: None

I think because it was very easy to determine the sequence of the protein that way. You could then search the pdb database for it or look for proteins that have a similar sequences with known structure.

Joined: 05/26/2008
Groups: Hold My Beer

I thought that might be the case at first too, but foldit already downloads a .pdb file into the client program data directory for each puzzle, so there are much easier ways to get that info than running a script, and looking at the output and retyping it into an editor, and searching. You could simply open the file in a program that supports displaying the sequence and copy/pasting. Or even better, load it into a program that will automatically blast/fasta the sequence and overlay the closest match structures right onto the screen for you without having to do anything. (won't mention any programs, and would never condone doing this, but I know they exist)

Also comparing an unknown structure to other known structures, is a commonly accepted practice in this field.

So in that regards to that reason, I can't imagine that being the actual reason for removing that functionality, as it severely limits the amount of "decisions" which can be made by the script. Even finding something simple like relative distance between sulfurs is a huge benefit in the script, but not possible without knowing what we are working with.

Joined: 05/09/2008
Groups: Void Crushers

sounds good to me too. I would like a do_freeze(segment index1 , segment index n)

Joined: 06/17/2010
Status: Open » Open

Most of it will be done in upcoming lua update.

Joined: 06/17/2010
Status: Open » Closed

Closing, v2 LUA allow us do those things.

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