RNAlib-2.2.0-RC2
model.h
Go to the documentation of this file.
1 #ifndef VIENNA_RNA_PACKAGE_MODEL_H
2 #define VIENNA_RNA_PACKAGE_MODEL_H
3 
4 #ifdef __GNUC__
5 #define DEPRECATED(func) func __attribute__ ((deprecated))
6 #else
7 #define DEPRECATED(func) func
8 #endif
9 
10 
11 /* make this interface backward compatible with RNAlib < 2.2.0 */
12 #define VRNA_BACKWARD_COMPAT
13 
30 #define VRNA_MODEL_DEFAULT_TEMPERATURE 37.0
31 
36 #define VRNA_MODEL_DEFAULT_PF_SCALE -1
37 
42 #define VRNA_MODEL_DEFAULT_BETA_SCALE 1.
43 
47 #define VRNA_MODEL_DEFAULT_DANGLES 2
48 
53 #define VRNA_MODEL_DEFAULT_SPECIAL_HP 1
54 
59 #define VRNA_MODEL_DEFAULT_NO_LP 0
60 
65 #define VRNA_MODEL_DEFAULT_NO_GU 0
66 
71 #define VRNA_MODEL_DEFAULT_NO_GU_CLOSURE 0
72 
77 #define VRNA_MODEL_DEFAULT_CIRC 0
78 
83 #define VRNA_MODEL_DEFAULT_GQUAD 0
84 
85 #define VRNA_MODEL_DEFAULT_CANONICAL_BP 0
86 
91 #define VRNA_MODEL_DEFAULT_UNIQ_ML 0
92 
97 #define VRNA_MODEL_DEFAULT_ENERGY_SET 0
98 
103 #define VRNA_MODEL_DEFAULT_BACKTRACK 1
104 
109 #define VRNA_MODEL_DEFAULT_BACKTRACK_TYPE 'F'
110 
115 #define VRNA_MODEL_DEFAULT_COMPUTE_BPP 1
116 
121 #define VRNA_MODEL_DEFAULT_MAX_BP_SPAN -1
122 
127 #define VRNA_MODEL_DEFAULT_LOG_ML 0
128 
133 #define VRNA_MODEL_DEFAULT_ALI_OLD_EN 0
134 
139 #define VRNA_MODEL_DEFAULT_ALI_RIBO 0
140 
145 #define VRNA_MODEL_DEFAULT_ALI_CV_FACT 1.
146 
150 #define VRNA_MODEL_DEFAULT_ALI_NC_FACT 1.
151 
152 
153 #ifdef VRNA_BACKWARD_COMPAT
154 
155 #ifndef MAXALPHA
156 
159 #define MAXALPHA 20
160 #endif
161 
162 #endif
163 
169 typedef struct vrna_md_t{
170  double temperature;
171  double betaScale;
172  int dangles;
179  int noLP;
180  int noGU;
182  int logML;
183  int circ;
184  int gquad;
186  int uniq_ML;
188  int backtrack;
191  char nonstandards[33];
199  int oldAliEn;
200  int ribo;
201  double cv_fact;
202  double nc_fact;
203  double sfact;
204  int rtype[8];
205  short alias[MAXALPHA+1];
206  int pair[MAXALPHA+1][MAXALPHA+1];
207 } vrna_md_t;
208 
209 
219 
220 
221 void vrna_md_set_nonstandards(vrna_md_t *md, const char *ns);
222 
223 
224 void vrna_md_set_dangles(vrna_md_t *md, int d);
225 
226 
227 int vrna_md_get_dangles(vrna_md_t *md);
228 
229 
230 void vrna_md_set_temperature(vrna_md_t *md, double T);
231 
232 
233 double vrna_md_get_temperature(vrna_md_t *md);
234 
235 
236 void vrna_md_set_special_hp(vrna_md_t *md, int shp);
237 
238 
239 int vrna_md_get_special_hp(vrna_md_t *md);
240 
241 
242 void vrna_md_set_gquad(vrna_md_t *md, int g);
243 
244 
245 int vrna_md_get_gquad(vrna_md_t *md);
246 
247 
248 void vrna_md_set_nolp(vrna_md_t *md, int nolp);
249 
250 
251 int vrna_md_get_nolp(vrna_md_t *md);
252 
253 
254 void vrna_md_set_betascale(vrna_md_t *md, double b);
255 
256 
257 double vrna_md_get_betascale(vrna_md_t *md);
258 
271 void vrna_md_update(vrna_md_t *md);
272 
287 
288 
289 #ifdef VRNA_BACKWARD_COMPAT
290 
291 #define model_detailsT vrna_md_t /* restore compatibility of struct rename */
292 #define set_model_details(a) vrna_md_set_globals(a) /* restore compatibility of function rename */
293 
294 /* BEGIN deprecated global variables: */
295 
302 extern double temperature;
303 
315 extern double pf_scale;
316 
338 extern int dangles;
339 
345 extern int tetra_loop;
346 
354 extern int noLonelyPairs;
355 
359 extern int noGU;
360 
364 extern int no_closingGU;
365 
369 extern int circ;
370 
374 extern int gquad;
375 
379 extern int canonicalBPonly;
380 
384 extern int uniq_ML;
385 
393 extern int energy_set;
394 
401 extern int do_backtrack;
402 
410 extern char backtrack_type;
411 
419 extern char *nonstandards;
420 
426 extern int max_bp_span;
427 
431 extern int oldAliEn;
432 
436 extern int ribo;
437 
438 extern double cv_fact;
439 
440 extern double nc_fact;
441 
443 extern int logML;
444 
445 /* END deprecated global variables: */
446 
447 #endif
448 
452 #endif
int noLP
Only consider canonical structures, i.e. no 'lonely' base pairs.
Definition: model.h:179
int special_hp
Include special hairpin contributions for tri, tetra and hexaloops.
Definition: model.h:178
char * nonstandards
contains allowed non standard base pairs
int uniq_ML
Flag to ensure unique multibranch loop decomposition during folding.
Definition: model.h:186
double cv_fact
Covariance scaling factor for consensus structure prediction.
Definition: model.h:201
double cv_fact
This variable controls the weight of the covariance term in the energy function of alignment folding ...
char backtrack_type
Specifies in which matrix to backtrack.
Definition: model.h:189
int energy_set
0 = BP; 1=any mit GC; 2=any mit AU-parameter
int noGUclosure
Do not allow loops to be closed by GU pair.
Definition: model.h:181
int backtrack
Specifies whether or not secondary structures should be backtraced.
Definition: model.h:188
int oldAliEn
use old alifold energies (with gaps)
int no_closingGU
GU allowed only inside stacks if set to 1.
int circ
backward compatibility variable.. this does not effect anything
double sfact
Scaling factor for partition function scaling.
Definition: model.h:203
int dangles
Switch the energy model for dangling end contributions (0, 1, 2, 3)
int gquad
Include G-quadruplexes in structure prediction.
Definition: model.h:184
int do_backtrack
do backtracking, i.e. compute secondary structures or base pair probabilities
double nc_fact
This variable controls the magnitude of the penalty for non-compatible sequences in the covariance te...
int max_bp_span
Maximum allowed base pair span.
char backtrack_type
A backtrack array marker for inverse_fold()
int max_bp_span
maximum allowed base pair span
Definition: model.h:192
int ribo
Use ribosum scoring table in alifold energy model.
Definition: model.h:200
double betaScale
A scaling factor for the thermodynamic temperature of the Boltzmann factors.
Definition: model.h:171
int uniq_ML
do ML decomposition uniquely (for subopt)
int logML
if nonzero use logarithmic ML energy in energy_of_struct
int min_loop_size
Minimum size of hairpin loops.
Definition: model.h:194
int tetra_loop
Include special stabilizing energies for some tri-, tetra- and hexa-loops;.
int dangles
Specifies the dangle model used in any energy evaluation (0,1,2 or 3)
Definition: model.h:172
void vrna_md_update(vrna_md_t *md)
Update the model details data structure.
int logML
Use logarithmic scaling for multi loops.
Definition: model.h:182
void vrna_md_set_default(vrna_md_t *md)
Set default model details.
int energy_set
Specifies the energy set that defines set of compatible base pairs.
Definition: model.h:187
int ribo
use ribosum matrices
char nonstandards[33]
contains allowed non standard bases
Definition: model.h:191
int circ
Assume RNA to be circular instead of linear.
Definition: model.h:183
The data structure that contains the complete model details used throughout the calculations.
Definition: model.h:169
int gquad
Allow G-quadruplex formation.
double temperature
Rescale energy parameters to a temperature in degC.
double pf_scale
A scaling factor used by pf_fold() to avoid overflows.
double temperature
The temperature used to scale the thermodynamic parameters.
Definition: model.h:170
int noGU
Global switch to forbid/allow GU base pairs at all.
void vrna_md_set_globals(vrna_md_t *md)
Set default model details.
int noLonelyPairs
Global switch to avoid/allow helices of length 1.
int noGU
Do not allow GU pairs.
Definition: model.h:180
int canonicalBPonly
int oldAliEn
Use old alifold energy model.
Definition: model.h:199
int compute_bpp
Specifies whether or not backward recursions for base pair probability (bpp) computation will be perf...
Definition: model.h:190
int canonicalBPonly
remove non-canonical bp's from constraint structures
Definition: model.h:185
#define MAXALPHA
Maximal length of alphabet.
Definition: model.h:159