RNAlib-2.6.3
 
Loading...
Searching...
No Matches
basic.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 VRNA_WARN_DEPRECATED
5# if defined(__clang__)
6# define DEPRECATED(func, msg) func __attribute__ ((deprecated("", msg)))
7# elif defined(__GNUC__)
8# define DEPRECATED(func, msg) func __attribute__ ((deprecated(msg)))
9# else
10# define DEPRECATED(func, msg) func
11# endif
12#else
13# define DEPRECATED(func, msg) func
14#endif
15
39
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) + \
50 (3 * VRNA_GQUAD_MIN_LINKER_LENGTH))
51#define VRNA_GQUAD_MAX_BOX_SIZE ((4 * VRNA_GQUAD_MAX_STACK_SIZE) + \
52 (3 * VRNA_GQUAD_MAX_LINKER_LENGTH))
53
58 int id;
59 int stack[NBPAIRS + 1][NBPAIRS + 1];
60 int hairpin[31];
61 int bulge[MAXLOOP + 1];
62 int internal_loop[MAXLOOP + 1];
63 int mismatchExt[NBPAIRS + 1][5][5];
64 int mismatchI[NBPAIRS + 1][5][5];
65 int mismatch1nI[NBPAIRS + 1][5][5];
66 int mismatch23I[NBPAIRS + 1][5][5];
67 int mismatchH[NBPAIRS + 1][5][5];
68 int mismatchM[NBPAIRS + 1][5][5];
69 int dangle5[NBPAIRS + 1][5];
70 int dangle3[NBPAIRS + 1][5];
71 int int11[NBPAIRS + 1][NBPAIRS + 1][5][5];
72 int int21[NBPAIRS + 1][NBPAIRS + 1][5][5][5];
73 int int22[NBPAIRS + 1][NBPAIRS + 1][5][5][5][5];
74 int ninio[5];
75 double lxc;
76 int MLbase;
77 int MLintern[NBPAIRS + 1];
78 int MLclosing;
79 int TerminalAU;
80 int DuplexInit;
81 int Tetraloop_E[200];
82 char Tetraloops[1401];
83 int Triloop_E[40];
84 char Triloops[241];
85 int Hexaloop_E[40];
86 char Hexaloops[1801];
87 int TripleC;
88 int MultipleCA;
89 int MultipleCB;
90 int gquad[VRNA_GQUAD_MAX_STACK_SIZE + 1][3 * VRNA_GQUAD_MAX_LINKER_LENGTH + 1];
91 int gquadLayerMismatch;
92 int gquadLayerMismatchMax;
93
94 double temperature;
97 char param_file[256];
98 int SaltStack;
99 int SaltLoop[MAXLOOP + 2];
100 double SaltLoopDbl[MAXLOOP + 2];
101 int SaltMLbase;
102 int SaltMLintern;
103 int SaltMLclosing;
104 int SaltDPXInit;
105};
106
111 int id;
114 double expstack[NBPAIRS + 1][NBPAIRS + 1];
115 double exphairpin[31];
116 double expbulge[MAXLOOP + 1];
117 double expinternal[MAXLOOP + 1];
118 double expmismatchExt[NBPAIRS + 1][5][5];
119 double expmismatchI[NBPAIRS + 1][5][5];
120 double expmismatch23I[NBPAIRS + 1][5][5];
121 double expmismatch1nI[NBPAIRS + 1][5][5];
122 double expmismatchH[NBPAIRS + 1][5][5];
123 double expmismatchM[NBPAIRS + 1][5][5];
124 double expdangle5[NBPAIRS + 1][5];
125 double expdangle3[NBPAIRS + 1][5];
126 double expint11[NBPAIRS + 1][NBPAIRS + 1][5][5];
127 double expint21[NBPAIRS + 1][NBPAIRS + 1][5][5][5];
128 double expint22[NBPAIRS + 1][NBPAIRS + 1][5][5][5][5];
129 double expninio[5][MAXLOOP + 1];
130 double lxc;
131 double expMLbase;
132 double expMLintern[NBPAIRS + 1];
133 double expMLclosing;
134 double expTermAU;
135 double expDuplexInit;
136 double exptetra[40];
137 double exptri[40];
138 double exphex[40];
139 char Tetraloops[1401];
140 double expTriloop[40];
141 char Triloops[241];
142 char Hexaloops[1801];
143 double expTripleC;
144 double expMultipleCA;
145 double expMultipleCB;
146 double expgquad[VRNA_GQUAD_MAX_STACK_SIZE + 1][3 * VRNA_GQUAD_MAX_LINKER_LENGTH + 1];
147 double expgquadLayerMismatch;
148 int gquadLayerMismatchMax;
149
150 double kT;
151 double pf_scale;
153 double temperature;
154 double alpha;
162 char param_file[256];
164 double expSaltStack;
165 double expSaltLoop[MAXLOOP + 2];
166 double SaltLoopDbl[MAXLOOP + 2];
167 int SaltMLbase;
168 int SaltMLintern;
169 int SaltMLclosing;
170 int SaltDPXInit;
171};
172
173
187
188
202
203
228
229
245 vrna_md_t *md);
246
247
261
262
275void
277 vrna_param_t *par);
278
279
297void
299 vrna_exp_param_t *params);
300
301
339void
341 double *mfe);
342
343
358void
360 vrna_md_t *md);
361
362
378void
380 vrna_md_t *md);
381
382
383void
384vrna_params_prepare(vrna_fold_compound_t *fc,
385 unsigned int options);
386
387
388#ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY
389
394typedef struct vrna_param_s paramT;
395
401
402DEPRECATED(vrna_param_t *get_parameter_copy(vrna_param_t *par),
403 "Use vrna_params_copy() instead");
404
415 "Use vrna_params() instead");
416
443 double betaScale,
444 vrna_md_t md,
445 double pf_scale),
446 "Use vrna_exp_params() instead");
447
459 "Use vrna_exp_params_copy() instead");
460
468DEPRECATED(vrna_exp_param_t *get_scaled_alipf_parameters(unsigned int n_seq),
469 "Use vrna_exp_params_comparative() instead");
470
479DEPRECATED(vrna_exp_param_t *get_boltzmann_factors_ali(unsigned int n_seq,
480 double temperature,
481 double betaScale,
482 vrna_md_t md,
483 double pf_scale),
484 "Use vrna_exp_params_comparative() instead");
485
497DEPRECATED(vrna_param_t *scale_parameters(void),
498 "Use vrna_params() instead");
499
517 vrna_md_t md),
518 "Usee vrna_params() instead");
519
520DEPRECATED(vrna_param_t *copy_parameters(void), "Use vrna_params_copy() instead");
521DEPRECATED(vrna_param_t *set_parameters(vrna_param_t *dest), "Use vrna_params_copy() instead");
522DEPRECATED(vrna_exp_param_t *scale_pf_parameters(void), "Use vrna_exp_params() instead");
523DEPRECATED(vrna_exp_param_t *copy_pf_param(void), "Use vrna_exp_params_copy() instead");
524DEPRECATED(vrna_exp_param_t *set_pf_param(vrna_param_t *dest),
525 "Use vrna_exp_params_copy() instead");
526
527#endif
528
534#endif
Energy parameter constants.
#define MAXLOOP
Definition constants.h:29
Various data structures and pre-processor macros.
The Basic Fold Compound API.
int id
An identifier for the data structure.
Definition basic.h:111
double pf_scale
Scaling factor to avoid over-/underflows.
Definition basic.h:151
double temperature
Temperature used for loop contribution scaling.
Definition basic.h:153
double alpha
Scaling factor for the thermodynamic temperature.
Definition basic.h:154
vrna_md_t model_details
Model details to be used in the recursions.
Definition basic.h:96
char param_file[256]
The filename the parameters were derived from, or empty string if they represent the default.
Definition basic.h:162
vrna_md_t model_details
Model details to be used in the recursions.
Definition basic.h:161
char param_file[256]
The filename the parameters were derived from, or empty string if they represent the default.
Definition basic.h:97
double temperature
Temperature used for loop contribution scaling.
Definition basic.h:94
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...
void vrna_params_reset(vrna_fold_compound_t *fc, vrna_md_t *md)
Reset free energy parameters within a vrna_fold_compound_t according to provided, or default model de...
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_exp_param_t * get_scaled_pf_parameters(void)
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)
vrna_param_t * vrna_params_copy(vrna_param_t *par)
Get a copy of the provided free energy parameters.
vrna_exp_param_t * get_boltzmann_factor_copy(vrna_exp_param_t *parameters)
Get a copy of already precomputed Boltzmann factors.
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 *fc, vrna_exp_param_t *params)
Update the energy parameters for subsequent partition function computations.
vrna_param_t * vrna_params(vrna_md_t *md)
Get a data structure containing prescaled free energy parameters.
vrna_param_t * scale_parameters(void)
Get precomputed energy contributions for all the known loop types.
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 *fc, vrna_md_t *md)
Reset Boltzmann factors for partition function computations within a vrna_fold_compound_t according t...
void vrna_params_subst(vrna_fold_compound_t *fc, vrna_param_t *par)
Update/Reset energy parameters data structure within a vrna_fold_compound_t.
void vrna_exp_params_rescale(vrna_fold_compound_t *fc, double *mfe)
Rescale Boltzmann factors for partition function computations.
vrna_param_t * get_scaled_parameters(double temperature, vrna_md_t md)
Get precomputed energy contributions for all the known loop types.
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...
The data structure that contains temperature scaled Boltzmann weights of the energy parameters.
Definition basic.h:110
The datastructure that contains temperature scaled energy parameters.
Definition basic.h:57
The most basic data structure required by many functions throughout the RNAlib.
Definition fold_compound.h:168
double temperature
Rescale energy parameters to a temperature in degC.
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:245
The model details data structure and its corresponding modifiers.