void structure.SetNote(integer segmentIndex, string note)
Sets the note assigned to a segment.
V1 Function Name
New to V2

structure.SetNote adds a note to the the segment specified by segmentIndex. The note can be any string.

Notes can be displayed in note mode in the original Foldit interface, or by using the shortcut key 1 in the selection interface.

To delete a note, call structure.SetNote with an empty string ("").

See also structure.GetNote.

The code belows adds notes for any Code that add remarks for glycine or cysteine segments.

for ii = 1, structure.GetCount() do
    local aa = structure.GetAminoAcid ( ii )
    if     aa == "g" then
        structure.SetNote ( ii, "Gly: very flexible")
    elseif aa == "c" then
        structure.SetNote ( ii, "Cys: like to be hidden inside, can create bonds to other Cys")