The syntax is Lua, so the ( ) in the if are optional, you can use them if you want.
Here are the current functions. Shake, wiggle, and so on use the new selection based interface. What other functions would be useful?
number get_score(): Return the current score.
number get_segment_score(integer segment_index_1[, …, integer segment_index_n]): Return the current score of the given segments. More than one segment index may be specified.
integer get_segment_count(): Return the number of segments.
integer get_band_count(): Return the number of bands.
void band_add_segment_segment(integer segment_index_1, integer segment_index_2): Add a band between the segments at 'segment_index_1' and at 'segment_index_2'.
void band_delete(integer band_index_1[, …, integer band_index_n]): Delete the bands at the given band indices.
void band_enable(integer band_index_1[, …, integer band_index_n]): Enable the bands at the given band indices.
void band_disable(integer band_index_1[, …, integer band_index_n]): Disable the bands at the given band indices.
void do_shake([integer iterations]): Run shake. Run for 'iterations' iterations if given; otherwise, until stopped.
void do_mutate([integer iterations]): Run mutate. Run for 'iterations' iterations if given; otherwise, until stopped.
void do_global_wiggle_all([integer iterations]): Run global wiggle on backbone and sidechains. Run for 'iterations' iterations if given; otherwise, until stopped.
void do_global_wiggle_backbone([integer iterations]): Run global wiggle on backbone. Run for 'iterations' iterations if given; otherwise, until stopped.
void do_global_wiggle_sidechains([integer iterations]): Run global wiggle on sidechains. Run for 'iterations' iterations if given; otherwise, until stopped.
void select_all(): Select all segments.
void select_index(integer segment_index_1[, …, integer segment_index_n]): Select segments at the given indices. More than one segment index may be specified.
void deselect_all(): Clear selection.