Foldit Wiki
Register
Advertisement
GUI Options

The commands available in a GUI recipe.

GUI Recipes are the original type of recipe in Foldit. ("GUI" is jargon for "Graphic User Interface".)

Note: GUI recipes are being removed in 2021. See Big Announcements for the New Year for details.

Lua scripting can also be used to create recipes. Lua recipes are more complicated than GUI recipes, but offer much greater control.

As the name implies, GUI recipes can be created in the Foldit client mainly by clicking and picking. Typing is only required if you add comments to the recipe, and when you give the recipe a name and description. In contrast, Lua recipes are written in programming language, and it's generally best to use an external editor.

GUI recipes consist of a series of commands like Shake Sidechains, Wiggle, and Mutate, which correspond to Foldit tools.

When a GUI recipe runs, each command in the recipe is performed in order, one time.

GUI recipe commands may have options, which are called "ingredients", in keeping with the "cooking" theme. For example, Shake Sidechains, Wiggle, and Mutate have an "iterations" ingredient, limiting how long the command runs. Mutate, Freeze, and Add bands have a Segments Ingredient, restricting the commands to certain segments. Ingredients are set using sliders. Other commands have different ingredients.

GUI recipes simplify repetitive tasks, and expand the capabilities of the basic tools. For example, a single "Local Wiggle Sequence" command wiggles many separate sections of the protein. It would be extremely time-consuming to do this manually.

Getting started with GUI recipes[]

Edit Recipe

Hovering over a recipe and clicking the notepad icon opens the recipe editor. The former sample GUI recipes, now removed, are shown in this image.

As noted above, GUI recipes are being removed in 2021. See Big Announcements for the New Year for details. The starter GUI recipes that were included in the cookbook when Foldit is installed are already gone. The cookbook now includes the ability to download a "starter pack" of Lua recipes.

For the time being, it's still possible to download GUI recipes from the Foldit website. It's also possible to create new GUI recipes in the recipe editor, although this is not recommended.

The steps below are an introduction to using the GUI recipe editor.

To open the recipe editor for an existing recipe, hover over the recipe name in the cookbook and click the notepad icon. To create a new recipe, click the notepad icon on the cookbook itself.

Recipe Example 1

Example recipe 1 in the recipe editor. Clicking on the blue dashed lines lets you add a new step to the recipe. (This example has since been removed.)

In the recipe editor, a GUI recipe has one or more commands separated by blue dashed lines. Clicking on the blue dashed lines lets you add a command at that spot.

Command selected

Clicking on a command lets you move the command (up and down arrows), or delete the command (red "X"), or show help for the command (question mark icon).

Clicking on an existing command shows up and down arrows to the left of the command. The arrows can be used to move the command to a different spot in the recipe. Clicking on a command also show a question mark help button and a red "X" icon to the right of the command. The help button displays a short popup explaining the purpose of the command. The "X" icon deletes the command.

The "example" GUI recipes are not very useful by themselves, but many players have created new recipes using them as a starting point. The All Example Macros page, shared by all four of the former sample recipes, has a long list of "children" recipes. (Not all these "shared" recipes are available to download, players may have used the "share with group" or "share with self" option.)

In addition to the sample recipes and their offspring, the Foldit recipes page contains many GUI recipes. Most, but not all, have "GUI" in the title to distinguish them from Lua recipes.

An early recipe, full 2-6-3 auto walk by Madde from 2009, is a good example of a GUI recipe. It performs a Local Wiggle Sequence command on different-sized sections of the protein. It also freezes the segments before and after the local wiggle sequence area, which tends to improve results. Many Foldit recipes, both GUI and Lua, use a similar technique. The Local Wiggle Sequence command is often used toward the end of a puzzle to find small gains.

Another GUI recipe, Blue Fuse GUI, is an example of "fusing", shaking and wiggling with different values for clashing importance. Fusing often improves the score, but not always. The recipe includes "Restore Recent Best" as the last command, to ensure that it doesn't leave the protein in a worse position than when it started.

GUI recipe command ingredients[]

The two most common ingredients are the Segments Ingredient, which specifies the segments a command applies to, and the Bands Ingredient, which specifies bands. Both of these appear on several commands, and both are somewhat complex. They're covered in detail on their own pages, but there's also a brief introduction below.

Another common ingredient is "iterations", which determines how long a command runs There are also other ingredients which are specific to one or two commands.

In the recipe editor, the values of ingredients are set using sliders.

Segments[]

The commands Local Wiggle Sequence, Freeze, Unfreeze, Set Structure, Set Amino Acid, Mutate, and Add Bands have a segments option. Add Bands has two segments ingredients.

Initially, the options for segments are "All", "By stride", and "User pick".

The "All" option means the command applies to all segments in the protein.

The "By stride" option means the command applies to every nth segment, starting at a specified segment. For example, a command might apply to every fourth segment starting at segment 3.

The "User pick" option requires the user select the segments by clicking on them. The command then operates on the selected segments.

The same set of selected segments is available to use later in the recipe. When "User pick" is first specified, "User pick <seg 1>" appears in the command.

On subsequent commands,"Reuse <seg 1>" is an option for any segment selection. A recipe can have multiple "user pick" commands, and each set of picks becomes available for later use.

See Segments Ingredient for more.

Bands[]

Three banding commands, Disable Bands, Enable Bands, Delete, and Change Band Strength, have options that are somewhat similar to segments: "All", "Connected", and "User pick".

For these banding commands, "All" means all bands, and "Connected" means bands that are connecting two segments. (A band can also extend from a segment to a point in space, a spaceband.)

When "User pick" appears for a banding command, the user is prompted to select bands by clicking on them. When "User pick" is first specified, "User pick <band 1>" appears in the command, and "Reuse <band 1>" is available on subsequent band commands.

See Bands Ingredient for more.

Iterations[]

Stop Timer Counter

The counter value corresponds to the "iterations" option in GUI recipe commands.

The commands Shake, Wiggle, Local Wiggle Sequence, and Mutate all have an "iterations" ingredient. The value of this option corresponds to the counter seen in the upper left of the Foldit window when a command is running. The number of iterations or cycles needed depends on the command. Shake generally finishes its work in the first cycle, while wiggle requires more cycles.

The value "Until Stopped" can also be selected for iterations. "Until stopped" means the command continues until the user cancels it. This setting should be used sparingly. Lua recipes don't have an equivalent for the "Until Stopped" setting.

Other ingredients[]

The Set Structure command lets you pick the secondary structure desired -- helix, sheet or loop from a menu.

The Set Amino Acid command lets you pick the amino acid desired from a menu.

Other commands have miscellaneous ingredients:

Some commands, like Set Recent Best, don't have any ingredients.

Converting to Lua[]

GUI commands to Lua functions lists the Lua equivalents for each GUI command, and discusses some of the issues in converting certain options. GUI commands Lua V2 equivalents has the same information in table format, minus the discussion.

Many of GUI commands have more than one Lua equivalent, but it's usually easy to pick the correct one. Some options are a little more complex, however.

The "by stride" option on the Segments Ingredient doesn't have a direct replacement, but it's easy to implement in Lua using a "for loop" and the appropriate Lua function.

On the other hand the "user pick" option for both the Segments and the Bands ingredients just isn't supported in Lua. Lua does have "dialogs" for displaying information and collecting user input, but they don't include picking segments or bands.

Somewhat oddly, the option to reuse a user pick on a subsequent command is easy to implement in Lua, but the lack of a user pick in the first place makes that irrelevant. Nevertheless, it's common for recipes to work with lists of segments or bands, but the lists are recipe picks, not user picks.

Many GUI recipes can be converted in a straightforward fashion, which doesn't require much knowledge of Lua or programming.

See GUI to Lua - converting Co lapse's Settle for a detailed example of converting a GUI recipe to Lua. Settle uses the "by stride" option several times, which is replaced by a "for loop" in Lua. Aside from that slight complication, it's easy to match the GUI recipe to the Lua recipe step-by-step.

The only tools required when converting are Foldit for viewing the GUI recipe, and an a text editor. A simple editor such as "Notepad" on Windows is good enough. You could even use the Foldit recipe editor in a second client, but this is not recommended, since it's fairly primitive and a little buggy.

Limitations of GUI recipes[]

The main advantage of GUI recipes over Lua recipes is that no debugging is required for a GUI recipe. There's no possibility of having a GUI recipe fail due to a syntax error in its programming.

While lack of debugging is a major plus, there are a large number of minuses to GUI recipes.

GUI recipes don't involve typing, and there's no "source code" format. GUI recipes must be created in the Foldit client. There's no equivalent to copying and pasting, so there's no way to merge parts of two different recipes, except by manually adding steps.

There is no way to perform a set of steps repeatedly in a GUI recipe. The only options are either to run the recipe repeatedly, or add the commands to the recipe repeatedly.

In general, GUI recipes lack many of the key features that a programming language like Lua provides. There are no variables, no if-then-else statements, and no for or while loops.

Several Foldit tools can't be used from a GUI recipe.

There are no GUI recipe commands for key Foldit tools like remix and rebuild.

The "add bands" command can only band between the backbone of segments. It can't band between the sidechains of segments, and it can't band from a segment to a point in space.

Some GUI recipes commands allow for complex segment selections to be specified, but these options may have limited practical use.

For example, the "add band" command can add multiple bands in a single operation, but lacks precise control. So, if the "add band" command specifies adding a band starting every fifth segment starting at segment 1 and ending every seventh segment starting at segment 12, that pattern is followed until the end of the protein is reached. There's no ability to restrict banding to only a section of the protein.

GUI recipes require the Foldit window to be visible while they are running. If the Foldit window is minimized, GUI recipes essentially stop until the window is visible again.

GUI recipes generally consume more computer resources than Lua recipes. For example, in the Windows environment, a GUI recipe tends to have two active threads while running, while a Lua recipe running with the Foldit window minimized has only one active thread. The effect is that a GUI recipe can use almost twice the processor power a a Lua recipe.

Historical use of GUI recipes[]

Some Foldit puzzles have limited players to using GUI recipes. These puzzles often had "hand-folding round" in the title. Generally, group play was also disabled in the hand-folding round. After the hand-folding round was completed, a new puzzle with the same protein would open. In the second round, players could load their soloist solutions from the hand-folding round, and Lua recipes and group play were enabled.

Puzzle 1105 "de-novo freestyle 52", was the last hand-folding puzzle, ending 1 July 2015. This puzzle never had a second round, although the reasons for this are unclear.

Advertisement