The Wang-Landau algorithm [1],[2] is a Mote Carlo approach for sampling the Density of States (DOS) of a system via a random walk in energy space. It has been successfully applied to classical systems like the Ising model or spin glasses.
This as an implementation of the Wang-Landau algorithm for RNA secondary structures. RNA-related computation is performed by libRNA (available with the ViennaRNA Package [3]).
A typical command line for running a simulation with 1000 bins and a fixed bin width of 0.1 (kcal/mol) is
$ RNAwl --bins 1000 --resolution 0.1 myrna.in
RNAwl expects a single input file containg the nucleotide sequence and a start structure in dot-bracket notation on separate lines. e.g.:
CGGCGACUGCCGUAUGAAUCUCUAUGAGCG
((((....)))).......(((...)))..
RNAwl -h lists available options and --info gives current (or default) values for all parameters.
Two types of output files are generated by default, both of which make use of the fact that the logarithm of the DOS is used internally. Output files are identified by extensions .lDoS and .sDoS.
First, the natural logarithm of the currently estimated (relative) DOS is ouput for each populated energy bin as xy list (exitension *.lDoS) every time the histogram is 'flat' (and thus reset to zero). x is computed as the average value of a bin's range (i.e. if a bin goes from E_a to E_b, x=(E_b-E_a)/2) and y is given as the natural logarithm of the estimated DOS in the corresponding bin.
Second, the current values of the (scaled) DOS estimation is output every c*10^(1/4) steps, starting with c=10^6 (extension *.sDoS). Scaling is performed via the lowest (groundstate) bin, for which the true DoS can be computed via suboptimal folding from the ViennaRNA library, i.e. ln[gn(E)] = ln[g(E)]-ln[g(Egs)]+ln[Q] where Q is the number of structures in the lowest bin.
To evaluate convergence, we have included a helper script that computes the relative error of the sampled DOS vs a 'reference' DOS. eval_sampledDOS.pl is available in the Perl/ folder of the distribution.
- libgsl GNU Scientific Library
- libRNA2 >=2.2 ViennaRNA Library
Histograms are allocated to uniformly cover the sampling range per default. If you would like to have more fine-grained control over the histogram layout, you can provide a custom bin width via the --resolution option. The sampling range will then be computed as <resolution> * <bins>, i.e. the upper bound of the sampling range is then computed as <mfe> + <resolution> * <bins>.
This is experimental software which has been implemented for reference purposes only. Read the source code to learn what it's all about. Please report bugs to [email protected]
Michael Thomas Wolfinger [email protected]
[1]: F. Wang, D.P. Landau "Efficient, Multiple-Range RandomWalk Algorithm to Calculate the Density of States" Phy. Rev. Lett. 86 10,2001
[2]: D.P. Landau, Shan-Ho Tsai, M. Exler "A new approach to Monte Carlo simulations in statistical physics: Wang-Landau sampling" Am. J. Phys. 72 10, 2004
[3]: R. Lorenz, S.H. Bernhart, C. Höner zu Siederdissen, H. Tafer, Ch. Flamm, P.F. Stadler, I.L. Hofacker "ViennaRNA Package 2.0" Alg. Mol. Biol., 6:1 26, 2011