Rav3n_pl Lv 1
This recipe DOES NOTHING!
It is only translation library.
If you not making LUA scripts by yourself it is USELESS for you!
Library that allows use 99% v1 scripts in dev v2 update w/o any chnage. Just add it at front of your v1 code and paste into v2 script. Now you can use v1 and v2 commands v2 script.
This recipe DOES NOTHING!
It is only translation library.
If you not making LUA scripts by yourself it is USELESS for you!
Works great, except for the replace_ss(ss) function. I always get an error at the line that says structure.SetSecondaryStructure(i, ss). The error is
bad argument #2 to 'SetSecondaryStructure' (string expected, got nil)
I also got this error when i attempted to make an all loops function for one of my own scripts, so i don't know what the problem could be…
ss code you want change to.
select_index(x)
replace_ss("L")
or use new code instead, like
for i=ss,se do
structure.SetSecondaryStructure(i,"L")
end
This library is temporary solution anyway :)
Yeah, as I was afraid of.
Those functions, which have just another name but the same number (and order) of parameters, renaming is simple.
It get's tricky if there are more parameters.
I also considered using this library, but this does lengthen the code, so I rather replace it.
But nice workaround, thanks for your work!
Thanks for the helpful script.
function replace_aa(aa)
for i=1,structure.GetCount() do
if selection.IsSelected(i) then
structure.SetAminoAcid(i, aa)
end
end
end
function replace_ss(ss)
for i=1,structure.GetCount() do
if selection.IsSelected(i) then
structure.SetSecondaryStructure(i,ss)
end
end
end
can be replaced with:
function replace_aa(aa)
structure.SetAminoAcidSelected(aa)
end
function replace_ss(ss)
structure.SetSecondaryStructureSelected(ss)
end
can be also converted https://fold.it/portal/node/991521