Automation of Foldit

Started by when

when Lv 1

Hello everyone, I am trying to automate Foldit operations. I learned from Wiki that Lua can be used to automate Foldit, but the tutorials for Lua seem a bit outdated. Can I use the Lua interface to accomplish the following tasks?

  • Obtaining the spatial structure of protein molecules.
  • Completely replacing mouse operations, such as dragging molecules to adjust their structure.
  • Invoking other tools provided by Foldit, such as Shake, Wiggle, etc.

Thank you for your guidance!

jeff101 Lv 1

Many Foldit players have written recipes in the language LUA to automate various procedures
within the game. You download these recipes into your cookbook to use them within Foldit, and
each recipe's web page lists its source code. Adapting other players' recipes is a good way to
learn how to write your own recipes. See https://fold.it/recipes for more details.

https://foldit.fandom.com/wiki/Lua_Scripting has a variety of links to help you get started coding
in LUA. I think GUI & LUA V1 recipes in Foldit are no longer supported, but LUA V2 recipes are
still supported. Some key links are https://foldit.fandom.com/wiki/Foldit_Lua_Functions which
lists all the supported special Foldit LUA functions, https://www.lua.org/manual/5.3/ which is
the Reference Manual for LUA 5.3, and https://www.lua.org/pil/contents.html about
Programming in LUA.

Obtaining the spatial structure of protein molecules is tricky. At first glance, there are no LUA
functions that report or set the cartesian xyz coordinates of atoms or phi,psi dihedral angles
for the protein backbone. You can, however, measure interatomic distances, and given these,
you can use the Law of Sines and the Law of Cosines to work out certain angles. Using bands
lets you enforce certain distances within the protein. There are also LUA commands to select,
wiggle, and shake parts of the protein.

I hope this helps,
Jeff