Icon representing a recipe

Recipe: 670 comment structs

created by gramps

Profile


Name
670 comment structs
ID
44916
Shared with
Public
Parent
None
Children
None
Created on
December 11, 2012 at 02:24 AM UTC
Updated on
December 11, 2012 at 02:24 AM UTC
Description

yields the predicted structs documented in the comments under the puzzle 670 home page

Best for


Code


newprog = "670 comment structs" -- -- autogenerated code local Struct_Types = { ["L"] = "Loop", ["E"] = "Sheet", ["H"] = "Helix", ["M"] = "Ligand" } function Make_All_Loop() selection.SelectAll() structure.SetSecondaryStructureSelected("L") print("everything has been changed to a loop") selection.DeselectAll() end -- function Make_All_Loop function Restore_One_Stuct(s_start,s_end,s_type) selection.SelectRange(s_start,s_end) print(Struct_Types[s_type].."("..s_start..","..s_end..")") structure.SetSecondaryStructureSelected(s_type) selection.DeselectAll() end -- function Restore_One_Stuct function Restore_Structs() Restore_One_Stuct(1,4,"H") Restore_One_Stuct(5,9,"L") Restore_One_Stuct(10,15,"E") Restore_One_Stuct(16,22,"L") Restore_One_Stuct(23,28,"H") Restore_One_Stuct(29,31,"L") Restore_One_Stuct(32,33,"E") Restore_One_Stuct(34,36,"L") Restore_One_Stuct(37,44,"E") Restore_One_Stuct(45,50,"L") Restore_One_Stuct(51,60,"E") Restore_One_Stuct(61,61,"L") Restore_One_Stuct(62,62,"H") Restore_One_Stuct(63,65,"L") Restore_One_Stuct(66,74,"E") Restore_One_Stuct(75,78,"L") Restore_One_Stuct(79,86,"E") Restore_One_Stuct(87,92,"L") Restore_One_Stuct(93,101,"E") Restore_One_Stuct(102,120,"L") end -- function Restore_Structs print("begin ",newprog) if structure.GetCount() == 120 then -- num segs match Make_All_Loop() Restore_Structs() else -- print warning line print("segment number mismatch -- no action taken") end print("end ",newprog)

Comments


gramps Lv 1

begin 670 comment structs
everything has been changed to a loop
Helix(1,4)
Loop(5,9)
Sheet(10,15)
Loop(16,22)
Helix(23,28)
Loop(29,31)
Sheet(32,33)
Loop(34,36)
Sheet(37,44)
Loop(45,50)
Sheet(51,60)
Loop(61,61)
Helix(62,62)
Loop(63,65)
Sheet(66,74)
Loop(75,78)
Sheet(79,86)
Loop(87,92)
Sheet(93,101)
Loop(102,120)
end 670 comment structs

puzzle 670 page here (read down, hat tip to folder spdenne for finding the prediction page):
http://fold.it/portal/node/994067