RNAlib-2.2.0-RC3
+ Collaboration diagram for Generalized Soft Constraints:

Macros

#define VRNA_DECOMP_PAIR_HP   1
 Generalized constraint folding flag indicating hairpin loop decomposition step.
 
#define VRNA_DECOMP_PAIR_IL   2
 Generalized constraint folding flag indicating interior loop decomposition step.
 
#define VRNA_SC_GEN_MFE   (char)1
 A flag passed to the generalized soft constraints pre-, and post- functions to indicate Minimum Free Energy (MFE) processing. More...
 
#define VRNA_SC_GEN_PF   (char)2
 A flag passed to the generalized soft constraints pre-, and post- functions to indicate Partition function (PF) processing. More...
 

Functions

void vrna_sc_add_f (vrna_fold_compound *vc, int(*f)(int, int, int, int, char, void *), void *data)
 Bind a function pointer for generalized soft constraint feature (MFE version) More...
 
void vrna_sc_add_bt (vrna_fold_compound *vc, PAIR *(*f)(int, int, int, int, char, void *))
 Bind a backtracking function pointer for generalized soft constraint feature. More...
 
void vrna_sc_add_exp_f (vrna_fold_compound *vc, FLT_OR_DBL(*exp_f)(int, int, int, int, char, void *), void *data)
 Bind a function pointer for generalized soft constraint feature (PF version) More...
 
void vrna_sc_add_pre (vrna_fold_compound *vc, void(*pre)(vrna_fold_compound *, char))
 Add a pre-processing function for the generalized soft constraints feature. More...
 
void vrna_sc_add_post (vrna_fold_compound *vc, void(*post)(vrna_fold_compound *, char))
 Add a post-processing function for the generalized soft constraints feature. More...
 

Detailed Description

Macro Definition Documentation

#define VRNA_SC_GEN_MFE   (char)1

A flag passed to the generalized soft constraints pre-, and post- functions to indicate Minimum Free Energy (MFE) processing.

This flag is passed as second argument to the pre-, and post- processing funtions that are bound to the vrna_sc_t structure via vrna_sc_add_pre(), and vrna_sc_add_post(), respectively. Use it in your implementation of the pre-, and post-processing functions to determine the mode of action required for corresponding pre-, and post- processing of data available to the function.

Note
This flag will be passed by calls of vrna_fold(), vrna_ali_fold(), vrna_cofold(), and vrna_subopt()
#define VRNA_SC_GEN_PF   (char)2

A flag passed to the generalized soft constraints pre-, and post- functions to indicate Partition function (PF) processing.

This flag is passed as second argument to the pre-, and post- processing funtions that are bound to the vrna_sc_t structure via vrna_sc_add_pre(), and vrna_sc_add_post(), respectively. Use it in your implementation of the pre-, and post-processing functions to determine the mode of action required for corresponding pre-, and post- processing of data available to the function.

Note
This flag will be passed by calls of vrna_pf_fold(), vrna_ali_pf_fold(), and vrna_co_pf_fold().

Function Documentation

void vrna_sc_add_f ( vrna_fold_compound vc,
int(*)(int, int, int, int, char, void *)  f,
void *  data 
)

Bind a function pointer for generalized soft constraint feature (MFE version)

This function allows to easily bind a function pointer and corresponding data structure to the soft constraint part vrna_sc_t of the vrna_fold_compound. The function for evaluating the generalized soft constraint feature has to return a pseudo free energy $ \hat{E} $ in $ dacal/mol $, where $ 1 dacal/mol = 10 cal/mol $.

Parameters
vcThe fold compound the generalized soft constraint function should be bound to
fA pointer to the function that evaluates the generalized soft constraint feature
dataA pointer to the data structure that holds required data for function 'f'
void vrna_sc_add_bt ( vrna_fold_compound vc,
PAIR *(*)(int, int, int, int, char, void *)  f 
)

Bind a backtracking function pointer for generalized soft constraint feature.

This function allows to easily bind a function pointer to the soft constraint part vrna_sc_t of the vrna_fold_compound. The provided function should be used for backtracking purposes in loop regions that were altered via the generalized soft constraint feature. It has to return an array of PAIR data structures, were the last element in the list is indicated by a value of -1 in it's i position.

Parameters
vcThe fold compound the generalized soft constraint function should be bound to
fA pointer to the function that returns additional base pairs
void vrna_sc_add_exp_f ( vrna_fold_compound vc,
FLT_OR_DBL(*)(int, int, int, int, char, void *)  exp_f,
void *  data 
)

Bind a function pointer for generalized soft constraint feature (PF version)

This function allows to easily bind a function pointer and corresponding data structure to the soft constraint part vrna_sc_t of the vrna_fold_compound. The function for evaluating the generalized soft constraint feature has to return a pseudo free energy $ \hat{E} $ as Boltzmann factor, i.e. $ exp(- \hat{E} / kT) $. The required unit for $ E $ is $ cal/mol $.

Parameters
vcThe fold compound the generalized soft constraint function should be bound to
exp_fA pointer to the function that evaluates the generalized soft constraint feature
dataA pointer to the data structure that holds required data for function 'f'
void vrna_sc_add_pre ( vrna_fold_compound vc,
void(*)(vrna_fold_compound *, char)  pre 
)

Add a pre-processing function for the generalized soft constraints feature.

Note
The function pointer passed will be used by calls of vrna_fold(), vrna_pf_fold(), vrna_ali_fold(), vrna_ali_pf_fold(), vrna_cofold(), vrna_co_pf_fold(), and vrna_subopt(). Each call is provided with the current vrna_fold_compound, and a flag to indicate whether general free energy evaluation (VRNA_SC_GEN_MFE), or partition function computations (VRNA_SC_GEN_PF) will take place next.
See also
VRNA_SC_GEN_MFE, VRNA_SC_GEN_PF, vrna_sc_t, vrna_fold_compound
Parameters
vcThe fold compound the generalized soft constraint function should be bound to
preA pointer to the pre-processing function
void vrna_sc_add_post ( vrna_fold_compound vc,
void(*)(vrna_fold_compound *, char)  post 
)

Add a post-processing function for the generalized soft constraints feature.

Note
The function pointer passed will be used by calls of vrna_fold(), vrna_pf_fold(), vrna_ali_fold(), vrna_ali_pf_fold(), vrna_cofold(), vrna_co_pf_fold(), and vrna_subopt(). Each call is provided with the current vrna_fold_compound, and a flag to indicate whether general free energy evaluation (VRNA_SC_GEN_MFE), or partition function computations (VRNA_SC_GEN_PF) has taken place before.
See also
VRNA_SC_GEN_MFE, VRNA_SC_GEN_PF, vrna_sc_t, vrna_fold_compound
Parameters
vcThe fold compound the generalized soft constraint function should be bound to
postA pointer to the post-processing function