Icon representing a recipe

Recipe: Snow Flea Bonding

created by brow42

Profile


Name
Snow Flea Bonding
ID
42892
Shared with
Public
Parent
None
Children
None
Created on
July 11, 2012 at 14:51 PM UTC
Updated on
July 11, 2012 at 14:51 PM UTC
Description

Snow Flea h-bond pattern based on the first few I found. (Spoiler!)

Best for


Code


--[[ * Snow Flea bonder * Original Author Brow42 Jun 28 2012 * Based on the few h-bonds I had, * make all the other bonds in the * same pattern. --]] str = 1 -- strength of bands bondlen = 3.0 -- about the length of the bond (possibly a little shorter) -- comment out to set goal length to actual length --band.DeleteAll() --[[ Band a Sheet args: Segment with red atom (oxygen, acceptor, last atom in segment) Segment with blue atom (nitrogen, donor, first atom in segment) Number of bonds to make Stride of red strand Stride of blue strand --]] function BandSheet(red,blue,n,d1,d2) local i rc, err = pcall( function() -- extra debugging to catch segment-out-of-bound errors for i = 1,n do j = band.AddBetweenSegments(blue,red,1,4) if j == 0 then error("Couldn't make band") end -- not sure if this would ever happen band.SetGoalLength(j,bondlen and bondlen or band.GetLength(j)) band.SetStrength(j,str) red,blue = red+d1,blue+d2 end end ) if rc == false then error (err..string.format(' red: %d blue: %d i: %d n: %d',red,blue,i,n)) end end -- 9 sheets between 7 strands -- args are: red atom seg, blue atom seg, # of bonds, red direction, blue direction BandSheet(71,45,4,3,3) BandSheet(44,15,4,3,3) BandSheet(67,73,3,-3,3) BandSheet(37,46,4,-3,3) BandSheet(10,16,3,-3,3) BandSheet(46,67,3,3,-3) BandSheet(16,37,4,3,-3) BandSheet(68,39,4,-3,-3) BandSheet(38,12,4,-3,-3) -- 2 disulfide bridges i = band.GetCount() band.AddBetweenSegments(1,28,6,6) band.AddBetweenSegments(13,43,6,6) band.SetStrength(i,str) band.SetStrength(i+1,str) band.SetGoalLength(i,bondlen and 2.05 or band.GetLength(i)) band.SetGoalLength(i+1,bondlen and 2.05 or band.GetLength(i+1))

Comments


brow42 Lv 1

Snow Flea is 75% over, but it's pretty hard and maybe some of you have given up. I knew what I wanted to make but even knowing that I still couldn't do it because I couldn't keep track of which atoms bonded; I lose them every time I moved the puzzle.

After lining up all the sidechains, part of my puzzle seemed bonded correctly. Extending those bonds to adjacent strands, like sheets, determined where all the other bonds should go. This script bands all the bonding atoms together. It also bands the cysteine bridges.

As a bonus, I found that the bands made the glycines flip over really quickly, unlike manual banding or my glycine flipper recipe.

The script has one option: if you comment out the band length, it will set the band to the current distance, effectively locking the atoms in place. This will help the structure survive rebuilds.

If you don't want to know what (I think) the puzzle looks like don't run this script!

I hope none of you think I'm making the puzzle too easy (and making you rank down) but this was a pretty hard puzzle.