integer band.AddToBandEndpoint(integer segmentIndex, integer bandIndex, [integer atomIndex])
Add a band to the endpoint of an existing band. Returns band number.
V1 Function Name
New to V2

band.AddToBandEndpoint adds a band that terminates at the same endpoint as an existing band.

The parameter segmentIndex is the segment to be used as the starting point of the new band.

The parameter bandIndex is the existing band. The endpoint of this band will be used as the endpoint of the new band.

The optional parameter atomIndex is the atom number of segment segmentIndex to be used for the starting point. If atomIndex is not specified, atom 2 of the segment is used by default.

The existing band can either a segment-to-segment band or a spaceband.

The new band has a goal length of 3.5 Angstroms and a strength of 1.0.

Symmetry puzzles are one application for band.AddToBandEndpoint. There's no way to create bands that begin on one of the symmetric copies of the protein in a symmetry puzzle. Bands must begin on the main copy of the protein. Also, a recipe can't create bands that end on a symmetric copy of the porotein.

The user can manually add bands from the main copy to points on the symmetric copies. A recipe can then use band.AddToBandEndpoint to create bands that begin on the main copy and end on one of the symmetric copies.

band.AddToBandEndpoint can also be used in a similar manner in other scenarios. Band endpoints can be used to identify interesting points on a protein or a ligand, and then recipes can create new bands to these end points.

As an example, the code below adds a band to empty space from segment 2 of the protein. It then uses the band.AddToBandEndpoint to add a second band from segment 10 of the protein to the same endpoint in space.

local band1 = band.Add ( 2, 1, 3, 20, 0, 0 )
if band1 ~= 0 then
    band.AddToBandEndpoint ( 10, band1 )

See also band.Add and band.AddBetweenSegments.

Community content is available under CC-BY-SA unless otherwise noted.