RNAlib-2.5.0
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(vrna_mx_pf_aux_ml_t aux_mx);
122 
123 
124 const FLT_OR_DBL *
125 vrna_exp_E_ml_fast_qqm1(vrna_mx_pf_aux_ml_t 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_split(vrna_fold_compound_t *fc,
175  int *i,
176  int *j,
177  int *k,
178  int *l,
179  int *component1,
180  int *component2,
181  vrna_bp_stack_t *bp_stack,
182  int *stack_count);
183 
184 
190 #ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY
191 
216 PRIVATE INLINE int
217 E_MLstem(int type,
218  int si1,
219  int sj1,
220  vrna_param_t *P)
221 {
222  int energy = 0;
223 
224  if (si1 >= 0 && sj1 >= 0)
225  energy += P->mismatchM[type][si1][sj1];
226  else if (si1 >= 0)
227  energy += P->dangle5[type][si1];
228  else if (sj1 >= 0)
229  energy += P->dangle3[type][sj1];
230 
231  if (type > 2)
232  energy += P->TerminalAU;
233 
234  energy += P->MLintern[type];
235 
236  return energy;
237 }
238 
239 
246 PRIVATE INLINE FLT_OR_DBL
247 exp_E_MLstem(int type,
248  int si1,
249  int sj1,
250  vrna_exp_param_t *P)
251 {
252  double energy = 1.0;
253 
254  if (si1 >= 0 && sj1 >= 0)
255  energy = P->expmismatchM[type][si1][sj1];
256  else if (si1 >= 0)
257  energy = P->expdangle5[type][si1];
258  else if (sj1 >= 0)
259  energy = P->expdangle3[type][sj1];
260 
261  if (type > 2)
262  energy *= P->expTermAU;
263 
264  energy *= P->expMLintern[type];
265  return (FLT_OR_DBL)energy;
266 }
267 
268 
269 #endif
270 
275 #endif
Various data structures and pre-processor macros.
The Basic Fold Compound API.
double FLT_OR_DBL
Typename for floating point number in partition function computations.
Definition: basic.h:43
Base pair stack element.
Definition: basic.h:143
The data structure that contains temperature scaled Boltzmann weights of the energy parameters.
Definition: basic.h:103
The datastructure that contains temperature scaled energy parameters.
Definition: basic.h:57
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_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)
The most basic data structure required by many functions throughout the RNAlib.
Definition: fold_compound.h:137
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 .
Functions to deal with sets of energy parameters.
General utility- and helper-functions used throughout the ViennaRNA Package.