RNAlib-2.4.0
2Dfold.h
Go to the documentation of this file.
1 #ifndef VIENNA_RNA_PACKAGE_TWO_D_FOLD_H
2 #define VIENNA_RNA_PACKAGE_TWO_D_FOLD_H
3 
4 /* make this interface backward compatible with RNAlib < 2.2.0 */
5 #define VRNA_BACKWARD_COMPAT
6 
7 #ifdef VRNA_WARN_DEPRECATED
8 # ifdef __GNUC__
9 # define DEPRECATED(func) func __attribute__ ((deprecated))
10 # else
11 # define DEPRECATED(func) func
12 # endif
13 #else
14 # define DEPRECATED(func) func
15 #endif
16 
37 #include <ViennaRNA/params.h>
38 
53 typedef struct vrna_sol_TwoD_t {
54  int k;
55  int l;
56  float en;
57  char *s;
59 
60 
90  int distance1,
91  int distance2);
92 
93 
112 char *
114  int k,
115  int l,
116  unsigned int j);
117 
118 
119 #ifdef VRNA_BACKWARD_COMPAT
120 
121 #define TwoDfold_solution vrna_sol_TwoD_t /* restore compatibility of struct rename */
122 
130 typedef struct TwoDfold_vars {
133  char *ptype;
134  char *sequence;
135  short *S, *S1;
136  unsigned int maxD1;
137  unsigned int maxD2;
140  unsigned int *mm1;
141  unsigned int *mm2;
143  int *my_iindx;
145  double temperature;
146 
147  unsigned int *referenceBPs1;
148  unsigned int *referenceBPs2;
149  unsigned int *bpdist;
151  short *reference_pt1;
152  short *reference_pt2;
153  int circ;
154  int dangles;
155  unsigned int seq_length;
156 
157  int ***E_F5;
158  int ***E_F3;
159  int ***E_C;
160  int ***E_M;
161  int ***E_M1;
162  int ***E_M2;
163 
164  int **E_Fc;
165  int **E_FcH;
166  int **E_FcI;
167  int **E_FcM;
168 
169  int **l_min_values;
170  int **l_max_values;
171  int *k_min_values;
172  int *k_max_values;
173 
174  int **l_min_values_m;
175  int **l_max_values_m;
176  int *k_min_values_m;
177  int *k_max_values_m;
178 
179  int **l_min_values_m1;
180  int **l_max_values_m1;
181  int *k_min_values_m1;
182  int *k_max_values_m1;
183 
184  int **l_min_values_f;
185  int **l_max_values_f;
186  int *k_min_values_f;
187  int *k_max_values_f;
188 
189  int **l_min_values_f3;
190  int **l_max_values_f3;
191  int *k_min_values_f3;
192  int *k_max_values_f3;
193 
194  int **l_min_values_m2;
195  int **l_max_values_m2;
196  int *k_min_values_m2;
197  int *k_max_values_m2;
198 
199  int *l_min_values_fc;
200  int *l_max_values_fc;
201  int k_min_values_fc;
202  int k_max_values_fc;
203 
204  int *l_min_values_fcH;
205  int *l_max_values_fcH;
206  int k_min_values_fcH;
207  int k_max_values_fcH;
208 
209  int *l_min_values_fcI;
210  int *l_max_values_fcI;
211  int k_min_values_fcI;
212  int k_max_values_fcI;
213 
214  int *l_min_values_fcM;
215  int *l_max_values_fcM;
216  int k_min_values_fcM;
217  int k_max_values_fcM;
218 
219  /* auxilary arrays for remaining set of coarse graining (k,l) > (k_max, l_max) */
220  int *E_F5_rem;
221  int *E_F3_rem;
222  int *E_C_rem;
223  int *E_M_rem;
224  int *E_M1_rem;
225  int *E_M2_rem;
226 
227  int E_Fc_rem;
228  int E_FcH_rem;
229  int E_FcI_rem;
230  int E_FcM_rem;
231 
232 #ifdef COUNT_STATES
233  unsigned long ***N_F5;
234  unsigned long ***N_C;
235  unsigned long ***N_M;
236  unsigned long ***N_M1;
237 #endif
238 
239  vrna_fold_compound_t *compatibility;
240 } TwoDfold_vars;
241 
260 DEPRECATED(TwoDfold_vars *
261  get_TwoDfold_variables(const char *seq,
262  const char *structure1,
263  const char *structure2,
264  int circ));
265 
276 DEPRECATED(void
277  destroy_TwoDfold_variables(TwoDfold_vars *our_variables));
278 
304 DEPRECATED(TwoDfold_solution *
306  int distance1,
307  int distance2));
308 
329 DEPRECATED(char *TwoDfold_backtrack_f5(unsigned int j,
330  int k,
331  int l,
332  TwoDfold_vars *vars));
333 
337 DEPRECATED(TwoDfold_solution **TwoDfold(TwoDfold_vars *our_variables,
338  int distance1,
339  int distance2));
340 
341 
342 #endif
343 
348 #endif
Solution element returned from vrna_mfe_TwoD()
Definition: 2Dfold.h:53
struct TwoDfold_vars TwoDfold_vars
Variables compound for 2Dfold MFE folding.
unsigned int * mm2
Maximum matching matrix, reference struct 2 disallowed.
Definition: 2Dfold.h:141
Variables compound for 2Dfold MFE folding.
Definition: 2Dfold.h:130
The most basic data structure required by many functions throughout the RNAlib.
Definition: data_structures.h:463
double temperature
Rescale energy parameters to a temperature in degC.
char * TwoDfold_backtrack_f5(unsigned int j, int k, int l, TwoDfold_vars *vars)
Backtrack a minimum free energy structure from a 5&#39; section of specified length.
The datastructure that contains temperature scaled energy parameters.
Definition: params.h:57
unsigned int * mm1
Maximum matching matrix, reference struct 1 disallowed.
Definition: 2Dfold.h:140
void destroy_TwoDfold_variables(TwoDfold_vars *our_variables)
Destroy a TwoDfold_vars datastructure without memory loss.
int l
Distance to second reference.
Definition: 2Dfold.h:55
char * s
MFE representative structure in dot-bracket notation.
Definition: 2Dfold.h:57
char * vrna_backtrack5_TwoD(vrna_fold_compound_t *vc, int k, int l, unsigned int j)
Backtrack a minimum free energy structure from a 5&#39; section of specified length.
int do_backtrack
Flag whether to do backtracing of the structure(s) or not.
Definition: 2Dfold.h:132
Various data structures and pre-processor macros.
unsigned int * referenceBPs2
Matrix containing number of basepairs of reference structure2 in interval [i,j].
Definition: 2Dfold.h:148
unsigned int * referenceBPs1
Matrix containing number of basepairs of reference structure1 in interval [i,j].
Definition: 2Dfold.h:147
Functions to deal with sets of energy parameters.
int * my_iindx
Index for moving in quadratic distancy dimensions.
Definition: 2Dfold.h:143
unsigned int maxD1
Maximum allowed base pair distance to first reference.
Definition: 2Dfold.h:136
vrna_sol_TwoD_t * TwoDfoldList(TwoDfold_vars *vars, int distance1, int distance2)
Compute MFE&#39;s and representative for distance partitioning.
struct vrna_sol_TwoD_t vrna_sol_TwoD_t
Solution element returned from vrna_mfe_TwoD()
int k
Distance to first reference.
Definition: 2Dfold.h:54
vrna_sol_TwoD_t * vrna_mfe_TwoD(vrna_fold_compound_t *vc, int distance1, int distance2)
Compute MFE&#39;s and representative for distance partitioning.
char * ptype
Precomputed array of pair types.
Definition: 2Dfold.h:133
vrna_param_t * P
Precomputed energy parameters and model details.
Definition: 2Dfold.h:131
short * S1
The input sequences in numeric form.
Definition: 2Dfold.h:135
char * sequence
The input sequence.
Definition: 2Dfold.h:134
TwoDfold_vars * get_TwoDfold_variables(const char *seq, const char *structure1, const char *structure2, int circ)
Get a structure of type TwoDfold_vars prefilled with current global settings.
float en
Free energy in kcal/mol.
Definition: 2Dfold.h:56
unsigned int maxD2
Maximum allowed base pair distance to second reference.
Definition: 2Dfold.h:137
int circ
backward compatibility variable.. this does not effect anything
int dangles
Switch the energy model for dangling end contributions (0, 1, 2, 3)
unsigned int * bpdist
Matrix containing base pair distance of reference structure 1 and 2 on interval [i,j].
Definition: 2Dfold.h:149