RNAlib-2.2.5
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 /*
95 #################################
96 # BEGIN OF FUNCTION DEFINITIONS #
97 #################################
98 */
99 
100 
101 int
102 E_mb_loop_fast( int i,
103  int j,
105  int *dmli1,
106  int *dmli2);
107 
108 int
109 E_mb_loop_stack(int i,
110  int j,
112 
113 int
114 E_ml_rightmost_stem(int i,
115  int j,
117 
118 
119 int
120 E_ml_stems_fast(int i,
121  int j,
123  int *fmi,
124  int *dmli);
125 
126 PRIVATE INLINE int E_MLstem(int type, int si1, int sj1, vrna_param_t *P){
127  int energy = 0;
128  if(si1 >= 0 && sj1 >= 0){
129  energy += P->mismatchM[type][si1][sj1];
130  }
131  else if (si1 >= 0){
132  energy += P->dangle5[type][si1];
133  }
134  else if (sj1 >= 0){
135  energy += P->dangle3[type][sj1];
136  }
137 
138  if(type > 2)
139  energy += P->TerminalAU;
140 
141  energy += P->MLintern[type];
142 
143  return energy;
144 }
145 
146 
147 
148 PRIVATE INLINE FLT_OR_DBL
149 exp_E_MLstem( int type,
150  int si1,
151  int sj1,
152  vrna_exp_param_t *P){
153 
154  double energy = 1.0;
155  if(si1 >= 0 && sj1 >= 0){
156  energy = P->expmismatchM[type][si1][sj1];
157  }
158  else if(si1 >= 0){
159  energy = P->expdangle5[type][si1];
160  }
161  else if(sj1 >= 0){
162  energy = P->expdangle3[type][sj1];
163  }
164 
165  if(type > 2)
166  energy *= P->expTermAU;
167 
168  energy *= P->expMLintern[type];
169  return (FLT_OR_DBL)energy;
170 }
171 
173 vrna_exp_E_mb_loop_fast( vrna_fold_compound_t *vc,
174  int i,
175  int j,
176  FLT_OR_DBL *qqm1);
177 
178 
179 
180 /*
181 #################################
182 # Backtracking functions below #
183 #################################
184 */
185 
186 int
187 vrna_BT_mb_loop_fake( vrna_fold_compound_t *vc,
188  int *u,
189  int *i,
190  int *j,
191  vrna_bp_stack_t *bp_stack,
192  int *stack_count);
193 
194 int
195 vrna_BT_mb_loop_split(vrna_fold_compound_t *vc,
196  int *i,
197  int *j,
198  int *k,
199  int *l,
200  int *component1,
201  int *component2,
202  vrna_bp_stack_t *bp_stack,
203  int *stack_count);
204 
205 int
207  int *i,
208  int *j,
209  int *k,
210  int en,
211  int *component1,
212  int *component2);
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:44
The most basic data structure required by many functions throughout the RNAlib.
Definition: data_structures.h:397
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 datastructure 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:199