RNAlib-2.2.0-RC2
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 __GNUC__
5 #define DEPRECATED(func) func __attribute__ ((deprecated))
6 #else
7 #define DEPRECATED(func) func
8 #endif
9 
10 /* make this interface backward compatible with RNAlib < 2.2.0 */
11 #define VRNA_BACKWARD_COMPAT
12 
27 #include <ViennaRNA/energy_const.h>
29 #include <ViennaRNA/model.h>
30 
31 #define VRNA_GQUAD_MAX_STACK_SIZE 7
32 #define VRNA_GQUAD_MIN_STACK_SIZE 2
33 #define VRNA_GQUAD_MAX_LINKER_LENGTH 15
34 #define VRNA_GQUAD_MIN_LINKER_LENGTH 1
35 #define VRNA_GQUAD_MIN_BOX_SIZE ((4*VRNA_GQUAD_MIN_STACK_SIZE)+(3*VRNA_GQUAD_MIN_LINKER_LENGTH))
36 #define VRNA_GQUAD_MAX_BOX_SIZE ((4*VRNA_GQUAD_MAX_STACK_SIZE)+(3*VRNA_GQUAD_MAX_LINKER_LENGTH))
37 
41 typedef struct vrna_param_t{
42  int id;
43  int stack[NBPAIRS+1][NBPAIRS+1];
44  int hairpin[31];
45  int bulge[MAXLOOP+1];
46  int internal_loop[MAXLOOP+1];
47  int mismatchExt[NBPAIRS+1][5][5];
48  int mismatchI[NBPAIRS+1][5][5];
49  int mismatch1nI[NBPAIRS+1][5][5];
50  int mismatch23I[NBPAIRS+1][5][5];
51  int mismatchH[NBPAIRS+1][5][5];
52  int mismatchM[NBPAIRS+1][5][5];
53  int dangle5[NBPAIRS+1][5];
54  int dangle3[NBPAIRS+1][5];
55  int int11[NBPAIRS+1][NBPAIRS+1][5][5];
56  int int21[NBPAIRS+1][NBPAIRS+1][5][5][5];
57  int int22[NBPAIRS+1][NBPAIRS+1][5][5][5][5];
58  int ninio[5];
59  double lxc;
60  int MLbase;
61  int MLintern[NBPAIRS+1];
62  int MLclosing;
63  int TerminalAU;
64  int DuplexInit;
65  int Tetraloop_E[200];
66  char Tetraloops[1401];
67  int Triloop_E[40];
68  char Triloops[241];
69  int Hexaloop_E[40];
70  char Hexaloops[1801];
71  int TripleC;
72  int MultipleCA;
73  int MultipleCB;
74  int gquad [VRNA_GQUAD_MAX_STACK_SIZE + 1]
75  [3*VRNA_GQUAD_MAX_LINKER_LENGTH + 1];
76 
77  double temperature;
81 } vrna_param_t;
82 
86 typedef struct vrna_exp_param_t{
87  int id;
90  double expstack[NBPAIRS+1][NBPAIRS+1];
91  double exphairpin[31];
92  double expbulge[MAXLOOP+1];
93  double expinternal[MAXLOOP+1];
94  double expmismatchExt[NBPAIRS+1][5][5];
95  double expmismatchI[NBPAIRS+1][5][5];
96  double expmismatch23I[NBPAIRS+1][5][5];
97  double expmismatch1nI[NBPAIRS+1][5][5];
98  double expmismatchH[NBPAIRS+1][5][5];
99  double expmismatchM[NBPAIRS+1][5][5];
100  double expdangle5[NBPAIRS+1][5];
101  double expdangle3[NBPAIRS+1][5];
102  double expint11[NBPAIRS+1][NBPAIRS+1][5][5];
103  double expint21[NBPAIRS+1][NBPAIRS+1][5][5][5];
104  double expint22[NBPAIRS+1][NBPAIRS+1][5][5][5][5];
105  double expninio[5][MAXLOOP+1];
106  double lxc;
107  double expMLbase;
108  double expMLintern[NBPAIRS+1];
109  double expMLclosing;
110  double expTermAU;
111  double expDuplexInit;
112  double exptetra[40];
113  double exptri[40];
114  double exphex[40];
115  char Tetraloops[1401];
116  double expTriloop[40];
117  char Triloops[241];
118  char Hexaloops[1801];
119  double expTripleC;
120  double expMultipleCA;
121  double expMultipleCB;
122  double expgquad[VRNA_GQUAD_MAX_STACK_SIZE + 1]
123  [3*VRNA_GQUAD_MAX_LINKER_LENGTH + 1];
124 
125  double kT;
126  double pf_scale;
128  double temperature;
129  double alpha;
139 
140 
153 
166 
190 
204 vrna_exp_param_t *vrna_exp_params_ali_get(unsigned int n_seq, vrna_md_t *md);
205 
218 
219 
220 #ifdef VRNA_BACKWARD_COMPAT
221 
222 #define paramT vrna_param_t /* restore compatibility of struct rename */
223 #define pf_paramT vrna_exp_param_t /* restore compatibility of struct rename */
224 
225 vrna_param_t *get_parameter_copy(vrna_param_t *par);
226 
237 
264  double betaScale,
265  vrna_md_t md,
266  double pf_scale);
267 
279 
287 vrna_exp_param_t *get_scaled_alipf_parameters(unsigned int n_seq);
288 
297 vrna_exp_param_t *get_boltzmann_factors_ali( unsigned int n_seq,
298  double temperature,
299  double betaScale,
300  vrna_md_t md,
301  double pf_scale);
302 
315 
333  vrna_md_t md);
334 
335 DEPRECATED(vrna_param_t *copy_parameters(void));
336 DEPRECATED(vrna_param_t *set_parameters(vrna_param_t *dest));
337 DEPRECATED(vrna_exp_param_t *scale_pf_parameters(void));
338 DEPRECATED(vrna_exp_param_t *copy_pf_param(void));
339 DEPRECATED(vrna_exp_param_t *set_pf_param(vrna_param_t *dest));
340 
341 #endif
342 
349 #endif
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_exp_param_t * get_scaled_alipf_parameters(unsigned int n_seq)
Get precomputed Boltzmann factors of the loop type dependent energy contributions (alifold variant) ...
The model details data structure and its corresponding modifiers.
vrna_md_t model_details
Model details to be used in the recursions.
Definition: params.h:79
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) ...
vrna_param_t * vrna_params_copy(vrna_param_t *par)
Get a copy of the provided free energy parameters.
vrna_exp_param_t * vrna_exp_params_get(vrna_md_t *md)
Get a data structure containing prescaled free energy parameters already transformed to Boltzmann fac...
double alpha
Scaling factor for the thermodynamic temperature.
Definition: params.h:129
double temperature
Temperature used for loop contribution scaling.
Definition: params.h:128
vrna_exp_param_t * get_scaled_pf_parameters(void)
vrna_md_t model_details
Model details to be used in the recursions.
Definition: params.h:136
double temperature
Temperature used for loop contribution scaling.
Definition: params.h:77
vrna_exp_param_t * get_boltzmann_factor_copy(vrna_exp_param_t *parameters)
Get a copy of already precomputed Boltzmann factors.
The datastructure that contains temperature scaled energy parameters.
Definition: params.h:41
vrna_exp_param_t * vrna_exp_params_ali_get(unsigned int n_seq, vrna_md_t *md)
Get a data structure containing prescaled free energy parameters already transformed to Boltzmann fac...
The data structure that contains the complete model details used throughout the calculations.
Definition: model.h:169
#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...
double temperature
Rescale energy parameters to a temperature in degC.
double pf_scale
Scaling factor to avoid over-/underflows.
Definition: params.h:126
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...
double pf_scale
A scaling factor used by pf_fold() to avoid overflows.
vrna_param_t * vrna_params_get(vrna_md_t *md)
Get a data structure containing prescaled free energy parameters.
int id
An identifier for the data structure.
Definition: params.h:87
vrna_param_t * scale_parameters(void)
Get precomputed energy contributions for all the known loop types.
The datastructure that contains temperature scaled Boltzmann weights of the energy parameters...
Definition: params.h:86