\hypertarget{fold_8h}{
\section{H/fold.h File Reference}
\label{fold_8h}\index{H/fold.h@{H/fold.h}}
}


MFE calculations and energy evaluations for single RNA sequences.  
Include dependency graph for fold.h:\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
float \hyperlink{fold_8h_adb973133c241d57c04b253df35e4d34e}{fold\_\-par} (const char $\ast$sequence, char $\ast$structure, \hyperlink{structparamT}{paramT} $\ast$parameters, int is\_\-constrained, int is\_\-circular)
\begin{DoxyCompactList}\small\item\em Compute minimum free energy and an appropriate secondary structure of an RNA sequence. \item\end{DoxyCompactList}\item 
float \hyperlink{fold_8h_aadafcb0f140795ae62e5ca027e335a9b}{fold} (const char $\ast$sequence, char $\ast$structure)
\begin{DoxyCompactList}\small\item\em Compute minimum free energy and an appropriate secondary structure of an RNA sequence. \item\end{DoxyCompactList}\item 
float \hyperlink{fold_8h_a4ac63ab3e8d9a80ced28b8052d94e423}{circfold} (const char $\ast$sequence, char $\ast$structure)
\begin{DoxyCompactList}\small\item\em Compute minimum free energy and an appropriate secondary structure of a circular RNA sequence. \item\end{DoxyCompactList}\item 
float \hyperlink{fold_8h_af93986cb3cb29770ec9cca69c9fab8cf}{energy\_\-of\_\-structure} (const char $\ast$string, const char $\ast$structure, int verbosity\_\-level)
\begin{DoxyCompactList}\small\item\em Calculate the free energy of an already folded RNA using global model detail settings. \item\end{DoxyCompactList}\item 
float \hyperlink{fold_8h_ab5169ea4f72f250e43811463a33f4e40}{energy\_\-of\_\-struct\_\-par} (const char $\ast$string, const char $\ast$structure, \hyperlink{structparamT}{paramT} $\ast$parameters, int verbosity\_\-level)
\begin{DoxyCompactList}\small\item\em Calculate the free energy of an already folded RNA. \item\end{DoxyCompactList}\item 
float \hyperlink{fold_8h_aeb14f3664aec67fc03268ac75253f0f8}{energy\_\-of\_\-circ\_\-structure} (const char $\ast$string, const char $\ast$structure, int verbosity\_\-level)
\begin{DoxyCompactList}\small\item\em Calculate the free energy of an already folded circular RNA. \item\end{DoxyCompactList}\item 
float \hyperlink{fold_8h_a75dc765ee4a1177832bc817c94cf88e5}{energy\_\-of\_\-circ\_\-struct\_\-par} (const char $\ast$string, const char $\ast$structure, \hyperlink{structparamT}{paramT} $\ast$parameters, int verbosity\_\-level)
\begin{DoxyCompactList}\small\item\em Calculate the free energy of an already folded circular RNA. \item\end{DoxyCompactList}\item 
int \hyperlink{fold_8h_a8831445966b761417e713360791299d8}{energy\_\-of\_\-structure\_\-pt} (const char $\ast$string, short $\ast$ptable, short $\ast$s, short $\ast$s1, int verbosity\_\-level)
\begin{DoxyCompactList}\small\item\em Calculate the free energy of an already folded RNA. \item\end{DoxyCompactList}\item 
int \hyperlink{fold_8h_ada4701dd7519b29da75ceac147601f4e}{energy\_\-of\_\-struct\_\-pt\_\-par} (const char $\ast$string, short $\ast$ptable, short $\ast$s, short $\ast$s1, \hyperlink{structparamT}{paramT} $\ast$parameters, int verbosity\_\-level)
\begin{DoxyCompactList}\small\item\em Calculate the free energy of an already folded RNA. \item\end{DoxyCompactList}\item 
\hypertarget{fold_8h_a107fdfe5fd641868156bfd849f6866c7}{
void \hyperlink{fold_8h_a107fdfe5fd641868156bfd849f6866c7}{free\_\-arrays} (void)}
\label{fold_8h_a107fdfe5fd641868156bfd849f6866c7}

\begin{DoxyCompactList}\small\item\em Free arrays for mfe folding. \item\end{DoxyCompactList}\item 
void \hyperlink{fold_8h_a87b7869bd1d8dc79c60775c74e009e9b}{parenthesis\_\-structure} (char $\ast$structure, \hyperlink{structbondT}{bondT} $\ast$bp, int length)
\begin{DoxyCompactList}\small\item\em Create a dot-\/backet/parenthesis structure from backtracking stack. \item\end{DoxyCompactList}\item 
void \hyperlink{fold_8h_a325f3835c68f34fe833b2b7a5828857f}{parenthesis\_\-zuker} (char $\ast$structure, \hyperlink{structbondT}{bondT} $\ast$bp, int length)
\begin{DoxyCompactList}\small\item\em Create a dot-\/backet/parenthesis structure from backtracking stack obtained by zuker suboptimal calculation in cofold.c. \item\end{DoxyCompactList}\item 
\hypertarget{fold_8h_a41bf8f6fa15b94471f7095cad9f0ccf3}{
void \hyperlink{fold_8h_a41bf8f6fa15b94471f7095cad9f0ccf3}{update\_\-fold\_\-params} (void)}
\label{fold_8h_a41bf8f6fa15b94471f7095cad9f0ccf3}

\begin{DoxyCompactList}\small\item\em Recalculate energy parameters. \item\end{DoxyCompactList}\item 
void \hyperlink{fold_8h_adaa59b81664e2e36cb9932e891558fae}{assign\_\-plist\_\-from\_\-db} (\hyperlink{structplist}{plist} $\ast$$\ast$pl, const char $\ast$struc, float \hyperlink{fold__vars_8h_ac98ec419070aee6831b44e5c700f090f}{pr})
\begin{DoxyCompactList}\small\item\em Create a \hyperlink{structplist}{plist} from a dot-\/bracket string. \item\end{DoxyCompactList}\item 
int \hyperlink{fold_8h_a2163034a25c6115d894b199e97e03f6c}{LoopEnergy} (int n1, int n2, int type, int type\_\-2, int si1, int sj1, int sp1, int sq1)
\item 
int \hyperlink{fold_8h_ab327ce11972f5ac069d52c8dedfdb700}{HairpinE} (int size, int type, int si1, int sj1, const char $\ast$string)
\item 
void \hyperlink{fold_8h_ac3f0a28d9cb609d388b155445073fd20}{initialize\_\-fold} (int length)
\begin{DoxyCompactList}\small\item\em Allocate arrays for folding\par
. \item\end{DoxyCompactList}\item 
float \hyperlink{fold_8h_ac2b37fea2145c94d925a3f33378ef87b}{energy\_\-of\_\-struct} (const char $\ast$string, const char $\ast$structure)
\begin{DoxyCompactList}\small\item\em Calculate the free energy of an already folded RNA. \item\end{DoxyCompactList}\item 
int \hyperlink{fold_8h_a27ce6f68512d43bf1fe14a06c9d76d5c}{energy\_\-of\_\-struct\_\-pt} (const char $\ast$string, short $\ast$ptable, short $\ast$s, short $\ast$s1)
\begin{DoxyCompactList}\small\item\em Calculate the free energy of an already folded RNA. \item\end{DoxyCompactList}\item 
float \hyperlink{fold_8h_a657222e2758c46bf13b416ef3032e417}{energy\_\-of\_\-circ\_\-struct} (const char $\ast$string, const char $\ast$structure)
\begin{DoxyCompactList}\small\item\em Calculate the free energy of an already folded circular RNA. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\hypertarget{fold_8h_a80c3c5fd35e7479704cc91d2d0367743}{
int \hyperlink{fold_8h_a80c3c5fd35e7479704cc91d2d0367743}{logML}}
\label{fold_8h_a80c3c5fd35e7479704cc91d2d0367743}

\begin{DoxyCompactList}\small\item\em if nonzero use logarithmic ML energy in energy\_\-of\_\-struct \item\end{DoxyCompactList}\item 
\hypertarget{fold_8h_a6c5655c8b272e3e6cab74dd0f540294f}{
int \hyperlink{fold_8h_a6c5655c8b272e3e6cab74dd0f540294f}{uniq\_\-ML}}
\label{fold_8h_a6c5655c8b272e3e6cab74dd0f540294f}

\begin{DoxyCompactList}\small\item\em do ML decomposition uniquely (for subopt) \item\end{DoxyCompactList}\item 
\hypertarget{fold_8h_ab9b2c3a37a5516614c06d0ab54b97cda}{
int \hyperlink{fold_8h_ab9b2c3a37a5516614c06d0ab54b97cda}{cut\_\-point}}
\label{fold_8h_ab9b2c3a37a5516614c06d0ab54b97cda}

\begin{DoxyCompactList}\small\item\em brief set to first pos of second seq for cofolding \item\end{DoxyCompactList}\item 
\hypertarget{fold_8h_a567530678f6260a1a649a5beca5da4c5}{
int \hyperlink{fold_8h_a567530678f6260a1a649a5beca5da4c5}{eos\_\-debug}}
\label{fold_8h_a567530678f6260a1a649a5beca5da4c5}

\begin{DoxyCompactList}\small\item\em brief verbose info from energy\_\-of\_\-struct \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
MFE calculations and energy evaluations for single RNA sequences. This file includes (almost) all function declarations within the RNAlib that are related to MFE folding... 

\subsection{Function Documentation}
\hypertarget{fold_8h_adb973133c241d57c04b253df35e4d34e}{
\index{fold.h@{fold.h}!fold\_\-par@{fold\_\-par}}
\index{fold\_\-par@{fold\_\-par}!fold.h@{fold.h}}
\subsubsection[{fold\_\-par}]{\setlength{\rightskip}{0pt plus 5cm}float fold\_\-par (const char $\ast$ {\em sequence}, \/  char $\ast$ {\em structure}, \/  {\bf paramT} $\ast$ {\em parameters}, \/  int {\em is\_\-constrained}, \/  int {\em is\_\-circular})}}
\label{fold_8h_adb973133c241d57c04b253df35e4d34e}


Compute minimum free energy and an appropriate secondary structure of an RNA sequence. The first parameter given, the RNA sequence, must be {\itshape uppercase\/} and should only contain an alphabet $\Sigma$ that is understood by the RNAlib\par
 (e.g. $ \Sigma = \{A,U,C,G\} $)\par


The second parameter, {\itshape structure\/}, must always point to an allocated block of memory with a size of at least $\mathrm{strlen}(\mathrm{sequence})+1$

If the third parameter is NULL, global model detail settings are assumed for the folding recursions. Otherwise, the provided parameters are used.

The fourth parameter indicates whether a secondary structure constraint in enhanced dot-\/bracket notation is passed through the structure parameter or not. If so, the characters \char`\"{} $|$ x $<$ $>$ \char`\"{} are recognized to mark bases that are paired, unpaired, paired upstream, or downstream, respectively. Matching brackets \char`\"{} ( ) \char`\"{} denote base pairs, dots \char`\"{}.\char`\"{} are used for unconstrained bases.

To indicate that the RNA sequence is circular and thus has to be post-\/processed, set the last parameter to non-\/zero

After a successful call of \hyperlink{fold_8h_adb973133c241d57c04b253df35e4d34e}{fold\_\-par()}, a backtracked secondary structure (in dot-\/bracket notation) that exhibits the minimum of free energy will be written to the memory {\itshape structure\/} is pointing to. The function returns the minimum of free energy for any fold of the sequence given.

\begin{DoxyNote}{Note}
OpenMP: Passing NULL to the 'parameters' argument involves access to several global model detail variables and thus is not to be considered threadsafe
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\hyperlink{fold_8h_aadafcb0f140795ae62e5ca027e335a9b}{fold()}, \hyperlink{fold_8h_a4ac63ab3e8d9a80ced28b8052d94e423}{circfold()}, \hyperlink{structmodel__detailsT}{model\_\-detailsT}, set\_\-energy\_\-model(), \hyperlink{params_8h_ac2f3ca440b7eaf4d999fb27da949fe72}{get\_\-scaled\_\-parameters()}
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
\item[{\em sequence}]RNA sequence \item[{\em structure}]A pointer to the character array where the secondary structure in dot-\/bracket notation will be written to \item[{\em parameters}]A data structure containing the prescaled energy contributions and the model details. (NULL may be passed, see OpenMP notes above) \item[{\em is\_\-constrained}]Switch to indicate that a structure contraint is passed via the structure argument (0==off) \item[{\em is\_\-circular}]Switch to (de-\/)activate postprocessing steps in case RNA sequence is circular (0==off)\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the minimum free energy (MFE) in kcal/mol 
\end{DoxyReturn}
\hypertarget{fold_8h_aadafcb0f140795ae62e5ca027e335a9b}{
\index{fold.h@{fold.h}!fold@{fold}}
\index{fold@{fold}!fold.h@{fold.h}}
\subsubsection[{fold}]{\setlength{\rightskip}{0pt plus 5cm}float fold (const char $\ast$ {\em sequence}, \/  char $\ast$ {\em structure})}}
\label{fold_8h_aadafcb0f140795ae62e5ca027e335a9b}


Compute minimum free energy and an appropriate secondary structure of an RNA sequence. This function essentially does the same thing as \hyperlink{fold_8h_adb973133c241d57c04b253df35e4d34e}{fold\_\-par()}. However, it takes its model details, i.e. \hyperlink{fold__vars_8h_ab4b11c8d9c758430960896bc3fe82ead}{temperature}, \hyperlink{fold__vars_8h_a72b511ed1201f7e23ec437e468790d74}{dangles}, \hyperlink{fold__vars_8h_a4f6265bdf0ead7ff4628a360adbfd77e}{tetra\_\-loop}, \hyperlink{fold__vars_8h_abf380d09e4f1ab94fc6af57cf0ad5d32}{noGU}, \hyperlink{fold__vars_8h_aa8d1c7b92489179e1eafa562b7bdd259}{no\_\-closingGU}, \hyperlink{fold__vars_8h_a0afc287c2464866d94858c39175154af}{fold\_\-constrained}, \hyperlink{fold__vars_8h_a097eccaabd6ae8b4fef83cccff85bb5d}{noLonelyPairs} from the current global settings within the library

Use \hyperlink{fold_8h_adb973133c241d57c04b253df35e4d34e}{fold\_\-par()} for a completely threadsafe variant

\begin{DoxySeeAlso}{See also}
\hyperlink{fold_8h_adb973133c241d57c04b253df35e4d34e}{fold\_\-par()}, \hyperlink{fold_8h_a4ac63ab3e8d9a80ced28b8052d94e423}{circfold()}
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
\item[{\em sequence}]RNA sequence \item[{\em structure}]A pointer to the character array where the secondary structure in dot-\/bracket notation will be written to \end{DoxyParams}
\begin{DoxyReturn}{Returns}
the minimum free energy (MFE) in kcal/mol 
\end{DoxyReturn}
\hypertarget{fold_8h_a4ac63ab3e8d9a80ced28b8052d94e423}{
\index{fold.h@{fold.h}!circfold@{circfold}}
\index{circfold@{circfold}!fold.h@{fold.h}}
\subsubsection[{circfold}]{\setlength{\rightskip}{0pt plus 5cm}float circfold (const char $\ast$ {\em sequence}, \/  char $\ast$ {\em structure})}}
\label{fold_8h_a4ac63ab3e8d9a80ced28b8052d94e423}


Compute minimum free energy and an appropriate secondary structure of a circular RNA sequence. This function essentially does the same thing as \hyperlink{fold_8h_adb973133c241d57c04b253df35e4d34e}{fold\_\-par()}. However, it takes its model details, i.e. \hyperlink{fold__vars_8h_ab4b11c8d9c758430960896bc3fe82ead}{temperature}, \hyperlink{fold__vars_8h_a72b511ed1201f7e23ec437e468790d74}{dangles}, \hyperlink{fold__vars_8h_a4f6265bdf0ead7ff4628a360adbfd77e}{tetra\_\-loop}, \hyperlink{fold__vars_8h_abf380d09e4f1ab94fc6af57cf0ad5d32}{noGU}, \hyperlink{fold__vars_8h_aa8d1c7b92489179e1eafa562b7bdd259}{no\_\-closingGU}, \hyperlink{fold__vars_8h_a0afc287c2464866d94858c39175154af}{fold\_\-constrained}, \hyperlink{fold__vars_8h_a097eccaabd6ae8b4fef83cccff85bb5d}{noLonelyPairs} from the current global settings within the library

Use \hyperlink{fold_8h_adb973133c241d57c04b253df35e4d34e}{fold\_\-par()} for a completely threadsafe variant

\begin{DoxySeeAlso}{See also}
\hyperlink{fold_8h_adb973133c241d57c04b253df35e4d34e}{fold\_\-par()}, \hyperlink{fold_8h_a4ac63ab3e8d9a80ced28b8052d94e423}{circfold()}
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
\item[{\em sequence}]RNA sequence \item[{\em structure}]A pointer to the character array where the secondary structure in dot-\/bracket notation will be written to \end{DoxyParams}
\begin{DoxyReturn}{Returns}
the minimum free energy (MFE) in kcal/mol 
\end{DoxyReturn}
\hypertarget{fold_8h_af93986cb3cb29770ec9cca69c9fab8cf}{
\index{fold.h@{fold.h}!energy\_\-of\_\-structure@{energy\_\-of\_\-structure}}
\index{energy\_\-of\_\-structure@{energy\_\-of\_\-structure}!fold.h@{fold.h}}
\subsubsection[{energy\_\-of\_\-structure}]{\setlength{\rightskip}{0pt plus 5cm}float energy\_\-of\_\-structure (const char $\ast$ {\em string}, \/  const char $\ast$ {\em structure}, \/  int {\em verbosity\_\-level})}}
\label{fold_8h_af93986cb3cb29770ec9cca69c9fab8cf}


Calculate the free energy of an already folded RNA using global model detail settings. If verbosity level is set to a value $>$0, energies of structure elements are printed to stdout

\begin{DoxyNote}{Note}
OpenMP: This function relies on several global model settings variables and thus is not to be considered threadsafe. See \hyperlink{fold_8h_ab5169ea4f72f250e43811463a33f4e40}{energy\_\-of\_\-struct\_\-par()} for a completely threadsafe implementation.
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\hyperlink{fold_8h_ab5169ea4f72f250e43811463a33f4e40}{energy\_\-of\_\-struct\_\-par()}, \hyperlink{fold_8h_aeb14f3664aec67fc03268ac75253f0f8}{energy\_\-of\_\-circ\_\-structure()}
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
\item[{\em string}]RNA sequence \item[{\em structure}]secondary structure in dot-\/bracket notation \item[{\em verbosity\_\-level}]a flag to turn verbose output on/off \end{DoxyParams}
\begin{DoxyReturn}{Returns}
the free energy of the input structure given the input sequence in kcal/mol 
\end{DoxyReturn}
\hypertarget{fold_8h_ab5169ea4f72f250e43811463a33f4e40}{
\index{fold.h@{fold.h}!energy\_\-of\_\-struct\_\-par@{energy\_\-of\_\-struct\_\-par}}
\index{energy\_\-of\_\-struct\_\-par@{energy\_\-of\_\-struct\_\-par}!fold.h@{fold.h}}
\subsubsection[{energy\_\-of\_\-struct\_\-par}]{\setlength{\rightskip}{0pt plus 5cm}float energy\_\-of\_\-struct\_\-par (const char $\ast$ {\em string}, \/  const char $\ast$ {\em structure}, \/  {\bf paramT} $\ast$ {\em parameters}, \/  int {\em verbosity\_\-level})}}
\label{fold_8h_ab5169ea4f72f250e43811463a33f4e40}


Calculate the free energy of an already folded RNA. If verbosity level is set to a value $>$0, energies of structure elements are printed to stdout

\begin{DoxySeeAlso}{See also}
\hyperlink{fold_8h_aeb14f3664aec67fc03268ac75253f0f8}{energy\_\-of\_\-circ\_\-structure()}, \hyperlink{fold_8h_a8831445966b761417e713360791299d8}{energy\_\-of\_\-structure\_\-pt()}, \hyperlink{params_8h_ac2f3ca440b7eaf4d999fb27da949fe72}{get\_\-scaled\_\-parameters()}
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
\item[{\em string}]RNA sequence in uppercase letters \item[{\em structure}]Secondary structure in dot-\/bracket notation \item[{\em parameters}]A data structure containing the prescaled energy contributions and the model details. \item[{\em verbosity\_\-level}]A flag to turn verbose output on/off \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The free energy of the input structure given the input sequence in kcal/mol 
\end{DoxyReturn}
\hypertarget{fold_8h_aeb14f3664aec67fc03268ac75253f0f8}{
\index{fold.h@{fold.h}!energy\_\-of\_\-circ\_\-structure@{energy\_\-of\_\-circ\_\-structure}}
\index{energy\_\-of\_\-circ\_\-structure@{energy\_\-of\_\-circ\_\-structure}!fold.h@{fold.h}}
\subsubsection[{energy\_\-of\_\-circ\_\-structure}]{\setlength{\rightskip}{0pt plus 5cm}float energy\_\-of\_\-circ\_\-structure (const char $\ast$ {\em string}, \/  const char $\ast$ {\em structure}, \/  int {\em verbosity\_\-level})}}
\label{fold_8h_aeb14f3664aec67fc03268ac75253f0f8}


Calculate the free energy of an already folded circular RNA. \begin{DoxyNote}{Note}
OpenMP: This function relies on several global model settings variables and thus is not to be considered threadsafe. See \hyperlink{fold_8h_a75dc765ee4a1177832bc817c94cf88e5}{energy\_\-of\_\-circ\_\-struct\_\-par()} for a completely threadsafe implementation.
\end{DoxyNote}
If verbosity level is set to a value $>$0, energies of structure elements are printed to stdout

\begin{DoxySeeAlso}{See also}
\hyperlink{fold_8h_a75dc765ee4a1177832bc817c94cf88e5}{energy\_\-of\_\-circ\_\-struct\_\-par()}, \hyperlink{fold_8h_ab5169ea4f72f250e43811463a33f4e40}{energy\_\-of\_\-struct\_\-par()}
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
\item[{\em string}]RNA sequence \item[{\em structure}]Secondary structure in dot-\/bracket notation \item[{\em verbosity\_\-level}]A flag to turn verbose output on/off \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The free energy of the input structure given the input sequence in kcal/mol 
\end{DoxyReturn}
\hypertarget{fold_8h_a75dc765ee4a1177832bc817c94cf88e5}{
\index{fold.h@{fold.h}!energy\_\-of\_\-circ\_\-struct\_\-par@{energy\_\-of\_\-circ\_\-struct\_\-par}}
\index{energy\_\-of\_\-circ\_\-struct\_\-par@{energy\_\-of\_\-circ\_\-struct\_\-par}!fold.h@{fold.h}}
\subsubsection[{energy\_\-of\_\-circ\_\-struct\_\-par}]{\setlength{\rightskip}{0pt plus 5cm}float energy\_\-of\_\-circ\_\-struct\_\-par (const char $\ast$ {\em string}, \/  const char $\ast$ {\em structure}, \/  {\bf paramT} $\ast$ {\em parameters}, \/  int {\em verbosity\_\-level})}}
\label{fold_8h_a75dc765ee4a1177832bc817c94cf88e5}


Calculate the free energy of an already folded circular RNA. If verbosity level is set to a value $>$0, energies of structure elements are printed to stdout

\begin{DoxySeeAlso}{See also}
\hyperlink{fold_8h_ab5169ea4f72f250e43811463a33f4e40}{energy\_\-of\_\-struct\_\-par()}, \hyperlink{params_8h_ac2f3ca440b7eaf4d999fb27da949fe72}{get\_\-scaled\_\-parameters()}
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
\item[{\em string}]RNA sequence \item[{\em structure}]Secondary structure in dot-\/bracket notation \item[{\em parameters}]A data structure containing the prescaled energy contributions and the model details. \item[{\em verbosity\_\-level}]A flag to turn verbose output on/off \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The free energy of the input structure given the input sequence in kcal/mol 
\end{DoxyReturn}
\hypertarget{fold_8h_a8831445966b761417e713360791299d8}{
\index{fold.h@{fold.h}!energy\_\-of\_\-structure\_\-pt@{energy\_\-of\_\-structure\_\-pt}}
\index{energy\_\-of\_\-structure\_\-pt@{energy\_\-of\_\-structure\_\-pt}!fold.h@{fold.h}}
\subsubsection[{energy\_\-of\_\-structure\_\-pt}]{\setlength{\rightskip}{0pt plus 5cm}int energy\_\-of\_\-structure\_\-pt (const char $\ast$ {\em string}, \/  short $\ast$ {\em ptable}, \/  short $\ast$ {\em s}, \/  short $\ast$ {\em s1}, \/  int {\em verbosity\_\-level})}}
\label{fold_8h_a8831445966b761417e713360791299d8}


Calculate the free energy of an already folded RNA. If verbosity level is set to a value $>$0, energies of structure elements are printed to stdout

\begin{DoxyNote}{Note}
OpenMP: This function relies on several global model settings variables and thus is not to be considered threadsafe. See \hyperlink{fold_8h_ada4701dd7519b29da75ceac147601f4e}{energy\_\-of\_\-struct\_\-pt\_\-par()} for a completely threadsafe implementation.
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\hyperlink{utils_8h_a89c32307ee50a0026f4a3131fac0845a}{make\_\-pair\_\-table()}, \hyperlink{fold_8h_ada4701dd7519b29da75ceac147601f4e}{energy\_\-of\_\-struct\_\-pt\_\-par()}
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
\item[{\em string}]RNA sequence \item[{\em ptable}]the pair table of the secondary structure \item[{\em s}]encoded RNA sequence \item[{\em s1}]encoded RNA sequence \item[{\em verbosity\_\-level}]a flag to turn verbose output on/off \end{DoxyParams}
\begin{DoxyReturn}{Returns}
the free energy of the input structure given the input sequence in 10kcal/mol 
\end{DoxyReturn}
\hypertarget{fold_8h_ada4701dd7519b29da75ceac147601f4e}{
\index{fold.h@{fold.h}!energy\_\-of\_\-struct\_\-pt\_\-par@{energy\_\-of\_\-struct\_\-pt\_\-par}}
\index{energy\_\-of\_\-struct\_\-pt\_\-par@{energy\_\-of\_\-struct\_\-pt\_\-par}!fold.h@{fold.h}}
\subsubsection[{energy\_\-of\_\-struct\_\-pt\_\-par}]{\setlength{\rightskip}{0pt plus 5cm}int energy\_\-of\_\-struct\_\-pt\_\-par (const char $\ast$ {\em string}, \/  short $\ast$ {\em ptable}, \/  short $\ast$ {\em s}, \/  short $\ast$ {\em s1}, \/  {\bf paramT} $\ast$ {\em parameters}, \/  int {\em verbosity\_\-level})}}
\label{fold_8h_ada4701dd7519b29da75ceac147601f4e}


Calculate the free energy of an already folded RNA. If verbosity level is set to a value $>$0, energies of structure elements are printed to stdout

\begin{DoxySeeAlso}{See also}
\hyperlink{utils_8h_a89c32307ee50a0026f4a3131fac0845a}{make\_\-pair\_\-table()}, \hyperlink{fold_8h_ab5169ea4f72f250e43811463a33f4e40}{energy\_\-of\_\-struct\_\-par()}, \hyperlink{params_8h_ac2f3ca440b7eaf4d999fb27da949fe72}{get\_\-scaled\_\-parameters()}
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
\item[{\em string}]RNA sequence in uppercase letters \item[{\em ptable}]The pair table of the secondary structure \item[{\em s}]Encoded RNA sequence \item[{\em s1}]Encoded RNA sequence \item[{\em parameters}]A data structure containing the prescaled energy contributions and the model details. \item[{\em verbosity\_\-level}]A flag to turn verbose output on/off \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The free energy of the input structure given the input sequence in 10kcal/mol 
\end{DoxyReturn}
\hypertarget{fold_8h_a87b7869bd1d8dc79c60775c74e009e9b}{
\index{fold.h@{fold.h}!parenthesis\_\-structure@{parenthesis\_\-structure}}
\index{parenthesis\_\-structure@{parenthesis\_\-structure}!fold.h@{fold.h}}
\subsubsection[{parenthesis\_\-structure}]{\setlength{\rightskip}{0pt plus 5cm}void parenthesis\_\-structure (char $\ast$ {\em structure}, \/  {\bf bondT} $\ast$ {\em bp}, \/  int {\em length})}}
\label{fold_8h_a87b7869bd1d8dc79c60775c74e009e9b}


Create a dot-\/backet/parenthesis structure from backtracking stack. \begin{DoxyNote}{Note}
This function is threadsafe 
\end{DoxyNote}
\hypertarget{fold_8h_a325f3835c68f34fe833b2b7a5828857f}{
\index{fold.h@{fold.h}!parenthesis\_\-zuker@{parenthesis\_\-zuker}}
\index{parenthesis\_\-zuker@{parenthesis\_\-zuker}!fold.h@{fold.h}}
\subsubsection[{parenthesis\_\-zuker}]{\setlength{\rightskip}{0pt plus 5cm}void parenthesis\_\-zuker (char $\ast$ {\em structure}, \/  {\bf bondT} $\ast$ {\em bp}, \/  int {\em length})}}
\label{fold_8h_a325f3835c68f34fe833b2b7a5828857f}


Create a dot-\/backet/parenthesis structure from backtracking stack obtained by zuker suboptimal calculation in cofold.c. \begin{DoxyNote}{Note}
This function is threadsafe 
\end{DoxyNote}
\hypertarget{fold_8h_adaa59b81664e2e36cb9932e891558fae}{
\index{fold.h@{fold.h}!assign\_\-plist\_\-from\_\-db@{assign\_\-plist\_\-from\_\-db}}
\index{assign\_\-plist\_\-from\_\-db@{assign\_\-plist\_\-from\_\-db}!fold.h@{fold.h}}
\subsubsection[{assign\_\-plist\_\-from\_\-db}]{\setlength{\rightskip}{0pt plus 5cm}void assign\_\-plist\_\-from\_\-db ({\bf plist} $\ast$$\ast$ {\em pl}, \/  const char $\ast$ {\em struc}, \/  float {\em pr})}}
\label{fold_8h_adaa59b81664e2e36cb9932e891558fae}


Create a \hyperlink{structplist}{plist} from a dot-\/bracket string. The dot-\/bracket string is parsed and for each base pair an entry in the \hyperlink{structplist}{plist} is created. The probability of each pair in the list is set by a function parameter.

The end of the \hyperlink{structplist}{plist} is marked by sequence positions i as well as j equal to 0. This condition should be used to stop looping over its entries

This function is threadsafe


\begin{DoxyParams}{Parameters}
\item[{\em pl}]A pointer to the \hyperlink{structplist}{plist} that is to be created \item[{\em struc}]The secondary structure in dot-\/bracket notation \item[{\em pr}]The probability for each base pair \end{DoxyParams}
\hypertarget{fold_8h_a2163034a25c6115d894b199e97e03f6c}{
\index{fold.h@{fold.h}!LoopEnergy@{LoopEnergy}}
\index{LoopEnergy@{LoopEnergy}!fold.h@{fold.h}}
\subsubsection[{LoopEnergy}]{\setlength{\rightskip}{0pt plus 5cm}int LoopEnergy (int {\em n1}, \/  int {\em n2}, \/  int {\em type}, \/  int {\em type\_\-2}, \/  int {\em si1}, \/  int {\em sj1}, \/  int {\em sp1}, \/  int {\em sq1})}}
\label{fold_8h_a2163034a25c6115d894b199e97e03f6c}
\begin{Desc}
\item[\hyperlink{deprecated__deprecated000002}{Deprecated}]\{This function is deprecated and will be removed soon. Use \hyperlink{loop__energies_8h_a3e5ad89f451254b1fe366d77aa8ff7bd}{E\_\-IntLoop()} instead!\} \end{Desc}
\hypertarget{fold_8h_ab327ce11972f5ac069d52c8dedfdb700}{
\index{fold.h@{fold.h}!HairpinE@{HairpinE}}
\index{HairpinE@{HairpinE}!fold.h@{fold.h}}
\subsubsection[{HairpinE}]{\setlength{\rightskip}{0pt plus 5cm}int HairpinE (int {\em size}, \/  int {\em type}, \/  int {\em si1}, \/  int {\em sj1}, \/  const char $\ast$ {\em string})}}
\label{fold_8h_ab327ce11972f5ac069d52c8dedfdb700}
\begin{Desc}
\item[\hyperlink{deprecated__deprecated000003}{Deprecated}]\{This function is deprecated and will be removed soon. Use \hyperlink{loop__energies_8h_aa362183cf6db89a10cdb0f5c4bd180c6}{E\_\-Hairpin()} instead!\} \end{Desc}
\hypertarget{fold_8h_ac3f0a28d9cb609d388b155445073fd20}{
\index{fold.h@{fold.h}!initialize\_\-fold@{initialize\_\-fold}}
\index{initialize\_\-fold@{initialize\_\-fold}!fold.h@{fold.h}}
\subsubsection[{initialize\_\-fold}]{\setlength{\rightskip}{0pt plus 5cm}void initialize\_\-fold (int {\em length})}}
\label{fold_8h_ac3f0a28d9cb609d388b155445073fd20}


Allocate arrays for folding\par
. \begin{Desc}
\item[\hyperlink{deprecated__deprecated000004}{Deprecated}]\{This function is deprecated and will be removed soon!\}\end{Desc}
\hypertarget{fold_8h_ac2b37fea2145c94d925a3f33378ef87b}{
\index{fold.h@{fold.h}!energy\_\-of\_\-struct@{energy\_\-of\_\-struct}}
\index{energy\_\-of\_\-struct@{energy\_\-of\_\-struct}!fold.h@{fold.h}}
\subsubsection[{energy\_\-of\_\-struct}]{\setlength{\rightskip}{0pt plus 5cm}float energy\_\-of\_\-struct (const char $\ast$ {\em string}, \/  const char $\ast$ {\em structure})}}
\label{fold_8h_ac2b37fea2145c94d925a3f33378ef87b}


Calculate the free energy of an already folded RNA. \begin{DoxyNote}{Note}
This function is not entirely threadsafe! Depending on the state of the global variable \hyperlink{fold_8h_a567530678f6260a1a649a5beca5da4c5}{eos\_\-debug} it prints energy information to stdout or not...\par

\end{DoxyNote}
\begin{Desc}
\item[\hyperlink{deprecated__deprecated000005}{Deprecated}]This function is deprecated and should not be used in future programs! Use \hyperlink{fold_8h_af93986cb3cb29770ec9cca69c9fab8cf}{energy\_\-of\_\-structure()} instead!\end{Desc}
\begin{DoxySeeAlso}{See also}
\hyperlink{fold_8h_af93986cb3cb29770ec9cca69c9fab8cf}{energy\_\-of\_\-structure}, \hyperlink{fold_8h_a657222e2758c46bf13b416ef3032e417}{energy\_\-of\_\-circ\_\-struct()}, \hyperlink{fold_8h_a27ce6f68512d43bf1fe14a06c9d76d5c}{energy\_\-of\_\-struct\_\-pt()} 
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
\item[{\em string}]RNA sequence \item[{\em structure}]secondary structure in dot-\/bracket notation \end{DoxyParams}
\begin{DoxyReturn}{Returns}
the free energy of the input structure given the input sequence in kcal/mol 
\end{DoxyReturn}
\hypertarget{fold_8h_a27ce6f68512d43bf1fe14a06c9d76d5c}{
\index{fold.h@{fold.h}!energy\_\-of\_\-struct\_\-pt@{energy\_\-of\_\-struct\_\-pt}}
\index{energy\_\-of\_\-struct\_\-pt@{energy\_\-of\_\-struct\_\-pt}!fold.h@{fold.h}}
\subsubsection[{energy\_\-of\_\-struct\_\-pt}]{\setlength{\rightskip}{0pt plus 5cm}int energy\_\-of\_\-struct\_\-pt (const char $\ast$ {\em string}, \/  short $\ast$ {\em ptable}, \/  short $\ast$ {\em s}, \/  short $\ast$ {\em s1})}}
\label{fold_8h_a27ce6f68512d43bf1fe14a06c9d76d5c}


Calculate the free energy of an already folded RNA. \begin{DoxyNote}{Note}
This function is not entirely threadsafe! Depending on the state of the global variable \hyperlink{fold_8h_a567530678f6260a1a649a5beca5da4c5}{eos\_\-debug} it prints energy information to stdout or not...\par

\end{DoxyNote}
\begin{Desc}
\item[\hyperlink{deprecated__deprecated000006}{Deprecated}]This function is deprecated and should not be used in future programs! Use \hyperlink{fold_8h_a8831445966b761417e713360791299d8}{energy\_\-of\_\-structure\_\-pt()} instead!\end{Desc}
\begin{DoxySeeAlso}{See also}
\hyperlink{utils_8h_a89c32307ee50a0026f4a3131fac0845a}{make\_\-pair\_\-table()}, \hyperlink{fold_8h_af93986cb3cb29770ec9cca69c9fab8cf}{energy\_\-of\_\-structure()} 
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
\item[{\em string}]RNA sequence \item[{\em ptable}]the pair table of the secondary structure \item[{\em s}]encoded RNA sequence \item[{\em s1}]encoded RNA sequence \end{DoxyParams}
\begin{DoxyReturn}{Returns}
the free energy of the input structure given the input sequence in 10kcal/mol 
\end{DoxyReturn}
\hypertarget{fold_8h_a657222e2758c46bf13b416ef3032e417}{
\index{fold.h@{fold.h}!energy\_\-of\_\-circ\_\-struct@{energy\_\-of\_\-circ\_\-struct}}
\index{energy\_\-of\_\-circ\_\-struct@{energy\_\-of\_\-circ\_\-struct}!fold.h@{fold.h}}
\subsubsection[{energy\_\-of\_\-circ\_\-struct}]{\setlength{\rightskip}{0pt plus 5cm}float energy\_\-of\_\-circ\_\-struct (const char $\ast$ {\em string}, \/  const char $\ast$ {\em structure})}}
\label{fold_8h_a657222e2758c46bf13b416ef3032e417}


Calculate the free energy of an already folded circular RNA. \begin{DoxyNote}{Note}
This function is not entirely threadsafe! Depending on the state of the global variable \hyperlink{fold_8h_a567530678f6260a1a649a5beca5da4c5}{eos\_\-debug} it prints energy information to stdout or not...\par

\end{DoxyNote}
\begin{Desc}
\item[\hyperlink{deprecated__deprecated000007}{Deprecated}]This function is deprecated and should not be used in future programs Use \hyperlink{fold_8h_aeb14f3664aec67fc03268ac75253f0f8}{energy\_\-of\_\-circ\_\-structure()} instead!\end{Desc}
\begin{DoxySeeAlso}{See also}
\hyperlink{fold_8h_aeb14f3664aec67fc03268ac75253f0f8}{energy\_\-of\_\-circ\_\-structure()}, \hyperlink{fold_8h_ac2b37fea2145c94d925a3f33378ef87b}{energy\_\-of\_\-struct()}, \hyperlink{fold_8h_a27ce6f68512d43bf1fe14a06c9d76d5c}{energy\_\-of\_\-struct\_\-pt()} 
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
\item[{\em string}]RNA sequence \item[{\em structure}]secondary structure in dot-\/bracket notation \end{DoxyParams}
\begin{DoxyReturn}{Returns}
the free energy of the input structure given the input sequence in kcal/mol 
\end{DoxyReturn}
