Icon representing a recipe

Recipe: 649 comment structs

created by gramps

Profile


Name
649 comment structs
ID
44458
Shared with
Public
Parent
None
Children
None
Created on
November 02, 2012 at 19:11 PM UTC
Updated on
November 02, 2012 at 19:11 PM UTC
Description

yields predicted structs from puzzle 649 page which actually just links to puzzle 642 comment

Best for


Code


newprog = "649 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,11,"L") Restore_One_Stuct(12,12,"H") Restore_One_Stuct(13,49,"L") Restore_One_Stuct(50,50,"E") Restore_One_Stuct(51,56,"L") Restore_One_Stuct(57,60,"E") Restore_One_Stuct(61,69,"L") Restore_One_Stuct(70,76,"E") Restore_One_Stuct(77,80,"L") Restore_One_Stuct(81,83,"E") Restore_One_Stuct(84,86,"L") Restore_One_Stuct(87,93,"E") Restore_One_Stuct(94,97,"L") Restore_One_Stuct(98,104,"E") Restore_One_Stuct(105,114,"L") Restore_One_Stuct(115,117,"E") Restore_One_Stuct(118,126,"L") Restore_One_Stuct(127,130,"E") Restore_One_Stuct(131,133,"H") Restore_One_Stuct(134,136,"L") Restore_One_Stuct(137,140,"E") Restore_One_Stuct(141,143,"L") Restore_One_Stuct(144,167,"H") Restore_One_Stuct(168,171,"L") end -- function Restore_Structs print("begin ",newprog) if structure.GetCount() == 171 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 649 comment structs
everything has been changed to a loop
Loop(1,11)
Helix(12,12)
Loop(13,49)
Sheet(50,50)
Loop(51,56)
Sheet(57,60)
Loop(61,69)
Sheet(70,76)
Loop(77,80)
Sheet(81,83)
Loop(84,86)
Sheet(87,93)
Loop(94,97)
Sheet(98,104)
Loop(105,114)
Sheet(115,117)
Loop(118,126)
Sheet(127,130)
Helix(131,133)
Loop(134,136)
Sheet(137,140)
Loop(141,143)
Helix(144,167)
Loop(168,171)
end 649 comment structs

Puzzle 649 page (this links to comment structs under 642):
https://fold.it/portal/node/993839

comment structs creation how-to:
http://fold.it/portal/recipe/44263#comment-19933