Callbacks in RNAlib#

Below, you find an enumeration of the available callback functions.

Global vrna_auxdata_free_f  (void *data)

This callback is supposed to free memory occupied by an auxiliary data structure. It will be called when the vrna_fold_compound_t is erased from memory through a call to vrna_fold_compound_free() and will be passed the address of memory previously bound to the vrna_fold_compound_t via vrna_fold_compound_add_auxdata().

Global vrna_bs_result_f  (const char *structure, void *data)

This function will be called for each secondary structure that has been successfully backtraced from the partition function DP matrices.

Global vrna_gr_inside_exp_f  (vrna_fold_compound_t *fc, unsigned int i, unsigned int j, void *data)

This callback allows for extending the partition function secondary structure decomposition with additional rules.

Global vrna_gr_inside_f  (vrna_fold_compound_t *fc, unsigned int i, unsigned int j, void *data)

This callback allows for extending the MFE secondary structure decomposition with additional rules.

Global vrna_gr_outside_f  (vrna_fold_compound_t *fc, unsigned int i, unsigned int j, int e, vrna_bps_t bp_stack, vrna_bts_t bt_stack, void *data)

This callback allows for backtracking (sub)structures obtained from extending the MFE secondary structure decomposition with additional rules.

Global vrna_gr_serialize_bp_f  (vrna_fold_compound_t *fc, vrna_bps_t bp_stack, void *data)

This callback allows for changing the way how base pairs (and other types of data) obtained from the default and extended grammar are converted back into a dot-bracket string.

Global vrna_hc_eval_f  (int i, int j, int k, int l, unsigned char d, void *data)

This callback enables one to over-rule default hard constraints in secondary structure decompositions.

Global vrna_heat_capacity_f  (float temp, float heat_capacity, void *data)

This function will be called for each evaluated temperature in the heat capacity prediction.

Global vrna_math_fun_dbl_f  (double value, vrna_math_fun_dbl_opt_t options)

This callback handles mathematical functions working on scalar double values.

Global vrna_mfe_window_f  (unsigned int start, unsigned int end, const char *structure, float en, void *data)

This function will be called for each hit in a sliding window MFE prediction.

Global vrna_probs_window_f  (FLT_OR_DBL *pr, int pr_size, int i, int max, unsigned int type, void *data)

This function will be called for each probability data set in the sliding window probability computation implementation of vrna_probs_window(). The argument type specifies the type of probability that is passed to this function.

Global vrna_recursion_status_f  (vrna_fold_compound_t *fc, unsigned char status, void *data)

This function will be called to notify a third-party implementation about the status of a currently ongoing recursion. The purpose of this callback mechanism is to provide users with a simple way to ensure pre- and post conditions for auxiliary mechanisms attached to our implementations.

Global vrna_sc_bt_f  (int i, int j, int k, int l, unsigned char d, void *data)

This callback enables one to add auxiliary base pairs in the backtracking steps of hairpin- and internal loops.

Global vrna_sc_exp_f  (int i, int j, int k, int l, unsigned char d, void *data)

This callback enables one to add (pseudo-)energy contributions to individual decompositions of the secondary structure (Partition function variant, i.e. contributions must be returned as Boltzmann factors).

Global vrna_sc_f  (int i, int j, int k, int l, unsigned char d, void *data)

This callback enables one to add (pseudo-)energy contributions to individual decompositions of the secondary structure.

Global vrna_subopt_result_f  (const char *stucture, float energy, void *data)

This function will be called for each suboptimal secondary structure that is successfully backtraced.

Global vrna_ud_add_probs_f  (vrna_fold_compound_t *fc, int i, int j, unsigned int loop_type, FLT_OR_DBL exp_energy, void *data)

A callback function to store equilibrium probabilities for the unstructured domain feature

Global vrna_ud_exp_f  (vrna_fold_compound_t *fc, int i, int j, unsigned int loop_type, void *data)

This function will be called to determine the additional energy contribution of a specific unstructured domain, e.g. the binding free energy of some ligand (Partition function variant, i.e. the Boltzmann factors instead of actual free energies).

Global vrna_ud_exp_production_f  (vrna_fold_compound_t *fc, void *data)

The production rule for the unstructured domain grammar extension (Partition function variant)

Global vrna_ud_f  (vrna_fold_compound_t *fc, int i, int j, unsigned int loop_type, void *data)

This function will be called to determine the additional energy contribution of a specific unstructured domain, e.g. the binding free energy of some ligand.

Global vrna_ud_get_probs_f  (vrna_fold_compound_t *fc, int i, int j, unsigned int loop_type, int motif, void *data)

A callback function to retrieve equilibrium probabilities for the unstructured domain feature

Global vrna_ud_production_f  (vrna_fold_compound_t *fc, void *data)

The production rule for the unstructured domain grammar extension