- integer band.AddBetweenSegments(integer segmentIndex1, integer segmentIndex2, [integer atomIndex1], [integer atomIndex2])
- Add a band between the two segments. By default bands to the backbone. Specify an atom number from 1 to structure.GetAtomCount() to band to a different atom. Returns band number.
- V1 Function Name
- More Information
Caution: the returned band index may be zero. A zero band index causes an error in other functions, such as band.SetStrength.
One case which returns a zero band index is banding a segment to itself, for example:
bIdx = band.AddBetweenSegments ( 21, 21 )
This is a rare case of a foldit Lua function setting a return code. Most other foldit functions "throw" an error in the case of bad parameters. In most cases, this terminates the recipe, but the thrown error can be "caught" by calling the function in question via the pcall function.