What is RNAfold?
RNAfold predicts RNA secondary structure by finding the conformation with the lowest Gibbs free energy. Given an RNA sequence, it computes the minimum free energy (MFE) structure and, optionally, base pair probabilities derived from the thermodynamic ensemble of all possible structures.
Secondary structure refers to the pattern of base pairs that form when an RNA molecule folds back on itself. These pairings (A-U, G-C, and G-U wobble pairs) stabilize hairpins, loops, and stems that determine the molecule's biological function. RNAfold treats this as an optimization problem: among all possible folding patterns, which is thermodynamically most favorable?
The tool is part of the ViennaRNA Package, developed at the University of Vienna since 1994. It remains one of the most widely used programs in RNA research, with applications ranging from small RNA annotation to mRNA vaccine design.
How RNAfold works
RNAfold implements Zuker's dynamic programming algorithm, published in 1981 and still the foundation of most RNA folding software. The algorithm works by decomposing the folding problem into smaller subproblems, finding optimal local structures, then combining them into a globally optimal solution.
The nearest-neighbor model
Energy calculations use the nearest-neighbor model, which treats RNA stability as the sum of contributions from individual structural elements: stacked base pairs, hairpin loops, internal loops, bulges, and multiloops. Each element has experimentally measured thermodynamic parameters (enthalpy and entropy), allowing precise energy calculation for any proposed structure.
The default Turner 2004 parameters come from decades of optical melting experiments on short RNA oligonucleotides. Alternative parameter sets (Andronescu 2007, Langdon 2018) offer different trade-offs between prediction accuracy and computational considerations.
Partition function and base pair probabilities
Beyond the single MFE structure, RNAfold can compute the partition function using McCaskill's algorithm. This provides:
- Base pair probabilities: The likelihood that any two nucleotides are paired across all thermodynamically accessible structures
- Ensemble free energy: The free energy of the entire structural ensemble, not just the MFE structure
- Ensemble diversity: A measure of structural heterogeneity in the thermodynamic ensemble
Base pair probabilities are particularly useful when the MFE structure is not significantly more stable than alternatives. Many biologically relevant RNAs occupy multiple conformations, and the partition function captures this flexibility.
Computational complexity
The algorithm runs in O(n³) time and O(n²) memory, where n is sequence length. RNAfold handles sequences up to approximately 32,000 nucleotides, though partition function calculations require more memory and are limited to shorter sequences.
How to use RNAfold online
ProteinIQ provides browser-based access to RNAfold, running the calculation on cloud infrastructure with no software installation required.
Input
| Input | Description |
|---|---|
RNA Sequences | FASTA format or plain sequence (A, U, G, C). Multiple sequences processed independently. |
File uploads accepted: .fasta, .fa, .txt (up to 10 MB).
Settings
Prediction options
| Setting | Description |
|---|---|
Temperature | Folding temperature in Celsius (0-100, default 37). Affects thermodynamic parameters. |
Disallow lonely pairs | When enabled, prevents isolated base pairs (helices of length 1). These are often artifacts. |
Circular RNA | Treats the sequence as circular rather than linear. Affects end effects and possible structures. |
Compute partition function | Calculates ensemble properties and base pair probabilities. Enabled by default. |
Energy parameters
| Setting | Description |
|---|---|
Energy model | Turner 2004 (default) uses the most widely validated parameters. Andronescu 2007 and Langdon 2018 are alternatives trained on different datasets. |
Dangling ends | Controls how unpaired nucleotides adjacent to helices contribute to stability. Double dangles (default) includes contributions from both sides. |
Output
Results appear in a spreadsheet with one row per input sequence:
| Column | Description |
|---|---|
Sequence ID | Header from FASTA input or auto-generated identifier |
Length (nt) | Number of nucleotides |
Secondary Structure | Dot-bracket notation. Dots (.) indicate unpaired positions; matching parentheses indicate base pairs |
MFE (kcal/mol) | Minimum free energy. More negative values indicate greater stability |
Ensemble Energy (kcal/mol) | Free energy of the thermodynamic ensemble (when partition function is computed) |
Interpreting results
The MFE value indicates how favorable the predicted structure is:
| MFE Range | Interpretation |
|---|---|
| < -30 kcal/mol | Very stable structure (typical for longer RNAs with extensive base pairing) |
| -10 to -30 kcal/mol | Moderately stable (typical for small RNAs, hairpins) |
| > -10 kcal/mol | Weakly structured or largely unfolded |
The difference between MFE and ensemble energy reflects structural diversity. When these values are similar, the MFE structure dominates the ensemble. Large differences suggest the RNA samples multiple conformations.
Limitations
RNAfold cannot predict pseudoknots, structures where base-paired regions interleave rather than nest. The dynamic programming algorithm requires that all paired positions be nested (no crossing base pairs). Some biologically important structures, including certain ribozymes and viral frameshifting elements, contain pseudoknots.
Prediction accuracy decreases for longer sequences. The algorithm finds the globally optimal structure according to the thermodynamic model, but parameter uncertainties accumulate. For sequences over 500 nucleotides, experimental validation becomes increasingly important.
The nearest-neighbor model does not account for tertiary interactions, protein binding, or co-transcriptional folding kinetics. The predicted structure represents thermodynamic equilibrium, which may differ from the kinetically trapped structure that forms during transcription.
Related tools
Other ViennaRNA tools for different RNA analysis tasks:
- RNAsubopt: Enumerates all structures within an energy range of the MFE, useful for exploring alternative conformations
- RNAcofold: Predicts the structure of two interacting RNA molecules forming a dimer
- RNAalifold: Predicts consensus structure from a multiple sequence alignment, using evolutionary conservation to improve accuracy
- RNAeval: Calculates the free energy of a given structure without performing prediction
- RNAplot: Generates 2D layout coordinates for visualizing secondary structures
- ViennaRNA: Access all 14 ViennaRNA methods through a unified interface
