interactively place bands between specific atoms in protein
Best for
Code
function Main()
-- bandsome: interactively place bands between specific atoms in protein
-- by jeff101 8/11/12
-- last updated around 10pm 8/11/12
-- below sets default values
rtot=structure.GetCount()
bnum=band.GetCount()
osdate=os.date()
oldscore=math.floor(current.GetScore()*1000)/1000 -- seems Foldit always rounds down at .001 position
print('bandsome begins at '..osdate..' on\n puzzle '..puzzle.GetName()..'\n with puzzle ID '..puzzle.GetPuzzleID()..', '..rtot..' residues, '..bnum..' bands,\n and score '..oldscore..'.')
rnum1=36
rnum2=72
if rnum1>rtot then
rnum1=1
end -- if rnum1
if rnum2>rtot then
rnum2=rtot
end
anum1=0 -- 0 is always the alpha-carbon
anum2=0
blen=2
bstr=10
keeplast=0
bnum=0
qflag=0
-- below gets input values
while qflag==0 do
atot1=structure.GetAtomCount(rnum1)
atot2=structure.GetAtomCount(rnum2)
local ask=dialog.CreateDialog('bandsome')
ask.Input1=dialog.AddSlider("rnum1: ",rnum1,1,rtot,0)
ask.Label1=dialog.AddLabel(" \nrnum1: index of residue 1.\n ")
ask.Input2=dialog.AddSlider("rnum2: ",rnum2,1,rtot,0)
ask.Label2=dialog.AddLabel(" \nrnum2: index of residue 2.\n ")
ask.Input3=dialog.AddSlider("anum1: ",anum1,0,atot1,0)
ask.Label3=dialog.AddLabel(" \nanum1: atom number on residue 1.\n ")
ask.Input4=dialog.AddSlider("anum2: ",anum2,0,atot2,0)
ask.Label4=dialog.AddLabel(" \nanum2: atom number on residue 2.\n ")
ask.Input5=dialog.AddSlider("blen: ",blen,0,10,1)
ask.Label5=dialog.AddLabel(" \nblen: desired band length.\n ")
ask.Input6=dialog.AddSlider("bstr: ",bstr,0,10,1)
ask.Label6=dialog.AddLabel(" \nbstr: band strength.\n ")
ask.Input7=dialog.AddSlider("keeplast: ",keeplast,-1,2,0)
ask.Label7a=dialog.AddLabel(" ")
ask.Label7b=dialog.AddLabel("keeplast: -1 remove all previous bands,\n0 replace previous band, 1 keep previous band,\n2 quit now without adding a new band.")
ask.Label7c=dialog.AddLabel(" ")
ask.OK = dialog.AddButton("OK", 1)
dialog.Show(ask)
rnum1=ask.Input1.value+0
rnum2=ask.Input2.value+0
anum1=ask.Input3.value+0
anum2=ask.Input4.value+0
blen=ask.Input5.value+0
bstr=ask.Input6.value+0
keeplast=ask.Input7.value+0
if keeplast== -1 then
bnum=band.GetCount()
print('Deleting all '..bnum..' previous bands.')
band.DeleteAll()
elseif keeplast==0 then
bnum=band.GetCount()
if bnum>0 then
print('Deleting band '..bnum..' so end with '..(bnum-1)..' bands.')
band.Delete(bnum)
end -- if bnum
elseif keeplast==2 then
qflag=1 -- this will quit
end -- if keeplast
if keeplast~=2 then
bnum=band.AddBetweenSegments(rnum1,rnum2,anum1,anum2)
if bnum>0 then
band.SetGoalLength(bnum,blen) -- 3.5 is default band length
band.SetStrength(bnum,bstr) -- 10 is max, 1 is default
dist=round(band.GetLength(bnum)*100)/100 -- round length to nearest 0.01
aa1=structure.GetAminoAcid(rnum1)
aa2=structure.GetAminoAcid(rnum2)
ss1=structure.GetSecondaryStructure(rnum1)
ss2=structure.GetSecondaryStructure(rnum2)
print('Adding band '..bnum..' between atom '..anum1..' on '..aa1..rnum1..' ('..ss1..')\n and atom '..anum2..' on '..aa2..rnum2..' ('..ss2..') with strength '..bstr..',\n goal length '..blen..', and present length '..dist..'.')
else
bnum=band.GetCount()
print('Failed to add new band. Still have '..bnum..' bands.')
end -- if bnum
end -- if keeplast
end -- while qflag
bnum=band.GetCount()
osdate=os.date()
print('Ending with '..bnum..' bands for '..rtot..' residues.')
print('All done at '..osdate..'.')
end -- Main()
-- below rounds val to nearest integer and returns it in res
function round(val)
local res=math.floor(val)
if val-res>=0.5 then
res=res+1
end -- if val
return res
end -- round()
Main()
A disulfide ensemble is a grouping of all disulfide species with the same number of disulfide bonds, and is usually denoted as the 1S ensemble, the 2S ensemble, etc. for disulfide species having one, two, etc. disulfide bonds.
Under typical conditions, disulfide reshuffling is much faster than the formation of new disulfide bonds or their reduction; hence, the disulfide species within an ensemble equilibrate more quickly than between ensembles.
The native form of a protein is usually a single disulfide species, although some proteins may cycle between a few disulfide states as part of their function, e.g., thioredoxin. In proteins with more than two cysteines, non-native disulfide species may be formed, which are almost always misfolded. As the number of cysteines increases, the number of nonnative species increases factorially.
Isomerases have been identified that catalyze the interconversion of disulfide species, accelerating the formation of the native disulfide species.
Disulfide species that lack one native disulfide bond are frequently folded, in particular, if the missing disulfide bond is exposed to solvent in the folded, native protein.
bandsomeSS (http://fold.it/portal/recipe/101275) is similar to bandsome,
but bandsomeSS only makes bands to help disulfide bonds form.
Like bandsome, bandsomeSS is menu-driven,
but bandsomeSS adds multiple bands per set of inputs
while bandsome adds just one.
If N is the number of cysteines and
m is the number of disulfide bonds they form
(m is an integer from 0 to M=floor(N/2)),
the general formula for Tm, the total number
of different s-s disulfide bond combinations,
seems to be:
Tm = N! / [m! (N-2m)! 2^m].
This gives for m=0 (no disulfide s-s bonds):
T0 = N! / [0! N! 2^0] = 1
and for m=1 (one disulfide s-s bond):
T1 = N! / [1! (N-2)! 2^1]
= N(N-1)/2 = (N^2-N)/2.
It also gives for m=M=floor(N/2):
TM = N! / [M! (N-2M)! 2^M],
where (N-2M)! = 0! = 1 for even N
and (N-2M)! = 1! = 1 for odd N,
thus giving:
TM = N! / [M! 2^M],
which is:
TM = (N)x(N-2)x(N-4)x...x1 for odd N and
TM = (N-1)x(N-3)x(N-5)x...x1 for even N
(either way, TM is a product of successive
odd integers).
Using the above formulas gives
the following chart of Tm values:
2m = 0 2 4 6 8 10 12
M N m = 0 1 2 3 4 5 6
-----------------------------------------------
0 0 1 0 0 0 0 0 0
0 1 1 0 0 0 0 0 0
1 2 1 1 0 0 0 0 0
1 3 1 3 0 0 0 0 0
2 4 1 6 3 0 0 0 0
2 5 1 10 15 0 0 0 0
3 6 1 15 15 15 0 0 0
3 7 1 21 105 105 0 0 0
4 8 1 28 210 420 105 0 0
4 9 1 36 378 1260 945 0 0
5 10 1 45 630 3150 4725 945 0
5 11 1 55 990 6930 17325 10395 0
6 12 1 66 1485 13860 51975 62370 10395
6 13 1 78 2145 25740 135135 270270 135135
While for small numbers of cysteines N,
it might be possible to try every disulfide
combination to find the best one, larger
values of N give prohibitively large numbers
of combinations.
If anyone finds a reference deriving the above
Tm formulas (or obtaining different ones),
please let me know. Thanks!