Get Started#

The ViennaRNA Package comes with a variety of executable programs and scripts as well as a C-library that provides access to our implemented algorithms. Moreover, the C-library is wrapped to scripting languages such as Perl 5 and Python.

Note

The latest stable release is Version 2.7.2

Download#

Installing from sourcecode is the recommended way to get most out of the ViennaRNA Package. For best portability the ViennaRNA package uses the GNU tools autoconf, automake, and libtool and can thus be compiled and installed on almost every computer platform.

ViennaRNA Package - Source Code v2.7.2src

See Installing from Source for instructions to install the source code package.

Older Versions

There should rarely be a good reason to use any but the latest version of our software. However if you want to look up the old bugs, here’s a list with most of the older releases for download.

For your convenience, we also provide precompiled binary packages for several Linux distributions and installer executables for Windows and MacOS X.

Notes on split packages

To comply with the packaging standards of the corresponding Linux distributions we split the ViennaRNA Package into

Core

Usually the executable programs and utility scripts

Development Files

The RNAlib C-library and the corresponding header files

Perl Bindings

The RNA module to access RNAlib C-library functions from within Perl scripts

Python Bindings

The RNA class to access RNAlib C-library functions from within Python scripts

Reference Manual

The documentation for the ViennaRNA Package

See Installing Pre-compiled Packages for instructions to install the binary packages.

ViennaRNA Package - Windows Installer v2.7.2x86_64

ViennaRNA Package - Windows Installer v2.7.2i686

Warning

The Windows installer will not change the PATH variable of your system. In order to omit the path to the binaries while using the programs of the ViennaRNA Package, please add the path of your ViennaRNA Package installation directory to your PATH variable manually.

Tip

The Windows installer doesn’t include python bindings for RNAlib! However, they can be manually installed from PyPI.

ViennaRNA Package - MacOS X Installer v2.7.2x86_64

ViennaRNA Package - MacOS X Installer v2.7.2arm64

Note

Two installers for Mac OS X are available here, one for x86_64 Intel CPUs (x86_64) that should work out of the box for all x86_64 based Macs, and a second (arm64) that runs on newer ARM-based Macs (M1-M3).

Tip

The installers include Python bindings for the Python versions that ship with the respective MacOS X. If you require Python bindings for any other Python version, please install them separately, e.g. from PyPI.

Here we list all versions of the ViennaRNA Package that contain special features which have not been included into the main release yet:

  • Preliminary version with CUDA (Nvidia GPU) support for RNAfold

    ViennaRNA Package v2.3.0cuda Source Code v2.3.0cudasrc

    Configure with

    ./configure NVCC_PATH=/path/to/cuda/bin NVCC_SAMPLES=/path/to/cuda/samples CUDA_SMS="35 50 61"
    

    where CUDA_SMS is a string specifying the CUDA compute capabilities. Here we include support for for Tesla K20, GTX745, and GTX 1060. You can check the appropriate CUDA compute capability for your GPU here: https://developer.nvidia.com/cuda-gpus. Simply use the compute level as displayed at the NVIDIA web site and multiply it by 10 to get a nice and clean integer number for CUDA_SMS. To find out the correct path to NVCC a simple which nvcc should suffice.

    For all CUDA related environment variables, check the output of

    ./configure --help
    

    Some answers to frequently asked questions can be found at W. Langdons CUDA RNAfold website.

  • Preliminary version implementing RNA/DNA hybrid support

    ViennaRNA Package v2.1.9h Source Code v2.1.9hsrc

Installing from Source#

The instructions below are for installing the ViennaRNA package from source code.

Tip

Read the Customizing the Build Process section before you install our software if you intend to deviate from the default setup.

Usually you’ll just download the latest source tarball, unpack it and run configure and make:

tar -zxvf ViennaRNA-2.7.2.tar.gz
cd ViennaRNA-2.7.2
./configure
make
sudo make install
Alternative installation target directory

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:

tar -zxvf ViennaRNA-2.7.2.tar.gz
cd ViennaRNA-2.7.2
./configure --prefix=$HOME/.local
make
make install

This will install the entire ViennaRNA Package into your home’s ~/.local/ directory that is commonly used for user-installed software. Just make sure that your PATH environment variable contains the $HOME/.local/bin directory such that our executables are looked-up for at the proper location.

The --prefix can be any other directory if you want to keep your installed software separate from each other. The make install command will then create the corresponding bin/, lib/, share/ directories within the directory you specified.

MacOS X quirks

Although users will find /usr/bin/gcc and /usr/bin/g++ executables 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, e.g.:

./configure --disable-openmp

You can also get the latest source code from our git repository hosted at github:

git clone https://github.com/ViennaRNA/ViennaRNA.git
Important steps before you proceed

To proceed with the configuration and installation you need to perform some additional steps before actually running the ./configure script:

  1. Unpack the libsvm archive to allow for SVM Z-score regression with the program RNALfold:

    tar -xzf src/libsvm-3.35.tar.gz -C src
    
  2. Unpack the dlib archive to allow for concentration dependency computations with the program RNAmultifold:

    tar -xjf src/dlib-20.0.tar.bz2 -C src
    
  3. Install the autotools toolchain and the additional maintainer tools gengetopt, help2man, flex, xxd, and swig if necessary. For instance, in Debian based distributions, the following packages need to be installed:

    • build-essential (basic build tools, such as compiler, linker, etc.)

    • autoconf, automake, libtool, pkg-config (autotools toolchain)

    • gengetopt (to generate command line parameter parsers)

    • help2man (to generate the man pages)

    • bison and flex (to generate sources for RNAforester)

    • vim-common (for the xxd program)

    • swig (to generate the scripting language interfaces)

    • liblapacke (for RNAxplorer)

    • liblapack (for RNAxplorer)

    • A fortran compiler, e.g. gfortran (for RNAxplorer)

  4. Finally, run the autoconf/automake toolchain:

    autoreconf -i
    

After that, you can compile and install the ViennaRNA Package as if obtained from the distribution tarball.

Usually, there is no need to (re-)build the documentation, it is already part of the source code tarball! However, if you compile from a freshly cloned git repository or you’ve changed any of the source code, building the documentation is probably required.

Technical details

Our API is documented with comments that are automatically parsed by doxygen. The extracted API documentation is then processed further by breathe and finally integrated into a comprehensive reference manual written in ReStructuredText. This manual is then compiled into HTML and/or PDF format by Sphinx.

To succeed with the compilation a few maintainer tools are required:

  • doxygen (to extract the API documentation)

  • sphinx-build (to compile the manual)

  • pdflatex (to compile a PDF version of the manual)

  • sphinx-multiproject

  • myst-parser

  • sphinx-copybutton

  • sphinxcontrib-bibtex

  • pydata-sphinx-theme

  • sphinx-design

If all the above tools are available, compilation of the documentation should succeed without any further problems

Manual documentation re-build trigger

If you intend to rebuild the documentation although it already has been build before, you can delete the file doc/refman-html. This file serves as a placeholder to prevent make from redundantly building the documentation, e.g. after extraction of the release tarball where typically none of the source code has been altered.

rm doc/refman-html
make

To trigger parsing of the API description from source code headers, you need to additionally remove the doxygen-xml placeholder file:

rm doc/doxygen/doxygen-xml doc/refman-html
make

Our source code allows for building a stand-alone Python interface. For that, we provide the necessary packaging files pyproject.toml, setup.cfg, setup.py and MANIFEST.in. They are created by our autoconf toolchain after a successful run of ./configure. Particular default compile-time features may be (de-)activated by setting the corresponding boolean flags in setup.cfg. Running

python -m build

will then create a source distribution (sdist) and a binary package (wheel) in the dist/ directory. These files can be easily installed via Python’s pip.

Important pre-conditions for build with fresh git repository

If you are about to create the Python interface from a fresh clone of our git repository, you require additional steps after running ./configure as described above. In particular, some autogenerated static files that are compiled into RNAlib must be generated. To do so, run

cd src/ViennaRNA/static
make
cd ../../..

Additionally, if building the reference manual is not explicitly turned off, the Python interface requires docstrings to be generated. They are taken from the doxygen xml output which can be created by

cd doc/doxygen
make doxygen-xml
cd ../..

Finally, the swig wrapper must be build using

cd interfaces/Python
make RNA/RNA.py
cd ../..

After these steps, the Python sdist and wheel packages can be build as usual.

Installing Pre-compiled Packages#

To install the pre-compiled Linux packages that we provide in the Download section above, simply download the corresponding files and use the installer program of your linux distribution.

Some examples to install the core programs and the Python 3 interface are shown below.

sudo pacman -U viennarna-2.7.2-1-x86_64.pkg.tar.zst python-rna-2.7.2-1-x86_64.pkg.tar.zst
sudo apt install viennarna-2.7.2-1_amd64.deb python3-rna-2.7.2-1_amd64.deb
sudo dnf install viennarna-2.7.2-1.x86_64.rpm python3-rna-2.7.2-1.x86_64.rpm

Simply download the latest MacOS X installer for your architecture from the download section above and run it. It will guide you through the installation process

Simply download the latest Windows installer for your architecture from the download section above and run it. It will guide you through the installation process

Pixi is a modern and extremely fast alternative to conda. It is based on the conda packages and environment. First install pixi and then set-up the bioconda channel:

pixi config set default-channels '["conda-forge", "bioconda"]'

After these steps, you can install the ViennaRNA bioconda package either globally

pixi global install viennarna

or locally in any workspace/environment:

pixi add viennarna

See the pixi documentation for further information on how to get started and use pixi for your own workspace(s).

The ViennaRNA Package is also available for the conda or mamba package manager. The only requirement is to set up the bioconda channels

conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge
conda config --set channel_priority strict

and then you can easily install the viennarna bioconda package through

conda install viennarna

The Python 3 interface for the ViennaRNA Package library is available at PyPI and can be installed independently using Python’s pip:

python -m pip install viennarna

An unofficial interface of the ViennaRNA Package for the Julia Programming Language exists at JuliaHub.

Customizing the Build Process#

The ViennaRNA Package includes additional executable programs such as

  • RNAforester,

  • Kinfold,

  • Kinwalker,

  • RNAlocmin, and

  • RNAxplorer.

Furthermore, we include several features in our C-library that may be activated by default, or have to be explicitly turned on at configure-time. Below we list a selection of the available configure options that affect the features included in all executable programs, the RNAlib C-library, and the corresponding scripting language interface(s).

Streaming SIMD Extension#

Since version 2.3.5 our sources contain code that implements a faster multibranch loop decomposition in global MFE predictions, as used e.g. in RNAfold. This implementation makes use of modern processors streaming SIMD extension (SSE) that provide the capability to execute particular instructions on multiple data simultaneously (SIMD - single instruction multiple data, thanks to W. B. Langdon for providing the modified code). Consequently, the time required to assess the minimum of all multibranch loop decompositions is reduced up to about one half compared to the runtime of the original implementation. This feature is enabled by default since version 2.4.11 and a dispatcher ensures that the correct implementation will be selected at runtime. If for any reason you want to disable this feature at compile-time use the following:

./configure --disable-simd

Scripting Language Interfaces#

The ViennaRNA Package comes with scripting language interfaces for Perl 5, Python (provided by SWIG), that allow one to use the implemented algorithms directly without the need of calling an executable program. The necessary requirements are determined at configure-time and particular languages may be deactivated automatically if the requirements are not met.

You may switch-off particular languages by passing the --without-perl and/or --without-python configure options, e.g.:

./configure --without-perl

will turn-off building the Perl 5 interface.

Tip

Disabling the scripting language support all-together can be accomplished using the following switch:

./configure --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.

Kinfold#

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.

RNAforester#

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.

Kinwalker#

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.

RNAlocmin#

The RNAlocmin program is part of the Basin Hopping Graph Framework and reads secondary structures and searches for local minima by performing a gradient walk from each of those structures. It then outputs an energetically sorted list of local minima with their energies and number of hits to particular minimum, which corresponds to a size of a gradient basin. Additional output consists of barrier trees and Arhenius rates to compute various kinetic aspects. Compilation and installation of this program is activated by default. Use the --without-rnalocmin option to disable building and installation of RNAlocmin.

RNAxplorer#

The RNAxplorer is a multitool, that offers different methods to explore RNA energy landscapes. In default mode it takes an RNA sequence as input and produces a sample of RNA secondary structures. The repellant sampling heuristic used in default mode iteratively penalizes base pairs of local minima of structures that have been seen too often. This results in a diverse sample set with the most important low free energy structures. Compilation and installation of this program is activated by default. Note, that this tool depends on the LAPACK library. Use the --without-rnaxplorer option to disable building and installation of RNAxplorer.

OpenMP#

To enable concurrent computation of our implementations and in some cases parallelization of the algorithms we make use of the OpenMP API. This interface is well understood by most modern compilers. However, in some cases it might be necessary to deactivate OpenMP support and therefore transform RNAlib into a C-library that is not entirely thread-safe. To do so, add the following configure option:

./configure --disable-openmp

POSIX threads#

To enable concurrent computation of multiple input data in RNAfold, and for our implementation of the concurrent unordered insert, ordered output flush data structure vrna_ostream_t we make use of POSIX threads (pthread). This should be supported on all modern platforms and usually does not pose any problems. Unfortunately, we use a threadpool implementation that is not compatible with Microsoft Windows yet. Thus, POSIX thread support can not be activated for Windows builds until we have fixed this problem. If you want to compile RNAfold and RNAlib without POSIX threads support for any other reasons, add the following configure option:

./configure --disable-pthreads

SVM Z-score filter#

By default, RNALfold that comes with the ViennaRNA Package allows for Z-score filtering of its predicted results using a Support Vector Machine (SVM) provided by the LIBSVM library. However, this library 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 program RNApvmin computes a pseudo-energy perturbation 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 (GSL), 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 portion of available minimizers in RNApvmin and linking against libgsl all-together, using:

./configure --without-gsl

Multiple-precision Floating-Point Computations#

Our Non-redundant Boltzmann Sampling implementation uses multi-precision floating-point computations provided by the GNU MPFR library by default. This requires linking against libmpfr and libgmp. You can switch off this feature using:

./configure --disable-mpfr

Universal binaries#

If you intend to build the ViennaRNA for Mac OS X such that it runs on both, x86_64 and the arm64 (Apple Silicon Processors) architectures, you need to build a so-called universal binary. Note, however, that to accomplish this task, you might need to deactivate any third-party library dependency as in most cases, only one architecture will be available at link time. This includes the Perl 5 and Python interfaces but might also concern also MPFR and GSL support, possibly even more. 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

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!

Disable C11/C++11 features#

By default, we use C11/C++11 features in our implementations. This mainly accounts for unnamed unions/structs within RNAlib. The configure script automatically detects whether or not your compiler understands these features. In case you are using an older compiler, these features will be deactivated by setting a specific pre-processor directive. If for some reason you want to deactivate C11/C++11 features despite the capabilities of your compiler, use the following configure option:

./configure --disable-c11

Deprecated symbols#

Since version 2.2 we are in the process of transforming the API of our RNAlib. Hence, several symbols are marked as deprecated whenever they have been replaced by the new API. By default, deprecation warnings at compile time are deactivated. If you want to get your terminal spammed by tons of deprecation warnings, enable them using:

./configure --enable-warn-deprecated

Single precision#

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 don’t plan to fold sequences over 1,000 bases in length you can compile the package to do the computations in single precision by running:

./configure --enable-floatpf

Warning

Using this option is discouraged and not necessary on most modern computers.

Help#

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

./configure --help

For more general information on the build process see the INSTALL file.

Build your own Binary Package from SourceCode#

If you don’t find a precompiled package for your linux distribution, or in case you just want to create a binary package by yourself, have a look into the packaging/ directory of our source tarball. It includes a list of some configuration files that we use for package generation:

  • For RPM based distributions, we use this SPEC file, originally written for Fedora, but meanwhile extended to work for at least the Linux distributions we provide binary packages ourselves.

  • Our binary package for ArchLinux was generated using this PKGBUILD file, which is also part of the viennarna source package available through the ArchLinux User Repository (AUR).

  • The configuration files for our binary Debian and Ubuntu packages are included in the source tarball within the packaging/debian directory.

  • Finally, for our MacOS X package, we make use of the pkgbuild, productbuild, and hditool commandline tools. The corresponding configuration files are included in our tarball in the directory packaging/macosx. For simplicity, you can instruct the autotools toolchain to automatically build the installer disk image by adding the following configure switch:

    ./configure --enable-macosx-installer
    

    This creates a file packaging/macosx/ViennaRNA-2.7.2-MacOSX.dmg.

Our binary packages in the above section are mainly build using the openSUSE Build Service, while the Windows Installer is created using the MinGW cross-compiler and the NSIS install system. The MacOS X installer is build on github via github actions.