RNAlib-2.3.1
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 
37 typedef struct vrna_param_s vrna_param_t;
40 
41 #include <ViennaRNA/energy_const.h>
43 #include <ViennaRNA/model.h>
44 
45 #define VRNA_GQUAD_MAX_STACK_SIZE 7
46 #define VRNA_GQUAD_MIN_STACK_SIZE 2
47 #define VRNA_GQUAD_MAX_LINKER_LENGTH 15
48 #define VRNA_GQUAD_MIN_LINKER_LENGTH 1
49 #define VRNA_GQUAD_MIN_BOX_SIZE ((4*VRNA_GQUAD_MIN_STACK_SIZE)+(3*VRNA_GQUAD_MIN_LINKER_LENGTH))
50 #define VRNA_GQUAD_MAX_BOX_SIZE ((4*VRNA_GQUAD_MAX_STACK_SIZE)+(3*VRNA_GQUAD_MAX_LINKER_LENGTH))
51 
55 struct vrna_param_s {
56  int id;
57  int stack[NBPAIRS+1][NBPAIRS+1];
58  int hairpin[31];
59  int bulge[MAXLOOP+1];
60  int internal_loop[MAXLOOP+1];
61  int mismatchExt[NBPAIRS+1][5][5];
62  int mismatchI[NBPAIRS+1][5][5];
63  int mismatch1nI[NBPAIRS+1][5][5];
64  int mismatch23I[NBPAIRS+1][5][5];
65  int mismatchH[NBPAIRS+1][5][5];
66  int mismatchM[NBPAIRS+1][5][5];
67  int dangle5[NBPAIRS+1][5];
68  int dangle3[NBPAIRS+1][5];
69  int int11[NBPAIRS+1][NBPAIRS+1][5][5];
70  int int21[NBPAIRS+1][NBPAIRS+1][5][5][5];
71  int int22[NBPAIRS+1][NBPAIRS+1][5][5][5][5];
72  int ninio[5];
73  double lxc;
74  int MLbase;
75  int MLintern[NBPAIRS+1];
76  int MLclosing;
77  int TerminalAU;
78  int DuplexInit;
79  int Tetraloop_E[200];
80  char Tetraloops[1401];
81  int Triloop_E[40];
82  char Triloops[241];
83  int Hexaloop_E[40];
84  char Hexaloops[1801];
85  int TripleC;
86  int MultipleCA;
87  int MultipleCB;
88  int gquad [VRNA_GQUAD_MAX_STACK_SIZE + 1]
89  [3*VRNA_GQUAD_MAX_LINKER_LENGTH + 1];
90 
91  double temperature;
94 };
95 
100  int id;
103  double expstack[NBPAIRS+1][NBPAIRS+1];
104  double exphairpin[31];
105  double expbulge[MAXLOOP+1];
106  double expinternal[MAXLOOP+1];
107  double expmismatchExt[NBPAIRS+1][5][5];
108  double expmismatchI[NBPAIRS+1][5][5];
109  double expmismatch23I[NBPAIRS+1][5][5];
110  double expmismatch1nI[NBPAIRS+1][5][5];
111  double expmismatchH[NBPAIRS+1][5][5];
112  double expmismatchM[NBPAIRS+1][5][5];
113  double expdangle5[NBPAIRS+1][5];
114  double expdangle3[NBPAIRS+1][5];
115  double expint11[NBPAIRS+1][NBPAIRS+1][5][5];
116  double expint21[NBPAIRS+1][NBPAIRS+1][5][5][5];
117  double expint22[NBPAIRS+1][NBPAIRS+1][5][5][5][5];
118  double expninio[5][MAXLOOP+1];
119  double lxc;
120  double expMLbase;
121  double expMLintern[NBPAIRS+1];
122  double expMLclosing;
123  double expTermAU;
124  double expDuplexInit;
125  double exptetra[40];
126  double exptri[40];
127  double exphex[40];
128  char Tetraloops[1401];
129  double expTriloop[40];
130  char Triloops[241];
131  char Hexaloops[1801];
132  double expTripleC;
133  double expMultipleCA;
134  double expMultipleCB;
135  double expgquad[VRNA_GQUAD_MAX_STACK_SIZE + 1]
136  [3*VRNA_GQUAD_MAX_LINKER_LENGTH + 1];
137 
138  double kT;
139  double pf_scale;
141  double temperature;
142  double alpha;
151 };
152 
153 
165 vrna_param_t *
167 
179 vrna_param_t *
181 
206 
221 vrna_exp_params_comparative(unsigned int n_seq,
222  vrna_md_t *md);
223 
237 
250 void
252  vrna_param_t *par);
253 
271 void
273  vrna_exp_param_t *params);
274 
312 void
314  double *mfe);
315 
330  vrna_md_t *md_p);
331 
347  vrna_md_t *md_p);
348 
349 #ifdef VRNA_BACKWARD_COMPAT
350 
355 typedef struct vrna_param_s paramT;
356 
362 
363 DEPRECATED(vrna_param_t *get_parameter_copy(vrna_param_t *par));
364 
374 DEPRECATED(vrna_exp_param_t *get_scaled_pf_parameters(void));
375 
401 DEPRECATED(vrna_exp_param_t *get_boltzmann_factors(double temperature, double betaScale, vrna_md_t md, double pf_scale));
402 
414 
422 DEPRECATED(vrna_exp_param_t *get_scaled_alipf_parameters(unsigned int n_seq));
423 
432 DEPRECATED(vrna_exp_param_t *get_boltzmann_factors_ali(unsigned int n_seq, double temperature, double betaScale, vrna_md_t md, double pf_scale));
433 
445 DEPRECATED(vrna_param_t *scale_parameters(void));
446 
464 
465 DEPRECATED(vrna_param_t *copy_parameters(void));
466 DEPRECATED(vrna_param_t *set_parameters(vrna_param_t *dest));
467 DEPRECATED(vrna_exp_param_t *scale_pf_parameters(void));
468 DEPRECATED(vrna_exp_param_t *copy_pf_param(void));
469 DEPRECATED(vrna_exp_param_t *set_pf_param(vrna_param_t *dest));
470 
471 #endif
472 
479 #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:29
vrna_md_t model_details
Model details to be used in the recursions.
Definition: params.h:93
double pf_scale
Scaling factor to avoid over-/underflows.
Definition: params.h:139
vrna_md_t model_details
Model details to be used in the recursions.
Definition: params.h:149
The most basic data structure required by many functions throughout the RNAlib.
Definition: data_structures.h:454
double temperature
Temperature used for loop contribution scaling.
Definition: params.h:141
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.
The datastructure that contains temperature scaled energy parameters.
Definition: params.h:55
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.
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.
Energy parameter constants.
Various data structures and pre-processor macros.
double alpha
Scaling factor for the thermodynamic temperature.
Definition: params.h:142
The data structure that contains temperature scaled Boltzmann weights of the energy parameters...
Definition: params.h:99
double pf_scale
A scaling factor used by pf_fold() to avoid overflows.
The data structure that contains the complete model details used throughout the calculations.
Definition: model.h:191
vrna_exp_param_t * get_scaled_pf_parameters(void)
double temperature
Temperature used for loop contribution scaling.
Definition: params.h:91
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...
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_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:25
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:100
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.