JWS-117 Compiled all tools with ./compilebin.sh and some were missing related files.
[jabaws.git] / binaries / src / ViennaRNA / doc / html / mp_example.html
index 4dedf7c..2d080f9 100644 (file)
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<meta http-equiv="X-UA-Compatible" content="IE=9"/>
 <title>RNAlib-2.1.2: Example - A Small Example Program</title>
 <link href="tabs.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="jquery.js"></script>
-<script type="text/javascript" src="dynsections.js"></script>
-<link href="navtree.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="resize.js"></script>
-<script type="text/javascript" src="navtree.js"></script>
-<script type="text/javascript">
-  $(document).ready(initResizable);
-</script>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
 </head>
 <body>
-<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
-<div id="titlearea">
-<table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
-  <td style="padding-left: 0.5em;">
-   <div id="projectname">RNAlib-2.1.2
-   </div>
-  </td>
- </tr>
- </tbody>
-</table>
-</div>
-<!-- end header part -->
-<!-- Generated by Doxygen 1.8.1.1 -->
-  <div id="navrow1" class="tabs">
-    <ul class="tablist">
-      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
-      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
+<!-- Generated by Doxygen 1.6.1 -->
+<script type="text/javascript">
+<!--
+function changeDisplayState (e){
+  var num=this.id.replace(/[^[0-9]/g,'');
+  var button=this.firstChild;
+  var sectionDiv=document.getElementById('dynsection'+num);
+  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
+    sectionDiv.style.display='block';
+    button.src='open.gif';
+  }else{
+    sectionDiv.style.display='none';
+    button.src='closed.gif';
+  }
+}
+function initDynSections(){
+  var divs=document.getElementsByTagName('div');
+  var sectionCounter=1;
+  for(var i=0;i<divs.length-1;i++){
+    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
+      var header=divs[i];
+      var section=divs[i+1];
+      var button=header.firstChild;
+      if (button!='IMG'){
+        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
+        button=document.createElement('img');
+        divs[i].insertBefore(button,divs[i].firstChild);
+      }
+      header.style.cursor='pointer';
+      header.onclick=changeDisplayState;
+      header.id='dynheader'+sectionCounter;
+      button.src='closed.gif';
+      section.id='dynsection'+sectionCounter;
+      section.style.display='none';
+      section.style.marginLeft='14px';
+      sectionCounter++;
+    }
+  }
+}
+window.onload = initDynSections;
+-->
+</script>
+<div class="navigation" id="top">
+  <div class="tabs">
+    <ul>
+      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
+      <li class="current"><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
       <li><a href="modules.html"><span>Modules</span></a></li>
-      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
       <li><a href="files.html"><span>Files</span></a></li>
     </ul>
   </div>
-</div><!-- top -->
-<div id="side-nav" class="ui-resizable side-nav-resizable">
-  <div id="nav-tree">
-    <div id="nav-tree-contents">
-    </div>
-  </div>
-  <div id="splitbar" style="-moz-user-select:none;" 
-       class="ui-resizable-handle">
-  </div>
 </div>
-<script type="text/javascript">
-$(document).ready(function(){initNavTree('mp_example.html','');});
-</script>
-<div id="doc-content">
-<div class="header">
-  <div class="headertitle">
-<div class="title">Example - A Small Example Program </div>  </div>
-</div><!--header-->
 <div class="contents">
-<div class="textblock"><p>The following program exercises most commonly used functions of the library. The program folds two sequences using both the mfe and partition function algorithms and calculates the tree edit and profile distance of the resulting structures and base pairing probabilities.</p>
-<div class="fragment"><div class="line"><span class="preprocessor">#include  &lt;stdio.h&gt;</span></div>
-<div class="line"><span class="preprocessor">#include  &lt;stdlib.h&gt;</span></div>
-<div class="line"><span class="preprocessor">#include  &lt;math.h&gt;</span></div>
-<div class="line"><span class="preprocessor">#include  &lt;string.h&gt;</span></div>
-<div class="line"><span class="preprocessor">#include  &quot;<a class="code" href="utils_8h.html" title="Various utility- and helper-functions used throughout the Vienna RNA package.">utils.h</a>&quot;</span></div>
-<div class="line"><span class="preprocessor">#include  &quot;<a class="code" href="fold__vars_8h.html" title="Here all all declarations of the global variables used throughout RNAlib.">fold_vars.h</a>&quot;</span></div>
-<div class="line"><span class="preprocessor">#include  &quot;<a class="code" href="fold_8h.html" title="MFE calculations and energy evaluations for single RNA sequences.">fold.h</a>&quot;</span></div>
-<div class="line"><span class="preprocessor">#include  &quot;<a class="code" href="part__func_8h.html" title="Partition function of single RNA sequences.">part_func.h</a>&quot;</span></div>
-<div class="line"><span class="preprocessor">#include  &quot;<a class="code" href="inverse_8h.html" title="Inverse folding routines.">inverse.h</a>&quot;</span></div>
-<div class="line"><span class="preprocessor">#include  &quot;<a class="code" href="RNAstruct_8h.html" title="Parsing and Coarse Graining of Structures.">RNAstruct.h</a>&quot;</span></div>
-<div class="line"><span class="preprocessor">#include  &quot;<a class="code" href="treedist_8h.html" title="Functions for Tree Edit Distances.">treedist.h</a>&quot;</span></div>
-<div class="line"><span class="preprocessor">#include  &quot;<a class="code" href="stringdist_8h.html" title="Functions for String Alignment.">stringdist.h</a>&quot;</span></div>
-<div class="line"><span class="preprocessor">#include  &quot;<a class="code" href="profiledist_8h.html">profiledist.h</a>&quot;</span></div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> main()</div>
-<div class="line">{</div>
-<div class="line">   <span class="keywordtype">char</span> *seq1=<span class="stringliteral">&quot;CGCAGGGAUACCCGCG&quot;</span>, *seq2=<span class="stringliteral">&quot;GCGCCCAUAGGGACGC&quot;</span>,</div>
-<div class="line">        *struct1,* struct2,* xstruc;</div>
-<div class="line">   <span class="keywordtype">float</span> e1, e2, tree_dist, string_dist, profile_dist, kT;</div>
-<div class="line">   <a class="code" href="structTree.html">Tree</a> *T1, *T2;</div>
-<div class="line">   <a class="code" href="structswString.html">swString</a> *S1, *S2;</div>
-<div class="line">   <span class="keywordtype">float</span> *pf1, *pf2;</div>
-<div class="line">   FLT_OR_DBL *bppm;</div>
-<div class="line">   <span class="comment">/* fold at 30C instead of the default 37C */</span></div>
-<div class="line">   <a class="code" href="fold__vars_8h.html#ab4b11c8d9c758430960896bc3fe82ead" title="Rescale energy parameters to a temperature in degC.">temperature</a> = 30.;      <span class="comment">/* must be set *before* initializing  */</span></div>
-<div class="line"></div>
-<div class="line">   <span class="comment">/* allocate memory for structure and fold */</span></div>
-<div class="line">   struct1 = (<span class="keywordtype">char</span>* ) <a class="code" href="utils_8h.html#ad7e1e137b3bf1f7108933d302a7f0177" title="Allocate space safely.">space</a>(<span class="keyword">sizeof</span>(<span class="keywordtype">char</span>)*(strlen(seq1)+1));</div>
-<div class="line">   e1 =  <a class="code" href="group__mfe__fold.html#gaadafcb0f140795ae62e5ca027e335a9b" title="Compute minimum free energy and an appropriate secondary structure of an RNA sequence.">fold</a>(seq1, struct1);</div>
-<div class="line"></div>
-<div class="line">   struct2 = (<span class="keywordtype">char</span>* ) <a class="code" href="utils_8h.html#ad7e1e137b3bf1f7108933d302a7f0177" title="Allocate space safely.">space</a>(<span class="keyword">sizeof</span>(<span class="keywordtype">char</span>)*(strlen(seq2)+1));</div>
-<div class="line">   e2 =  <a class="code" href="group__mfe__fold.html#gaadafcb0f140795ae62e5ca027e335a9b" title="Compute minimum free energy and an appropriate secondary structure of an RNA sequence.">fold</a>(seq2, struct2);</div>
-<div class="line"></div>
-<div class="line">   <a class="code" href="group__mfe__fold.html#ga107fdfe5fd641868156bfd849f6866c7" title="Free arrays for mfe folding.">free_arrays</a>();     <span class="comment">/* free arrays used in fold() */</span></div>
-<div class="line"></div>
-<div class="line">   <span class="comment">/* produce tree and string representations for comparison */</span></div>
-<div class="line">   xstruc = <a class="code" href="RNAstruct_8h.html#a78d73cd54a068ef2812812771cdddc6f" title="Convert the full structure from bracket notation to the expanded notation including root...">expand_Full</a>(struct1);</div>
-<div class="line">   T1 = <a class="code" href="treedist_8h.html#a08fe4d5afd385dce593b86eaf010c6e3" title="Constructs a Tree ( essentially the postorder list ) of the structure &#39;struc&#39;, for use in tree_edit_d...">make_tree</a>(xstruc);</div>
-<div class="line">   S1 = <a class="code" href="stringdist_8h.html#a3125991b3a403b3f89230474deb3f22e" title="Convert a structure into a format suitable for string_edit_distance().">Make_swString</a>(xstruc);</div>
-<div class="line">   free(xstruc);</div>
-<div class="line"></div>
-<div class="line">   xstruc = <a class="code" href="RNAstruct_8h.html#a78d73cd54a068ef2812812771cdddc6f" title="Convert the full structure from bracket notation to the expanded notation including root...">expand_Full</a>(struct2);</div>
-<div class="line">   T2 = <a class="code" href="treedist_8h.html#a08fe4d5afd385dce593b86eaf010c6e3" title="Constructs a Tree ( essentially the postorder list ) of the structure &#39;struc&#39;, for use in tree_edit_d...">make_tree</a>(xstruc);</div>
-<div class="line">   S2 = <a class="code" href="stringdist_8h.html#a3125991b3a403b3f89230474deb3f22e" title="Convert a structure into a format suitable for string_edit_distance().">Make_swString</a>(xstruc);</div>
-<div class="line">   free(xstruc);</div>
-<div class="line"></div>
-<div class="line">   <span class="comment">/* calculate tree edit distance and aligned structures with gaps */</span></div>
-<div class="line">   <a class="code" href="dist__vars_8h.html#aa03194c513af6b860e7b33e370b82bdb" title="Produce an alignment of the two structures being compared by tracing the editing path giving the mini...">edit_backtrack</a> = 1;</div>
-<div class="line">   tree_dist = <a class="code" href="treedist_8h.html#a3b21f1925f7071f46d93431a835217bb" title="Calculates the edit distance of the two trees.">tree_edit_distance</a>(T1, T2);</div>
-<div class="line">   <a class="code" href="treedist_8h.html#acbc1cb9bce582ea945e4a467c76a57aa" title="Free the memory allocated for Tree t.">free_tree</a>(T1); <a class="code" href="treedist_8h.html#acbc1cb9bce582ea945e4a467c76a57aa" title="Free the memory allocated for Tree t.">free_tree</a>(T2);</div>
-<div class="line">   <a class="code" href="RNAstruct_8h.html#a1054c4477d53b31d79d4cb132100e87a" title="Converts two aligned structures in expanded notation.">unexpand_aligned_F</a>(aligned_line);</div>
-<div class="line">   printf(<span class="stringliteral">&quot;%s\n%s  %3.2f\n&quot;</span>, aligned_line[0], aligned_line[1], tree_dist);</div>
-<div class="line"></div>
-<div class="line">   <span class="comment">/* same thing using string edit (alignment) distance */</span></div>
-<div class="line">   string_dist = <a class="code" href="stringdist_8h.html#a89e3c335ef17780576d7c0e713830db9" title="Calculate the string edit distance of T1 and T2.">string_edit_distance</a>(S1, S2);</div>
-<div class="line">   free(S1); free(S2);</div>
-<div class="line">   printf(<span class="stringliteral">&quot;%s  mfe=%5.2f\n%s  mfe=%5.2f  dist=%3.2f\n&quot;</span>,</div>
-<div class="line">          aligned_line[0], e1, aligned_line[1], e2, string_dist);</div>
-<div class="line"></div>
-<div class="line">   <span class="comment">/* for longer sequences one should also set a scaling factor for</span></div>
-<div class="line"><span class="comment">      partition function folding, e.g: */</span></div>
-<div class="line">   kT = (<a class="code" href="fold__vars_8h.html#ab4b11c8d9c758430960896bc3fe82ead" title="Rescale energy parameters to a temperature in degC.">temperature</a>+273.15)*1.98717/1000.;  <span class="comment">/* kT in kcal/mol */</span></div>
-<div class="line">   <a class="code" href="fold__vars_8h.html#ad3b22044065acc6dee0af68931b52cfd" title="A scaling factor used by pf_fold() to avoid overflows.">pf_scale</a> = exp(-e1/kT/strlen(seq1));</div>
-<div class="line"></div>
-<div class="line">   <span class="comment">/* calculate partition function and base pair probabilities */</span></div>
-<div class="line">   e1 = <a class="code" href="group__pf__fold.html#gadc3db3d98742427e7001a7fd36ef28c2" title="Compute the partition function  of an RNA sequence.">pf_fold</a>(seq1, struct1);</div>
-<div class="line">   <span class="comment">/* get the base pair probability matrix for the previous run of pf_fold() */</span></div>
-<div class="line">   bppm = <a class="code" href="group__pf__fold.html#ga6d463707d5f64bdc4d21515b7dd9b115" title="Get a pointer to the base pair probability arrayAccessing the base pair probabilities for a pair (i...">export_bppm</a>();</div>
-<div class="line">   pf1 = <a class="code" href="profiledist_8h.html#a8822fd5268be115c6e6cdc92009436cc" title="condense pair probability matrix into a vector containing probabilities for unpaired, upstream paired and downstream paired.">Make_bp_profile_bppm</a>(bppm, strlen(seq1));</div>
-<div class="line"></div>
-<div class="line">   e2 = <a class="code" href="group__pf__fold.html#gadc3db3d98742427e7001a7fd36ef28c2" title="Compute the partition function  of an RNA sequence.">pf_fold</a>(seq2, struct2);</div>
-<div class="line">   <span class="comment">/* get the base pair probability matrix for the previous run of pf_fold() */</span></div>
-<div class="line">   bppm = <a class="code" href="group__pf__fold.html#ga6d463707d5f64bdc4d21515b7dd9b115" title="Get a pointer to the base pair probability arrayAccessing the base pair probabilities for a pair (i...">export_bppm</a>();</div>
-<div class="line">   pf2 = <a class="code" href="profiledist_8h.html#a8822fd5268be115c6e6cdc92009436cc" title="condense pair probability matrix into a vector containing probabilities for unpaired, upstream paired and downstream paired.">Make_bp_profile_bppm</a>(bppm, strlen(seq2));</div>
-<div class="line"></div>
-<div class="line">   <a class="code" href="group__pf__fold.html#gae73db3f49a94f0f72e067ecd12681dbd" title="Free arrays for the partition function recursions.">free_pf_arrays</a>();  <span class="comment">/* free space allocated for pf_fold() */</span></div>
-<div class="line"></div>
-<div class="line">   profile_dist = <a class="code" href="profiledist_8h.html#abe75e90e00a1e5dd8862944ed53dad5d" title="Align the 2 probability profiles T1, T2 .">profile_edit_distance</a>(pf1, pf2);</div>
-<div class="line">   printf(<span class="stringliteral">&quot;%s  free energy=%5.2f\n%s  free energy=%5.2f  dist=%3.2f\n&quot;</span>,</div>
-<div class="line">          aligned_line[0], e1, aligned_line[1], e2, profile_dist);</div>
-<div class="line"></div>
-<div class="line">   <a class="code" href="profiledist_8h.html#a9b0b84a5a45761bf42d7c835dcdb3b85" title="free space allocated in Make_bp_profile">free_profile</a>(pf1); <a class="code" href="profiledist_8h.html#a9b0b84a5a45761bf42d7c835dcdb3b85" title="free space allocated in Make_bp_profile">free_profile</a>(pf2);</div>
-<div class="line">}</div>
-</div><!-- fragment --><p>In a typical Unix environment you would compile this program using: </p>
-<pre class="fragment">cc ${OPENMP_CFLAGS} -c example.c -I${hpath}
-</pre><p> and link using </p>
-<pre class="fragment">cc ${OPENMP_CFLAGS} -o example -L${lpath} -lRNA -lm
-</pre><p> where <em>${hpath}</em> and <em>${lpath}</em> point to the location of the header files and library, respectively. </p>
-<dl class="section note"><dt>Note:</dt><dd>As default, the RNAlib is compiled with build-in <em>OpenMP</em> multithreading support. Thus, when linking your own object files to the library you have to pass the compiler specific <em>${OPENMP_CFLAGS}</em> (e.g. '-fopenmp' for <b>gcc</b>) even if your code does not use openmp specific code. However, in that case the <em>OpenMP</em> flags may be ommited when compiling example.c </dd></dl>
-</div></div><!-- contents -->
-</div><!-- doc-content -->
-<!-- start footer part -->
-<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
-  <ul>
-    <li class="footer">Generated on Wed Jul 24 2013 13:38:59 for RNAlib-2.1.2 by
-    <a href="http://www.doxygen.org/index.html">
-    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.1.1 </li>
-  </ul>
+
+
+<h1><a class="anchor" id="mp_example">Example - A Small Example Program </a></h1><p>The following program exercises most commonly used functions of the library. The program folds two sequences using both the mfe and partition function algorithms and calculates the tree edit and profile distance of the resulting structures and base pairing probabilities.</p>
+<div class="fragment"><pre class="fragment"> {.c}
+<span class="preprocessor">#include  &lt;stdio.h&gt;</span>
+<span class="preprocessor">#include  &lt;stdlib.h&gt;</span>
+<span class="preprocessor">#include  &lt;math.h&gt;</span>
+<span class="preprocessor">#include  &lt;string.h&gt;</span>
+<span class="preprocessor">#include  &quot;<a class="code" href="utils_8h.html" title="Various utility- and helper-functions used throughout the Vienna RNA package.">utils.h</a>&quot;</span>
+<span class="preprocessor">#include  &quot;<a class="code" href="fold__vars_8h.html" title="Here all all declarations of the global variables used throughout RNAlib.">fold_vars.h</a>&quot;</span>
+<span class="preprocessor">#include  &quot;<a class="code" href="fold_8h.html" title="MFE calculations and energy evaluations for single RNA sequences.">fold.h</a>&quot;</span>
+<span class="preprocessor">#include  &quot;<a class="code" href="part__func_8h.html" title="Partition function of single RNA sequences.">part_func.h</a>&quot;</span>
+<span class="preprocessor">#include  &quot;<a class="code" href="inverse_8h.html" title="Inverse folding routines.">inverse.h</a>&quot;</span>
+<span class="preprocessor">#include  &quot;<a class="code" href="RNAstruct_8h.html" title="Parsing and Coarse Graining of Structures.">RNAstruct.h</a>&quot;</span>
+<span class="preprocessor">#include  &quot;<a class="code" href="treedist_8h.html" title="Functions for Tree Edit Distances.">treedist.h</a>&quot;</span>
+<span class="preprocessor">#include  &quot;<a class="code" href="stringdist_8h.html" title="Functions for String Alignment.">stringdist.h</a>&quot;</span>
+<span class="preprocessor">#include  &quot;<a class="code" href="profiledist_8h.html">profiledist.h</a>&quot;</span>
+
+<span class="keywordtype">void</span> main()
+{
+   <span class="keywordtype">char</span> *seq1=<span class="stringliteral">&quot;CGCAGGGAUACCCGCG&quot;</span>, *seq2=<span class="stringliteral">&quot;GCGCCCAUAGGGACGC&quot;</span>,
+        *struct1,* struct2,* xstruc;
+   <span class="keywordtype">float</span> e1, e2, tree_dist, string_dist, profile_dist, kT;
+   <a class="code" href="structTree.html">Tree</a> *T1, *T2;
+   <a class="code" href="structswString.html">swString</a> *S1, *S2;
+   <span class="keywordtype">float</span> *pf1, *pf2;
+   FLT_OR_DBL *bppm;
+   <span class="comment">/* fold at 30C instead of the default 37C */</span>
+   <a class="code" href="fold__vars_8h.html#ab4b11c8d9c758430960896bc3fe82ead" title="Rescale energy parameters to a temperature in degC.">temperature</a> = 30.;      <span class="comment">/* must be set *before* initializing  */</span>
+
+   <span class="comment">/* allocate memory for structure and fold */</span>
+   struct1 = (<span class="keywordtype">char</span>* ) <a class="code" href="utils_8h.html#ad7e1e137b3bf1f7108933d302a7f0177" title="Allocate space safely.">space</a>(<span class="keyword">sizeof</span>(<span class="keywordtype">char</span>)*(strlen(seq1)+1));
+   e1 =  <a class="code" href="group__mfe__fold.html#gaadafcb0f140795ae62e5ca027e335a9b" title="Compute minimum free energy and an appropriate secondary structure of an RNA sequence...">fold</a>(seq1, struct1);
+
+   struct2 = (<span class="keywordtype">char</span>* ) <a class="code" href="utils_8h.html#ad7e1e137b3bf1f7108933d302a7f0177" title="Allocate space safely.">space</a>(<span class="keyword">sizeof</span>(<span class="keywordtype">char</span>)*(strlen(seq2)+1));
+   e2 =  <a class="code" href="group__mfe__fold.html#gaadafcb0f140795ae62e5ca027e335a9b" title="Compute minimum free energy and an appropriate secondary structure of an RNA sequence...">fold</a>(seq2, struct2);
+
+   <a class="code" href="group__mfe__fold.html#ga107fdfe5fd641868156bfd849f6866c7" title="Free arrays for mfe folding.">free_arrays</a>();     <span class="comment">/* free arrays used in fold() */</span>
+
+   <span class="comment">/* produce tree and string representations for comparison */</span>
+   xstruc = <a class="code" href="RNAstruct_8h.html#a78d73cd54a068ef2812812771cdddc6f" title="Convert the full structure from bracket notation to the expanded notation including...">expand_Full</a>(struct1);
+   T1 = <a class="code" href="treedist_8h.html#a08fe4d5afd385dce593b86eaf010c6e3" title="Constructs a Tree ( essentially the postorder list ) of the structure &amp;#39;struc&amp;#39;...">make_tree</a>(xstruc);
+   S1 = <a class="code" href="stringdist_8h.html#a3125991b3a403b3f89230474deb3f22e" title="Convert a structure into a format suitable for string_edit_distance().">Make_swString</a>(xstruc);
+   free(xstruc);
+
+   xstruc = <a class="code" href="RNAstruct_8h.html#a78d73cd54a068ef2812812771cdddc6f" title="Convert the full structure from bracket notation to the expanded notation including...">expand_Full</a>(struct2);
+   T2 = <a class="code" href="treedist_8h.html#a08fe4d5afd385dce593b86eaf010c6e3" title="Constructs a Tree ( essentially the postorder list ) of the structure &amp;#39;struc&amp;#39;...">make_tree</a>(xstruc);
+   S2 = <a class="code" href="stringdist_8h.html#a3125991b3a403b3f89230474deb3f22e" title="Convert a structure into a format suitable for string_edit_distance().">Make_swString</a>(xstruc);
+   free(xstruc);
+
+   <span class="comment">/* calculate tree edit distance and aligned structures with gaps */</span>
+   <a class="code" href="dist__vars_8h.html#aa03194c513af6b860e7b33e370b82bdb" title="Produce an alignment of the two structures being compared by tracing the editing...">edit_backtrack</a> = 1;
+   tree_dist = <a class="code" href="treedist_8h.html#a3b21f1925f7071f46d93431a835217bb" title="Calculates the edit distance of the two trees.">tree_edit_distance</a>(T1, T2);
+   <a class="code" href="treedist_8h.html#acbc1cb9bce582ea945e4a467c76a57aa" title="Free the memory allocated for Tree t.">free_tree</a>(T1); <a class="code" href="treedist_8h.html#acbc1cb9bce582ea945e4a467c76a57aa" title="Free the memory allocated for Tree t.">free_tree</a>(T2);
+   <a class="code" href="RNAstruct_8h.html#a1054c4477d53b31d79d4cb132100e87a" title="Converts two aligned structures in expanded notation.">unexpand_aligned_F</a>(aligned_line);
+   printf(<span class="stringliteral">&quot;%s\n%s  %3.2f\n&quot;</span>, aligned_line[0], aligned_line[1], tree_dist);
+
+   <span class="comment">/* same thing using string edit (alignment) distance */</span>
+   string_dist = <a class="code" href="stringdist_8h.html#a89e3c335ef17780576d7c0e713830db9" title="Calculate the string edit distance of T1 and T2.">string_edit_distance</a>(S1, S2);
+   free(S1); free(S2);
+   printf(<span class="stringliteral">&quot;%s  mfe=%5.2f\n%s  mfe=%5.2f  dist=%3.2f\n&quot;</span>,
+          aligned_line[0], e1, aligned_line[1], e2, string_dist);
+
+   <span class="comment">/* for longer sequences one should also set a scaling factor for</span>
+<span class="comment">      partition function folding, e.g: */</span>
+   kT = (<a class="code" href="fold__vars_8h.html#ab4b11c8d9c758430960896bc3fe82ead" title="Rescale energy parameters to a temperature in degC.">temperature</a>+273.15)*1.98717/1000.;  <span class="comment">/* kT in kcal/mol */</span>
+   <a class="code" href="fold__vars_8h.html#ad3b22044065acc6dee0af68931b52cfd" title="A scaling factor used by pf_fold() to avoid overflows.">pf_scale</a> = exp(-e1/kT/strlen(seq1));
+
+   <span class="comment">/* calculate partition function and base pair probabilities */</span>
+   e1 = <a class="code" href="group__pf__fold.html#gadc3db3d98742427e7001a7fd36ef28c2" title="Compute the partition function  of an RNA sequence.">pf_fold</a>(seq1, struct1);
+   <span class="comment">/* get the base pair probability matrix for the previous run of pf_fold() */</span>
+   bppm = <a class="code" href="group__pf__fold.html#ga6d463707d5f64bdc4d21515b7dd9b115" title="Get a pointer to the base pair probability arrayAccessing the base pair probabilities...">export_bppm</a>();
+   pf1 = <a class="code" href="profiledist_8h.html#a8822fd5268be115c6e6cdc92009436cc" title="condense pair probability matrix into a vector containing probabilities for unpaired...">Make_bp_profile_bppm</a>(bppm, strlen(seq1));
+
+   e2 = <a class="code" href="group__pf__fold.html#gadc3db3d98742427e7001a7fd36ef28c2" title="Compute the partition function  of an RNA sequence.">pf_fold</a>(seq2, struct2);
+   <span class="comment">/* get the base pair probability matrix for the previous run of pf_fold() */</span>
+   bppm = <a class="code" href="group__pf__fold.html#ga6d463707d5f64bdc4d21515b7dd9b115" title="Get a pointer to the base pair probability arrayAccessing the base pair probabilities...">export_bppm</a>();
+   pf2 = <a class="code" href="profiledist_8h.html#a8822fd5268be115c6e6cdc92009436cc" title="condense pair probability matrix into a vector containing probabilities for unpaired...">Make_bp_profile_bppm</a>(bppm, strlen(seq2));
+
+   <a class="code" href="group__pf__fold.html#gae73db3f49a94f0f72e067ecd12681dbd" title="Free arrays for the partition function recursions.">free_pf_arrays</a>();  <span class="comment">/* free space allocated for pf_fold() */</span>
+
+   profile_dist = <a class="code" href="profiledist_8h.html#abe75e90e00a1e5dd8862944ed53dad5d" title="Align the 2 probability profiles T1, T2 .">profile_edit_distance</a>(pf1, pf2);
+   printf(<span class="stringliteral">&quot;%s  free energy=%5.2f\n%s  free energy=%5.2f  dist=%3.2f\n&quot;</span>,
+          aligned_line[0], e1, aligned_line[1], e2, profile_dist);
+
+   <a class="code" href="profiledist_8h.html#a9b0b84a5a45761bf42d7c835dcdb3b85" title="free space allocated in Make_bp_profile">free_profile</a>(pf1); <a class="code" href="profiledist_8h.html#a9b0b84a5a45761bf42d7c835dcdb3b85" title="free space allocated in Make_bp_profile">free_profile</a>(pf2);
+}
+</pre></div><p>In a typical Unix environment you would compile this program using: </p>
+<div class="fragment"><pre class="fragment">
+cc ${OPENMP_CFLAGS} -c example.c -I${hpath}
+</pre></div><p> and link using </p>
+<div class="fragment"><pre class="fragment">
+cc ${OPENMP_CFLAGS} -o example -L${lpath} -lRNA -lm
+</pre></div><p> where <em>${hpath}</em> and <em>${lpath}</em> point to the location of the header files and library, respectively. </p>
+<dl class="note"><dt><b>Note:</b></dt><dd>As default, the RNAlib is compiled with build-in <em>OpenMP</em> multithreading support. Thus, when linking your own object files to the library you have to pass the compiler specific <em>${OPENMP_CFLAGS}</em> (e.g. '-fopenmp' for <b>gcc</b>) even if your code does not use openmp specific code. However, in that case the <em>OpenMP</em> flags may be ommited when compiling example.c </dd></dl>
 </div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on 11 Apr 2017 for RNAlib-2.1.2 by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
 </body>
 </html>