RNAlib-2.3.1
multibranch_loops.h
Go to the documentation of this file.
1 #ifndef VIENNA_RNA_PACKAGE_MULTIBRANCH_LOOPS_H
2 #define VIENNA_RNA_PACKAGE_MULTIBRANCH_LOOPS_H
3 
4 #include <ViennaRNA/utils.h>
6 #include <ViennaRNA/params.h>
7 
8 #ifdef __GNUC__
9 # define INLINE inline
10 #else
11 # define INLINE
12 #endif
13 
45 PRIVATE INLINE int E_MLstem( int type,
46  int si1,
47  int sj1,
48  vrna_param_t *P);
49 
56 PRIVATE INLINE FLT_OR_DBL exp_E_MLstem(int type,
57  int si1,
58  int sj1,
59  vrna_exp_param_t *P);
60 
61 
62 
68 int E_mb_loop_stack(int i, int j, vrna_fold_compound_t *vc);
69 
85 int
87  int *i,
88  int *j,
89  int *k,
90  int en,
91  int *component1,
92  int *component2);
93 
94 int
95 vrna_E_mb_loop_fast(vrna_fold_compound_t *vc,
96  int i,
97  int j,
98  int *dmli1,
99  int *dmli2);
100 
101 int
102 E_mb_loop_stack(int i,
103  int j,
105 
106 int
107 E_ml_rightmost_stem(int i,
108  int j,
110 
111 int
112 vrna_E_ml_stems_fast( vrna_fold_compound_t *vc,
113  int i,
114  int j,
115  int *fmi,
116  int *dmli);
117 
118 
120 vrna_exp_E_mb_loop_fast( vrna_fold_compound_t *vc,
121  int i,
122  int j,
123  FLT_OR_DBL *qqm1);
124 
125 
126 
127 /*
128 #################################
129 # Backtracking functions below #
130 #################################
131 */
132 
133 int
134 vrna_BT_mb_loop_fake( vrna_fold_compound_t *vc,
135  int *u,
136  int *i,
137  int *j,
138  vrna_bp_stack_t *bp_stack,
139  int *stack_count);
140 
141 int
142 vrna_BT_mb_loop_split(vrna_fold_compound_t *vc,
143  int *i,
144  int *j,
145  int *k,
146  int *l,
147  int *component1,
148  int *component2,
149  vrna_bp_stack_t *bp_stack,
150  int *stack_count);
151 
152 int
154  int *i,
155  int *j,
156  int *k,
157  int en,
158  int *component1,
159  int *component2);
160 
161 /*
162 ########################################
163 # BEGIN OF INLINE FUNCTION DEFINITIONS #
164 ########################################
165 */
166 
167 
168 PRIVATE INLINE int E_MLstem(int type, int si1, int sj1, vrna_param_t *P){
169  int energy = 0;
170  if(si1 >= 0 && sj1 >= 0){
171  energy += P->mismatchM[type][si1][sj1];
172  }
173  else if (si1 >= 0){
174  energy += P->dangle5[type][si1];
175  }
176  else if (sj1 >= 0){
177  energy += P->dangle3[type][sj1];
178  }
179 
180  if(type > 2)
181  energy += P->TerminalAU;
182 
183  energy += P->MLintern[type];
184 
185  return energy;
186 }
187 
188 
189 
190 PRIVATE INLINE FLT_OR_DBL
191 exp_E_MLstem( int type,
192  int si1,
193  int sj1,
194  vrna_exp_param_t *P){
195 
196  double energy = 1.0;
197  if(si1 >= 0 && sj1 >= 0){
198  energy = P->expmismatchM[type][si1][sj1];
199  }
200  else if(si1 >= 0){
201  energy = P->expdangle5[type][si1];
202  }
203  else if(sj1 >= 0){
204  energy = P->expdangle3[type][sj1];
205  }
206 
207  if(type > 2)
208  energy *= P->expTermAU;
209 
210  energy *= P->expMLintern[type];
211  return (FLT_OR_DBL)energy;
212 }
213 
218 #endif
int E_mb_loop_stack(int i, int j, vrna_fold_compound_t *vc)
Evaluate energy of a multi branch helices stacking onto closing pair (i,j)
double FLT_OR_DBL
Typename for floating point number in partition function computations.
Definition: data_structures.h:48
The most basic data structure required by many functions throughout the RNAlib.
Definition: data_structures.h:454
The datastructure that contains temperature scaled energy parameters.
Definition: params.h:55
General utility- and helper-functions used throughout the ViennaRNA Package.
Various data structures and pre-processor macros.
Functions to deal with sets of energy parameters.
The data structure that contains temperature scaled Boltzmann weights of the energy parameters...
Definition: params.h:99
int vrna_BT_mb_loop(vrna_fold_compound_t *vc, int *i, int *j, int *k, int en, int *component1, int *component2)
Backtrack the decomposition of a multi branch loop closed by .
Base pair stack element.
Definition: data_structures.h:222