RNAlib-2.2.7
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 
42 PRIVATE INLINE int E_MLstem( int type,
43  int si1,
44  int sj1,
45  vrna_param_t *P);
46 
53 PRIVATE INLINE FLT_OR_DBL exp_E_MLstem(int type,
54  int si1,
55  int sj1,
56  vrna_exp_param_t *P);
57 
58 
59 
65 int E_mb_loop_stack(int i, int j, vrna_fold_compound_t *vc);
66 
82 int
84  int *i,
85  int *j,
86  int *k,
87  int en,
88  int *component1,
89  int *component2);
90 
91 /*
92 #################################
93 # BEGIN OF FUNCTION DEFINITIONS #
94 #################################
95 */
96 
97 
98 int
99 E_mb_loop_fast( int i,
100  int j,
102  int *dmli1,
103  int *dmli2);
104 
105 int
106 E_mb_loop_stack(int i,
107  int j,
109 
110 int
111 E_ml_rightmost_stem(int i,
112  int j,
114 
115 
116 int
117 E_ml_stems_fast(int i,
118  int j,
120  int *fmi,
121  int *dmli);
122 
123 PRIVATE INLINE int E_MLstem(int type, int si1, int sj1, vrna_param_t *P){
124  int energy = 0;
125  if(si1 >= 0 && sj1 >= 0){
126  energy += P->mismatchM[type][si1][sj1];
127  }
128  else if (si1 >= 0){
129  energy += P->dangle5[type][si1];
130  }
131  else if (sj1 >= 0){
132  energy += P->dangle3[type][sj1];
133  }
134 
135  if(type > 2)
136  energy += P->TerminalAU;
137 
138  energy += P->MLintern[type];
139 
140  return energy;
141 }
142 
143 
144 
145 PRIVATE INLINE FLT_OR_DBL
146 exp_E_MLstem( int type,
147  int si1,
148  int sj1,
149  vrna_exp_param_t *P){
150 
151  double energy = 1.0;
152  if(si1 >= 0 && sj1 >= 0){
153  energy = P->expmismatchM[type][si1][sj1];
154  }
155  else if(si1 >= 0){
156  energy = P->expdangle5[type][si1];
157  }
158  else if(sj1 >= 0){
159  energy = P->expdangle3[type][sj1];
160  }
161 
162  if(type > 2)
163  energy *= P->expTermAU;
164 
165  energy *= P->expMLintern[type];
166  return (FLT_OR_DBL)energy;
167 }
168 
170 vrna_exp_E_mb_loop_fast( vrna_fold_compound_t *vc,
171  int i,
172  int j,
173  FLT_OR_DBL *qqm1);
174 
175 
176 
177 /*
178 #################################
179 # Backtracking functions below #
180 #################################
181 */
182 
183 int
184 vrna_BT_mb_loop_fake( vrna_fold_compound_t *vc,
185  int *u,
186  int *i,
187  int *j,
188  vrna_bp_stack_t *bp_stack,
189  int *stack_count);
190 
191 int
192 vrna_BT_mb_loop_split(vrna_fold_compound_t *vc,
193  int *i,
194  int *j,
195  int *k,
196  int *l,
197  int *component1,
198  int *component2,
199  vrna_bp_stack_t *bp_stack,
200  int *stack_count);
201 
202 int
204  int *i,
205  int *j,
206  int *k,
207  int en,
208  int *component1,
209  int *component2);
210 
215 #endif
double FLT_OR_DBL
Typename for floating point number in partition function computations.
Definition: data_structures.h:39
The most basic data structure required by many functions throughout the RNAlib.
Definition: data_structures.h:390
The datastructure that contains temperature scaled energy parameters.
Definition: params.h:50
General utility- and helper-functions used throughout the ViennaRNA Package.
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)
The datastructure that contains temperature scaled Boltzmann weights of the energy parameters...
Definition: params.h:94
Base pair stack element.
Definition: data_structures.h:192
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 .