RNAlib-2.4.14
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
69 E_ml_rightmost_stem(int i,
70  int j,
72 
73 
74 int
75 vrna_E_ml_stems_fast(vrna_fold_compound_t *fc,
76  int i,
77  int j,
78  int *fmi,
79  int *dmli);
80 
81 
82 /* End basic interface */
98 typedef struct vrna_mx_pf_aux_ml_s *vrna_mx_pf_aux_ml_t;
99 
100 
102 vrna_exp_E_mb_loop_fast(vrna_fold_compound_t *fc,
103  int i,
104  int j,
105  vrna_mx_pf_aux_ml_t aux_mx);
106 
107 
109 vrna_exp_E_ml_fast_init(vrna_fold_compound_t *fc);
110 
111 
112 void
113 vrna_exp_E_ml_fast_rotate(vrna_mx_pf_aux_ml_t aux_mx);
114 
115 
116 void
117 vrna_exp_E_ml_fast_free(vrna_mx_pf_aux_ml_t aux_mx);
118 
119 
120 const FLT_OR_DBL *
121 vrna_exp_E_ml_fast_qqm(struct vrna_mx_pf_aux_ml_s *aux_mx);
122 
123 
124 const FLT_OR_DBL *
125 vrna_exp_E_ml_fast_qqm1(struct vrna_mx_pf_aux_ml_s *aux_mx);
126 
127 
129 vrna_exp_E_ml_fast(vrna_fold_compound_t *fc,
130  int i,
131  int j,
132  vrna_mx_pf_aux_ml_t aux_mx);
133 
134 
135 /* End partition function interface */
163 int
165  int *i,
166  int *j,
167  int *k,
168  int en,
169  int *component1,
170  int *component2);
171 
172 
173 int
174 vrna_BT_mb_loop_fake(vrna_fold_compound_t *fc,
175  int *u,
176  int *i,
177  int *j,
178  vrna_bp_stack_t *bp_stack,
179  int *stack_count);
180 
181 
182 int
183 vrna_BT_mb_loop_split(vrna_fold_compound_t *fc,
184  int *i,
185  int *j,
186  int *k,
187  int *l,
188  int *component1,
189  int *component2,
190  vrna_bp_stack_t *bp_stack,
191  int *stack_count);
192 
193 
199 #ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY
200 
225 PRIVATE INLINE int
226 E_MLstem(int type,
227  int si1,
228  int sj1,
229  vrna_param_t *P)
230 {
231  int energy = 0;
232 
233  if (si1 >= 0 && sj1 >= 0)
234  energy += P->mismatchM[type][si1][sj1];
235  else if (si1 >= 0)
236  energy += P->dangle5[type][si1];
237  else if (sj1 >= 0)
238  energy += P->dangle3[type][sj1];
239 
240  if (type > 2)
241  energy += P->TerminalAU;
242 
243  energy += P->MLintern[type];
244 
245  return energy;
246 }
247 
248 
255 PRIVATE INLINE FLT_OR_DBL
256 exp_E_MLstem(int type,
257  int si1,
258  int sj1,
259  vrna_exp_param_t *P)
260 {
261  double energy = 1.0;
262 
263  if (si1 >= 0 && sj1 >= 0)
264  energy = P->expmismatchM[type][si1][sj1];
265  else if (si1 >= 0)
266  energy = P->expdangle5[type][si1];
267  else if (sj1 >= 0)
268  energy = P->expdangle3[type][sj1];
269 
270  if (type > 2)
271  energy *= P->expTermAU;
272 
273  energy *= P->expMLintern[type];
274  return (FLT_OR_DBL)energy;
275 }
276 
277 
278 #endif
279 
284 #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:98
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.