Next: , Previous: PF Fold, Up: Folding Routines


2.3 Inverse Folding

We provide two functions that search for sequences with a given structure, thereby inverting the folding routines.

— Function: float inverse_fold (char* start, char* target)

searches for a sequence with minimum free energy structure target, starting with sequence start. It returns 0 if the search was successful, otherwise a structure distance to target is returned. The found sequence is returned in start. If 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. Since inverse_fold() calls fold() you have to allocate memory for folding by calling initialize_fold()

— Function: float inverse_pf_fold (char* start, char* target)

searches for a sequence with maximum probability to fold into structure target using the partition function algorithm. It returns -kT log(p) where p is the frequency of target in the ensemble of possible structures. This is usually much slower than inverse_fold(). Since inverse_pf_fold() calls pf_fold() you have to allocate memory for folding by calling init_pf_fold()

— Variable: char *symbolset

The global variable char *symbolset points to the allowed bases, initially "AUGC". It can be used to design sequences from reduced alphabets.

Prototypes for these functions are declared in inverse.h.