What is RNAfold?
RNAfold predicts the secondary structure of a single RNA strand by finding the base-pairing pattern with the lowest folding free energy. It is the core structure-prediction program of the ViennaRNA Package, and it reports its answer as a minimum free energy (MFE) structure in dot-bracket notation along with the energy in kcal/mol.
The prediction is thermodynamic, not evolutionary or learned. RNAfold scores every possible nested pairing using the Turner nearest-neighbor energy parameters (stacking, hairpin, bulge, and loop contributions) and uses dynamic programming to find the global optimum without enumerating structures one by one. Because the model assumes nested base pairs, RNAfold does not predict pseudoknots, and accuracy drops for long sequences where tertiary contacts and cofactors matter.
With the partition function turned on, RNAfold goes beyond the single best structure and describes the whole Boltzmann ensemble of structures: how dominant the MFE structure is, how diverse the ensemble looks, and two alternative representative structures (centroid and MEA).
How to use RNAfold online
Paste one or more RNA sequences in FASTA or plain text, adjust the folding temperature or other options if needed, and run the job. ProteinIQ folds each sequence on the ViennaRNA engine and returns the MFE secondary structure in dot-bracket notation, the free energy in kcal/mol, and downloadable structure plots. No installation, compilation, or command-line flags required.
A short worked example shows the format. The sequence below is the canonical RNAfold example; at the default 37°C it folds into a single hairpin:
Input:
CGCAGGGAUACCCGCG
Output:
CGCAGGGAUACCCGCG
(((.((....)).))) (-5.20)The dots are unpaired bases and each matched ( / ) pair is a base pair. This sequence forms one stem of five pairs closing a four-nucleotide loop, with a free energy of -5.20 kcal/mol.
For batch jobs, give each sequence a FASTA header and the results table fills one row per record:
>tRNA_acceptor
GGGCGAAUUCCUUUUU
>hairpin
GGGGAAAACCCCInputs
| Input | Description |
|---|---|
RNA Sequences | One or more RNA sequences, pasted as FASTA (>header lines) or plain sequence, one per line. Upload .fasta, .fa, or .txt (up to 10 MB). |
Sequences may contain A, C, G, U (and T, read as U). Modified-base characters are tolerated. Each strand is folded on its own; for two strands that pair with each other, use RNA-RNA cofolding instead. Sequences up to roughly 32,700 nucleotides are supported, though folding time and memory grow quickly with length.
Settings
| Setting | Description |
|---|---|
Temperature (°C) | Folding temperature used to scale the energy parameters (0-100, default 37). Lower temperatures stabilize pairing; raise it to model structure at non-physiological or thermophilic conditions. |
Disallow lonely pairs | Forbids isolated base pairs (helices of length 1). Off by default. Turning it on removes thermodynamically weak single pairs and usually gives cleaner, more realistic helices. |
Circular RNA | Folds the sequence as a closed circle rather than a linear strand. Use for circRNAs, viroids, and circular RNA constructs where the 5' and 3' ends are joined. Off by default. |
Compute partition function | Adds the full ensemble calculation: ensemble free energy, MFE frequency, ensemble diversity, and the centroid and MEA structures. Off by default to keep standard MFE-only behavior. |
Dangling ends | How unpaired bases adjacent to a helix contribute energy. Double dangles (default) is the standard ViennaRNA setting; Ignore dangling ends disables the term; Only unpaired on either side and Allow coaxial stacking match the -d1 and -d3 modes. |
Results
Without the partition function, the results table reports one row per sequence:
| Column | Meaning |
|---|---|
Sequence ID | FASTA header or auto-assigned identifier. |
Length (nt) | Sequence length in nucleotides. |
MFE Structure | The minimum free energy structure in dot-bracket notation. |
MFE (kcal/mol) | Folding free energy of that structure. More negative means a more stable fold. |
Turning on the partition function adds these columns:
| Column | Meaning |
|---|---|
Ensemble Free Energy (kcal/mol) | Free energy of the entire Boltzmann ensemble. Always lower than or equal to the MFE, since it sums over all structures. |
MFE Frequency | Boltzmann probability of the exact MFE structure (0-1). How much of the ensemble sits in the single best structure. |
Ensemble Diversity | Mean base-pair distance between structures in the ensemble. Low means the molecule has one dominant fold; high means many competing structures. |
Centroid Structure / Distance / Energy | The structure with the smallest total base-pair distance to all others, plus its distance and free energy. |
MEA Structure / Score / Energy | The maximum expected accuracy structure, built from the most probable individual base pairs, plus its score and free energy. |
The Files tab holds structure plots of the MFE structure rendered as _ss.eps (PostScript), _ss.svg (vector image), and _ss.gml (graph for Cytoscape and other graph tools). To re-render or restyle a structure from its dot-bracket string, use RNAplot.
Reading dot-bracket notation
Dot-bracket notation encodes a secondary structure as a string the same length as the sequence:
.is an unpaired base.(and the matching)are the two partners of a base pair. Pairs nest like balanced parentheses, so the first(closes with the last).
In the example (((.((....)).))), the outer three pairs and the inner two pairs form a stem interrupted by a single unpaired bulge, capping a loop of four unpaired bases. The notation cannot represent crossing pairs, which is why pseudoknots never appear in RNAfold output. To compute the free energy of a structure you wrote yourself in this notation, use RNAeval.
How RNAfold works
The MFE prediction uses the Zuker dynamic programming recursion. Instead of scoring each candidate structure separately, RNAfold builds the optimal structure for every subsequence and combines those optima, which makes the global minimum reachable in time for a sequence of length . Energies come from the Turner 2004 nearest-neighbor model, where the stability of a helix depends on which base-pair steps stack on each other, and loops carry length- and sequence-dependent penalties.
The partition function uses McCaskill's algorithm over the same energy model. Rather than the single lowest-energy fold, it computes the Boltzmann-weighted sum over all structures, which yields base-pairing probabilities and the ensemble free energy. From those probabilities RNAfold derives the two alternative structures:
- Centroid: the structure closest, on average, to every other structure in the ensemble. It tends to keep only pairs the ensemble strongly agrees on.
- MEA: the maximum expected accuracy structure, assembled to maximize the sum of probabilities of the pairs (and unpaired positions) it includes.
Interpreting the ensemble metrics
The MFE structure is the single best guess, but a thermodynamic prediction is only as trustworthy as the ensemble around it. The partition-function metrics tell you how much to trust that single structure.
- A high
MFE Frequency(the MFE structure carries a large share of the ensemble probability) and a lowEnsemble Diversitytogether mean the molecule has one dominant, well-defined fold. Reported structures from RNAfold, the centroid, and MEA usually agree in this case. - A low MFE frequency with high diversity means many structures compete within a few kcal/mol. The single MFE structure is then a weak summary, and the centroid or MEA structure, or a sample of suboptimal structures, gives a more honest picture.
The Ensemble Free Energy is always lower than or equal to the MFE because it sums over every structure, not just the best one. The gap between them widens as more structures contribute.
When to use RNAfold vs other ViennaRNA tools
RNAfold folds one full-length strand into its global MFE structure. Several sibling tools cover cases it is not built for:
| Goal | Tool |
|---|---|
| Fold a single RNA into one global MFE structure | RNAfold (this tool) |
| Fold two strands that hybridize with each other | RNAcofold |
| Find locally stable structures in a long RNA or transcript | RNALfold |
| Get per-base accessibility and pair probabilities along a sequence | RNAplfold |
| Sample suboptimal structures within an energy window | RNAsubopt |
| Score the energy of a structure you already have | RNAeval |
| Analyze density of states across an RNA energy landscape | RNAdos |
| Design a sequence that folds into a target structure | RNAinverse |
| Predict a consensus structure from aligned homologs | RNAalifold |
For a deep-learning alternative that predicts base pairing without the nested-structure assumption, including some pseudoknots, see SMRTNet. If you have a DNA template and need the transcript first, convert it with DNA to RNA.
FAQ
What does RNAfold predict?
RNAfold predicts the minimum free energy secondary structure of an RNA sequence: which bases pair with which, returned as a dot-bracket string and a free energy in kcal/mol. With the partition function enabled it also reports ensemble metrics and the centroid and MEA structures.
Is this the real ViennaRNA RNAfold?
Yes. ProteinIQ runs ViennaRNA 2.7.2 with the standard Turner energy parameters, the same engine and defaults as the command-line RNAfold, so results match what you would get locally.
What is minimum free energy in RNA folding?
The minimum free energy is the lowest folding free energy among all possible secondary structures for a sequence. The structure that achieves it is the MFE structure, the single most thermodynamically stable fold under the chosen temperature and energy model.
Does RNAfold predict pseudoknots?
No. RNAfold only models nested base pairs, so crossing interactions and pseudoknots are excluded by design. For pseudoknot-capable prediction, use a deep-learning model such as SMRTNet.
How long can the RNA sequence be?
Sequences up to about 32,700 nucleotides are accepted, with file uploads up to 10 MB. Runtime and memory scale steeply with length because the algorithm is in time, so very long sequences fold slowly.
What is the difference between the MFE, centroid, and MEA structures?
The MFE structure is the single lowest-energy fold. The centroid is the structure closest on average to all structures in the ensemble. The MEA structure maximizes the expected number of correctly assigned pairs and unpaired bases. The centroid and MEA only appear when the partition function is enabled, and they are most useful when the ensemble has several competing structures.
Related tools

RNAdos
RNAdos calculates density-of-states summaries for RNA sequences, reporting representative structures and state counts across energy bands.

RNAeval
RNAeval calculates the free energy of an RNA secondary structure for a given sequence. Evaluates if a proposed structure is thermodynamically favorable.

RNALfold
RNALfold reports locally stable RNA secondary structures within a sliding window and returns their start and end positions on the input sequence.

RNAplfold
RNAplfold computes local base pair probabilities using a sliding window approach. Useful for analyzing accessibility and identifying binding sites in long RNA sequences.

RNAsubopt
RNAsubopt enumerates all RNA secondary structures within a specified energy range above the minimum free energy (MFE). Useful for exploring the structural ensemble and identifying alternative conformations.

ViennaRNA
ViennaRNA supports a curated set of scientifically faithful ViennaRNA 2.7.2 workflows for RNA folding, density-of-states analysis, interaction prediction, local accessibility, plotting, inverse folding, and structure analysis.

RNAcofold
RNAcofold predicts the joint secondary structure of two interacting RNA molecules and optionally reports partition-function and concentration-dependent equilibrium metrics.

RNAdistance
RNAdistance compares RNA secondary structures using the selected native ViennaRNA distance representation and comparison mode.

RNAduplex
RNAduplex computes the hybridization structure between two RNA sequences. Predicts the optimal duplex formation and binding energy.

RNAplex
RNAplex predicts fast query-target RNA interactions, reporting parsed hit coordinates, structures, and energies.