JWS-117 Compiled all tools with ./compilebin.sh and some were missing related files.
[jabaws.git] / binaries / src / ViennaRNA / doc / latex / mp_example.tex
index b82d3a7..27c736f 100644 (file)
@@ -1,15 +1,17 @@
 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.
 
 
-\begin{DoxyCode}
+
+\begin{footnotesize}\begin{alltt}
+ \{.c\}
 \textcolor{preprocessor}{#include  <stdio.h>}
 \textcolor{preprocessor}{#include  <stdlib.h>}
 \textcolor{preprocessor}{#include  <math.h>}
 \textcolor{preprocessor}{#include  <string.h>}
 \textcolor{preprocessor}{#include  "\hyperlink{utils_8h}{utils.h}"}
-\textcolor{preprocessor}{#include  "\hyperlink{fold__vars_8h}{fold\_vars.h}"}
+\textcolor{preprocessor}{#include  "\hyperlink{fold__vars_8h}{fold_vars.h}"}
 \textcolor{preprocessor}{#include  "\hyperlink{fold_8h}{fold.h}"}
-\textcolor{preprocessor}{#include  "\hyperlink{part__func_8h}{part\_func.h}"}
+\textcolor{preprocessor}{#include  "\hyperlink{part__func_8h}{part_func.h}"}
 \textcolor{preprocessor}{#include  "\hyperlink{inverse_8h}{inverse.h}"}
 \textcolor{preprocessor}{#include  "\hyperlink{RNAstruct_8h}{RNAstruct.h}"}
 \textcolor{preprocessor}{#include  "\hyperlink{treedist_8h}{treedist.h}"}
@@ -35,28 +37,28 @@ The following program exercises most commonly used functions of the library. The
    struct2 = (\textcolor{keywordtype}{char}* ) \hyperlink{utils_8h_ad7e1e137b3bf1f7108933d302a7f0177}{space}(\textcolor{keyword}{sizeof}(\textcolor{keywordtype}{char})*(strlen(seq2)+1));
    e2 =  \hyperlink{group__mfe__fold_gaadafcb0f140795ae62e5ca027e335a9b}{fold}(seq2, struct2);
 
-   \hyperlink{group__mfe__fold_ga107fdfe5fd641868156bfd849f6866c7}{free\_arrays}();     \textcolor{comment}{/* free arrays used in fold() */}
+   \hyperlink{group__mfe__fold_ga107fdfe5fd641868156bfd849f6866c7}{free_arrays}();     \textcolor{comment}{/* free arrays used in fold() */}
 
    \textcolor{comment}{/* produce tree and string representations for comparison */}
-   xstruc = \hyperlink{RNAstruct_8h_a78d73cd54a068ef2812812771cdddc6f}{expand\_Full}(struct1);
-   T1 = \hyperlink{treedist_8h_a08fe4d5afd385dce593b86eaf010c6e3}{make\_tree}(xstruc);
-   S1 = \hyperlink{stringdist_8h_a3125991b3a403b3f89230474deb3f22e}{Make\_swString}(xstruc);
+   xstruc = \hyperlink{RNAstruct_8h_a78d73cd54a068ef2812812771cdddc6f}{expand_Full}(struct1);
+   T1 = \hyperlink{treedist_8h_a08fe4d5afd385dce593b86eaf010c6e3}{make_tree}(xstruc);
+   S1 = \hyperlink{stringdist_8h_a3125991b3a403b3f89230474deb3f22e}{Make_swString}(xstruc);
    free(xstruc);
 
-   xstruc = \hyperlink{RNAstruct_8h_a78d73cd54a068ef2812812771cdddc6f}{expand\_Full}(struct2);
-   T2 = \hyperlink{treedist_8h_a08fe4d5afd385dce593b86eaf010c6e3}{make\_tree}(xstruc);
-   S2 = \hyperlink{stringdist_8h_a3125991b3a403b3f89230474deb3f22e}{Make\_swString}(xstruc);
+   xstruc = \hyperlink{RNAstruct_8h_a78d73cd54a068ef2812812771cdddc6f}{expand_Full}(struct2);
+   T2 = \hyperlink{treedist_8h_a08fe4d5afd385dce593b86eaf010c6e3}{make_tree}(xstruc);
+   S2 = \hyperlink{stringdist_8h_a3125991b3a403b3f89230474deb3f22e}{Make_swString}(xstruc);
    free(xstruc);
 
    \textcolor{comment}{/* calculate tree edit distance and aligned structures with gaps */}
-   \hyperlink{dist__vars_8h_aa03194c513af6b860e7b33e370b82bdb}{edit\_backtrack} = 1;
-   tree\_dist = \hyperlink{treedist_8h_a3b21f1925f7071f46d93431a835217bb}{tree\_edit\_distance}(T1, T2);
-   \hyperlink{treedist_8h_acbc1cb9bce582ea945e4a467c76a57aa}{free\_tree}(T1); \hyperlink{treedist_8h_acbc1cb9bce582ea945e4a467c76a57aa}{free\_tree}(T2);
-   \hyperlink{RNAstruct_8h_a1054c4477d53b31d79d4cb132100e87a}{unexpand\_aligned\_F}(aligned\_line);
+   \hyperlink{dist__vars_8h_aa03194c513af6b860e7b33e370b82bdb}{edit_backtrack} = 1;
+   tree\_dist = \hyperlink{treedist_8h_a3b21f1925f7071f46d93431a835217bb}{tree_edit_distance}(T1, T2);
+   \hyperlink{treedist_8h_acbc1cb9bce582ea945e4a467c76a57aa}{free_tree}(T1); \hyperlink{treedist_8h_acbc1cb9bce582ea945e4a467c76a57aa}{free_tree}(T2);
+   \hyperlink{RNAstruct_8h_a1054c4477d53b31d79d4cb132100e87a}{unexpand_aligned_F}(aligned\_line);
    printf(\textcolor{stringliteral}{"%s\(\backslash\)n%s  %3.2f\(\backslash\)n"}, aligned\_line[0], aligned\_line[1], tree\_dist);
 
    \textcolor{comment}{/* same thing using string edit (alignment) distance */}
-   string\_dist = \hyperlink{stringdist_8h_a89e3c335ef17780576d7c0e713830db9}{string\_edit\_distance}(S1, S2);
+   string\_dist = \hyperlink{stringdist_8h_a89e3c335ef17780576d7c0e713830db9}{string_edit_distance}(S1, S2);
    free(S1); free(S2);
    printf(\textcolor{stringliteral}{"%s  mfe=%5.2f\(\backslash\)n%s  mfe=%5.2f  dist=%3.2f\(\backslash\)n"},
           aligned\_line[0], e1, aligned\_line[1], e2, string\_dist);
@@ -64,34 +66,36 @@ The following program exercises most commonly used functions of the library. The
    \textcolor{comment}{/* for longer sequences one should also set a scaling factor for}
 \textcolor{comment}{      partition function folding, e.g: */}
    kT = (\hyperlink{fold__vars_8h_ab4b11c8d9c758430960896bc3fe82ead}{temperature}+273.15)*1.98717/1000.;  \textcolor{comment}{/* kT in kcal/mol */}
-   \hyperlink{fold__vars_8h_ad3b22044065acc6dee0af68931b52cfd}{pf\_scale} = exp(-e1/kT/strlen(seq1));
+   \hyperlink{fold__vars_8h_ad3b22044065acc6dee0af68931b52cfd}{pf_scale} = exp(-e1/kT/strlen(seq1));
 
    \textcolor{comment}{/* calculate partition function and base pair probabilities */}
-   e1 = \hyperlink{group__pf__fold_gadc3db3d98742427e7001a7fd36ef28c2}{pf\_fold}(seq1, struct1);
+   e1 = \hyperlink{group__pf__fold_gadc3db3d98742427e7001a7fd36ef28c2}{pf_fold}(seq1, struct1);
    \textcolor{comment}{/* get the base pair probability matrix for the previous run of pf\_fold() */}
-   bppm = \hyperlink{group__pf__fold_ga6d463707d5f64bdc4d21515b7dd9b115}{export\_bppm}();
-   pf1 = \hyperlink{profiledist_8h_a8822fd5268be115c6e6cdc92009436cc}{Make\_bp\_profile\_bppm}(bppm, strlen(seq1));
+   bppm = \hyperlink{group__pf__fold_ga6d463707d5f64bdc4d21515b7dd9b115}{export_bppm}();
+   pf1 = \hyperlink{profiledist_8h_a8822fd5268be115c6e6cdc92009436cc}{Make_bp_profile_bppm}(bppm, strlen(seq1));
 
-   e2 = \hyperlink{group__pf__fold_gadc3db3d98742427e7001a7fd36ef28c2}{pf\_fold}(seq2, struct2);
+   e2 = \hyperlink{group__pf__fold_gadc3db3d98742427e7001a7fd36ef28c2}{pf_fold}(seq2, struct2);
    \textcolor{comment}{/* get the base pair probability matrix for the previous run of pf\_fold() */}
-   bppm = \hyperlink{group__pf__fold_ga6d463707d5f64bdc4d21515b7dd9b115}{export\_bppm}();
-   pf2 = \hyperlink{profiledist_8h_a8822fd5268be115c6e6cdc92009436cc}{Make\_bp\_profile\_bppm}(bppm, strlen(seq2));
+   bppm = \hyperlink{group__pf__fold_ga6d463707d5f64bdc4d21515b7dd9b115}{export_bppm}();
+   pf2 = \hyperlink{profiledist_8h_a8822fd5268be115c6e6cdc92009436cc}{Make_bp_profile_bppm}(bppm, strlen(seq2));
 
-   \hyperlink{group__pf__fold_gae73db3f49a94f0f72e067ecd12681dbd}{free\_pf\_arrays}();  \textcolor{comment}{/* free space allocated for pf\_fold() */}
+   \hyperlink{group__pf__fold_gae73db3f49a94f0f72e067ecd12681dbd}{free_pf_arrays}();  \textcolor{comment}{/* free space allocated for pf\_fold() */}
 
-   profile\_dist = \hyperlink{profiledist_8h_abe75e90e00a1e5dd8862944ed53dad5d}{profile\_edit\_distance}(pf1, pf2);
+   profile\_dist = \hyperlink{profiledist_8h_abe75e90e00a1e5dd8862944ed53dad5d}{profile_edit_distance}(pf1, pf2);
    printf(\textcolor{stringliteral}{"%s  free energy=%5.2f\(\backslash\)n%s  free energy=%5.2f  dist=%3.2f\(\backslash\)n"},
           aligned\_line[0], e1, aligned\_line[1], e2, profile\_dist);
 
-   \hyperlink{profiledist_8h_a9b0b84a5a45761bf42d7c835dcdb3b85}{free\_profile}(pf1); \hyperlink{profiledist_8h_a9b0b84a5a45761bf42d7c835dcdb3b85}{free\_profile}(pf2);
+   \hyperlink{profiledist_8h_a9b0b84a5a45761bf42d7c835dcdb3b85}{free_profile}(pf1); \hyperlink{profiledist_8h_a9b0b84a5a45761bf42d7c835dcdb3b85}{free_profile}(pf2);
 \}
-\end{DoxyCode}
+\end{alltt}\end{footnotesize}
 
 
-In a typical Unix environment you would compile this program using\-: \begin{DoxyVerb}cc ${OPENMP_CFLAGS} -c example.c -I${hpath}
+In a typical Unix environment you would compile this program using: \begin{DoxyVerb}
+cc ${OPENMP_CFLAGS} -c example.c -I${hpath}
 \end{DoxyVerb}
- and link using \begin{DoxyVerb}cc ${OPENMP_CFLAGS} -o example -L${lpath} -lRNA -lm
+ and link using \begin{DoxyVerb}
+cc ${OPENMP_CFLAGS} -o example -L${lpath} -lRNA -lm
 \end{DoxyVerb}
- where {\itshape \$\{hpath\}} and {\itshape \$\{lpath\}} point to the location of the header files and library, respectively. \begin{DoxyNote}{Note}
-As default, the R\-N\-Alib is compiled with build-\/in {\itshape Open\-M\-P} multithreading support. Thus, when linking your own object files to the library you have to pass the compiler specific {\itshape \$\{O\-P\-E\-N\-M\-P\-\_\-\-C\-F\-L\-A\-G\-S\}} (e.\-g. '-\/fopenmp' for {\bfseries gcc}) even if your code does not use openmp specific code. However, in that case the {\itshape Open\-M\-P} flags may be ommited when compiling example.\-c 
+ where {\itshape \$\{hpath\}\/} and {\itshape \$\{lpath\}\/} point to the location of the header files and library, respectively. \begin{DoxyNote}{Note}
+As default, the RNAlib is compiled with build-\/in {\itshape OpenMP\/} multithreading support. Thus, when linking your own object files to the library you have to pass the compiler specific {\itshape \$\{OPENMP\_\-CFLAGS\}\/} (e.g. '-\/fopenmp' for {\bfseries gcc}) even if your code does not use openmp specific code. However, in that case the {\itshape OpenMP\/} flags may be ommited when compiling example.c 
 \end{DoxyNote}