Icon representing a recipe

Recipe: 662 comment structs

created by gramps

Profile


Name
662 comment structs
ID
45053
Shared with
Public
Parent
None
Children
None
Created on
December 21, 2012 at 23:47 PM UTC
Updated on
December 21, 2012 at 23:47 PM UTC
Description

yields the structs from the comment under the 662 puzzle page

Best for


Code


newprog = "662 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,3,"L") Restore_One_Stuct(4,6,"H") Restore_One_Stuct(7,18,"L") Restore_One_Stuct(19,19,"E") Restore_One_Stuct(20,25,"L") Restore_One_Stuct(26,27,"H") Restore_One_Stuct(28,30,"L") Restore_One_Stuct(31,33,"H") Restore_One_Stuct(34,39,"E") Restore_One_Stuct(40,48,"L") Restore_One_Stuct(49,52,"H") Restore_One_Stuct(53,56,"E") Restore_One_Stuct(57,60,"L") Restore_One_Stuct(61,62,"E") Restore_One_Stuct(63,67,"L") Restore_One_Stuct(68,71,"E") Restore_One_Stuct(72,74,"L") Restore_One_Stuct(75,82,"E") Restore_One_Stuct(83,85,"L") Restore_One_Stuct(86,89,"E") Restore_One_Stuct(90,91,"L") Restore_One_Stuct(92,96,"E") Restore_One_Stuct(97,101,"L") Restore_One_Stuct(102,110,"H") Restore_One_Stuct(111,117,"L") end -- function Restore_Structs print("begin ",newprog) if structure.GetCount() == 117 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 662 comment structs
everything has been changed to a loop
Loop(1,3)
Helix(4,6)
Loop(7,18)
Sheet(19,19)
Loop(20,25)
Helix(26,27)
Loop(28,30)
Helix(31,33)
Sheet(34,39)
Loop(40,48)
Helix(49,52)
Sheet(53,56)
Loop(57,60)
Sheet(61,62)
Loop(63,67)
Sheet(68,71)
Loop(72,74)
Sheet(75,82)
Loop(83,85)
Sheet(86,89)
Loop(90,91)
Sheet(92,96)
Loop(97,101)
Helix(102,110)
Loop(111,117)
end 662 comment structs

662 puzzle page
https://fold.it/portal/node/994192