Icon representing a recipe

Recipe: Score_note

created by LHOr

Profile


Name
Score_note
ID
109063
Shared with
Public
Parent
None
Children
Created on
May 28, 2025 at 06:24 AM UTC
Updated on
May 28, 2025 at 06:24 AM UTC
Description

prints top5 worst scoring segments

Best for


Code


protienlength=structure.GetCount() totalscore=current.GetEnergyScore() min={} for i=1,protienlength do segmentscore=current.GetSegmentEnergyScore(i) if table.getn(min)<5 then table.insert(min, {i,segmentscore}) else if min[5][2]>segmentscore then table.remove(min) table.insert(min, {i,segmentscore}) end end table.sort(min, function (left, right) return left[2] < right[2] end) end for i=1,5 do structure.SetNote(min[i][1], "#"..tostring(i).." : "..tostring(min[i][2])) end

Comments