structure.GetCount Edit

integer structure.GetCount()
Return the number of segments.
V1 Function Name

structure.GetCount returns the number of segments in the current pose.

In design puzzles, other poses, such as "recent best" or a quicksave may have a different number of segments than the current pose. Recipes should avoid caching the number of segments in a pose, restoring an alternate pose, then using the cached number of segments.

Segments commonly represent the residues of amino acids, usually joined by peptide bonds. Segments may also represent ligands, RNA, or DNA.

The function structure.GetSecondaryStructure identifies ligand segments with structure code "M" for molecule. RNA and DNA segments can be identified by inspecting the codes returned by structure.GetAminoAcid ,which returns two-character codes beginning with "r" or "d" in those cases.

Example Edit