RNAlib-2.4.8
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 #ifdef VRNA_WARN_DEPRECATED
5 # if defined(__clang__)
6 # define DEPRECATED(func, msg) func __attribute__ ((deprecated("", msg)))
7 # elif defined(__GNUC__)
8 # define DEPRECATED(func, msg) func __attribute__ ((deprecated(msg)))
9 # else
10 # define DEPRECATED(func, msg) func
11 # endif
12 #else
13 # define DEPRECATED(func, msg) func
14 #endif
15 
36 #include <ViennaRNA/params/basic.h>
37 
52 typedef struct vrna_sol_TwoD_t {
53  int k;
54  int l;
55  float en;
56  char *s;
58 
59 
89  int distance1,
90  int distance2);
91 
92 
111 char *
113  int k,
114  int l,
115  unsigned int j);
116 
117 
118 #ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY
119 
120 #define TwoDfold_solution vrna_sol_TwoD_t /* restore compatibility of struct rename */
121 
129 typedef struct TwoDfold_vars {
132  char *ptype;
133  char *sequence;
134  short *S, *S1;
135  unsigned int maxD1;
136  unsigned int maxD2;
139  unsigned int *mm1;
140  unsigned int *mm2;
142  int *my_iindx;
144  double temperature;
145 
146  unsigned int *referenceBPs1;
147  unsigned int *referenceBPs2;
148  unsigned int *bpdist;
150  short *reference_pt1;
151  short *reference_pt2;
152  int circ;
153  int dangles;
154  unsigned int seq_length;
155 
156  int ***E_F5;
157  int ***E_F3;
158  int ***E_C;
159  int ***E_M;
160  int ***E_M1;
161  int ***E_M2;
162 
163  int **E_Fc;
164  int **E_FcH;
165  int **E_FcI;
166  int **E_FcM;
167 
168  int **l_min_values;
169  int **l_max_values;
170  int *k_min_values;
171  int *k_max_values;
172 
173  int **l_min_values_m;
174  int **l_max_values_m;
175  int *k_min_values_m;
176  int *k_max_values_m;
177 
178  int **l_min_values_m1;
179  int **l_max_values_m1;
180  int *k_min_values_m1;
181  int *k_max_values_m1;
182 
183  int **l_min_values_f;
184  int **l_max_values_f;
185  int *k_min_values_f;
186  int *k_max_values_f;
187 
188  int **l_min_values_f3;
189  int **l_max_values_f3;
190  int *k_min_values_f3;
191  int *k_max_values_f3;
192 
193  int **l_min_values_m2;
194  int **l_max_values_m2;
195  int *k_min_values_m2;
196  int *k_max_values_m2;
197 
198  int *l_min_values_fc;
199  int *l_max_values_fc;
200  int k_min_values_fc;
201  int k_max_values_fc;
202 
203  int *l_min_values_fcH;
204  int *l_max_values_fcH;
205  int k_min_values_fcH;
206  int k_max_values_fcH;
207 
208  int *l_min_values_fcI;
209  int *l_max_values_fcI;
210  int k_min_values_fcI;
211  int k_max_values_fcI;
212 
213  int *l_min_values_fcM;
214  int *l_max_values_fcM;
215  int k_min_values_fcM;
216  int k_max_values_fcM;
217 
218  /* auxilary arrays for remaining set of coarse graining (k,l) > (k_max, l_max) */
219  int *E_F5_rem;
220  int *E_F3_rem;
221  int *E_C_rem;
222  int *E_M_rem;
223  int *E_M1_rem;
224  int *E_M2_rem;
225 
226  int E_Fc_rem;
227  int E_FcH_rem;
228  int E_FcI_rem;
229  int E_FcM_rem;
230 
231 #ifdef COUNT_STATES
232  unsigned long ***N_F5;
233  unsigned long ***N_C;
234  unsigned long ***N_M;
235  unsigned long ***N_M1;
236 #endif
237 
238  vrna_fold_compound_t *compatibility;
239 } TwoDfold_vars;
240 
259 DEPRECATED(TwoDfold_vars *
260  get_TwoDfold_variables(const char *seq,
261  const char *structure1,
262  const char *structure2,
263  int circ),
264  "Use the new API and corresponding functions vrna_fold_compound_TwoD(), etc. instead");
265 
276 DEPRECATED(void
278  "Use the new API and vrna_fold_compound_free() instead");
279 
305 DEPRECATED(TwoDfold_solution *
307  int distance1,
308  int distance2),
309  "Use the new API and vrna_mfe_TwoD() instead");
310 
331 DEPRECATED(char *TwoDfold_backtrack_f5(unsigned int j,
332  int k,
333  int l,
334  TwoDfold_vars *vars),
335  "Use the new API and vrna_backtrack5_TwoD() instead");
336 
340 DEPRECATED(TwoDfold_solution **TwoDfold(TwoDfold_vars *our_variables,
341  int distance1,
342  int distance2),
343  "Use the new API and vrna_mfe_TwoD() instead");
344 
345 
346 #endif
347 
352 #endif
Solution element returned from vrna_mfe_TwoD()
Definition: 2Dfold.h:52
struct TwoDfold_vars TwoDfold_vars
Variables compound for 2Dfold MFE folding.
unsigned int * mm2
Maximum matching matrix, reference struct 2 disallowed.
Definition: 2Dfold.h:140
Variables compound for 2Dfold MFE folding.
Definition: 2Dfold.h:129
The most basic data structure required by many functions throughout the RNAlib.
Definition: fold_compound.h:132
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: basic.h:56
unsigned int * mm1
Maximum matching matrix, reference struct 1 disallowed.
Definition: 2Dfold.h:139
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:54
char * s
MFE representative structure in dot-bracket notation.
Definition: 2Dfold.h:56
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.
Various data structures and pre-processor macros.
int do_backtrack
Flag whether to do backtracing of the structure(s) or not.
Definition: 2Dfold.h:131
unsigned int * referenceBPs2
Matrix containing number of basepairs of reference structure2 in interval [i,j].
Definition: 2Dfold.h:147
unsigned int * referenceBPs1
Matrix containing number of basepairs of reference structure1 in interval [i,j].
Definition: 2Dfold.h:146
int * my_iindx
Index for moving in quadratic distancy dimensions.
Definition: 2Dfold.h:142
unsigned int maxD1
Maximum allowed base pair distance to first reference.
Definition: 2Dfold.h:135
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:53
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:132
vrna_param_t * P
Precomputed energy parameters and model details.
Definition: 2Dfold.h:130
char * sequence
The input sequence.
Definition: 2Dfold.h:133
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.
Functions to deal with sets of energy parameters.
float en
Free energy in kcal/mol.
Definition: 2Dfold.h:55
unsigned int maxD2
Maximum allowed base pair distance to second reference.
Definition: 2Dfold.h:136
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:148