||This article needs additional citations for verification. (May 2010)|
Stem-loop intramolecular base pairing is a pattern that can occur in single-stranded DNA or, more commonly, in RNA. The structure is also known as a hairpin or hairpin loop. It occurs when two regions of the same strand, usually complementary in nucleotide sequence when read in opposite directions, base-pair to form a double helix that ends in an unpaired loop. The resulting structure is a key building block of many RNA secondary structures.
Formation and stability 
The formation of a stem-loop structure is dependent on the stability of the resulting helix and loop regions. The first prerequisite is the presence of a sequence that can fold back on itself to form a paired double helix. The stability of this helix is determined by its length, the number of mismatches or bulges it contains (a small number are tolerable, especially in a long helix) and the base composition of the paired region. Pairings between guanine and cytosine have three hydrogen bonds and are more stable compared to adenine-uracil pairings, which have only two. In RNA, guanine-uracil pairings featuring two hydrogen bonds are as well common and favorable. Base stacking interactions, which align the pi orbitals of the bases' aromatic rings in a favorable orientation, also promote helix formation.
The stability of the loop also influences the formation of the stem-loop structure. "Loops" that are less than three bases long are sterically impossible and do not form. Large loops with no secondary structure of their own (such as pseudoknot pairing) are also unstable. Optimal loop length tends to be about 4-8 bases long. One common loop with the sequence UUCG is known as the "tetraloop" and is particularly stable due to the base-stacking interactions of its component nucleotides.
Structural contexts 
Stem-loops occur in pre-microRNA structures and most famously in transfer RNA, which contain three true stem-loops and one stem that meet in a cloverleaf pattern. The anticodon that recognizes a codon during the translation process is located on one of the unpaired loops in the tRNA. Two nested stem-loop structures occur in RNA pseudoknots, where the loop of one structure forms part of the second stem.
Many ribozymes also feature stem-loop structures. The self-cleaving hammerhead ribozyme contains three stem-loops that meet in a central unpaired region where the cleavage site lies. The hammerhead ribozyme's basic secondary structure is required for self-cleavage activity.
Stem-loop structures are also important in prokaryotic rho-independent transcription termination. The hairpin loop forms in an mRNA strand during transcription and causes the RNA polymerase to become dissociated from the DNA template strand. This process is known as rho-independent or intrinsic termination, and the sequences involved are called terminator sequences.
The palindromic DNA sequence
can form the following hairpin structure
---C G--- C G T A G C C G X X X X X X X
See also 
- Malys N, Nivinskas R (2009). "Non-canonical RNA arrangement in T4-even phages: accommodated ribosome binding site at the gene 26-25 intercistronic junction". Mol Microbiol 73 (6): 1115–1127. doi:10.1111/j.1365-2958.2009.06840.x. PMID 19708923.
- Malys N, McCarthy JEG (2010). "Translation initiation: variations in the mechanism can be anticipated". Cellular and Molecular Life Sciences 68 (6): 991–1003. doi:10.1007/s00018-010-0588-z. PMID 21076851.
- Watson JD, Baker TA, Bell SP, Gann A, Levine M, Losick R. (2004). Molecular Biology of the Gene. 5th ed. Pearson Benjamin Cummings: CSHL Press. See esp. ch. 6.