Icon representing a recipe

Recipe: Cut Around Cysteine

created by marsfan

Profile


Name
Cut Around Cysteine
ID
103592
Shared with
Public
Parent
None
Children
Created on
June 24, 2020 at 22:38 PM UTC
Updated on
June 24, 2020 at 22:38 PM UTC
Description

Disulfide Bridges are very strong, and can block wiggles from happening. A fix for this is to isolate the bond by cutting around it.

To make the recipe skip cutting around segment, add a note to that segment that contains the string "<NC>"

Best for


Code


function checkAndCut(segment) -- Check if segment is within range (to avoid crashing foldit) if (segment <= structure.GetCount()) and (segment > 0) then -- Check if no cut flag in note. if not string.find(structure.GetNote(segment), "<NC>") then structure.InsertCut(segment) end end end function main() -- Iterate through all segments for segment=1, structure.GetCount() do -- Check if the segment is cysteine if structure.GetAminoAcid(i)== 'c' then -- Cut around segment, but do it safely to avoid crashing. checkAndCut(segment) checkAndCut(segment-1) end end print("Done") end function cleanup(err) if string.find(err, "Cancelled") then print("User Cancelled") else print(err) end return err end xpcall(main, cleanup)

Comments