Font size: Increase font size Decrease font size Switch style sheet from default to highcontrast and back

ViennaRNA Package 2 - Documentation

Here, we provide all the documentation necessary to install and use the programs of the ViennaRNA Package. We also provide a reference manual the for RNAlib C library which comes with the package.

Installing the ViennaRNA Package

For best portability the ViennaRNA package uses the GNU autoconf and automake tools. The instructions below are for installing the ViennaRNA package from source. However, pre-compiled binaries for various Linux distributions, as well as for Windows users are available from Download section of the main ViennaRNA homepage.


Usually you'll just unpack, configure and make. To do this type:

tar -zxvf ViennaRNA-2.2.5.tar.gz
cd ViennaRNA-2.2.5
sudo make install

User-dir Installation

If you do not have root privileges on your computer, you might want to install the ViennaRNA Package to a location where you actually have write access to. To do so, you can set the installation prefix of the ./configure script like so:

./configure --prefix=/home/username/ViennaRNA
make install
This will install the entire ViennaRNA Package into a new directory ViennaRNA directly into the users username home directory.

Notes for MacOS X users

Although users will find /usr/bin/gcc and /usr/bin/g++ exectuables in their directory tree, these programs are not at all what they pretend to be. Instead of including the GNU programs, Apple decided to install clang/llvm in disguise. Unfortunately, the default version of clang/llvm does not support OpenMP (yet), but only complains at a late stage of the build process when this support is required. Therefore, it seems necessary to deactivate OpenMP support by passing the option --disable-openmp to the ./configure script.

Additionally, since MacOS X 10.5 the perl and python installation distributed with MacOS X always include so called universal-binaries (a.k.a. fat-binaries), i.e. binaries for multiple architecture types.
In order to compile and link the programs, library, and scripting language interfaces of the ViennaRNA Package for multiple architectures, we've added a new configure switch that sets up the required changes automatically:

./configure --enable-universal-binary

Note, that with link time optimization turned on, MacOS X's default compiler (llvm/clang) generates an intermediary binary format that can not easily be combined into a multi-architecture library. Therefore, the --enable-universal-binary switch turns off link time optimization!

Optional sub-packages and configure options

This release includes the RNAforester, Kinfold, and Kinwalker programs, which can also be obtained as independent packages. Running ./configure in the ViennaRNA directory will configure these packages as well. However, for detailed information and compile time options, see the README and INSTALL files in the respective subdirectories.

Scripting Interfaces

The ViennaRNA Package comes with scripting language interfaces for Perl 5, Python 2, and Python 3 (provided by swig), that allow one to use the implemented algorithms directly without the need of calling an executable program. While building the Perl 5 and Python 2 interface is enabled by default, the interface for Python 3 needs to be explicitely activated. To do so, just pass the --with-python3 flag to the configure script before running make. On the other hand, you can build the ViennaRNA package without Perl 5 or Python 2 support by switching them off at configure time, before the actual installation.

./confgure --without-perl --without-python
Disabling the entire scripting language support alltogether can be accomplished using the following switch:
./confgure --without-swig

Cluster Analysis

The programs AnalyseSeqs and AnalyseDists offer some cluster analysis tools (split decomposition, statistical geometry, neighbor joining, Ward's method) for sequences and distance data. To also build these programs add --with-cluster to your configure options.


The Kinfold program can be used to simulate the folding dynamics of an RNA molecule, and is compiled by default. Use the --without-kinfold option to skip compilation and installation of Kinfold.


The RNAforester program is used for comparing secondary structures using tree alignment. Similar to Kinfold, use the --without-forester option to skip compilation and installation of RNAforester.


The Kinwalker algorithm performs co-transcriptional folding of RNAs, starting at a user specified structure (default: open chain) and ending at the minimum free energy structure. Compilation and installation of this program is deactivated by default. Use the --with-kinwalker option to enable building and installation of Kinwalker.

Link Time Optimization (LTO)

To increase the performance of our implementations, the ViennaRNA Package tries to make use of the Link Time Optimization (LTO) feature of modern C-compilers. If you are experiencing any troubles at make-time or run-time, or the configure script for some reason detects that your compiler supports this feature although it doesn't, you can deactivate it using the flag

./configure --disable-lto

Stochastic backtracking using Boustrophedon scheme

Stochastic backtracking for single RNA sequences, e.g. available through the RNAsubopt program, received a major speedup by implementing a Boustrophedon scheme (see this article for details). If for some reason you want to deactivate this feature, you can do that by adding the following switch to the configure script:

./configure --disable-boustrophedon

Generic Hard Constraints

The new constraints framework also implements first steps for generic hard constraints. However, this feature is deactivated by default due to performance reasons. Most users do not need this advanced feature since it is only accessible through the RNAlib C-library. If you want to develop third-party programs that link against RNAlib and make use of this feature, you need to enable it using by adding the following configure switch:

./configure --enable-gen-hard-constraints

SVM Z-score filter in RNALfold

By default, RNALfold that comes with the ViennaRNA Package allows for z-score filtering of its predicted results using a support vector machine (SVM). However, the library we use to implement this feature (libsvm) is statically linked to our own RNAlib. If this introduces any problems for your own third-party programs that link against RNAlib, you can safely switch off the z-scoring implementation using

./configure --without-svm

GNU Scientific Library

The new program RNApvmin computes a pseudo-energy pertubation vector that aims to minimize the discrepancy of predicted, and observed pairing probabilities. For that purpose it implements several methods to solve the optimization problem. Many of them are provided by the GNU Scientific Library, which is why the RNApvmin program, and the RNAlib C-library are required to be linked against libgsl. If this introduces any problems in your own third-party programs that link against RNAlib, you can turn off a larger protion of available minimizers in RNApvmin and linking against libgsl alltogether, using the switch

./configure --without-gsl

Single precision partition function

Calculation of partition functions (via RNAfold -p) uses double precision floats by default, to avoid overflow errors on longer sequences. If your machine has little memory and you dont't plan to fold sequences over 1000 bases in length you can compile the package to do the computions in single precision by running

./configure --enable-floatpf
However, using this option is discouraged and not necessary on most modern computers.


For a complete list of all ./configure options and important environment variables, type

./configure --help
For more general information on the buid process see the INSTALL.configure file.


Although the man pages are also included in the ViennaRNA Package itself it is sometimes useful to have an HTML translation making them accessible through a web browser.

Click on the corresponding program name in the table below to browse its manual page

AnalyseDists Analyse a distance matrix
AnalyseSeqs Analyse a set of sequences of common length
Kinfold Simulate kinetic folding of RNA secondary structures
RNA2Dfold Compute MFE structure, partition function and representative sample structures of k,l neighborhoods
RNAaliduplex Predict conserved RNA-RNA interactions between two alignments
RNAalifold Calculate secondary structures for a set of aligned RNA sequences
RNAcofold Calculate secondary structures of two RNAs with dimerization
RNAdistance Calculate distances between RNA secondary structures
RNAduplex Compute the structure upon hybridization of two RNA strands
RNAeval Evaluate free energy of RNA sequences with given secondary structure
RNAfold Calculate minimum free energy secondary structures and partition function of RNAs
RNAforester Compare RNA secondary structures via forest alignment
RNAheat Calculate the specific heat (melting curve) of an RNA sequence
RNAinverse Find RNA sequences with given secondary structure (sequence design)
RNALalifold Calculate locally stable secondary structures for a set of aligned RNAs
RNALfold Calculate locally stable secondary structures of long RNAs
RNApaln RNA alignment based on sequence base pairing propensities
RNApdist Calculate distances between thermodynamic RNA secondary structures ensembles
RNAparconv Convert energy parameter files from ViennaRNA 1.8 to 2.0 format
RNAPKplex Predict RNA secondary structures including pseudoknots
RNAplex Find targets of a query RNA
RNAplfold Calculate average pair probabilities for locally stable secondary structures
RNAplot Draw RNA Secondary Structures in PostScript, SVG, or GML
RNApvmin Calculate a perturbation vector that minimizes discrepancies between predicted and observed pairing probabilities
RNAsnoop Find targets of a query H/ACA snoRNA
RNAsubopt Calculate suboptimal secondary structures of RNAs
RNAup Calculate the thermodynamics of RNA-RNA interactions


The Vienna RNA package comes with a number of small utilities, many of them to manipulate the PostScript files produced by the structure prediction programs RNAfold and RNAalifold. Most of the Perl utilities contain embedded pod documentation. Type e.g.

for detailed instructions.

Click on the corresponding utility name in the table below to browse its manual page
ct2db Produce dot bracket notation of an RNA secondary structure given as mfold .ct file Produce a mountain representation of a secondary structure from it's dot-bracket notation, as produced by RNAfold. Output consists of simple x y data suitable as input to a plotting program. The mountain representation is a xy plot with sequence position on the x-axis and the number of base pairs enclosing that position on the y-axis.
RNAfold < my.seq | | xmgrace -pipe Produce a PostScript mountain plot from a color dot plot as created by RNAalifold -p or alidot -p. Each base pair is represented by a trapez whose color encodes the number of consistent and compensatory mutations supporting that pair: Red marks pairs with no sequence variation; ochre, green, turquoise, blue, and violet mark pairs with 2,3,4,5,6 different types of pairs, respectively.
Example: > Reads a sequence alignment in CLUSTAL format and a consensus secondary structure (which it extracts from a secondary structure plot as produced by RNAalifold), and produces a postscript figure of the alignment annotated using the consensus structure, coloring base pair using the same color scheme as, RNAalifold and alidot.
Example: -s file.aln > Reads a consensus secondary structure plot and a color dot plot as produced by RNAalifold -p, and writes a new secondary structure plot in which base pairs a colored using the color information from the dot plot.
Example: > Similar to, but produces a mountain plot from the pair probabilities contained in a PostScript dot plot. It write 3 sets of x y data, suitable as input for a plot program. The first two sets containing the mountain representation from pair probabilities and MFE structure, the third set is the "positional entropy" a measure of structural well-definedness.
Example: | xmgrace -pipe Refold using consensus structure as constraint Reads a postscript secondary structure plot and a dot plot containing pair probabilities as produced by RNAfold -p, and produces a new structure plot, color annotated with reliability information in the form of either pair probabilities or positional entropy (default).
Example: > Reads a postscript secondary structure plot as produced by RNAfold and produces a new rotated and/or mirrored structure plot.
Example: -a 30 -m > Design sequences that can adopt two different structure, i.e. design RNA switches. The program will sample the set of sequences compatible with two input structures in order to find sequences with desired thermodynamic and kinetic properties. In particular it is possible to specify
  1. Two different temperatures such that structure 1 is favored at T1 and structure 2 at T2 to design temperature sensitive switches (RNA thermometers)
  2. The desired height of the energy barrier separating the two structures, thus determining the refolding time between meta-stable states. Flexible design of multi-stable RNA molecules. An initially random sequence is iteratively mutated and evaluated according to an objective function (see Option: --optfun). Whenever a better scoring sequence has been found, the mutation is accepted, the algorithm terminates once a local minimum is found. This script makes heavy use of the new RNA::Design Perl 5 sub-package provided by the latest ViennaRNA Package.

RNAlib Reference Manual

The core of the ViennaRNA Package is formed by a collection of routines for the prediction and comparison of RNA secondary structures. These routines can be accessed through the stand-alone programs and utilities described above, which should be sufficient for most users. For those who wish to develop their own programs we provide a library that can either be linked to your own C/C++ code, or accessed through our scripting language interface. Currently, we provide support for Perl and Python.

Follow this link to view the HTML version of the RNAlib API Reference Manual.

Get the reference manual for Vienna RNA Package 2.2.5 The documentation can also be downloaded as a PDF document

Terms and Definitions

Throughout these webpages, we use many terms related to RNA secondary structure prediction. Below you'll find a list of some often used vocabulary and its corresponding definition.

Dot-Bracket notation Pseudo-knot free secondary structures can be represented in the space-efficient bracket notation, which is used throughout the ViennaRNA package. A structure on a sequence of length n is represented by a string of equal length consisting of matching brackets and dots. A base pair between base i and j is represented by a ( at position i and a ) at position j, unpaired bases are represented by dots. Thus the secondary structure
is equivalent to:
secondary structure graph
i.e. a stem-loop structure consisting of a an outer helix of 3 base pairs followed by an interior loop of size 3, a second helix of length 4, and a hairpin loop of size 3.

Base pair probabilities are sometimes summarized in pseudo bracket notation with the additional symbols ,, |, {, }. Here, the usual (, ), ., represent bases with a strong preference (more than 2/3) to pair upstream (with a partner further 3'), pair down-stream, or not pair, respectively. {, }, and , are just weaker version of the above and | represents a base that is mostly paired but has pairing partners both upstream and downstream. In this case open and closed brackets need not match up.

Comments and Bug Reports

If in doubt our program is right, nature is at fault.
Comments and bug reports should be sent to