Icon representing a recipe

Recipe: Design Models 2.3.3

created by Bruno Kestemont


Design Models 2.3.3
Shared with
Created on
December 05, 2020 at 11:26 AM UTC
Updated on
December 05, 2020 at 11:26 AM UTC

Proposes a secundary structure for current length

Best for


--Start Design Models by Bruno Kestemont --[[ =================================== ver 1.0.0 ver 1.0.1 added 80 ver 1.0.2 added HHH models (for H-Bond puzzles) ver 1.0.3 debugged dialog for n60 ver 1.0.4 more models like HHSSSS from 60 res. ver 1.0.5 HHSSSS in all lengths ver 1.0.6 debugged ver 1.0.7 added 85 & 90 ver 1.0.8 fixed HHSSS in 80-85-90 ver 1.0.9 added HHSSSSH in 80-85-90 ver 1.0.10 added SSS_SSS and SSSS_SSSS in 75-80-85-90 ver 1.0.11 corrected the length of sheets in order to respect chirality in 85 + test bands ver 1.1.0 Adding different paterns for choice of direction and chirality, e.g. HHSSS, SSSHH, HSSSH ver 2 : SS compatible with blueprint: 2-4-5 segs only for SS(never 3), 1-2-3 only for HH ver 2.0.1: following blueprint rule where it was missing ver 2.0.1: corrected SSs + added notes ver 2.2.1: added 95-120 ver 2.2.2: some bug fixed (including in 65) ver 2.3: identify unlocked ones (at end of protein) ver 2.3.1: better shapes for using BluePrint. I'll add ok bp when the design is immediately ok using ideal SS then bp ver 2.3.2: added some HHHH in short proteins ver 2.3.3: ideal SS Note: in SSS, when the number of residues is pair (for a connecting loop of 3 segments) , we can do a good cake turning left, then right then left ... If it is uneven, it does not work (has to turn always left or always right). That's what I tried to correct in this version Moreover, I've seen in top solutions that HSSSH can be as good as SSSHH or HHSSS As chirality has its importance, I made several similar structures but in opposite directions as well. One segment at each end. From this basic designs, it's possible to idealize each turns by transforming loop segments to sheets. The rules are: SS link: 2-3 => turn left (from residue n to n+1 with sidechains pointing bellow) 4 segs= 50-50 WARNING: you have few choice here: only one Blupoint solution turns left. Only if all SS links are 4, then you may try with right turns. 5 segs: turning right (=> replacing the 2 sheet ends with loops doesn't solve chirality problem) TO DO VERIFY HS link (2-3 loop length): the sidechain of the first sheet seg must point away from helix (use this rule to decide on which side of the plane you put your helix) SH link (2 loop length): the helix is where the latest S seg's sidechain points to SH link (3 loop length): the helix goes opposite of the last sheet sidechain. Helix length is arround double than sheet length. The length of the helix determines the way it turns from the sheet: TO DO verify. You may change the turn by displacing the residue the helix starts from (but it's not elegant, I've to correct this from here). Best shapes for HH: link 1 and 2 forms a V (not parallel helices => to avoid link 3: first model forms a light V => not the best latest model is nice parallel => the best Best shape for SS: link 4 turns right or left => --]] recipename= "Design Models 2.3.3" -- ================================== Begin Function Wrappers by Brown42 -- These must always be at the top of a file -- Remove the problematic molecule e.g. puzzle 471 structure._GetCount = structure.GetCount function structure.HasMolecule() return structure.GetSecondaryStructure(structure._GetCount())=='M' end function structure.GetCountC() local n = structure._GetCount() while structure.GetSecondaryStructure(n) == 'M' do n = n - 1 end return n end function getFirstUnlocked() local first=1 while structure.IsLocked(first) do first = first + 1 end return first end -- ================================== End Function Wrappers structure.HasMolecule() if structure.HasMolecule() then print('Note: structure has a molecule, which will be ignored.') end first= getFirstUnlocked() last = structure.GetCountC() n=last-first+1 sslist = {} tab2= {} saveNote19=structure.GetNote(19) note19libre=true note19Set=false SSreset='' SS="" -- the SS to be assigned and pasted in note 19 BND="" -- the bands to be whritten in note 18 (for import with Band Copy-Paste recipe) print("first, last, n: ",first, " ", last, " ",n) --START SET NOTES BY PD --[[ Set note with author, recipe and big steps -- By Pauldunn This subroutine is used in much group recipe versions in various groups originally in Go Science It traces the various recipes and players that improved the current solution Module to quick copy-paste it in existing recipes, by Bruno Kestemont ]]-- --HOW TO include in a recipe? --1a) COPY from here ================ function InitNotes(recipename) local recipename=recipename or "" note_number=structure.GetCount() for seg=structure.GetCount(),1,-1 do if structure.GetNote(seg)~="" then break end note_number=seg end print(string.format("Recording "..recipename.." results in Note for segment %i",note_number)) starting_score=current.GetScore() --structure.SetNote(note_number,string.format("(%s) %.3f + %s(%i) %.3f",user.GetPlayerName(),starting_score,recipename,loop_count,current.GetScore())) end function SetNote(note_number, starting_score, recipename, loop_count) local recipename=recipename or "" local starting_score=starting_score or 0 local loop_count=loop_count or 1 --print(string.format("Recording "..recipename.." results in Note for segment %i",note_number)) structure.SetNote(note_number,string.format("(%s) %.3f + %s(%i) %.3f",user.GetPlayerName(),starting_score,recipename,loop_count,current.GetScore())) end InitNotes(recipename) -- WARNING: and match "recipename" with the recipename of the recipe --1b) COPY to here. ================ --2) PASTE somewhere to the beginning of your recipe. --3a) COPY from here --------------- SetNote(note_number, starting_score, recipename, 0) -- WARNING: and mach "recipename" and "loop_count" with the names of the recipe --3b) COPY to here -------------- --4) PASTE at the end of the main loop function of your recipe, at the end of the cleanup function, at the end of the recipe --better loop_count a global variable --END SET NOTES BY PD -- ============================== Begin Read Functions -- Read primary and secondary structure function ReadStructure() local tmp = {} local rc, aa for i = first,last do if structure.IsMutable(i) == true then tmp[#tmp + 1] = structure.GetAminoAcid(i) else tmp[#tmp + 1] = ' ' end sslist[#sslist + 1] = structure.GetSecondaryStructure(i) end ConcatenateStructure() local dontprintlist = {M=true} dontprintlist[' '] = true print('Structure read from range:',first,'to',last) print('Secondary Structure:') print(SS) end -- ============================== End Read Functions function ConcatenateStructure() local sstructure='' for i = first,last do sstructure=sstructure..sslist[i] end if (sstructure:find("E") or sstructure:find("H")) then SS=sstructure else SS='' -- avoiding all loops print("No SS found, only loops") end return end -- ============================== Begin Write Functions function note19free() if #saveNote19>0 and (saveNote19:find("E") or saveNote19:find("H")) then note19libre=false note19Set=true elseif #saveNote19>0 then if saveNote19:find("LLL") then print("Only loops in note 19: deleting") structure.SetNote(19,'') note19libre=true -- will erase note 19 note19Set=false else note19libre=false note19Set=false end else note19libre=true note19Set=false end if note19Set==false then print("Note 19 not empty, delete the note and run again") end end function WriteStructure() note19free() if note19libre and not note19Set then print("Copied in note 19") structure.SetNote(19,SS) end if BND~="" then print("Copied bands in note 18") structure.SetNote(18,BND) end end function WriteSecondaryStructure(str) -- by Brown42, BK --local n = structure.GetCount() local tab ={} local input = string.upper(str) print ('input='..input) local ss = { H='H', E='E', L='L', I='L', B='L', S='L', T='L', M=' ', G='H'} ss[' '] = ' ' -- table of allowed SS, reduced to 'EHL ' --tab = StringToTable(input) tab = StringToTable(input, first) if tab == nil then print ('tab is nil') return false else print('tab n= '..#tab) end -- Error check SS input for i = 1,#tab do --for i = first,last do -- initializing to L --local x = tab[i-first] local x = tab[i] print(i..") SS: "..ss[x[1]]..". from:"..x[2]..". to: "..x[3]) if x[2] < first or x[2] > last or x[3] < first or x[3] > last then print ('Your secondary structure is out of range') return false end x[1] = ss[x[1]] if x[1] == nil then print('Unrecognized AA symbol:',x[1],x[2],'Input Error') return false end -- Set SS structure.SetSecondaryStructureSelected('L') end for i = 1,#tab do --for i = first,last do local x = tab[i] --local x = tab[i-first+1] if x[1] ~= ' ' then -- no changes for ' ' if x[2] == x[3] then structure.SetSecondaryStructure(x[2],x[1]) else selection.DeselectAll() selection.SelectRange(x[2],x[3]) structure.SetSecondaryStructureSelected(x[1]) structure.IdealSSSelected() end end end return true end -- ============================== End Write Functions -- ============================== Begin Reset Functions function ResetSS(str) local str=str or SS if str==nil or str=='' then if note19Set then str=structure.GetNote(19) end end if str==nil or str=='' then print ('Nothing found in note 19, nothing to reset') else print('Reseting secundary structure:',str) WriteSecondaryStructure(str) end end function ParseCompressed(str) -- based on Brown42 -- First turn string into letter - number pairs local init = 1 local tab = {} local ranging = false -- true means range extension is disallowed local lower = 0 -- lower value of range, 0 illegal local sym = '' -- symbol being compressed, empty illegal while init <= #str do local a,b,c,d = string.find(str, ' *([%a%-]?) *(%d+) *',init) if a == nil then break end init = b+1 -- continuing a range, check if it's valid if c == '-' then if ranging == true then dialog.ShowMessageBox('Multiple range numbers (a range is number - number)','Input Error') return nil end if sym == '' or lower == 0 then dialog.ShowMessageBox('Initial range (a range continues a structure number pair)','Input Error') return nil end tab[#tab+1] = {sym, lower, tonumber(d)} ranging = true lower = 0 -- starting a new range with explicit symbol elseif c ~= '' then ranging = false if sym ~= '' and lower > 0 then tab[#tab+1] = {sym,lower,lower} end sym = c lower = tonumber(d) ranging = false -- starting a new range with same symbol elseif sym ~= '' then if lower > 0 then tab[#tab+1] = {sym,lower,lower} end lower = tonumber(d) ranging = false else dialog.ShowMessageBox({'Missing structure symbol (a range starts', 'with a structure number pair'},'Input Error') end end if lower > 0 then tab[#tab+1] = {sym,lower,lower} end return tab end -- is there another way to do this? string.subs I guess function string.at(str,i) return string.char(string.byte(str,i)) end -- Group up identical symbols into symbol,range table function Compress(str,start) ---- based on Brown42 local sym = '' local count = 0 local result = {} for i = 1,#str+1 do if string.at(str,i) == sym then count = count + 1 else if count > 0 then result[#result+1] = {sym,start+i-1-count,start+i-2} end count = 1 sym = string.at(str,i) end end return result end -- Turn a string that may or may not be compressed into a symbol,range table, by Brown42 function StringToTable(input,startstr) startstr = startstr or '' local compressed = string.find(input,'%d') ~= nil local tab if compressed then if startstr ~= '' then dialog.ShowMessageBox({'Reminder: the start/range value is ignored','when using compressed notation.'},'Info') end tab = ParseCompressed(input) if (tab == nil) then dialog.ShowMessageBox('Error parsing compressed string.') return nil end else local start = 1 if startstr ~= '' then start = tonumber(startstr) end tab = Compress(input,start) end return tab end certified= false if n== 121 then certified = true end -- to be adapted when new ones come TO DO, not working yet function get_parameters (certified) -- everything is here local certified=certified or false -- the aim is to present only successfull ones at first shot (Not used actually) local dlog = dialog.CreateDialog ( recipename ) dl1=dialog.AddLabel("Choose only one design (S= sheet, H= helix)") if certified == true then dl2=dialog.AddLabel("Designs that have been succesfull in the past:") dlog.SSSSHH = dialog.AddCheckbox ( "SSSSHH" , false ) else if n== 50 then dlog.SHS = dialog.AddCheckbox ( "SHS" , false ) dlog.HHH = dialog.AddCheckbox ( "HHH" , false ) dlog.SSHSS = dialog.AddCheckbox ( "SSHSS" , false ) dlog.HHSSSS = dialog.AddCheckbox ( "HHSSSS" , false ) dlog.SSSSHH = dialog.AddCheckbox ( "SSSSHH" , false ) dlog.HSSSSH = dialog.AddCheckbox ( "HSSSSH" , false ) elseif n==55 then dlog.SHS = dialog.AddCheckbox ( "SHS" , false ) dlog.HSH = dialog.AddCheckbox ( "HSH" , false ) dlog.HHH = dialog.AddCheckbox ( "HHH" , false ) dlog.SSHSS = dialog.AddCheckbox ( "SSHSS" , false ) dlog.HHSSSS = dialog.AddCheckbox ( "HHSSSS" , false ) dlog.SSSSHH = dialog.AddCheckbox ( "SSSSHH" , false ) dlog.HSSSSH = dialog.AddCheckbox ( "HSSSSH" , false ) dlog.SSS_SSS = dialog.AddCheckbox ( "SSS_SSS" , false ) dlog.SSSS_SSSS = dialog.AddCheckbox ( "SSSS_SSSS" , false ) elseif n==60 then dlog.HHH = dialog.AddCheckbox ( "HHH" , false ) dlog.HHHH = dialog.AddCheckbox ( "HHHH" , false ) dlog.SSSHH = dialog.AddCheckbox ( "SSSHH" , false ) dlog.SSSHH2 = dialog.AddCheckbox ( "SSSHH2" , false ) dlog.HHSSS = dialog.AddCheckbox ( "HHSSS" , false ) dlog.HHSSS2 = dialog.AddCheckbox ( "HHSSS2" , false ) dlog.SSSSSH = dialog.AddCheckbox ( "SSSSSH" , false ) dlog.SHHSSS = dialog.AddCheckbox ( "SHHSSS" , false ) dlog.HHSSSS = dialog.AddCheckbox ( "HHSSSS" , false ) dlog.SSSSHH = dialog.AddCheckbox ( "SSSSHH" , false ) dlog.HSSSSH = dialog.AddCheckbox ( "HSSSSH" , false ) dlog.SSS_SSS = dialog.AddCheckbox ( "SSS_SSS" , false ) elseif n==65 then dlog.SSH = dialog.AddCheckbox ( "SSH" , false ) dlog.HSH = dialog.AddCheckbox ( "HSH" , false ) dlog.HHH = dialog.AddCheckbox ( "HHH" , false ) dlog.HHHH = dialog.AddCheckbox ( "HHHH" , false ) dlog.SSHSS = dialog.AddCheckbox ( "SSHSS" , false ) dlog.HHSSS = dialog.AddCheckbox ( "HHSSS" , false ) dlog.HHSSSS = dialog.AddCheckbox ( "HHSSSS" , false ) dlog.SSSSHH = dialog.AddCheckbox ( "SSSSHH" , false ) dlog.HSSSSH = dialog.AddCheckbox ( "HSSSSH" , false ) dlog.HHHSSS = dialog.AddCheckbox ( "HHHSSS" , false ) dlog.SSS_SSS = dialog.AddCheckbox ( "SSS_SSS" , false ) dlog.SSSS_SSSS = dialog.AddCheckbox ( "SSSS_SSSS" , false ) elseif n==70 then dlog.HHH = dialog.AddCheckbox ( "HHH" , false ) dlog.HHHH = dialog.AddCheckbox ( "HHHH" , false ) dlog.SHS = dialog.AddCheckbox ( "SHS" , false ) dlog.HSSS = dialog.AddCheckbox ( "HSSS" , false ) dlog.HHSSS = dialog.AddCheckbox ( "HHSSS" , false ) dlog.SSSHH = dialog.AddCheckbox ( "SSSHH" , false ) dlog.HSSSH = dialog.AddCheckbox ( "HSSSH" , false ) dlog.SSHSS = dialog.AddCheckbox ( "SSHSS" , false ) dlog.HHSSSS = dialog.AddCheckbox ( "HHSSSS" , false ) dlog.SSSSHH = dialog.AddCheckbox ( "SSSSHH" , false ) dlog.HSSSSH = dialog.AddCheckbox ( "HSSSSH" , false ) dlog.SSS_SSS = dialog.AddCheckbox ( "SSS_SSS" , false ) dlog.SSSS_SSSS = dialog.AddCheckbox ( "SSSS_SSSS" , false ) elseif n==75 then dlog.HHH = dialog.AddCheckbox ( "HHH" , false ) dlog.HHHH = dialog.AddCheckbox ( "HHHH" , false ) dlog.HSSS = dialog.AddCheckbox ( "HSSS" , false ) dlog.SSSSH = dialog.AddCheckbox ( "SSSSH" , false ) dlog.SSHSS = dialog.AddCheckbox ( "SSHSS" , false ) dlog.HHSSS = dialog.AddCheckbox ( "HHSSS" , false ) dlog.SSSHH = dialog.AddCheckbox ( "SSSHH" , false ) dlog.HSSSH = dialog.AddCheckbox ( "HSSSH" , false ) dlog.HHSSSS = dialog.AddCheckbox ( "HHSSSS" , false ) dlog.SHSSSS = dialog.AddCheckbox ( "SHSSSS" , false ) dlog.SSS_SSS = dialog.AddCheckbox ( "SSS_SSS" , false ) dlog.SSSS_SSSS = dialog.AddCheckbox ( "SSSS_SSSS" , false ) elseif n==80 or n==85 or n==90 or n==95 or n==100 or n==105 or n==110 or n==115 or n==120 then dlog.HHH = dialog.AddCheckbox ( "HHH" , false ) dlog.HHHH = dialog.AddCheckbox ( "HHHH" , false ) dlog.HSSS = dialog.AddCheckbox ( "HSSS" , false ) dlog.SSSSH = dialog.AddCheckbox ( "SSSSH" , false ) dlog.SSHSS = dialog.AddCheckbox ( "SSHSS" , false ) dlog.HHSSS = dialog.AddCheckbox ( "HHSSS" , false ) dlog.SSSHH = dialog.AddCheckbox ( "SSSHH" , false ) dlog.HSSSH = dialog.AddCheckbox ( "HSSSH" , false ) dlog.HHSSSS = dialog.AddCheckbox ( "HHSSSS" , false ) dlog.SSSSHH = dialog.AddCheckbox ( "SSSSHH" , false ) dlog.HSSSSH = dialog.AddCheckbox ( "HSSSSH" , false ) dlog.HHSSSSH = dialog.AddCheckbox ( "HHSSSSH" , false ) dlog.SSS_SSS = dialog.AddCheckbox ( "SSS_SSS" , false ) dlog.SSSS_SSSS = dialog.AddCheckbox ( "SSSS_SSSS" , false ) else print("Puzzle length not implemented") return false end end dlog.ok = dialog.AddButton ( "OK" , 1 ) if certified == true then dlog.ok = dialog.AddButton ( "More" , 2 ) end dlog.cancel = dialog.AddButton ( "Cancel" , 0 ) if ( dialog.Show ( dlog ) > 1 ) then return get_parameters (false) end if ( dialog.Show ( dlog ) > 0 ) then if certified == true then if dlog.SSSSHH.value then SS="LEEEEEEEEEELLEEEEEEEEEELLEEEEEEEEEELLLLEEEEEEEEEELLHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHL" -- ok end else if n== 50 then if dlog.HHH.value then SS="LHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHL" --ok elseif dlog.SHS.value then SS="LEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEL" --ok elseif dlog.SSHSS.value then SS="LEEEEEELLEEEEEELLLHHHHHHHHHHHHLLLEEEEEELLLLEEEEEEL" --ok elseif dlog.SSSSHH.value then SS="LEEEELLLLEEEELLLLEEEELLEEEELLLHHHHHHHHLLLHHHHHHHHL" --ok elseif dlog.HHSSSS.value then SS="LHHHHHHHHLLLHHHHHHHHLLLEEEELLEEEELLLLEEEELLLLEEEEL" elseif dlog.HSSSSH.value then SS="LHHHHHHHLLEEEELLLLEEEEEELLLLEEEELLLLEEEELLHHHHHHHL" --ok end elseif n==55 then if dlog.SHS.value then SS="LEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEEL" --ok elseif dlog.HSH.value then SS="LHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHL" --ok elseif dlog.HHH.value then SS="LHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHL" --ok elseif dlog.SSHSS.value then SS="LEEEEEELLLLLEEEEEELLLHHHHHHHHHHHHHLLLEEEEEELLLLLEEEEEEL" --ok elseif dlog.HHSSSS.value then SS="LHHHHHHHHHLLLHHHHHHHHHLLLEEEELLLLEEEELLLLEEEELLLLLEEEEL" --ok verify 5 turns right elseif dlog.SSSSHH.value then SS="LEEEELLLLLEEEELLLLEEEELLLLEEEELLLHHHHHHHHHLLLHHHHHHHHHL" --ok verify 5 turns right elseif dlog.HSSSSH.value then SS="LHHHHHHHHHLLLEEEELLLLEEEELLLLLEEEELLLLEEEELLLHHHHHHHHHL" --ok verify 5 turns right elseif dlog.SSS_SSS.value then SS="LEEEEEELLEEEEEELLEEEEEELLLLLLEEEEEELLLLLEEEEEELLEEEEEEL" --ok verify 5 turns right end elseif n==60 then if dlog.HHH.value then SS="LHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHL" --ok bp elseif dlog.HHHH.value then SS="LHHHHHHHHHHHHLLLHHHHHHHHHHHHHLLLHHHHHHHHHHHLLLHHHHHHHHHHHHHL" --ok bp elseif dlog.HHSSS.value then SS="LHHHHHHHHHHHHHLLLHHHHHHHHHHHHHLLLEEEEEELLLLEEEEEELLLLEEEEEEL" --ok bp bof elseif dlog.SSSHH.value then SS="LEEEEEELLEEEEEELLEEEEEELLLHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHL" -- ok bp bof elseif dlog.HHSSS2.value then SS="LHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHLLLEEEEEELLEEEEEELLEEEEEEL" -- ok bp bof elseif dlog.SSSHH2.value then SS="LEEEEEELLEEEEEELLEEEEEELLLHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHL" elseif dlog.SSSSSH.value then SS="LEEEEEELLEEEEEELLEEEEEELLLLEEEEEELLLLLEEEEEELLLHHHHHHHHHHHHL" --ok elseif dlog.SHHSSS.value then SS="LEEEEEELLLHHHHHHHHHHHHLLLHHHHHHHHHHLLLEEEEELLEEEEEELLEEEEEEL" --ok elseif dlog.SSSSHH.value then SS="LEEEEEELLEEEEEELLEEEEEELLEEEEEELLLHHHHHHHHHHHLLLHHHHHHHHHHHL" --ok elseif dlog.HHSSSS.value then SS="LHHHHHHHHHHHLLLHHHHHHHHHHHLLLEEEEEELLEEEEEELLEEEEEELLEEEEEEL" --ok elseif dlog.HSSSSH.value then SS="LHHHHHHHHHHHLLLEEEEEELLEEEEEELLEEEEEELLEEEEEELLLHHHHHHHHHHHL" --ok elseif dlog.SSS_SSS.value then SS="LEEEEEELLLLEEEEEELLLLEEEEEELLLLLLEEEEEELLLLEEEEEELLLLEEEEEEL" --ok end elseif n==65 then if dlog.SSH.value then SS="LEEEEEEEEEEEEEELLEEEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHL" --ok elseif dlog.HSH.value then SS="LHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HHH.value then SS="LHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHL" elseif dlog.HHHH.value then SS="LHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHL" elseif dlog.SSHSS.value then SS="LEEEEEEEELLLLEEEEEEEELLLHHHHHHHHHHHHHHHHHLLLEEEEEEEELLLLEEEEEEEEL" --ok elseif dlog.HHSSS.value then SS="LHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHLLLEEEEEEELLLLEEEEEEEELLEEEEEEEEL" --ok elseif dlog.HHHSSS.value then SS="LHHHHHHHHHHLLLHHHHHHHHHHLLLHHHHHHHHHHLLLEEEEEELLEEEEEELLLLEEEEEEL" --ok elseif dlog.HSSSSH.value then SS="LHHHHHHHHHHHHLLEEEEEELLLLEEEEEELLLLEEEEEELLEEEEEELLLHHHHHHHHHHHHL" --ok elseif dlog.HHSSSS.value then SS="LHHHHHHHHHHHLLLHHHHHHHHHHHHLLLEEEEEELLLLEEEEEELLLLEEEEEELLEEEEEEL" elseif dlog.SSSSHH.value then SS="LEEEEEELLEEEEEELLLLLEEEEEELLEEEEEELLLHHHHHHHHHHHHLLLHHHHHHHHHHHHL" --ok elseif dlog.SSS_SSS.value then SS="LEEEEEELLLLLEEEEEELLLLLEEEEEELLLLLLLEEEEEELLLLLEEEEEELLLLLEEEEEEL" --ok elseif dlog.SSSS_SSSS.value then SS="LEEEEEELLEEEEEELLEEEEEELLEEEEEELLLEEEEEELLEEEEEELLEEEEEELLEEEEEEL" end elseif n==70 then if dlog.HHH.value then SS="LHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHL" --ok elseif dlog.HHHH.value then SS="LHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHL" elseif dlog.SHS.value then SS="LEEEEEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEEEEEEL" --ok elseif dlog.HSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEELLLLLEEEEEEEEEELLLLLEEEEEEEEEEL" --ok elseif dlog.HHSSS.value then SS="HHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHLLLEEEEEEEELLLLEEEEEEEELLLLEEEEEEEEL" --ok elseif dlog.SSSHH.value then SS="LEEEEEEEELLEEEEEEEELLEEEEEEEELLLHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHH" --ok elseif dlog.HSSSH.value then SS="LHHHHHHHHHHHHHHHLLLEEEEEEEELLLLEEEEEEEELLLLEEEEEEEELLLHHHHHHHHHHHHHHHL" --ok elseif dlog.SSSSHH.value then SS="LEEEEEELLEEEEEELLLLEEEEEELLLLEEEEEELLLHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHL" --ok elseif dlog.HHSSSS.value then SS="LHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHLLLEEEEEELLEEEEEELLLLEEEEEELLLLEEEEEEL" --ok elseif dlog.HSSSSH.value then SS="LHHHHHHHHHHHHHHLLLEEEEEELLEEEEEELLEEEEEELLLLLEEEEEELLLHHHHHHHHHHHHHHHL" --ok elseif dlog.SSHSS.value then SS="LEEEEEEEEEELLEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEELLEEEEEEEEEEL" --ok elseif dlog.SSS_SSS.value then SS="EEEEEEEELLLLEEEEEEEELLLLEEEEEEEELLLLLEEEEEEEELLLLEEEEEEEELLLLEEEEEEEEL" --ok elseif dlog.SSSS_SSSS.value then SS="EEEELLLLLEEEELLLLLEEEELLLLLEEEELLLLLLLLEEEELLLLLEEEELLLLLEEEELLLLLEEEE" --ok end elseif n==75 then if dlog.HHH.value then SS="LHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHL" --ok elseif dlog.HHHH.value then SS="LHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHL" --ok elseif dlog.HSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHEEEEEEEEEELLLLLEEEEEEEEEEEELLLLEEEEEEEEEEEEL" --ok elseif dlog.SSSSH.value then SS="LEEEEEEEEEELLEEEEEEEEEELLLLEEEEEEEEEELLEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHL" --ok elseif dlog.SSHSS.value then SS="LEEEEEEEEEELLLLLEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEELLLLEEEEEEEEEEL" --ok elseif dlog.HHSSS.value then SS="LHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHLLLEEEEEEEELLLLLEEEEEEEELLLLEEEEEEEEL" --ok elseif dlog.SSSHH.value then SS="LEEEEEEEELLEEEEEEEELLLLLEEEEEEEELLLHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHL" --ok elseif dlog.HSSSH.value then SS="LHHHHHHHHHHHHHHHHHLLLEEEEEEEELLLLEEEEEEEELLLLLEEEEEEEELLLHHHHHHHHHHHHHHHHHL" --ok elseif dlog.SHSSSS.value then SS="LEEEEEEEELLLHHHHHHHHHHHHHHHHHHLLLEEEEEEEELLEEEEEEEELLEEEEEEEELLLLLEEEEEEEEL" elseif dlog.HHSSSS.value then SS="LHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHLLLEEEEEEEELLEEEEEEEELLLLEEEEEEEELLEEEEEEEEL" --ok elseif dlog.SSS_SSS.value then SS="EEEEEEEEEELLLLLEEEEEEEELLLLLEEEEEEEELLLLLEEEEEEEELLLLEEEEEEEELLLLLEEEEEEEEL" --ok elseif dlog.SSSS_SSSS.value then SS="LEEEEEELLEEEEEELLLLEEEEEELLLLEEEEEELLLLLEEEEEELLLLEEEEEELLLLEEEEEELLEEEEEEL" --ok end elseif n==80 then if dlog.HHH.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HHHH.value then SS="LHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHL" --ok bp elseif dlog.HSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEELLEEEEEEEEEEEEEEL" elseif dlog.SSSSH.value then SS="LEEEEEEEEEELLLLLEEEEEEEEEELLLLLEEEEEEEEEELLLLEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.SSHSS.value then SS="LEEEEEEEEEEELLLLEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEELLLLEEEEEEEEEEEL" elseif dlog.HHSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHLLEEEEEEEEEELLEEEEEEEEEELLEEEEEEEEEEL" elseif dlog.HSSSH.value then SS="LHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEELLEEEEEEEEEELLLLEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHL" elseif dlog.SSSHH.value then SS="LEEEEEEEEEELLLLEEEEEEEEEELLEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHL" elseif dlog.HHSSSS.value then SS="LHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHLLLEEEEEEEELLEEEEEEEELLEEEEEEEELLLLEEEEEEEEL" elseif dlog.SSSSHH.value then SS="LEEEEEELLLLLEEEEEELLLLEEEEEELLLLLEEEEEELLLHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHL" elseif dlog.HSSSSH.value then SS="LHHHHHHHHHHHHHHHHLLEEEEEEEELLLLEEEEEEEELLEEEEEEEELLLLEEEEEEEELLLHHHHHHHHHHHHHHHL" elseif dlog.HHSSSSH.value then SS="LHHHHHHHHHHHHLLLHHHHHHHHHHHHLLLEEEEEELLEEEEEELLLLLEEEEEELLEEEEEELLLHHHHHHHHHHHHL" elseif dlog.SSS_SSS.value then SS="LEEEEEEEEEELLEEEEEEEEEELLLLEEEEEEEEEELLLLLLEEEEEEEEEELLEEEEEEEEEELLLLEEEEEEEEEEL" elseif dlog.SSSS_SSSS.value then SS="LEEEEEEELLLLEEEEEELLLLEEEEEELLLLEEEEEELLLLLEEEEEELLLLEEEEEELLLLEEEEEELLLLEEEEEEL" end elseif n==85 then if dlog.HHH.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HHHH.value then SS="LHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEEEELLLLLEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEL" elseif dlog.SSSSH.value then SS="LEEEEEEEEEEEELLLLEEEEEEEEEEEELLLLEEEEEEEEEEEELLLLEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHL" elseif dlog.SSHSS.value then SS="LEEEEEEEEEEEELLLLEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEELLEEEEEEEEEEEEL" elseif dlog.HHSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEELLLLEEEEEEEEEELLLLEEEEEEEEEEL" elseif dlog.SSSHH.value then SS="LEEEEEEEEEELLEEEEEEEEEELLLLEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HSSSH.value then SS="LHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEELLLLEEEEEEEEEELLEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HHSSSS.value then SS="LHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHLLLEEEEEEEEEELLEEEEEEEEEELLEEEEEEEEEELLEEEEEEEEEEL" elseif dlog.SSSSHH.value then SS="LEEEEEEEEEELLEEEEEEEEEELLEEEEEEEEEELLEEEEEEEEEELLLHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHL" elseif dlog.HSSSSH.value then SS="LHHHHHHHHHHHHHHHHLLLEEEEEEEEEELLEEEEEEEEEELLEEEEEEEEEELLEEEEEEEEEELLLHHHHHHHHHHHHHHHL" elseif dlog.HHSSSSH.value then SS="LHHHHHHHHHHHHHLLLHHHHHHHHHHHHHLLLEEEEEELLLLEEEEEELLLLEEEEEELLEEEEEELLLHHHHHHHHHHHHHHL" elseif dlog.SSS_SSS.value then SS="LEEEEEEEEEELLLLEEEEEEEEEELLLLLEEEEEEEEEELLLLLEEEEEEEEEELLLLLEEEEEEEEEELLLLEEEEEEEEEEL" elseif dlog.SSSS_SSSS.value then SS="EEEEEEEELLEEEEEEEELLEEEEEEEELLLLEEEEEEEELLLLEEEEEEEELLEEEEEEEELLLLEEEEEEEELLEEEEEEEEL" end elseif n==90 then if dlog.HHH.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HHHH.value then SS="LHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHL" elseif dlog.HSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEEL" elseif dlog.SSSSH.value then SS="LEEEEEEEEEEEEEELLEEEEEEEEEEEEEELLEEEEEEEEEEEEEELLEEEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.SSHSS.value then SS="LEEEEEEEEEEEEEELLEEEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEEEELLEEEEEEEEEEEEEEL" elseif dlog.HHSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEELLEEEEEEEEEEEELLEEEEEEEEEEEEL" elseif dlog.SSSHH.value then SS="LEEEEEEEEEEEELLEEEEEEEEEEEELLEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HSSSH.value then SS="LHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEELLLLEEEEEEEEEELLLLLEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HHSSSS.value then SS="LHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHLLLEEEEEEEEEELLEEEEEEEEEELLLLEEEEEEEEELLEEEEEEEEEEL" elseif dlog.SSSSHH.value then SS="LEEEEEEEEEELLEEEEEEEEEELLEEEEEEEEEELLEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHL" elseif dlog.HSSSSH.value then SS="LHHHHHHHHHHHHHHHHHLLLEEEEEEEEEELLLLEEEEEEEEEELLLLEEEEEEEEEELLEEEEEEEEEELLLHHHHHHHHHHHHHHHL" elseif dlog.HHSSSSH.value then SS="LHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHLLLEEEEEELLLEEEEEELLLEEEEEELLLEEEEEELLLHHHHHHHHHHHHHHHL" elseif dlog.SSS_SSS.value then SS="EEEEEEEEEEEELLLEEEEEEEEEEEELLLLEEEEEEEEEEEELLLLLEEEEEEEEEEEELLLLEEEEEEEEEEEELLEEEEEEEEEEEE" elseif dlog.SSSS_SSSS.value then SS="LEEEEEEEELLEEEEEEEELLLLEEEEEEEELLLLEEEEEEEELLLLEEEEEEEELLLLEEEEEEEELLLLEEEEEEEELLEEEEEEEEL" end elseif n==95 then if dlog.HHH.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HHHH.value then SS="LHHHHHHHHHHHHHHHHHHHHLLLLHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEEEL" elseif dlog.SSSSH.value then SS="LEEEEEEEEEEEEEELLEEEEEEEEEEEEEELLEEEEEEEEEEEEEELLEEEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.SSHSS.value then SS="LEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEL" elseif dlog.HHSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHLHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEELLLLEEEEEEEEEEEELLLLEEEEEEEEEEEEL" elseif dlog.SSSHH.value then SS="LEEEEEEEEEEEELLEEEEEEEEEEEELLEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHLLHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HSSSH.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHLLEEEEEEEEEEEELLEEEEEEEEEEEELLEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HHSSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEELLEEEEEEEEEELLLLEEEEEEEEEELLEEEEEEEEEEL" elseif dlog.SSSSHH.value then SS="LEEEEEEEEEELLEEEEEEEEEELLEEEEEEEEEELLLLEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HSSSSH.value then SS="LHHHHHHHHHHHHHHHHHLLLEEEEEEEEEELLLLLEEEEEEEEEELLLLLEEEEEEEEEELLLLEEEEEEEEEELLLHHHHHHHHHHHHHHHHL" elseif dlog.HHSSSSH.value then SS="LHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHLLLEEEEEEEELLEEEEEEEELLEEEEEEEELLLLEEEEEEEELLLHHHHHHHHHHHHHHL" elseif dlog.SSS_SSS.value then SS="EEEEEEEEEEEELLEEEEEEEEEEEEEELLEEEEEEEEEEEEEELLLLLEEEEEEEEEEEEEELLEEEEEEEEEEEEEELLEEEEEEEEEEEEEE" elseif dlog.SSSS_SSSS.value then SS="LEEEEEEEELLLLEEEEEEEELLLLEEEEEEEELLLLEEEEEEEELLLLLEEEEEEEELLLLEEEEEEEELLLLEEEEEEEELLLLEEEEEEEEL" end elseif n==100 then-- nok if dlog.HHH.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HHHH.value then SS="LHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEEEEEL" elseif dlog.SSSSH.value then SS="LEEEEEEEEEEEEEELLEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEELLEEEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.SSHSS.value then SS="LEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEL" elseif dlog.HHSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEELLLLEEEEEEEEEEEELLLLEEEEEEEEEEEEL" -- ok elseif dlog.SSSHH.value then SS="LEEEEEEEEEEEELLLLEEEEEEEEEEEELLLLEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HSSSH.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEELLEEEEEEEEEEEELLLLEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HHSSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEELLLLEEEEEEEEEELLLLEEEEEEEEEELLLLEEEEEEEEEEL" elseif dlog.SSSSHH.value then SS="LEEEEEEEEEELLLLEEEEEEEEEELLLLEEEEEEEEEELLLLEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHL" -- ok elseif dlog.HSSSSH.value then SS="LHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEELLLLLEEEEEEEEEELLLLLEEEEEEEEEELLLLLEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHL" elseif dlog.HHSSSSH.value then SS="LHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHLLLEEEEEEEELLEEEEEEEELLLLEEEEEEEELLLLEEEEEEEELLLHHHHHHHHHHHHHHL" elseif dlog.SSS_SSS.value then SS="EEEEEEEEEEEELLLLEEEEEEEEEEEEEELLEEEEEEEEEEEEEELLLLLLEEEEEEEEEEEEEELLEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEE" elseif dlog.SSSS_SSSS.value then SS="LEEEEEEEEEELLEEEEEEEEEELLLLEEEEEEEEEELLEEEEEEEEEELLLLEEEEEEEEEELLEEEEEEEEEELLEEEEEEEEEELLEEEEEEEEEEL" end elseif n==105 then-- nok if dlog.HHH.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HHHH.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEEEEEL" elseif dlog.SSSSH.value then SS="LEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.SSHSS.value then SS="LEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEEL" elseif dlog.HHSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEL" elseif dlog.SSSHH.value then SS="LEEEEEEEEEEEEEELLEEEEEEEEEEEEEELLEEEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HSSSH.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEELLLLLEEEEEEEEEEEELLLLLEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HHSSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEELLEEEEEEEEEEEELLEEEEEEEEEEEELLEEEEEEEEEEEEL" elseif dlog.SSSSHH.value then SS="LEEEEEEEEEELLLLLEEEEEEEEEELLLLLEEEEEEEEEELLLLLEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HSSSSH.value then SS="LHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEELLLLEEEEEEEEEEEELLEEEEEEEEEEEELLLLLEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHL" elseif dlog.HHSSSSH.value then SS="LHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEELLEEEEEEEEEELLEEEEEEEEEELLEEEEEEEEEELLLHHHHHHHHHHHHHHL" elseif dlog.SSS_SSS.value then SS="EEEEEEEEEEEELLLLEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEELLLLLLLEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEE" elseif dlog.SSSS_SSSS.value then SS="LEEEEEEEEEELLEEEEEEEEEELLLLEEEEEEEEEELLEEEEEEEEEELLLLLEEEEEEEEEELLEEEEEEEEEELLLLEEEEEEEEEELLLLEEEEEEEEEEL" end elseif n==110 then-- nok if dlog.HHH.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HHHH.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEEEEEEL" elseif dlog.SSSSH.value then SS="LEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.SSHSS.value then SS="LEEEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEEEL" elseif dlog.HHSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEEEELLEEEEEEEEEEEEEELLEEEEEEEEEEEEEEL" -- ok elseif dlog.SSSHH.value then SS="LEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HSSSH.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEEEELLLLLEEEEEEEEEEEEEELLLEEEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HHSSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHLLHHHHHHHHHHHHHHHHHHHHHHHLLEEEEEEEEEEEELLLLEEEEEEEEEEEELLLLEEEEEEEEEEEELLEEEEEEEEEEEEL" elseif dlog.SSSSHH.value then SS="LEEEEEEEEEEEELLEEEEEEEEEEEELLEEEEEEEEEEEELLEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHL" -- ok elseif dlog.HSSSSH.value then SS="LHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEELLLLEEEEEEEEEEEELLEEEEEEEEEEEELLLLLEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HHSSSSH.value then SS="LHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEELLEEEEEEEEEELLEEEEEEEEEELLEEEEEEEEEELLLHHHHHHHHHHHHHHHHHL" elseif dlog.SSS_SSS.value then SS="EEEEEEEEEEEEEELLEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEELLLLLLEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEEE" elseif dlog.SSSS_SSSS.value then SS="LEEEEEEEEEELLLLEEEEEEEEEELLLLEEEEEEEEEELLEEEEEEEEEELLLLLLEEEEEEEEEELLLLEEEEEEEEEELLLLEEEEEEEEEELLLLEEEEEEEEEEL" end elseif n==115 then-- nok if dlog.HHH.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HHHH.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEEEEEEEL" elseif dlog.SSSSH.value then SS="LEEEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.SSHSS.value then SS="LEEEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEEEEL" elseif dlog.HHSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEEEELLLLLEEEEEEEEEEEEEELLLLLEEEEEEEEEEEEEEL" -- ok elseif dlog.SSSHH.value then SS="LEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HSSSH.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLLEEEEEEEEEEEEEELLLLLEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HHSSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEELLLLEEEEEEEEEEEELLLLEEEEEEEEEEEELLLLEEEEEEEEEEEEL" elseif dlog.SSSSHH.value then SS="LEEEEEEEEEEEELLLLEEEEEEEEEEEELLLLEEEEEEEEEEEELLLLEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHL" -- ok elseif dlog.HSSSSH.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEELLLLEEEEEEEEEEEELLEEEEEEEEEEEELLLLLEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HHSSSSH.value then SS="LHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEELLLLEEEEEEEEEELLLLEEEEEEEEEELLEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHL" elseif dlog.SSS_SSS.value then SS="EEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEEELLLLLEEEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEEE" elseif dlog.SSSS_SSSS.value then SS="LEEEEEEEEEEEELLEEEEEEEEEEEELLEEEEEEEEEEEELLEEEEEEEEEEEELLLLLEEEEEEEEEEEELLEEEEEEEEEEEELLEEEEEEEEEEEELLEEEEEEEEEEEEL" end elseif n==120 then-- nok if dlog.HHH.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HHHH.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHHHLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEEEEEEEEEL" elseif dlog.SSSSH.value then SS="LEEEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.SSHSS.value then SS="LEEEEEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEEEEEL" elseif dlog.HHSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEEL" -- nok elseif dlog.SSSHH.value then SS="LEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HSSSH.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HHSSSS.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEEEELLEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEELLLLEEEEEEEEEEEEEEL" elseif dlog.SSSSHH.value then SS="LEEEEEEEEEEEELLLLLEEEEEEEEEEEELLLLLEEEEEEEEEEEELLLLLEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HSSSSH.value then SS="LHHHHHHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEEEELLLLEEEEEEEEEEEELLLLLEEEEEEEEEEEELLLLLEEEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHHHHHHL" elseif dlog.HHSSSSH.value then SS="LHHHHHHHHHHHHHHHHHHLLHHHHHHHHHHHHHHHHHHHHLLLEEEEEEEEEELLLLEEEEEEEEEELLLLEEEEEEEEEELLLLEEEEEEEEEELLLHHHHHHHHHHHHHHHHHHHHL" elseif dlog.SSS_SSS.value then SS="EEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEEEELLLLLLEEEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEEEELLEEEEEEEEEEEEEEEEEE" elseif dlog.SSSS_SSSS.value then SS="LEEEEEEEEEEEELLLLEEEEEEEEEEEELLEEEEEEEEEEEELLEEEEEEEEEEEELLLLLLEEEEEEEEEEEELLEEEEEEEEEEEELLEEEEEEEEEEEELLLLEEEEEEEEEEEEL" end end end return true else return false end end -- ============================== End Reset Functions function MAIN() if get_parameters (certified) then --ReadStructure() WriteStructure() -- into note 19 ResetSS() -- actually, writes the SS read from note 19 SetNote(note_number, starting_score, recipename, 0) -- WARNING: and mach "recipename" and "loop_count" with the names of the recipe end end MAIN()


Bruno Kestemont Lv 1

(edited) The proposed SS is based on following basic preferences:

-1 loop at each end
-2, 4 or 5 loops between sheets (SS)
-3 loops between helixes (HH), and between helix and sheet (HS)
-helix length = 2 * sheet length

Bruno Kestemont Lv 1

The recipe only proposes designs where there is a reasonable amount of sheets for each helix (minimum 2 sheets per helix) and a reasonable core potential. Only exact matching of above preferences are proposed, unless for very common structure (e.g. SSHSS), where a solution with extra loops could be proposed (up to 5 loops around an helix).

The SS is archived in note 19. It can be recovered at any time using Reset my SS in note 19 _GS.

Bruno Kestemont Lv 1

1) On a reset of the puzzle, run the recipe and select to design you like (e.g. SHS, 2 sheets and one crossing helix)

Now it's time to hand fold (did you expect to escape hand fold ?!?)

2) tool "Ideal SS" on each helix

3) You might freeze all helices and sheets if you want to use bands

4) Cut in the loops - or use bands - in order to align the sheets and make H-bonds

5) Align the helices along the sheets

6) Quickfix

Bruno Kestemont Lv 1

ver 1.0.11 corrected the length of sheets in order to respect chirality in 85 + test bands
ver 1.1.0 Adding different paterns for choice of direction and chirality, e.g. HHSSS, SSSHH, HSSSH
Note: in SSS, when the number of residues is pair (for a connecting loop of 3 segments) , we can do a good
cake turning left, then right then left …
If it is uneven, it does not work (has to turn always left or always right).
That's what I tried to correct in this verion
Moreover, I've seen in top solutions that HSSSH can be as good as SSSHH or HHSSS
As chirality has its importance, I made several similar structures but in opposite directions as well.
The default loops are : 3 segments for connecting sheets, 4 segments for connecting Helices (to sheet or helice) and
one segment at each end. From this basic designes, it's possible to idealize chang turns by transforming loop segments to sheets.
The rules are: SS link: 2-3 => turn left (from residue n to n+1 with sidechains pointing bellow)
4 segs= 50-50
5 segs: turning right (=> replacing the 2 sheet ends with loops doesn't solve chirality problem)
HS link (2-3-4 loop length): the sidechain of the forst sheet seg must point away from helix
(use this rule to decide on which side of the plane you put your helix)
SH link (2 loop length): the helix is where the latest S seg's sidechain points to
SH link (3 loop length): the helix goes opposite of the last sheet sidechain.

Bruno Kestemont Lv 1

added soms SS.
Tip: start with a length of a multiple of 5 (and add 5 segments to the given structure), run the recipe and choose your SS.
Ideal SS all sheets and helices.
Then use Blueprint tool for sheets.
If the loop length between helices is too short (1 or 2 would be too short for core filter), or if the link between sheets and helices (or between sheets) is not nice, add a segment in the loop and try Blueprint again.

Freeze the nice structures and loops. Add bands between sheets. Clashing importance to 0.1, wiggle backbones until most sheet loops are ideal (check the filter ideal loop to see on screen).

Use remix to try to fix unideal loops. If it does not work, add or delete residues in the loop and try again. If it doesn't work, Autostructure and try again.

CI 1, mutate all. Wiggle all.Mutate all. Shake all.

If there remain unideal loops, delete of add segments, remix, autostrucure, try again or run Find Starting Filter recipe if you have no time.

Skippysk8s Lv 1

Thanks Bruno :) This is much better than our old starter recipes which didn't address ideal loops at all

Bruno Kestemont Lv 1

Adapted to most common Blueprint shapes (3 loops around helices). Less loops around helices give non-parallel structures, which is less likely to be ok for monomer core filter.

When I try something that immediately fits exactly the filters constraints for monomer core and ideal loops, I add an "ok bp" as a comment within the recipe (this can be usefull for future updates, e.g. indicating "ok bp" in the dialog when appropriate).

It only works curently for number of residues as multiple of 5. For lengths in the between, user could edit the recipe and copy the proxy SS into text editor then adapt and use recipe SS Edit or AA Copy Paste Compare in order to input the SS into the puzzle.

jawz101 Lv 1

love it. I tried all of them against covid 15 and HSSSSH would shake and wiggle right into a desired shape (all of the sheets eventually bonded nicely w/o any pulling on my part.) And it scored rather high w/ no intervention.

It makes me wonder what was so special about that pattern that would lend it to naturally going into a shape I would imagine.

And it would also be nice to throw many others in to see how they'd perform.


I also try to play with shapes like a Greek Key Motif https://en.wikipedia.org/wiki/Structural_motif and to see what it scores like

Bruno Kestemont Lv 1

I actually designed the most common ones as seen in Foldit top results for design puzzles (not for design binding puzzles).

It would be great to test other shapes for the binding puzzles. I tested HHHHHH with some good result but no top result, so I abandonned this idea of small helice binding into the site.

I don't remember HSSHSSH in top results for simple designs.

How to name the Greek Key and make it understandable for user? What do you think about S-SSSHH, HHS-SSS etc ? (I suppose that adding 2 helices is necessary for monomer core). The problem (or the advantage for binding ?) of the Greek Key might be the long loop.