\hypertarget{group__inverse__fold}{
\section{Searching Sequences for Predefined Structures}
\label{group__inverse__fold}\index{Searching Sequences for Predefined Structures@{Searching Sequences for Predefined Structures}}
}


Collaboration diagram for Searching Sequences for Predefined Structures:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=240pt]{group__inverse__fold}
\end{center}
\end{figure}
\subsection*{Files}
\begin{DoxyCompactItemize}
\item 
file \hyperlink{inverse_8h}{inverse.h}


\begin{DoxyCompactList}\small\item\em Inverse folding routines. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
float \hyperlink{group__inverse__fold_ga7af026de55d4babad879f2c92559cbbc}{inverse\_\-fold} (char $\ast$start, const char $\ast$target)
\begin{DoxyCompactList}\small\item\em Find sequences with predefined structure. \item\end{DoxyCompactList}\item 
float \hyperlink{group__inverse__fold_gaeef52ecbf2a2450ad585a344f9826806}{inverse\_\-pf\_\-fold} (char $\ast$start, const char $\ast$target)
\begin{DoxyCompactList}\small\item\em Find sequence that maximizes probability of a predefined structure. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__inverse__fold_ga8f791e7740a5a28b9f6fafb4e60301d9}{
char $\ast$ \hyperlink{group__inverse__fold_ga8f791e7740a5a28b9f6fafb4e60301d9}{symbolset}}
\label{group__inverse__fold_ga8f791e7740a5a28b9f6fafb4e60301d9}

\begin{DoxyCompactList}\small\item\em This global variable points to the allowed bases, initially \char`\"{}AUGC\char`\"{}. It can be used to design sequences from reduced alphabets. \item\end{DoxyCompactList}\item 
float \hyperlink{group__inverse__fold_ga7f17d3b169af048d32bb185039a9c09c}{final\_\-cost}
\item 
int \hyperlink{group__inverse__fold_ga7ec4ba51f86e1717a1e174264e4a75ce}{give\_\-up}
\item 
int \hyperlink{group__inverse__fold_gafcfc65fba01b9cca5946726ed9057a63}{inv\_\-verbose}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
We provide two functions that search for sequences with a given structure, thereby inverting the folding routines. 

\subsection{Function Documentation}
\hypertarget{group__inverse__fold_ga7af026de55d4babad879f2c92559cbbc}{
\index{inverse\_\-fold@{inverse\_\-fold}!inverse\_\-fold@{inverse\_\-fold}}
\index{inverse\_\-fold@{inverse\_\-fold}!inverse_fold@{inverse\_\-fold}}
\subsubsection[{inverse\_\-fold}]{\setlength{\rightskip}{0pt plus 5cm}float inverse\_\-fold (char $\ast$ {\em start}, \/  const char $\ast$ {\em target})}}
\label{group__inverse__fold_ga7af026de55d4babad879f2c92559cbbc}


Find sequences with predefined structure. This function searches for a sequence with minimum free energy structure provided in the parameter 'target', starting with sequence 'start'. It returns 0 if the search was successful, otherwise a structure distance in terms of the energy difference between the search result and the actual target 'target' is returned. The found sequence is returned in 'start'. If \hyperlink{group__inverse__fold_ga7ec4ba51f86e1717a1e174264e4a75ce}{give\_\-up} is set to 1, the function will return as soon as it is clear that the search will be unsuccessful, this speeds up the algorithm if you are only interested in exact solutions.


\begin{DoxyParams}{Parameters}
\item[{\em start}]The start sequence \item[{\em target}]The target secondary structure in dot-\/bracket notation \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The distance to the target in case a search was unsuccessful, 0 otherwise 
\end{DoxyReturn}
\hypertarget{group__inverse__fold_gaeef52ecbf2a2450ad585a344f9826806}{
\index{inverse\_\-fold@{inverse\_\-fold}!inverse\_\-pf\_\-fold@{inverse\_\-pf\_\-fold}}
\index{inverse\_\-pf\_\-fold@{inverse\_\-pf\_\-fold}!inverse_fold@{inverse\_\-fold}}
\subsubsection[{inverse\_\-pf\_\-fold}]{\setlength{\rightskip}{0pt plus 5cm}float inverse\_\-pf\_\-fold (char $\ast$ {\em start}, \/  const char $\ast$ {\em target})}}
\label{group__inverse__fold_gaeef52ecbf2a2450ad585a344f9826806}


Find sequence that maximizes probability of a predefined structure. This function searches for a sequence with maximum probability to fold into the provided structure 'target' using the partition function algorithm. It returns $-kT \cdot \log(p)$ where $p$ is the frequency of 'target' in the ensemble of possible structures. This is usually much slower than \hyperlink{group__inverse__fold_ga7af026de55d4babad879f2c92559cbbc}{inverse\_\-fold()}.


\begin{DoxyParams}{Parameters}
\item[{\em start}]The start sequence \item[{\em target}]The target secondary structure in dot-\/bracket notation \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The distance to the target in case a search was unsuccessful, 0 otherwise 
\end{DoxyReturn}


\subsection{Variable Documentation}
\hypertarget{group__inverse__fold_ga7f17d3b169af048d32bb185039a9c09c}{
\index{inverse\_\-fold@{inverse\_\-fold}!final\_\-cost@{final\_\-cost}}
\index{final\_\-cost@{final\_\-cost}!inverse_fold@{inverse\_\-fold}}
\subsubsection[{final\_\-cost}]{\setlength{\rightskip}{0pt plus 5cm}float {\bf final\_\-cost}}}
\label{group__inverse__fold_ga7f17d3b169af048d32bb185039a9c09c}
when to stop \hyperlink{group__inverse__fold_gaeef52ecbf2a2450ad585a344f9826806}{inverse\_\-pf\_\-fold()} \hypertarget{group__inverse__fold_ga7ec4ba51f86e1717a1e174264e4a75ce}{
\index{inverse\_\-fold@{inverse\_\-fold}!give\_\-up@{give\_\-up}}
\index{give\_\-up@{give\_\-up}!inverse_fold@{inverse\_\-fold}}
\subsubsection[{give\_\-up}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf give\_\-up}}}
\label{group__inverse__fold_ga7ec4ba51f86e1717a1e174264e4a75ce}
default 0: try to minimize structure distance even if no exact solution can be found \hypertarget{group__inverse__fold_gafcfc65fba01b9cca5946726ed9057a63}{
\index{inverse\_\-fold@{inverse\_\-fold}!inv\_\-verbose@{inv\_\-verbose}}
\index{inv\_\-verbose@{inv\_\-verbose}!inverse_fold@{inverse\_\-fold}}
\subsubsection[{inv\_\-verbose}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf inv\_\-verbose}}}
\label{group__inverse__fold_gafcfc65fba01b9cca5946726ed9057a63}
print out substructure on which \hyperlink{group__inverse__fold_ga7af026de55d4babad879f2c92559cbbc}{inverse\_\-fold()} fails 