Fandom

Foldit Wiki

Foldit Lua Function get segment score part

Redirected from Get segment score part

1,465pages on
this wiki
Add New Page
Comments0 Share

get_segment_score_part Edit

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 Edit

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:

Print segment details recipe output

Recipe Output

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.