Profile
- Name
- Note_score(function)
- ID
- 109068
- Shared with
- Public
- Parent
- Note_score(recipe)
- Children
- Created on
- June 02, 2025 at 16:46 PM UTC
- Updated on
- June 02, 2025 at 16:50 PM UTC
- Description
a simple function that prints top_x worst scoring segments
Best for
Code
function note_score(to_xth)
protienlength=structure.GetCount()
totalscore=current.GetEnergyScore()
min={}
for i=1,protienlength do
segmentscore=current.GetSegmentEnergyScore(i)
if table.getn(min)<to_xth then
table.insert(min, {i,segmentscore})
else
if min[to_xth][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,to_xth do
structure.SetNote(min[i][1], "#"..tostring(i).." : "..tostring(min[i][2]))
end
end