Icon representing a recipe

Recipe: Fast Relax 1.0

created by LociOiling

Profile


Name
Fast Relax 1.0
ID
107977
Shared with
Public
Parent
None
Children
None
Created on
September 18, 2022 at 01:16 AM UTC
Updated on
September 18, 2022 at 01:16 AM UTC
Description

V2 port of the classic shared by Frankie_says in 2011

https://old.fold.it/portal/recipe/34893

Best for


Code


--[[ FastRelax Based on a recipe used in Rosetta, as described in a Foldit publication in PNAS: Firas Khatib, Seth Cooper, Michael D. Tyka, Kefan Xu, Ilya Makedon, Zoran Popovic, David Baker and Foldit Players. Algorithm discovery by protein folding game players. Proceedings of the National Academy of Sciences of the United States of America (2011) http://www.pnas.org/content/108/47/18949.abstract Converted from v1 Lua by Rav3n_pl's v1 to v2 converter, FolditLuaConverter. Fast Relax 1.0 - LociOiling -- 2022/09/17 + converted using FolditLuaConverter + fixed #NEED EDIT! lines (only two in this case) + minimal testing ]]-- -- options at end p=print CI=behavior.SetClashImportance S=structure.ShakeSidechainsSelected WA=structure.WiggleAll function Score() if energy==true then return current.GetEnergyScore() -- #NEED EDIT! remove(true) if you have it#() else return current.GetScore() -- #NEED EDIT! remove(true) if you have it#() end end function round(x)--cut all afer 3-rd place return x-x%0.001 end function SaveBest() local g=Score()-bestScore if g>0 then bestScore=Score() save.Quicksave(3) else save.Quickload(3) end end function FastRelax() bestScore=Score() save.Quicksave(3) p("Starting FastRelax, Score: ",round(bestScore)) selection.SelectAll() recentbest.Save() repeat local ss=Score() CI(0.02) S(shakes) WA(wiggles) CI(0.25) S(shakes) WA(wiggles) CI(0.55) S(shakes) WA(wiggles) CI(1) S(shakes) WA(wiggles) recentbest.Restore() SaveBest() local g=Score()-ss p("Loop gain: ",round(g)) until g<minPpi p("End score: ",round(Score())) end -- options below VVVV energy=false --set true to seek energy in exploration puzzles minPpi=2 --minimum points gain per loop shakes=2 --number of shakes wiggles=5 --number of wiggles -- main call FastRelax() --end of script

Comments