Tutorials · updated 2026-11-22
Predict RNA secondary structure online: the MFE structure and the whole ensemble
RNA structure prediction usually prints one structure. Here is how to run it on this platform, how to read the free energy of the whole ensemble beside the single structure, and the controls that show what the answer does and does not tell you. The example is a real run. You can read all of it without signing up.
What you will do
- Predict the secondary structure of an RNA: the minimum free energy structure and the free energy of the whole ensemble.
- Read how wide the Boltzmann ensemble is, and how much of it the single printed structure represents.
- Check the prediction against a solved 3D structure, after testing that the residue numbering lines up, and against scrambled copies of the same sequence.
Step 1: run it
RNA secondary structure prediction is free and instant. It is offered through an AI assistant: connect it once, then ask in plain language, for example “Using rnafold, fold this RNA and show me its ensemble:” followed by the sequence. Two tools answer: fold_rna gives the minimum free energy (MFE) structure, the ensemble free energy, the centroid and the positional entropy; rna_ensemble draws 1000 structures from the Boltzmann ensemble (seed 1), clusters them and reports what share of the sample each cluster holds. Sequences are folded on our server and nothing is queued.
Provenance comes with the result: ViennaRNA 2.7.2 stochastic backtracking (uniq_ML=1); energy model RNA Turner 2004; temperature 37 degrees C. The clustering is average-linkage agglomerative on base-pair distance; k chosen by the highest silhouette score over 2..20.
Example: yeast tRNA-Phe, 76 nucleotides
A transfer RNA is a good first case because its fold was solved by crystallography, so a reference exists (the structure 1EHZ, used below). The MFE structure is the single lowest-energy arrangement of the sequence:
position 10 20 30 40 50 60 70 80 sequence GCGGAUUUAG CUCAGUUGGG AGAGCGCCAG ACUGAAGAUC UGGAGGUCCU GUGUUCGAUC CACAGAAUUC GCACCA MFE (((((((..( (((....... .)))).(((( (.......)) ))).....(( (((....... )))))))))) )).... centroid (((((((... ..(((..... .......... .)))...... .......... .......... .....))))) ))....
- MFE: -22.4 kcal/mol. Ensemble free energy: -24.13 kcal/mol. The MFE sits 1.73 kcal/mol above the ensemble free energy.
- The centroid is the structure closest on average to all the others in the ensemble. It is 16.21 base pairs from the structures in the ensemble on average. Here it is not the same structure as the MFE.
- Mean base-pair distance between two structures drawn from the ensemble: 23.38. Ensemble defect: 0.4525. The tool’s note: the defect is the expected share of incorrectly paired positions if the MFE were the truth.
- Positional entropy runs from 0.001 to 2.346; it is highest where the ensemble disagrees with itself about a position, and lowest at the 3′ tail.
The MFE structure is one member of a wide ensemble
From the two energies the tool reports, the Boltzmann probability of the MFE structure itself is about 6.0 percent. As a cross-check, the ViennaRNA package 2.7.2 run locally on the same sequence gives 6.1 percent (that cross-check is ours, not a tool output). So the printed structure is expected in about one sampled structure in 16.
In the 1000 sampled structures, 375 are distinct. The clustering finds 7 clusters. The cluster whose centroid is exactly the MFE structure holds 28 percent of the sample, and it is not the largest cluster.
| Cluster | Share of sample, % | Range under resampling, % | Mean distance to centroid (base pairs) | Centroid is the MFE |
|---|---|---|---|---|
| 1 | 35.4 | 0 to 37 | 5.14 | no |
| 2 | 28.0 | 26 to 30 | 4.45 | yes |
| 3 | 17.7 | 16 to 19 | 4.58 | no |
| 4 | 15.8 | 15 to 16 | 4.04 | no |
| 5 | 2.3 | 0 to 3 | 9.74 | no |
| 6 | 0.6 | 0 to 1 | 3.5 | no |
| 7 | 0.2 | 0 to 1 | 1.5 | no |
The tool’s own reading of this table: cluster members sit 5 base pairs from the centroid against a median of 29 between any two samples, so the clusters are tighter than the ensemble and occupancy describes distinct states. And on stability: the decomposition is not stable under resampling: the largest cluster's occupancy ranged 0%-37% across 10 bootstrap resamples (cluster count [7, 8]). Quote the range, not the single figure. So the shares are frequencies in one sample under one energy model, not a ranking, and the largest cluster’s share is the least settled number in the table.
Control 1: compare with a solved structure, after testing the numbering
A comparison with a crystal structure is only meaningful if residue 31 of the prediction is residue 31 of the crystal. We learned that this is not automatic. Read straight from the 1EHZ file, the pairing tool reports 75 residues for a 76-nucleotide sequence, because the file contains modified nucleotides. So the comparison above uses a copy of the coordinates in which each modified nucleotide is written as its parent base. That is a change to the reference and it is stated here. With it the tool reads 76 residues and its read-out sequence is identical to the sequence that was folded, letter for letter, so position i is the same residue in both.
The reading of coordinates was then tested with known answers, before trusting any comparison:
- The same coordinates rotated, moved, given another chain name and with every residue number shifted: structure identical to the original: yes; sequence identical: yes; pairs 22.
- The coordinates with residue 37 deleted: 75 residues are read, and the 22 pairs that remain, after an explicit shift of every number above 37 by one, are the pairs observed: identical.
The crystal contains 22 pairs (canonical and wobble pairs only, as annotated from the coordinates). The MFE structure has 21 pairs and shares 20 with the crystal.
position 10 20 30 40 50 60 70 80 sequence GCGGAUUUAG CUCAGUUGGG AGAGCGCCAG ACUGAAGAUC UGGAGGUCCU GUGUUCGAUC CACAGAAUUC GCACCA crystal (((((((..( (((.....[. .))))((((( .........) ))))....(( (((..].... )))))))))) )).... MFE (((((((..( (((....... .)))).(((( (.......)) ))).....(( (((....... )))))))))) ))....
| Pair | In the crystal | In the MFE structure | Share of sampled structures containing it |
|---|---|---|---|
| 19-56 | yes | no | below 0.1 (not listed) |
| 26-44 | yes | no | below 0.1 (not listed) |
| 31-39 | no | yes | 26.9 |
Those are the pairs on which the two disagree; the other 20 are shared. For the MFE-only pair, an earlier measurement in our records of the same crystal reports: A31-PSU39, N1...N3 = 4.80 A, distorted in the crystal, and that the annotator recovers 20/21 of the canonical cloverleaf pairs, so that record attributes its absence from the crystal annotation to the crystal, not to the annotation tool.
| Helix in the MFE structure (5′ strand and 3′ strand) | Pairs | Also in the crystal | Share of sampled structures, lowest to highest pair |
|---|---|---|---|
| 1-7 with 66-72 | 7 | 7 | 61 to 98 |
| 10-13 with 22-25 | 4 | 4 | 20 to 20 |
| 27-31 with 39-43 | 5 | 4 | 27 to 28 |
| 49-53 with 61-65 | 5 | 5 | 39 to 43 |
Read it with the ensemble beside it: only 7 of the 21 MFE pairs appear in at least half of the sampled structures. The table above counts, helix by helix, how many MFE pairs the crystal also has; the ensemble adds that some of those pairs are present in only a minority of the sampled structures. The crystal is one conformation of a molecule bound in a lattice, and the ensemble is a calculation at one temperature in one energy model.
Control 2: the same letters in a random order
We shuffled the sequence 10 times (same composition, seeds 1 to 10) and ran the same two tools. A shuffled sequence has no designed fold, so this shows what the tools return when there is none.
| Sequence | MFE, kcal/mol | MFE above ensemble | Ensemble defect | Mean pair distance | Pairs in MFE | Shared with crystal | Unique fraction of the sample | Occupancy reading |
|---|---|---|---|---|---|---|---|---|
| tRNA-Phe | -22.4 | 1.73 | 0.4525 | 23.38 | 21 | 20 | 0.375 | distinct states |
| shuffle 1 | -15.3 | 1.28 | 0.2303 | 18.09 | 21 | 0 | 0.535 | not interpretable |
| shuffle 2 | -19.8 | 1.45 | 0.458 | 27.92 | 24 | 0 | 0.409 | distinct states |
| shuffle 3 | -20.9 | 0.58 | 0.0775 | 6.84 | 22 | 0 | 0.19 | not interpretable |
| shuffle 4 | -21.7 | 1.84 | 0.2027 | 14.5 | 17 | 1 | 0.57 | not interpretable |
| shuffle 5 | -16.9 | 2.26 | 0.2578 | 16.89 | 18 | 0 | 0.57 | not interpretable |
| shuffle 6 | -22.2 | 1.86 | 0.3009 | 18.16 | 23 | 0 | 0.619 | not interpretable |
| shuffle 7 | -19.1 | 2.06 | 0.1436 | 8.94 | 20 | 0 | 0.362 | not interpretable |
| shuffle 8 | -19.9 | 2.79 | 0.1945 | 12.86 | 23 | 0 | 0.637 | not interpretable |
| shuffle 9 | -25.4 | 1.87 | 0.1299 | 8.2 | 26 | 0 | 0.329 | distinct states |
| shuffle 10 | -22 | 2.69 | 0.2865 | 12.73 | 24 | 0 | 0.528 | not interpretable |
- Every shuffle returns a structure with 17 to 26 pairs and an energy. A structure always comes back; it does not mean the sequence was designed to fold.
- MFE energy does not separate the real sequence from the scrambles. Shuffles with an MFE at or below the real one: 1 of 10; the shuffles span -25.4 to -15.3 kcal/mol.
- The ensemble numbers do not separate them cleanly either. Shuffles with an ensemble defect at or above the real sequence’s (0.4525): 1 of 10; the shuffles span 0.0775 to 0.458. The real tRNA’s occupancy reading is “distinct states”; 2 of the 10 shuffles read as distinct states and 8 as not interpretable.
- What does separate them is the reference: the real sequence’s MFE shares 20 pairs with the crystal; the most any shuffle shares is 1. A shuffle has no crystal, so this only says the scrambles do not happen to reproduce a tRNA.
Our own notes from an earlier measurement on a riboswitch found the same thing: the ensemble metrics did not separate the real sequence from scrambled copies of it. Treat energy and ensemble width as descriptions of the sequence under the model, not as evidence that the sequence folds that way.
What this example does not show
- One tRNA is a favourable case. We have not checked whether this sequence is among those the energy parameters were fitted on, so it is not a test on a sequence the model has never seen. Agreement with one crystal says nothing about other RNAs.
- The crystal is one conformation, in a lattice, with modified bases that we renamed to their parents. We did not compare against solution data such as chemical probing.
- These are secondary-structure tools: pairs and loops, not 3D coordinates. Why the two crystal pairs are absent from the MFE structure above is not tested here.
- Ten shuffles and one sampling seed are small controls. The cluster shares move with the sample, as the range column shows. Use the numbers as descriptions of this run.
- Long RNAs often have no small set of dominant structures; the tool says so in its reading when that happens, as it does for 8 of the 10 shuffles here.
- A separate tool,
rna_accessibility, gives the probability that each window is unpaired, which is the question for antisense and siRNA sites and is not answered by an MFE structure. It is not run in this example.
This page is about the numbers; the figure that draws them, with the dot plot of pair occupancies and the per-nucleotide pairing and ladder-length tracks, has its own tutorial: Read the RNA ensemble dot plot and the ladder-length track.
Run it on your own sequence
Sequences you give are processed on our server in the EU. Signing up is needed to run; reading results is not.
The method, version and licence are listed on the RNA secondary structure page.