Icon representing a recipe

Recipe: wisky's Repeating Rebuild All

created by wisky

Profile


Name
wisky's Repeating Rebuild All
ID
49111
Shared with
Public
Parent
Repeating Rebuild All 12,6
Children
Created on
May 12, 2014 at 02:32 AM UTC
Updated on
May 12, 2014 at 02:32 AM UTC
Description

Selects whole protein and rebuilds it in repeatable loops

Saves best share to slot 1

12 rebuilds, with 6 repeats.

Enjoy all!

Best for


Code


-- wisky's Repeating Rebuild All! -- Rebuilds whole protein in repeatable loops. -- Best scoring pose saved in quickslave slot 1 NumberOfRebuilds=12 -- Number of Rebuilds per Retry NumberOfRetries=6 -- Number of Retries function Score() --return score return current.GetScore() end function BlueFuse() local before=current.GetScore() local after=current.GetScore() behavior.SetClashImportance(.05) structure.ShakeSidechainsAll(1) behavior.SetClashImportance(1) structure.WiggleAll(5) behavior.SetClashImportance(.07) structure.ShakeSidechainsAll(1) behavior.SetClashImportance(1) structure.WiggleAll(5) behavior.SetClashImportance(.3) structure.WiggleAll(8) behavior.SetClashImportance(1) structure.WiggleAll(15) after=current.GetScore() end function RebuildAll() -- Rebuild all loop, adapted from drjr's Randomizer for j=1,NumberOfRebuilds do print("Rebuild " .. j .. " - Initial Score: " .. Score()) selection.SelectAll() structure.RebuildSelected(1) --structure.IdealizeSelected() structure.ShakeSidechainsSelected(1) structure.WiggleAll(10) structure.ShakeSidechainsAll(1) structure.WiggleAll(10) BlueFuse() print("Rebuild " .. j .. " - Final Score: " .. Score()) recentbest.Restore() end end function Retry() -- Retry loop, self-written for k=1,NumberOfRetries do print("Starting Retry " .. k) save.Quickload(89) recentbest.Save() RebuildAll() if Score() > BestScore then save.Quicksave(1) BestScore=Score() end print("Finishing Retry " .. k) end end save.Quicksave(89) BestScore=Score() Retry() save.Quickload(1)

Comments


egran48 Lv 1

Congrats on your first script, fresh eyes with no preconceived ideas can create new things. I will be watching out for any of your new scripts and would be willing to be your tester before going public.
Thanks again