RNAlib-2.3.1
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 
5 
16 typedef struct vrna_sc_s vrna_sc_t;
17 
44 typedef int (vrna_callback_sc_energy)(int i, int j, int k, int l, char d, void *data);
45 
72 typedef FLT_OR_DBL (vrna_callback_sc_exp_energy)(int i, int j, int k, int l, char d, void *data);
73 
94 typedef vrna_basepair_t *(vrna_callback_sc_backtrack)(int i, int j, int k, int l, char d, void *data);
95 
101 struct vrna_sc_s {
102  int **energy_up;
103  int *energy_bp;
110  /* generic soft contraints below */
128  void *data;
132  vrna_callback_free_auxdata *free_data;
133 };
134 
152 
168  const FLT_OR_DBL **constraints,
169  unsigned int options);
170 
185  int i,
186  int j,
187  FLT_OR_DBL energy,
188  unsigned int options);
189 
205  const FLT_OR_DBL *constraints,
206  unsigned int options);
207 
221  int i,
222  FLT_OR_DBL energy,
223  unsigned int options);
224 
235 
243 void vrna_sc_free(vrna_sc_t *sc);
244 
257  void *data,
258  vrna_callback_free_auxdata *free_data);
259 
277 
297 
316 
317 #endif
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:44
void vrna_sc_free(vrna_sc_t *sc)
Free memory occupied by a vrna_sc_t data structure.
double FLT_OR_DBL
Typename for floating point number in partition function computations.
Definition: data_structures.h:48
The most basic data structure required by many functions throughout the RNAlib.
Definition: data_structures.h:454
int * energy_stack
Pseudo Energy contribution per base pair involved in a stack.
Definition: constraints_soft.h:107
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:116
vrna_callback_sc_energy * f
A function pointer used for pseudo energy contribution in MFE calculations.
Definition: constraints_soft.h:111
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)
Various data structures and pre-processor macros.
FLT_OR_DBL * exp_energy_bp
Boltzmann Factors of the energy contribution for base pairs.
Definition: constraints_soft.h:105
Base pair data structure used in subopt.c.
Definition: data_structures.h:174
FLT_OR_DBL ** exp_energy_up
Boltzmann Factors of the energy contributions for unpaired sequence stretches.
Definition: constraints_soft.h:104
The soft constraints data structure.
Definition: constraints_soft.h:101
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:72
void( vrna_callback_free_auxdata)(void *data)
Callback to free memory allocated for auxiliary user-provided data.
Definition: data_structures.h:60
vrna_callback_sc_exp_energy * exp_f
A function pointer used for pseudo energy contribution boltzmann factors in PF calculations.
Definition: constraints_soft.h:122
int ** energy_up
Energy contribution for stretches of unpaired nucleotides.
Definition: constraints_soft.h:102
void vrna_sc_set_bp(vrna_fold_compound_t *vc, const FLT_OR_DBL **constraints, unsigned int options)
Set soft constraints for paired nucleotides.
void vrna_sc_add_bp(vrna_fold_compound_t *vc, int i, int j, FLT_OR_DBL energy, unsigned int options)
Add soft constraints for paired nucleotides.
FLT_OR_DBL * exp_energy_stack
Boltzmann weighted pseudo energy contribution per nucleotide involved in a stack. ...
Definition: constraints_soft.h:108
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:94
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.
void vrna_sc_init(vrna_fold_compound_t *vc)
Initialize an empty soft constraints data structure within a vrna_fold_compound_t.
int * energy_bp
Energy contribution for base pairs.
Definition: constraints_soft.h:103
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.
void vrna_sc_remove(vrna_fold_compound_t *vc)
Remove soft constraints from vrna_fold_compound_t.
void vrna_sc_add_up(vrna_fold_compound_t *vc, int i, FLT_OR_DBL energy, unsigned int options)
Add soft constraints for unpaired nucleotides.
void vrna_sc_set_up(vrna_fold_compound_t *vc, const FLT_OR_DBL *constraints, unsigned int options)
Set soft constraints for unpaired nucleotides.
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)
void * data
A pointer to the data object provided for for pseudo energy contribution functions of the generic sof...
Definition: constraints_soft.h:128