Back to Recipes Homepage
recipe picture
Recipe: Scaffolding V1.1
5
Your rating: None Average: 5 (2 votes)
Used 184 times with an average impact of -4152 points.

Profile

Name: Scaffolding V1.1
ID: 8710
Created on: Wed, 08/18/2010 - 11:20
Updated on: Wed, 08/18/2010 - 18:20
Description:

Script request by Mat747. See script for details.



Best For


Comments

Joined: 09/18/2009
Groups: SETI.Germany
That's how the code does look like

-- Scaffolding by Crashguard303
-- Script request by Mat747

-- Applies bands between segments,
-- if their distance is inbetween an user-specified range,
-- resulting a relative position lock of these segments (scaffolding).
-- This example creates bands between all segments, which have have a distance from 9 to 11.

-- NOTE:
-- At the moment, FoldIt doesn't allow us to set band lengths greater than 20.
-- We can't apply bands between adjacent segments, so these are skipped

function Scaffolding(MinDist,MaxDist,DeleteAllBands,Strength)
local MinDist=MinDist
local MaxDist=MaxDist
local DeleteAllBands=DeleteAllBands
local Strength=Strength

local k
local l

local NumSegs=get_segment_count()

if MinDist<1 then MinDist=1 end -- if value is smaller than 1, set it to 1
if MinDist>20 then MinDist=20 end -- if value is bigger than 20, set it to 20
if MaxDist<1 then MaxDist=1 end
if MaxDist>20 then MaxDist=20 end

if MinDist>MaxDist then MinDist,MaxDist=MaxDist,MinDist end
-- If Min>Max, swapt them becasue it wouldn't make sense

if DeleteAllBands then
while get_band_count()>0 do
band_delete(get_band_count())
end -- while
end -- if

print("Connecting segments with distance ",MinDist,"-",MaxDist,"...")
local Finish=NumSegs-1
for k=1,Finish do
local Start=k+1
for l=Start, NumSegs do
if (l-k)>1 then -- check that there is at least 1 segment between
local Distance=get_segment_distance(k,l) -- get distance
if Distance>=MinDist then -- above or equal minimum?
if Distance<=MaxDist then -- below or equal maximum?
print("Connected ",k,":",l," distance:",Distance) -- show
band_add_segment_segment(k,l) -- connect
local TempBandCount=get_band_count() -- get new band amount
band_set_length(TempBandCount,Distance)
band_set_strength(TempBandCount,Strength)
end -- if Distance
end -- if Distance
end -- if l-k
end -- l loop
end -- k loop
end -- function

-- CHANGE PARAMETERS HERE:
MinDist=4.75 -- Minimum segment distance to band, float value
MaxDist=6.25 -- Maximum segment distance to band, float value
DeleteAllBands=true -- boolean value
-- If true, all existing bands are deleted before script is executed.
-- If false, previous bands are kept, however.
Strength=1 -- Band strength of the scaffold
-- I forgot minimum and maximum value.
-- Please look for yourself :p

Scaffolding(MinDist,MaxDist,DeleteAllBands,Strength) -- Call script with these parameters

Joined: 09/18/2009
Groups: SETI.Germany
More...

This parameter example uses a distance range between 4.75 and 6.25 trying to band sheet and helix segments to keep them in position.

Joined: 09/18/2009
Groups: SETI.Germany
Update...

This script version is obsolete and can be deleted.

Joined: 08/24/2010
Very powerful

Very useful when using sidechain, or rebuild recipes. They prevent the protein from ripping apart.

Want to try?
Add to Cookbook!
To download recipes to your cookbook, you need to have the game client running.
Parent
Children
Authors
Sitemap

Developed by: UW Center for Game Science, UW Institute for Protein Design, Northeastern University, Vanderbilt University Meiler Lab, UC Davis
Supported by: DARPA, NSF, NIH, HHMI, Amazon, Microsoft, Adobe, RosettaCommons