1 #ifndef __VIENNA_RNA_PACKAGE_INVERSE_H__
2 #define __VIENNA_RNA_PACKAGE_INVERSE_H__
8 * \addtogroup inverse_fold
9 * We provide two functions that search for sequences with a given
10 * structure, thereby inverting the folding routines.
14 * \brief Inverse folding routines
18 * \brief This global variable points to the allowed bases, initially "AUGC".
19 * It can be used to design sequences from reduced alphabets.
21 extern char *symbolset;
22 /** when to stop inverse_pf_fold() */
23 extern float final_cost;
24 /** default 0: try to minimize structure distance even if no exact solution can be found */
26 /** print out substructure on which inverse_fold() fails */
27 extern int inv_verbose;
30 * \brief Find sequences with predefined structure
32 * This function searches for a sequence with minimum free energy structure
33 * provided in the parameter 'target', starting with sequence 'start'.
34 * It returns 0 if the search was successful, otherwise a structure distance
35 * in terms of the energy difference between the search result and the actual
36 * target 'target' is returned. The found sequence is returned in 'start'.
37 * If #give_up is set to 1, the function will return as soon as it is
38 * clear that the search will be unsuccessful, this speeds up the algorithm
39 * if you are only interested in exact solutions.
41 * \param start The start sequence
42 * \param target The target secondary structure in dot-bracket notation
43 * \return The distance to the target in case a search was unsuccessful, 0 otherwise
45 float inverse_fold( char *start,
49 * \brief Find sequence that maximizes probability of a predefined structure
51 * This function searches for a sequence with maximum probability to fold into
52 * the provided structure 'target' using the partition function algorithm.
53 * It returns \f$-kT \cdot \log(p)\f$ where \f$p\f$ is the frequency of 'target' in
54 * the ensemble of possible structures. This is usually much slower than
57 * \param start The start sequence
58 * \param target The target secondary structure in dot-bracket notation
59 * \return The distance to the target in case a search was unsuccessful, 0 otherwise
61 float inverse_pf_fold(char *start,