Icon representing a recipe

Recipe: Install Compound library item 0.1

created by AlkiP0Ps

Profile


Name
Install Compound library item 0.1
ID
108837
Shared with
Public
Parent
Compound Library item check (kludge)
Children
Created on
September 09, 2024 at 11:11 AM UTC
Updated on
September 09, 2024 at 11:41 AM UTC
Description

Trying to mimic natural reaction behaviour by doing shake and wiggle as much at the same time as possible. At least I'm pretty sure that's what nature does :-)

Seems to be very gentle on torsion quality, so that's a bonus.

Use your usual docking tricks after, if it looks good.

2nd attempt at a script.

Best for


Code


-- 2nd attempt at a script, trying to mimic nature's everything at once approach recipename= "Install Compound library item *gently*" local shakesNum = { 1, 1, 2, 2, 3, 5, 1, } local wigglesNum = { 1, 2, 3, 5, 7, 9, 12, } local cycleImprovement = 1 print ("Start score "..current.GetEnergyScore()) print ("Working through "..#shakesNum.." settings") print ("Minimum improvement per setting = "..cycleImprovement) for outside=1, #shakesNum do print ("Start setting # "..outside.." : shake "..(shakesNum [ outside ])..", wiggle "..(wigglesNum [outside])) for inside=1, 25 do -- 25 to prevent endless asymtote local loopStartScore = current.GetEnergyScore() structure.ShakeSidechainsAll((shakesNum [ outside ])) structure.WiggleAll((wigglesNum [outside])) local loopEndScore = current.GetEnergyScore() print ("Cycle "..inside.." = "..loopEndScore) -- Break if progress less than requested if (loopEndScore - loopStartScore < cycleImprovement) then print ("End setting # "..outside.. ": shake "..(shakesNum [ outside ])..", wiggle "..(wigglesNum [outside]).." = "..loopEndScore) print ("Insufficent improvement, moving to next setting") break end end end print (". . . No more settings, that's all folks.")

Comments


AlkiP0Ps Lv 1

You're most welcome.
I like to think this one should be fairly easy to adapt to your prefered settings. Future version will have a menu.