The "loops" of S are planar faces of the unique planar embedding of the secondary structure graph (whose edges are the base pairs in S together with the backbone edges (i, i + 1), i = 1 ..., n - 1). Equivalently, the loops are the elements of the unique minimum cycle basis of the secondary structure graph [34]. The external loop consists of all those nucleotides that are not enclosed by a base pair in S. The standard energy model for RNA secondary structures associates an energy contribution to each loop L that depends on the loop type type(L) (hairpin loop, interior loop, bulge, stacked pair, or multi-branch loop) and the sequence of some or all of the nucleotides in the loop, x|L: