Gibbs sampling and helix-cap motifs