RNAlib-2.2.7
params.h
Go to the documentation of this file.
1 #ifndef VIENNA_RNA_PACKAGE_PARAMS_H
2 #define VIENNA_RNA_PACKAGE_PARAMS_H
3 
4 #ifdef DEPRECATION_WARNINGS
5 # ifdef __GNUC__
6 # define DEPRECATED(func) func __attribute__ ((deprecated))
7 # else
8 # define DEPRECATED(func) func
9 # endif
10 #else
11 # define DEPRECATED(func) func
12 #endif
13 
14 /* make this interface backward compatible with RNAlib < 2.2.0 */
15 #define VRNA_BACKWARD_COMPAT
16 
32 typedef struct vrna_param_s vrna_param_t;
35 
36 #include <ViennaRNA/energy_const.h>
38 #include <ViennaRNA/model.h>
39 
40 #define VRNA_GQUAD_MAX_STACK_SIZE 7
41 #define VRNA_GQUAD_MIN_STACK_SIZE 2
42 #define VRNA_GQUAD_MAX_LINKER_LENGTH 15
43 #define VRNA_GQUAD_MIN_LINKER_LENGTH 1
44 #define VRNA_GQUAD_MIN_BOX_SIZE ((4*VRNA_GQUAD_MIN_STACK_SIZE)+(3*VRNA_GQUAD_MIN_LINKER_LENGTH))
45 #define VRNA_GQUAD_MAX_BOX_SIZE ((4*VRNA_GQUAD_MAX_STACK_SIZE)+(3*VRNA_GQUAD_MAX_LINKER_LENGTH))
46 
50 struct vrna_param_s {
51  int id;
52  int stack[NBPAIRS+1][NBPAIRS+1];
53  int hairpin[31];
54  int bulge[MAXLOOP+1];
55  int internal_loop[MAXLOOP+1];
56  int mismatchExt[NBPAIRS+1][5][5];
57  int mismatchI[NBPAIRS+1][5][5];
58  int mismatch1nI[NBPAIRS+1][5][5];
59  int mismatch23I[NBPAIRS+1][5][5];
60  int mismatchH[NBPAIRS+1][5][5];
61  int mismatchM[NBPAIRS+1][5][5];
62  int dangle5[NBPAIRS+1][5];
63  int dangle3[NBPAIRS+1][5];
64  int int11[NBPAIRS+1][NBPAIRS+1][5][5];
65  int int21[NBPAIRS+1][NBPAIRS+1][5][5][5];
66  int int22[NBPAIRS+1][NBPAIRS+1][5][5][5][5];
67  int ninio[5];
68  double lxc;
69  int MLbase;
70  int MLintern[NBPAIRS+1];
71  int MLclosing;
72  int TerminalAU;
73  int DuplexInit;
74  int Tetraloop_E[200];
75  char Tetraloops[1401];
76  int Triloop_E[40];
77  char Triloops[241];
78  int Hexaloop_E[40];
79  char Hexaloops[1801];
80  int TripleC;
81  int MultipleCA;
82  int MultipleCB;
83  int gquad [VRNA_GQUAD_MAX_STACK_SIZE + 1]
84  [3*VRNA_GQUAD_MAX_LINKER_LENGTH + 1];
85 
86  double temperature;
89 };
90 
95  int id;
98  double expstack[NBPAIRS+1][NBPAIRS+1];
99  double exphairpin[31];
100  double expbulge[MAXLOOP+1];
101  double expinternal[MAXLOOP+1];
102  double expmismatchExt[NBPAIRS+1][5][5];
103  double expmismatchI[NBPAIRS+1][5][5];
104  double expmismatch23I[NBPAIRS+1][5][5];
105  double expmismatch1nI[NBPAIRS+1][5][5];
106  double expmismatchH[NBPAIRS+1][5][5];
107  double expmismatchM[NBPAIRS+1][5][5];
108  double expdangle5[NBPAIRS+1][5];
109  double expdangle3[NBPAIRS+1][5];
110  double expint11[NBPAIRS+1][NBPAIRS+1][5][5];
111  double expint21[NBPAIRS+1][NBPAIRS+1][5][5][5];
112  double expint22[NBPAIRS+1][NBPAIRS+1][5][5][5][5];
113  double expninio[5][MAXLOOP+1];
114  double lxc;
115  double expMLbase;
116  double expMLintern[NBPAIRS+1];
117  double expMLclosing;
118  double expTermAU;
119  double expDuplexInit;
120  double exptetra[40];
121  double exptri[40];
122  double exphex[40];
123  char Tetraloops[1401];
124  double expTriloop[40];
125  char Triloops[241];
126  char Hexaloops[1801];
127  double expTripleC;
128  double expMultipleCA;
129  double expMultipleCB;
130  double expgquad[VRNA_GQUAD_MAX_STACK_SIZE + 1]
131  [3*VRNA_GQUAD_MAX_LINKER_LENGTH + 1];
132 
133  double kT;
134  double pf_scale;
136  double temperature;
137  double alpha;
146 };
147 
148 
160 vrna_param_t *
162 
174 vrna_param_t *
176 
201 
216 vrna_exp_params_comparative(unsigned int n_seq,
217  vrna_md_t *md);
218 
232 
245 void
247  vrna_param_t *par);
248 
266 void
268  vrna_exp_param_t *params);
269 
307 void
309  double *mfe);
310 
325  vrna_md_t *md_p);
326 
342  vrna_md_t *md_p);
343 
344 #ifdef VRNA_BACKWARD_COMPAT
345 
350 typedef struct vrna_param_s paramT;
351 
357 
358 DEPRECATED(vrna_param_t *get_parameter_copy(vrna_param_t *par));
359 
369 DEPRECATED(vrna_exp_param_t *get_scaled_pf_parameters(void));
370 
396 DEPRECATED(vrna_exp_param_t *get_boltzmann_factors(double temperature, double betaScale, vrna_md_t md, double pf_scale));
397 
409 
417 DEPRECATED(vrna_exp_param_t *get_scaled_alipf_parameters(unsigned int n_seq));
418 
427 DEPRECATED(vrna_exp_param_t *get_boltzmann_factors_ali(unsigned int n_seq, double temperature, double betaScale, vrna_md_t md, double pf_scale));
428 
440 DEPRECATED(vrna_param_t *scale_parameters(void));
441 
459 
460 DEPRECATED(vrna_param_t *copy_parameters(void));
461 DEPRECATED(vrna_param_t *set_parameters(vrna_param_t *dest));
462 DEPRECATED(vrna_exp_param_t *scale_pf_parameters(void));
463 DEPRECATED(vrna_exp_param_t *copy_pf_param(void));
464 DEPRECATED(vrna_exp_param_t *set_pf_param(vrna_param_t *dest));
465 
466 #endif
467 
474 #endif
vrna_param_t * vrna_params(vrna_md_t *md)
Get a data structure containing prescaled free energy parameters.
vrna_param_t * get_scaled_parameters(double temperature, vrna_md_t md)
Get precomputed energy contributions for all the known loop types.
#define MAXLOOP
Definition: energy_const.h:28
vrna_md_t model_details
Model details to be used in the recursions.
Definition: params.h:88
double pf_scale
Scaling factor to avoid over-/underflows.
Definition: params.h:134
vrna_md_t model_details
Model details to be used in the recursions.
Definition: params.h:144
The most basic data structure required by many functions throughout the RNAlib.
Definition: data_structures.h:390
double temperature
Temperature used for loop contribution scaling.
Definition: params.h:136
vrna_exp_param_t * get_scaled_alipf_parameters(unsigned int n_seq)
Get precomputed Boltzmann factors of the loop type dependent energy contributions (alifold variant) ...
double temperature
Rescale energy parameters to a temperature in degC.
The model details data structure and its corresponding modifiers.
The datastructure that contains temperature scaled energy parameters.
Definition: params.h:50
vrna_exp_param_t * vrna_exp_params_copy(vrna_exp_param_t *par)
Get a copy of the provided free energy parameters (provided as Boltzmann factors) ...
void vrna_exp_params_subst(vrna_fold_compound_t *vc, vrna_exp_param_t *params)
Update the energy parameters for subsequent partition function computations.
void vrna_exp_params_reset(vrna_fold_compound_t *vc, vrna_md_t *md_p)
Reset Boltzmann factors for partition function computations within a vrna_fold_compound_t according t...
vrna_param_t * vrna_params_copy(vrna_param_t *par)
Get a copy of the provided free energy parameters.
void vrna_exp_params_rescale(vrna_fold_compound_t *vc, double *mfe)
Rescale Boltzmann factors for partition function computations.
The data structure that contains the complete model details used throughout the calculations.
Definition: model.h:187
double alpha
Scaling factor for the thermodynamic temperature.
Definition: params.h:137
The datastructure that contains temperature scaled Boltzmann weights of the energy parameters...
Definition: params.h:94
double pf_scale
A scaling factor used by pf_fold() to avoid overflows.
vrna_exp_param_t * get_scaled_pf_parameters(void)
double temperature
Temperature used for loop contribution scaling.
Definition: params.h:86
vrna_exp_param_t * vrna_exp_params_comparative(unsigned int n_seq, vrna_md_t *md)
Get a data structure containing prescaled free energy parameters already transformed to Boltzmann fac...
vrna_exp_param_t * get_boltzmann_factor_copy(vrna_exp_param_t *parameters)
Get a copy of already precomputed Boltzmann factors.
#define NBPAIRS
Definition: energy_const.h:24
vrna_exp_param_t * get_boltzmann_factors_ali(unsigned int n_seq, double temperature, double betaScale, vrna_md_t md, double pf_scale)
Get precomputed Boltzmann factors of the loop type dependent energy contributions (alifold variant) w...
vrna_exp_param_t * get_boltzmann_factors(double temperature, double betaScale, vrna_md_t md, double pf_scale)
Get precomputed Boltzmann factors of the loop type dependent energy contributions with independent th...
void vrna_params_reset(vrna_fold_compound_t *vc, vrna_md_t *md_p)
Reset free energy parameters within a vrna_fold_compound_t according to provided, or default model de...
int id
An identifier for the data structure.
Definition: params.h:95
vrna_exp_param_t * vrna_exp_params(vrna_md_t *md)
Get a data structure containing prescaled free energy parameters already transformed to Boltzmann fac...
vrna_param_t * scale_parameters(void)
Get precomputed energy contributions for all the known loop types.
void vrna_params_subst(vrna_fold_compound_t *vc, vrna_param_t *par)
Update/Reset energy parameters data structure within a vrna_fold_compound_t.