RNAlib-2.4.8
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 
7 
8 #ifdef VRNA_WARN_DEPRECATED
9 # if defined(DEPRECATED)
10 # undef DEPRECATED
11 # endif
12 # if defined(__clang__)
13 # define DEPRECATED(func, msg) func __attribute__ ((deprecated("", msg)))
14 # elif defined(__GNUC__)
15 # define DEPRECATED(func, msg) func __attribute__ ((deprecated(msg)))
16 # else
17 # define DEPRECATED(func, msg) func
18 # endif
19 #else
20 # define DEPRECATED(func, msg) func
21 #endif
22 
23 #ifdef __GNUC__
24 # define INLINE inline
25 #else
26 # define INLINE
27 #endif
28 
53 int
55  int i,
56  int j);
57 
58 
59 int
60 vrna_E_mb_loop_fast(vrna_fold_compound_t *fc,
61  int i,
62  int j,
63  int *dmli1,
64  int *dmli2);
65 
66 
67 int
69  int i,
70  int j);
71 
72 
73 int
74 E_ml_rightmost_stem(int i,
75  int j,
77 
78 
79 int
80 vrna_E_ml_stems_fast(vrna_fold_compound_t *fc,
81  int i,
82  int j,
83  int *fmi,
84  int *dmli);
85 
86 
87 /* End basic interface */
103 typedef struct vrna_mx_pf_aux_ml_s *vrna_mx_pf_aux_ml_t;
104 
105 
107 vrna_exp_E_mb_loop_fast(vrna_fold_compound_t *fc,
108  int i,
109  int j,
110  vrna_mx_pf_aux_ml_t aux_mx);
111 
112 
114 vrna_exp_E_ml_fast_init(vrna_fold_compound_t *fc);
115 
116 
117 void
118 vrna_exp_E_ml_fast_rotate(vrna_mx_pf_aux_ml_t aux_mx);
119 
120 
121 void
122 vrna_exp_E_ml_fast_free(vrna_mx_pf_aux_ml_t aux_mx);
123 
124 
125 const FLT_OR_DBL *
126 vrna_exp_E_ml_fast_qqm(struct vrna_mx_pf_aux_ml_s *aux_mx);
127 
128 
129 const FLT_OR_DBL *
130 vrna_exp_E_ml_fast_qqm1(struct vrna_mx_pf_aux_ml_s *aux_mx);
131 
132 
134 vrna_exp_E_ml_fast(vrna_fold_compound_t *fc,
135  int i,
136  int j,
137  vrna_mx_pf_aux_ml_t aux_mx);
138 
139 
140 /* End partition function interface */
168 int
170  int *i,
171  int *j,
172  int *k,
173  int en,
174  int *component1,
175  int *component2);
176 
177 
178 int
179 vrna_BT_mb_loop_fake(vrna_fold_compound_t *fc,
180  int *u,
181  int *i,
182  int *j,
183  vrna_bp_stack_t *bp_stack,
184  int *stack_count);
185 
186 
187 int
188 vrna_BT_mb_loop_split(vrna_fold_compound_t *fc,
189  int *i,
190  int *j,
191  int *k,
192  int *l,
193  int *component1,
194  int *component2,
195  vrna_bp_stack_t *bp_stack,
196  int *stack_count);
197 
198 
204 #ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY
205 
230 PRIVATE INLINE int
231 E_MLstem(int type,
232  int si1,
233  int sj1,
234  vrna_param_t *P)
235 {
236  int energy = 0;
237 
238  if (si1 >= 0 && sj1 >= 0)
239  energy += P->mismatchM[type][si1][sj1];
240  else if (si1 >= 0)
241  energy += P->dangle5[type][si1];
242  else if (sj1 >= 0)
243  energy += P->dangle3[type][sj1];
244 
245  if (type > 2)
246  energy += P->TerminalAU;
247 
248  energy += P->MLintern[type];
249 
250  return energy;
251 }
252 
253 
260 PRIVATE INLINE FLT_OR_DBL
261 exp_E_MLstem(int type,
262  int si1,
263  int sj1,
264  vrna_exp_param_t *P)
265 {
266  double energy = 1.0;
267 
268  if (si1 >= 0 && sj1 >= 0)
269  energy = P->expmismatchM[type][si1][sj1];
270  else if (si1 >= 0)
271  energy = P->expdangle5[type][si1];
272  else if (sj1 >= 0)
273  energy = P->expdangle3[type][sj1];
274 
275  if (type > 2)
276  energy *= P->expTermAU;
277 
278  energy *= P->expMLintern[type];
279  return (FLT_OR_DBL)energy;
280 }
281 
282 
283 #endif
284 
289 #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:56
Various data structures and pre-processor macros.
The data structure that contains temperature scaled Boltzmann weights of the energy parameters...
Definition: basic.h:101
struct vrna_mx_pf_aux_ml_s * vrna_mx_pf_aux_ml_t
Auxiliary helper arrays for fast exterior loop computations.
Definition: multibranch.h:103
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:142
Functions to deal with sets of energy parameters.
General utility- and helper-functions used throughout the ViennaRNA Package.