RNAlib-2.6.3
 
Loading...
Searching...
No Matches
2Dpfold.h
Go to the documentation of this file.
1#ifndef VIENNA_RNA_PACKAGE_TWO_D_PF_FOLD_H
2#define VIENNA_RNA_PACKAGE_TWO_D_PF_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
49typedef struct vrna_sol_TwoD_pf_t {
50 int k;
51 int l;
54
79 int maxDistance1,
80 int maxDistance2);
81
82 /* End of group kl_neighborhood_pf */
84
108char *
110 int d1,
111 int d2);
112
113
134char *
136 int d1,
137 int d2,
138 unsigned int length);
139
140 /* End of group kl_neighborhood_stochbt */
144
145#ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY
146
147#define TwoDpfold_solution vrna_sol_TwoD_pf_t /* restore compatibility of struct rename */
148
156typedef struct {
157 unsigned int alloc;
158 char *ptype;
159 char *sequence;
160 short *S, *S1;
161 unsigned int maxD1;
162 unsigned int maxD2;
164 double temperature; /* temperature in last call to scale_pf_params */
165 double init_temp; /* temperature in last call to scale_pf_params */
166 FLT_OR_DBL *scale;
168 vrna_exp_param_t *pf_params; /* holds all [unscaled] pf parameters */
169
170 int *my_iindx;
171 int *jindx;
173 short *reference_pt1;
174 short *reference_pt2;
175
176 unsigned int *referenceBPs1;
177 unsigned int *referenceBPs2;
178 unsigned int *bpdist;
180 unsigned int *mm1;
181 unsigned int *mm2;
183 int circ;
184 int dangles;
185 unsigned int seq_length;
186
187 FLT_OR_DBL ***Q;
188 FLT_OR_DBL ***Q_B;
189 FLT_OR_DBL ***Q_M;
190 FLT_OR_DBL ***Q_M1;
191 FLT_OR_DBL ***Q_M2;
192
193 FLT_OR_DBL **Q_c;
194 FLT_OR_DBL **Q_cH;
195 FLT_OR_DBL **Q_cI;
196 FLT_OR_DBL **Q_cM;
197
198 int **l_min_values;
199 int **l_max_values;
200 int *k_min_values;
201 int *k_max_values;
202
203 int **l_min_values_b;
204 int **l_max_values_b;
205 int *k_min_values_b;
206 int *k_max_values_b;
207
208 int **l_min_values_m;
209 int **l_max_values_m;
210 int *k_min_values_m;
211 int *k_max_values_m;
212
213 int **l_min_values_m1;
214 int **l_max_values_m1;
215 int *k_min_values_m1;
216 int *k_max_values_m1;
217
218 int **l_min_values_m2;
219 int **l_max_values_m2;
220 int *k_min_values_m2;
221 int *k_max_values_m2;
222
223 int *l_min_values_qc;
224 int *l_max_values_qc;
225 int k_min_values_qc;
226 int k_max_values_qc;
227
228 int *l_min_values_qcH;
229 int *l_max_values_qcH;
230 int k_min_values_qcH;
231 int k_max_values_qcH;
232
233 int *l_min_values_qcI;
234 int *l_max_values_qcI;
235 int k_min_values_qcI;
236 int k_max_values_qcI;
237
238 int *l_min_values_qcM;
239 int *l_max_values_qcM;
240 int k_min_values_qcM;
241 int k_max_values_qcM;
242
243 /* auxilary arrays for remaining set of coarse graining (k,l) > (k_max, l_max) */
244 FLT_OR_DBL *Q_rem;
245 FLT_OR_DBL *Q_B_rem;
246 FLT_OR_DBL *Q_M_rem;
247 FLT_OR_DBL *Q_M1_rem;
248 FLT_OR_DBL *Q_M2_rem;
249
250 FLT_OR_DBL Q_c_rem;
251 FLT_OR_DBL Q_cH_rem;
252 FLT_OR_DBL Q_cI_rem;
253 FLT_OR_DBL Q_cM_rem;
254
255 vrna_fold_compound_t *compatibility;
257
276DEPRECATED(TwoDpfold_vars *
277 get_TwoDpfold_variables(const char *seq,
278 const char *structure1,
279 char *structure2,
280 int circ),
281 "Use the new API and vrna_fold_compound_TwoD() instead");
282
296DEPRECATED(void
298 "Use the new API and vrna_fold_compound_free() instead");
299
324DEPRECATED(TwoDpfold_solution *
326 int maxDistance1,
327 int maxDistance2),
328 "Use the new API and vrna_pf_TwoD() instead");
329
351DEPRECATED(char *
353 int d1,
354 int d2),
355 "Use the new API and vrna_pbacktrack_TwoD() instead");
356
381DEPRECATED(char *
383 int d1,
384 int d2,
385 unsigned int length),
386 "Use the new API and vrna_pbacktrack5_TwoD() instead");
387
393DEPRECATED(FLT_OR_DBL **TwoDpfold(TwoDpfold_vars *our_variables,
394 int maxDistance1,
395 int maxDistance2),
396 "Use the new API and vrna_pf_TwoD() instead");
397
403DEPRECATED(FLT_OR_DBL **TwoDpfold_circ(TwoDpfold_vars *our_variables,
404 int maxDistance1,
405 int maxDistance2),
406 "Use the new API and vrna_pf_TwoD() instead");
407
408#endif
409
410#endif
char * TwoDpfold_pbacktrack(TwoDpfold_vars *vars, int d1, int d2)
Sample secondary structure representatives from a set of distance classes according to their Boltzman...
TwoDpfold_vars * get_TwoDpfold_variables(const char *seq, const char *structure1, char *structure2, int circ)
Get a datastructure containing all necessary attributes and global folding switches.
TwoDpfold_solution * TwoDpfoldList(TwoDpfold_vars *vars, int maxDistance1, int maxDistance2)
Compute the partition function for all distance classes.
char * TwoDpfold_pbacktrack5(TwoDpfold_vars *vars, int d1, int d2, unsigned int length)
Sample secondary structure representatives with a specified length from a set of distance classes acc...
void destroy_TwoDpfold_variables(TwoDpfold_vars *vars)
Free all memory occupied by a TwoDpfold_vars datastructure.
Various data structures and pre-processor macros.
The Basic Fold Compound API.
double FLT_OR_DBL
Typename for floating point number in partition function computations.
Definition basic.h:43
The data structure that contains temperature scaled Boltzmann weights of the energy parameters.
Definition basic.h:110
The most basic data structure required by many functions throughout the RNAlib.
Definition fold_compound.h:168
int l
Distance to second reference.
Definition 2Dpfold.h:51
FLT_OR_DBL q
partition function
Definition 2Dpfold.h:52
int k
Distance to first reference.
Definition 2Dpfold.h:50
vrna_sol_TwoD_pf_t * vrna_pf_TwoD(vrna_fold_compound_t *fc, int maxDistance1, int maxDistance2)
Compute the partition function for all distance classes.
Solution element returned from vrna_pf_TwoD()
Definition 2Dpfold.h:49
char * vrna_pbacktrack_TwoD(vrna_fold_compound_t *fc, int d1, int d2)
Sample secondary structure representatives from a set of distance classes according to their Boltzman...
char * vrna_pbacktrack5_TwoD(vrna_fold_compound_t *fc, int d1, int d2, unsigned int length)
Sample secondary structure representatives with a specified length from a set of distance classes acc...
int dangles
Switch the energy model for dangling end contributions (0, 1, 2, 3)
double temperature
Rescale energy parameters to a temperature in degC.
double pf_scale
A scaling factor used by pf_fold() to avoid overflows.
int circ
backward compatibility variable.. this does not effect anything
Functions to deal with sets of energy parameters.
Variables compound for 2Dfold partition function folding.
Definition 2Dpfold.h:156
int * jindx
Index for moving in the triangular matrix qm1.
Definition 2Dpfold.h:171
unsigned int * referenceBPs2
Matrix containing number of basepairs of reference structure2 in interval [i,j].
Definition 2Dpfold.h:177
short * S1
The input sequences in numeric form.
Definition 2Dpfold.h:160
char * sequence
The input sequence
Definition 2Dpfold.h:159
char * ptype
Precomputed array of pair types.
Definition 2Dpfold.h:158
unsigned int maxD1
Maximum allowed base pair distance to first reference.
Definition 2Dpfold.h:161
unsigned int * mm1
Maximum matching matrix, reference struct 1 disallowed.
Definition 2Dpfold.h:180
unsigned int maxD2
Maximum allowed base pair distance to second reference.
Definition 2Dpfold.h:162
int * my_iindx
Index for moving in quadratic distancy dimensions.
Definition 2Dpfold.h:170
unsigned int * bpdist
Matrix containing base pair distance of reference structure 1 and 2 on interval [i,...
Definition 2Dpfold.h:178
unsigned int * referenceBPs1
Matrix containing number of basepairs of reference structure1 in interval [i,j].
Definition 2Dpfold.h:176
unsigned int * mm2
Maximum matching matrix, reference struct 2 disallowed.
Definition 2Dpfold.h:181