RNAlib-2.2.9

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

constraints_soft.h
Go to the documentation of this file.
1 #ifndef VIENNA_RNA_PACKAGE_CONSTRAINTS_SOFT_H
2 #define VIENNA_RNA_PACKAGE_CONSTRAINTS_SOFT_H
3
4 #include <ViennaRNA/data_structures.h>
5
26 typedef struct vrna_sc_s vrna_sc_t;
27
54 typedef int (vrna_callback_sc_energy)(int i, int j, int k, int l, char d, void *data);
55
82 typedef FLT_OR_DBL (vrna_callback_sc_exp_energy)(int i, int j, int k, int l, char d, void *data);
83
104 typedef vrna_basepair_t *(vrna_callback_sc_backtrack)(int i, int j, int k, int l, char d, void *data);
105
111 struct vrna_sc_s {
112 int **energy_up;
113 int *energy_bp;
114 FLT_OR_DBL **exp_energy_up;
115 FLT_OR_DBL *exp_energy_bp;
117 int *energy_stack;
118 FLT_OR_DBL *exp_energy_stack;
120 /* generic soft contraints below */
121 vrna_callback_sc_energy *f;
126 vrna_callback_sc_backtrack *bt;
132 vrna_callback_sc_exp_energy *exp_f;
138 void *data;
142 vrna_callback_free_auxdata *free_data;
143 };
144
161 void vrna_sc_init(vrna_fold_compound_t *vc);
162
172 void vrna_sc_add_bp(vrna_fold_compound_t *vc,
173 const FLT_OR_DBL **constraints,
174 unsigned int options);
175
185 void vrna_sc_add_up(vrna_fold_compound_t *vc,
186 const FLT_OR_DBL *constraints,
187 unsigned int options);
188
198 void vrna_sc_remove(vrna_fold_compound_t *vc);
199
207 void vrna_sc_free(vrna_sc_t *sc);
208
220 void vrna_sc_add_data(vrna_fold_compound_t *vc,
221 void *data,
222 vrna_callback_free_auxdata *free_data);
223
239 void vrna_sc_add_f( vrna_fold_compound_t *vc,
240 vrna_callback_sc_energy *f);
241
259 void vrna_sc_add_bt(vrna_fold_compound_t *vc,
260 vrna_callback_sc_backtrack *f);
261
278 void vrna_sc_add_exp_f( vrna_fold_compound_t *vc,
279 vrna_callback_sc_exp_energy *exp_f);
280
281 #endif
vrna_callback_sc_energy
int( vrna_callback_sc_energy)(int i, int j, int k, int l, char d, void *data)
Callback to retrieve pseudo energy contribution for soft constraint feature.
Definition: constraints_soft.h:54
vrna_sc_free
void vrna_sc_free(vrna_sc_t *sc)
Free memory occupied by a vrna_sc_t data structure.
vrna_sc_add_up
void vrna_sc_add_up(vrna_fold_compound_t *vc, const FLT_OR_DBL *constraints, unsigned int options)
Add soft constraints for unpaired nucleotides.
vrna_sc_add_bp
void vrna_sc_add_bp(vrna_fold_compound_t *vc, const FLT_OR_DBL **constraints, unsigned int options)
Add soft constraints for paired nucleotides.
FLT_OR_DBL
double FLT_OR_DBL
Typename for floating point number in partition function computations.
Definition: data_structures.h:39
vrna_fc_s
The most basic data structure required by many functions throughout the RNAlib.
Definition: data_structures.h:424
vrna_sc_s::energy_stack
int * energy_stack
Pseudo Energy contribution per base pair involved in a stack.
Definition: constraints_soft.h:117
vrna_sc_s::bt
vrna_callback_sc_backtrack * bt
A function pointer used to obtain backtraced base pairs in loop regions that were altered by soft con...
Definition: constraints_soft.h:126
vrna_sc_s::f
vrna_callback_sc_energy * f
A function pointer used for pseudo energy contribution in MFE calculations.
Definition: constraints_soft.h:121
vrna_sc_add_exp_f
void vrna_sc_add_exp_f(vrna_fold_compound_t *vc, vrna_callback_sc_exp_energy *exp_f)
Bind a function pointer for generic soft constraint feature (PF version)
data_structures.h
vrna_sc_s::exp_energy_bp
FLT_OR_DBL * exp_energy_bp
Boltzmann Factors of the energy contribution for base pairs.
Definition: constraints_soft.h:115
vrna_basepair_s
Base pair data structure used in subopt.c.
Definition: data_structures.h:156
vrna_sc_s::exp_energy_up
FLT_OR_DBL ** exp_energy_up
Boltzmann Factors of the energy contributions for unpaired sequence stretches.
Definition: constraints_soft.h:114
vrna_sc_s
The soft constraints data structure.
Definition: constraints_soft.h:111
vrna_callback_sc_exp_energy
FLT_OR_DBL( vrna_callback_sc_exp_energy)(int i, int j, int k, int l, char d, void *data)
Callback to retrieve pseudo energy contribution as Boltzmann Factors for soft constraint feature...
Definition: constraints_soft.h:82
vrna_callback_free_auxdata
void( vrna_callback_free_auxdata)(void *data)
Callback to free memory allocated for auxiliary user-provided data.
Definition: data_structures.h:51
vrna_sc_s::exp_f
vrna_callback_sc_exp_energy * exp_f
A function pointer used for pseudo energy contribution boltzmann factors in PF calculations.
Definition: constraints_soft.h:132
vrna_sc_s::energy_up
int ** energy_up
Energy contribution for stretches of unpaired nucleotides.
Definition: constraints_soft.h:112
vrna_sc_s::exp_energy_stack
FLT_OR_DBL * exp_energy_stack
Boltzmann weighted pseudo energy contribution per nucleotide involved in a stack. ...
Definition: constraints_soft.h:118
vrna_callback_sc_backtrack
vrna_basepair_t *( vrna_callback_sc_backtrack)(int i, int j, int k, int l, char d, void *data)
Callback to retrieve auxiliary base pairs for soft constraint feature.
Definition: constraints_soft.h:104
vrna_sc_add_data
void vrna_sc_add_data(vrna_fold_compound_t *vc, void *data, vrna_callback_free_auxdata *free_data)
Add an auxiliary data structure for the generic soft constraints callback function.
vrna_sc_init
void vrna_sc_init(vrna_fold_compound_t *vc)
Initialize an empty soft constraints data structure within a vrna_fold_compound_t.
vrna_sc_s::energy_bp
int * energy_bp
Energy contribution for base pairs.
Definition: constraints_soft.h:113
vrna_sc_add_bt
void vrna_sc_add_bt(vrna_fold_compound_t *vc, vrna_callback_sc_backtrack *f)
Bind a backtracking function pointer for generic soft constraint feature.
vrna_sc_remove
void vrna_sc_remove(vrna_fold_compound_t *vc)
Remove soft constraints from vrna_fold_compound_t.
vrna_sc_add_f
void vrna_sc_add_f(vrna_fold_compound_t *vc, vrna_callback_sc_energy *f)
Bind a function pointer for generic soft constraint feature (MFE version)
vrna_sc_s::data
void * data
A pointer to the data object provided for for pseudo energy contribution functions of the generic sof...
Definition: constraints_soft.h:138