\hypertarget{part__func_8h}{
\section{/homes/fmmarquesmadeira/Projects/jabaws/binaries/src/ViennaRNA/H/part\_\-func.h File Reference}
\label{part__func_8h}\index{/homes/fmmarquesmadeira/Projects/jabaws/binaries/src/ViennaRNA/H/part\_\-func.h@{/homes/fmmarquesmadeira/Projects/jabaws/binaries/src/ViennaRNA/H/part\_\-func.h}}
}


Partition function of single RNA sequences.  
Include dependency graph for part\_\-func.h:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=215pt]{part__func_8h__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
float \hyperlink{group__pf__fold_ga1839c61275760944b3a007c41d5c0823}{pf\_\-fold\_\-par} (const char $\ast$sequence, char $\ast$structure, \hyperlink{structpf__paramT}{pf\_\-paramT} $\ast$parameters, int calculate\_\-bppm, int is\_\-constrained, int is\_\-circular)
\begin{DoxyCompactList}\small\item\em Compute the partition function $Q$ for a given RNA sequence. \item\end{DoxyCompactList}\item 
float \hyperlink{group__pf__fold_gadc3db3d98742427e7001a7fd36ef28c2}{pf\_\-fold} (const char $\ast$sequence, char $\ast$structure)
\begin{DoxyCompactList}\small\item\em Compute the partition function $Q$ of an RNA sequence. \item\end{DoxyCompactList}\item 
float \hyperlink{group__pf__fold_ga819ce5fca8984004ac81c4a3b04cb735}{pf\_\-circ\_\-fold} (const char $\ast$sequence, char $\ast$structure)
\begin{DoxyCompactList}\small\item\em Compute the partition function of a circular RNA sequence. \item\end{DoxyCompactList}\item 
char $\ast$ \hyperlink{group__subopt__stochbt_gac03ca6db186bb3bf0a2a326d7fb3ba03}{pbacktrack} (char $\ast$sequence)
\begin{DoxyCompactList}\small\item\em Sample a secondary structure from the Boltzmann ensemble according its probability\par
. \item\end{DoxyCompactList}\item 
char $\ast$ \hyperlink{group__subopt__stochbt_ga00474051204ac9ad576b3e45174d03ff}{pbacktrack\_\-circ} (char $\ast$sequence)
\begin{DoxyCompactList}\small\item\em Sample a secondary structure of a circular RNA from the Boltzmann ensemble according its probability. \item\end{DoxyCompactList}\item 
void \hyperlink{group__pf__fold_gae73db3f49a94f0f72e067ecd12681dbd}{free\_\-pf\_\-arrays} (void)
\begin{DoxyCompactList}\small\item\em Free arrays for the partition function recursions. \item\end{DoxyCompactList}\item 
void \hyperlink{group__pf__fold_ga384e927890f9c034ff09fa66da102d28}{update\_\-pf\_\-params} (int length)
\begin{DoxyCompactList}\small\item\em Recalculate energy parameters. \item\end{DoxyCompactList}\item 
\hypertarget{group__pf__fold_ga0733527a94de3b79eee3c3c03c99c1bc}{
void \hyperlink{group__pf__fold_ga0733527a94de3b79eee3c3c03c99c1bc}{update\_\-pf\_\-params\_\-par} (int length, \hyperlink{structpf__paramT}{pf\_\-paramT} $\ast$parameters)}
\label{group__pf__fold_ga0733527a94de3b79eee3c3c03c99c1bc}

\begin{DoxyCompactList}\small\item\em Recalculate energy parameters. \item\end{DoxyCompactList}\item 
double $\ast$ \hyperlink{group__pf__fold_ga6d463707d5f64bdc4d21515b7dd9b115}{export\_\-bppm} (void)
\begin{DoxyCompactList}\small\item\em Get a pointer to the base pair probability array

Accessing the base pair probabilities for a pair (i,j) is achieved by. \item\end{DoxyCompactList}\item 
void \hyperlink{group__pf__fold_ga03e15e831a31b1154855ab47edbdb019}{assign\_\-plist\_\-from\_\-pr} (\hyperlink{structplist}{plist} $\ast$$\ast$pl, double $\ast$probs, int length, double cutoff)
\begin{DoxyCompactList}\small\item\em Create a \hyperlink{structplist}{plist} from a probability matrix. \item\end{DoxyCompactList}\item 
int \hyperlink{group__pf__fold_ga18607e79e106cad827f482eedd2f632e}{get\_\-pf\_\-arrays} (short $\ast$$\ast$S\_\-p, short $\ast$$\ast$S1\_\-p, char $\ast$$\ast$ptype\_\-p, double $\ast$$\ast$qb\_\-p, double $\ast$$\ast$qm\_\-p, double $\ast$$\ast$q1k\_\-p, double $\ast$$\ast$qln\_\-p)
\begin{DoxyCompactList}\small\item\em Get the pointers to (almost) all relavant computation arrays used in partition function computation. \item\end{DoxyCompactList}\item 
\hypertarget{part__func_8h_a189e2a1ec6cc32c53ea72f7543b0441e}{
double \hyperlink{part__func_8h_a189e2a1ec6cc32c53ea72f7543b0441e}{get\_\-subseq\_\-F} (int i, int j)}
\label{part__func_8h_a189e2a1ec6cc32c53ea72f7543b0441e}

\begin{DoxyCompactList}\small\item\em Get the free energy of a subsequence from the q\mbox{[}\mbox{]} array. \item\end{DoxyCompactList}\item 
char $\ast$ \hyperlink{group__centroid__fold_ga9aba0ba1433a6d259331e0fe9fc4a9a6}{get\_\-centroid\_\-struct\_\-pl} (int length, double $\ast$dist, \hyperlink{structplist}{plist} $\ast$pl)
\begin{DoxyCompactList}\small\item\em Get the centroid structure of the ensemble. \item\end{DoxyCompactList}\item 
char $\ast$ \hyperlink{group__centroid__fold_gacdabece4aa1e20c9eaa97acb4c4dcc38}{get\_\-centroid\_\-struct\_\-pr} (int length, double $\ast$dist, double $\ast$\hyperlink{fold__vars_8h_a0f5757427fd5f2f79d6fca0081cd5a52}{pr})
\begin{DoxyCompactList}\small\item\em Get the centroid structure of the ensemble. \item\end{DoxyCompactList}\item 
double \hyperlink{group__pf__fold_ga79cbc375af65f11609feb6b055269e7d}{mean\_\-bp\_\-distance} (int length)
\begin{DoxyCompactList}\small\item\em Get the mean base pair distance of the last partition function computation. \item\end{DoxyCompactList}\item 
double \hyperlink{group__pf__fold_ga72d84525f0afd3a9d60d830a2f501fa5}{mean\_\-bp\_\-distance\_\-pr} (int length, double $\ast$\hyperlink{fold__vars_8h_a0f5757427fd5f2f79d6fca0081cd5a52}{pr})
\begin{DoxyCompactList}\small\item\em Get the mean base pair distance in the thermodynamic ensemble. \item\end{DoxyCompactList}\item 
\hypertarget{part__func_8h_a1f562d463c14d4703d9656056200eb38}{
void \hyperlink{part__func_8h_a1f562d463c14d4703d9656056200eb38}{bppm\_\-to\_\-structure} (char $\ast$structure, double $\ast$\hyperlink{fold__vars_8h_a0f5757427fd5f2f79d6fca0081cd5a52}{pr}, unsigned int length)}
\label{part__func_8h_a1f562d463c14d4703d9656056200eb38}

\begin{DoxyCompactList}\small\item\em Create a dot-\/bracket like structure string from base pair probability matrix. \item\end{DoxyCompactList}\item 
\hypertarget{part__func_8h_a49962ad6242b8c628de6ca16bb831c1d}{
char \hyperlink{part__func_8h_a49962ad6242b8c628de6ca16bb831c1d}{bppm\_\-symbol} (const float $\ast$x)}
\label{part__func_8h_a49962ad6242b8c628de6ca16bb831c1d}

\begin{DoxyCompactList}\small\item\em Get a pseudo dot bracket notation for a given probability information. \item\end{DoxyCompactList}\item 
void \hyperlink{part__func_8h_a15176e23eceeff8c7d14eabcfec8a2af}{init\_\-pf\_\-fold} (int length)
\begin{DoxyCompactList}\small\item\em Allocate space for \hyperlink{group__pf__fold_gadc3db3d98742427e7001a7fd36ef28c2}{pf\_\-fold()}. \item\end{DoxyCompactList}\item 
char $\ast$ \hyperlink{part__func_8h_ae89a63bd83e75a80b2ba36d20b31ce81}{centroid} (int length, double $\ast$dist)
\item 
double \hyperlink{part__func_8h_ae9556ba7ded44fe2321b6f67c3fc02a3}{mean\_\-bp\_\-dist} (int length)
\item 
double \hyperlink{part__func_8h_a68ba6f3a48e08ca131ab54621ce3a2d7}{expLoopEnergy} (int u1, int u2, int type, int type2, short si1, short sj1, short sp1, short sq1)
\item 
double \hyperlink{part__func_8h_a7b6ab474cc80accc48010ccfcc59f96b}{expHairpinEnergy} (int u, int type, short si1, short sj1, const char $\ast$string)
\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{group__subopt__stochbt_gacd79b1a570e6ad9be24cb11fe8cae30a}{st\_\-back}
\begin{DoxyCompactList}\small\item\em Flag indicating that auxilary arrays are needed throughout the computations. This is essential for stochastic backtracking. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Partition function of single RNA sequences. This file includes (almost) all function declarations within the {\bfseries RNAlib} that are related to Partion function folding... 

\subsection{Function Documentation}
\hypertarget{part__func_8h_a15176e23eceeff8c7d14eabcfec8a2af}{
\index{part\_\-func.h@{part\_\-func.h}!init\_\-pf\_\-fold@{init\_\-pf\_\-fold}}
\index{init\_\-pf\_\-fold@{init\_\-pf\_\-fold}!part_func.h@{part\_\-func.h}}
\subsubsection[{init\_\-pf\_\-fold}]{\setlength{\rightskip}{0pt plus 5cm}void init\_\-pf\_\-fold (int {\em length})}}
\label{part__func_8h_a15176e23eceeff8c7d14eabcfec8a2af}


Allocate space for \hyperlink{group__pf__fold_gadc3db3d98742427e7001a7fd36ef28c2}{pf\_\-fold()}. \begin{Desc}
\item[\hyperlink{deprecated__deprecated000011}{Deprecated}]This function is obsolete and will be removed soon! \end{Desc}
\hypertarget{part__func_8h_ae89a63bd83e75a80b2ba36d20b31ce81}{
\index{part\_\-func.h@{part\_\-func.h}!centroid@{centroid}}
\index{centroid@{centroid}!part_func.h@{part\_\-func.h}}
\subsubsection[{centroid}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ centroid (int {\em length}, \/  double $\ast$ {\em dist})}}
\label{part__func_8h_ae89a63bd83e75a80b2ba36d20b31ce81}
\begin{Desc}
\item[\hyperlink{deprecated__deprecated000012}{Deprecated}]This function is deprecated and should not be used anymore as it is not threadsafe! \end{Desc}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__centroid__fold_ga9aba0ba1433a6d259331e0fe9fc4a9a6}{get\_\-centroid\_\-struct\_\-pl()}, \hyperlink{group__centroid__fold_gacdabece4aa1e20c9eaa97acb4c4dcc38}{get\_\-centroid\_\-struct\_\-pr()} 
\end{DoxySeeAlso}
\hypertarget{part__func_8h_ae9556ba7ded44fe2321b6f67c3fc02a3}{
\index{part\_\-func.h@{part\_\-func.h}!mean\_\-bp\_\-dist@{mean\_\-bp\_\-dist}}
\index{mean\_\-bp\_\-dist@{mean\_\-bp\_\-dist}!part_func.h@{part\_\-func.h}}
\subsubsection[{mean\_\-bp\_\-dist}]{\setlength{\rightskip}{0pt plus 5cm}double mean\_\-bp\_\-dist (int {\em length})}}
\label{part__func_8h_ae9556ba7ded44fe2321b6f67c3fc02a3}
get the mean pair distance of ensemble

\begin{Desc}
\item[\hyperlink{deprecated__deprecated000013}{Deprecated}]This function is not threadsafe and should not be used anymore. Use \hyperlink{group__pf__fold_ga79cbc375af65f11609feb6b055269e7d}{mean\_\-bp\_\-distance()} instead! \end{Desc}
\hypertarget{part__func_8h_a68ba6f3a48e08ca131ab54621ce3a2d7}{
\index{part\_\-func.h@{part\_\-func.h}!expLoopEnergy@{expLoopEnergy}}
\index{expLoopEnergy@{expLoopEnergy}!part_func.h@{part\_\-func.h}}
\subsubsection[{expLoopEnergy}]{\setlength{\rightskip}{0pt plus 5cm}double expLoopEnergy (int {\em u1}, \/  int {\em u2}, \/  int {\em type}, \/  int {\em type2}, \/  short {\em si1}, \/  short {\em sj1}, \/  short {\em sp1}, \/  short {\em sq1})}}
\label{part__func_8h_a68ba6f3a48e08ca131ab54621ce3a2d7}
\begin{Desc}
\item[\hyperlink{deprecated__deprecated000014}{Deprecated}]Use \hyperlink{loop__energies_8h_aa5e98e524e2a41e290b942b09544bc9e}{exp\_\-E\_\-IntLoop()} from \hyperlink{loop__energies_8h}{loop\_\-energies.h} instead \end{Desc}
\hypertarget{part__func_8h_a7b6ab474cc80accc48010ccfcc59f96b}{
\index{part\_\-func.h@{part\_\-func.h}!expHairpinEnergy@{expHairpinEnergy}}
\index{expHairpinEnergy@{expHairpinEnergy}!part_func.h@{part\_\-func.h}}
\subsubsection[{expHairpinEnergy}]{\setlength{\rightskip}{0pt plus 5cm}double expHairpinEnergy (int {\em u}, \/  int {\em type}, \/  short {\em si1}, \/  short {\em sj1}, \/  const char $\ast$ {\em string})}}
\label{part__func_8h_a7b6ab474cc80accc48010ccfcc59f96b}
\begin{Desc}
\item[\hyperlink{deprecated__deprecated000015}{Deprecated}]Use \hyperlink{loop__energies_8h_a0e128184bb097dc2da33706f33b555a6}{exp\_\-E\_\-Hairpin()} from \hyperlink{loop__energies_8h}{loop\_\-energies.h} instead \end{Desc}
