Wikia

Foldit Wiki

Foldit Lua Function rotamer.SetRotamer

Comments0
683pages on
this wiki

Redirected from Foldit Lua Function rotamer.GetCount

Contents

rotamer.SetRotamer EdytujEdit

Function: void rotamer.SetRotamer(integer segmentIndex, integer position)
Description: Snap the sidechain at the given segment to a rotamer. (Range 1 to rotamer.GetCount()).
V1 Function Name: do_sidechain_snap


rotamer.GetCount EdytujEdit

Function: integer rotamer.GetCount(integer segmentIndex)
Description: Return the number of rotamers the sidechain at the given index can snap to. This number may change if the backbone moves.
V1 Function Name: get_sidechain_snap_count

Remarks Edit

Sample Edit

Code will set all sidechains to best "sidechain" score part position. It will kill global score in the process (create clashes).

for s=1, structure.GetCount() do
  save.Quicksave(4)
  scr=current.GetSegmentEnergySubscore(s,'sidechain')
  for r=1,rotamer.GetCount(s) do
    rotamer.SetRotamer(s, r)
    if current.GetSegmentEnergySubscore(s,'sidechain')>scr then
      save.Quicksave(4)
    end
  end
  save.Quickload(4)
end
Advertisement | Your ad here

Photos

Add a Photo
3,580photos on this wiki
See all photos >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki