We provide two functions that search for sequences with a given structure, thereby inverting the folding routines.
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_upis 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
fold()you have to allocate memory for folding by calling
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
pf_fold()you have to allocate memory for folding by calling
The global variable
char *symbolsetpoints 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.