RNAlib-2.4.12
multibranch.h
Go to the documentation of this file.
1 #ifndef VIENNA_RNA_PACKAGE_LOOPS_MULTIBRANCH_H
2 #define VIENNA_RNA_PACKAGE_LOOPS_MULTIBRANCH_H
3 
8 
9 #ifdef VRNA_WARN_DEPRECATED
10 # if defined(DEPRECATED)
11 # undef DEPRECATED
12 # endif
13 # if defined(__clang__)
14 # define DEPRECATED(func, msg) func __attribute__ ((deprecated("", msg)))
15 # elif defined(__GNUC__)
16 # define DEPRECATED(func, msg) func __attribute__ ((deprecated(msg)))
17 # else
18 # define DEPRECATED(func, msg) func
19 # endif
20 #else
21 # define DEPRECATED(func, msg) func
22 #endif
23 
24 #ifdef __GNUC__
25 # define INLINE inline
26 #else
27 # define INLINE
28 #endif
29 
54 int
56  int i,
57  int j);
58 
59 
60 int
61 vrna_E_mb_loop_fast(vrna_fold_compound_t *fc,
62  int i,
63  int j,
64  int *dmli1,
65  int *dmli2);
66 
67 
68 int
70  int i,
71  int j);
72 
73 
74 int
75 E_ml_rightmost_stem(int i,
76  int j,
78 
79 
80 int
81 vrna_E_ml_stems_fast(vrna_fold_compound_t *fc,
82  int i,
83  int j,
84  int *fmi,
85  int *dmli);
86 
87 
88 /* End basic interface */
104 typedef struct vrna_mx_pf_aux_ml_s *vrna_mx_pf_aux_ml_t;
105 
106 
108 vrna_exp_E_mb_loop_fast(vrna_fold_compound_t *fc,
109  int i,
110  int j,
111  vrna_mx_pf_aux_ml_t aux_mx);
112 
113 
115 vrna_exp_E_ml_fast_init(vrna_fold_compound_t *fc);
116 
117 
118 void
119 vrna_exp_E_ml_fast_rotate(vrna_mx_pf_aux_ml_t aux_mx);
120 
121 
122 void
123 vrna_exp_E_ml_fast_free(vrna_mx_pf_aux_ml_t aux_mx);
124 
125 
126 const FLT_OR_DBL *
127 vrna_exp_E_ml_fast_qqm(struct vrna_mx_pf_aux_ml_s *aux_mx);
128 
129 
130 const FLT_OR_DBL *
131 vrna_exp_E_ml_fast_qqm1(struct vrna_mx_pf_aux_ml_s *aux_mx);
132 
133 
135 vrna_exp_E_ml_fast(vrna_fold_compound_t *fc,
136  int i,
137  int j,
138  vrna_mx_pf_aux_ml_t aux_mx);
139 
140 
141 /* End partition function interface */
169 int
171  int *i,
172  int *j,
173  int *k,
174  int en,
175  int *component1,
176  int *component2);
177 
178 
179 int
180 vrna_BT_mb_loop_fake(vrna_fold_compound_t *fc,
181  int *u,
182  int *i,
183  int *j,
184  vrna_bp_stack_t *bp_stack,
185  int *stack_count);
186 
187 
188 int
189 vrna_BT_mb_loop_split(vrna_fold_compound_t *fc,
190  int *i,
191  int *j,
192  int *k,
193  int *l,
194  int *component1,
195  int *component2,
196  vrna_bp_stack_t *bp_stack,
197  int *stack_count);
198 
199 
205 #ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY
206 
231 PRIVATE INLINE int
232 E_MLstem(int type,
233  int si1,
234  int sj1,
235  vrna_param_t *P)
236 {
237  int energy = 0;
238 
239  if (si1 >= 0 && sj1 >= 0)
240  energy += P->mismatchM[type][si1][sj1];
241  else if (si1 >= 0)
242  energy += P->dangle5[type][si1];
243  else if (sj1 >= 0)
244  energy += P->dangle3[type][sj1];
245 
246  if (type > 2)
247  energy += P->TerminalAU;
248 
249  energy += P->MLintern[type];
250 
251  return energy;
252 }
253 
254 
261 PRIVATE INLINE FLT_OR_DBL
262 exp_E_MLstem(int type,
263  int si1,
264  int sj1,
265  vrna_exp_param_t *P)
266 {
267  double energy = 1.0;
268 
269  if (si1 >= 0 && sj1 >= 0)
270  energy = P->expmismatchM[type][si1][sj1];
271  else if (si1 >= 0)
272  energy = P->expdangle5[type][si1];
273  else if (sj1 >= 0)
274  energy = P->expdangle3[type][sj1];
275 
276  if (type > 2)
277  energy *= P->expTermAU;
278 
279  energy *= P->expMLintern[type];
280  return (FLT_OR_DBL)energy;
281 }
282 
283 
284 #endif
285 
290 #endif
double FLT_OR_DBL
Typename for floating point number in partition function computations.
Definition: basic.h:43
The most basic data structure required by many functions throughout the RNAlib.
Definition: fold_compound.h:132
The datastructure that contains temperature scaled energy parameters.
Definition: basic.h:57
Various data structures and pre-processor macros.
The data structure that contains temperature scaled Boltzmann weights of the energy parameters...
Definition: basic.h:103
struct vrna_mx_pf_aux_ml_s * vrna_mx_pf_aux_ml_t
Auxiliary helper arrays for fast exterior loop computations.
Definition: multibranch.h:104
int vrna_BT_mb_loop(vrna_fold_compound_t *fc, int *i, int *j, int *k, int en, int *component1, int *component2)
Backtrack the decomposition of a multi branch loop closed by .
int vrna_E_mb_loop_stack(vrna_fold_compound_t *fc, int i, int j)
Evaluate energy of a multi branch helices stacking onto closing pair (i,j)
Base pair stack element.
Definition: basic.h:143
Functions to deal with sets of energy parameters.
The Basic Fold Compound API.
General utility- and helper-functions used throughout the ViennaRNA Package.