Icon representing a recipe

Recipe: getligscores

created by LociOiling

Profile


Name
getligscores
ID
109108
Shared with
Public
Parent
None
Children
None
Created on
July 19, 2025 at 20:21 PM UTC
Updated on
July 19, 2025 at 20:36 PM UTC
Description

For each ligand segment, get the segment score and selected subscores. Compare the segment score to the total of the subscores.

Best for


Code


--[[ get ligand scores the score reported by current.GetSegmentEnergyScore for a ligand is much lower than the total of the scores reported by current.GetSegmentEnergySubscore the total of the subscores is what's shown in the segment information window in the Foldit GUI this recipe reports for all ligands, regardless of where they appear in the puzzle the recipe only reports specific subscores LociOiling 20250719 ]]-- for seg = 1, structure.GetCount () do if structure.GetSecondaryStructure ( seg ) == "M" then local tscore = current.GetSegmentEnergyScore ( seg ) print ( "segment " .. seg .. " score = " .. tscore ) subs = { "Clashing", "Pairwise", "Packing", "Hiding", "Bonding", "Ideality", } local tsubs = 0 for ii = 1, #subs do local sscore = current.GetSegmentEnergySubscore ( seg, subs [ ii ] ) print ( "segment " .. seg .. " " .. subs [ ii ] .. " score = " .. sscore ) tsubs = tsubs + sscore end print ( "segment " .. seg .. " " .. "subscore total = " .. tsubs ) print ( "segment " .. seg .. " " .. "difference = " .. tsubs - tscore ) end end

Comments


bravosk8erboy Lv 1

did you think about using puzzle.GetPuzzleSubscoreNames() to generate the list instead of just using the fixed list you have?