Back to Recipes Homepage
recipe picture
Recipe: bigoudi an helix curler
Created by marie_s 71 1514
5
Your rating: None Average: 5 (5 votes)
Used 403 times with an average impact of -175 points.

Profile

Name: bigoudi an helix curler
ID: 5680
Created on: Fri, 07/16/2010 - 05:55
Updated on: Fri, 07/16/2010 - 12:55
Description:

curl helix



Best For


Comments

marie_s's picture
User offline. Last seen 1 year 23 weeks ago. Offline
Joined: 05/18/2008
Groups: None
code

make nicer helix

reset_recent_best()
print('score before ',get_score())
nbsegtot=get_segment_count()
nbhelix =0 -- number of helices
beghelix ={} -- first segment of each helices longer than 4
endhelix ={} -- last segment

-- search number of helices, first and last segment of each
if get_ss(1)=='H' then nbhelix=1 beghelix[1]=noseg end -- if it begin by an helix
for noseg =2,nbsegtot do
if get_ss(noseg)=='H' and (get_ss(noseg-1)=='L' or get_ss(noseg-1)=='E' )
then nbhelix=nbhelix+1 beghelix[nbhelix]=noseg
end -- of if begin of an helix
if (get_ss(noseg)=='E' or get_ss(noseg)=='L') and get_ss(noseg-1)=='H'
then endhelix[nbhelix]=noseg - 1
if endhelix[nbhelix] -- helix of less than 5 segments don't count
end -- of if end of helix
end -- on loop on segment

-- put band on helix number "helix" of strength "power" each segment with the segment "step" segments away
function band_helix (helix,step, power)
for segmt=beghelix[helix], endhelix[helix]-step do
band_add_segment_segment(segmt, segmt+step)
band_set_strength(get_band_count(),power)
end -- of segment of one helix
end -- of function band helix

-- wiggle, delete bands, wiggle, shake,wiggle
function try()
select_all()
set_behavior_clash_importance(1)
do_global_wiggle_all(1)
while get_band_count() > 0 do band_delete(1) end
do_global_wiggle_all(3)
do_shake(1)
do_global_wiggle_all(2)
restore_recent_best()
end -- of try

-- helix by helix (more effective than all togethers)
for h=1,nbhelix do
for force=1,10 do
band_helix(h,5,force/10)
try()
print('h ',h,' 5 force ', force, ' ',get_score())
end
for force=1,10 do
band_helix(h,4,force/10)
try()
print('h ',h,' 4 force ', force, ' ',get_score())
end
for force=1,10 do
band_helix(h,5,force/10)
band_helix(h,4,force/10)
try()
print('h ',h,' 4 and 5 force ', force, ' ',get_score())
end
end -- of loop on helices

Joined: 09/18/2009
Groups: SETI.Germany
Good script!

Nice strategy!
Don't believe the average score impact!

Joined: 06/17/2010
cool :D

Great job Marie :D
Little programming advice: dont create/delete bands, U can disable/enable them between change of force.

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

none

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, Boehringer Ingelheim, RosettaCommons