Icon representing a recipe

Recipe: 647 comment structs

created by gramps

Profile


Name
647 comment structs
ID
44441
Shared with
Public
Parent
None
Children
Created on
October 30, 2012 at 01:01 AM UTC
Updated on
October 30, 2012 at 01:01 AM UTC
Description

Yields predicted structs from the comment on puzzle 647 page

Best for


Code


newprog = "647 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,12,"L") Restore_One_Stuct(13,18,"E") Restore_One_Stuct(19,27,"L") Restore_One_Stuct(28,29,"E") Restore_One_Stuct(30,34,"L") Restore_One_Stuct(35,38,"E") Restore_One_Stuct(39,42,"L") Restore_One_Stuct(43,50,"E") Restore_One_Stuct(51,54,"L") Restore_One_Stuct(55,60,"E") Restore_One_Stuct(61,61,"L") Restore_One_Stuct(62,65,"E") Restore_One_Stuct(66,70,"L") Restore_One_Stuct(71,77,"H") Restore_One_Stuct(78,89,"L") Restore_One_Stuct(90,96,"E") Restore_One_Stuct(97,99,"L") Restore_One_Stuct(100,107,"E") Restore_One_Stuct(108,115,"L") Restore_One_Stuct(116,123,"E") Restore_One_Stuct(124,134,"L") Restore_One_Stuct(135,137,"H") Restore_One_Stuct(138,139,"L") end -- function Restore_Structs print("begin ",newprog) if structure.GetCount() == 139 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 647 comment structs
everything has been changed to a loop
Loop(1,12)
Sheet(13,18)
Loop(19,27)
Sheet(28,29)
Loop(30,34)
Sheet(35,38)
Loop(39,42)
Sheet(43,50)
Loop(51,54)
Sheet(55,60)
Loop(61,61)
Sheet(62,65)
Loop(66,70)
Helix(71,77)
Loop(78,89)
Sheet(90,96)
Loop(97,99)
Sheet(100,107)
Loop(108,115)
Sheet(116,123)
Loop(124,134)
Helix(135,137)
Loop(138,139)
end 647 comment structs

Here's the 647 puzzle page
https://fold.it/portal/node/993806

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