Foldit Wiki
Advertisement

get_segment_score_part[]

Function
number get_segment_score_part(string score_part, integer segment_index_1[, ..., integer segment_index_n])
Description
Return the current score part of the given segments. More than one segment index may be specified.
V2 Function Name
current.GetSegmentEnergySubscore

More than one segment index may be specified.

Example[]

The recipe print_segment_details shows an example of using get_segment_score_part to report on a single segment.

function print_segment_details(seg) 
  attr = {"clashing", "packing", "hiding", "bonding","backbone","sidechain","reference", "disulfides", "other"}
  rpt = "segment #" .. seg .. ":\n"
  tot  = 0
  for x=1,9 do 
    part =  get_segment_score_part(attr[x], seg)
    tot = tot +  part
    rpt = rpt .. attr[x] .. " = " .. part .. "\n"
  end
  rpt  = rpt .. "Total = " .. tot .. "\n" ..
              "get_segment_score(" .. seg .. ") = " .. get_segment_score(seg) .. "\n\n"
 print (rpt)
end
-----
print_segment_details(18)

The results look something like this:

Recipe Output

Advertisement