dp_matrices.h
Go to the documentation of this file.
#ifndef VIENNA_RNA_PACKAGE_DP_MATRICES_H
#define VIENNA_RNA_PACKAGE_DP_MATRICES_H
typedef struct vrna_mx_mfe_s vrna_mx_mfe_t;
typedef struct vrna_mx_pf_s vrna_mx_pf_t;
#include <ViennaRNA/data_structures.h>
typedef enum {
VRNA_MX_DEFAULT,
VRNA_MX_WINDOW,
VRNA_MX_2DFOLD
} vrna_mx_type_e;
struct vrna_mx_mfe_s {
vrna_mx_type_e type;
unsigned int length;
#if ( __STDC_VERSION__ >= 201112L ) || ( __cplusplus >= 201103L )
/* C11 support for unnamed unions/structs */
union {
struct {
#endif
int *c;
int *f5;
int *f3;
int *fc;
int *fML;
int *fM1;
int *fM2;
int *ggg;
int Fc;
int FcH;
int FcI;
int FcM;
#if ( __STDC_VERSION__ >= 201112L ) || ( __cplusplus >= 201103L )
/* C11 support for unnamed unions/structs */
};
struct {
#endif
int **c_local;
int *f3_local;
int **fML_local;
int **ggg_local;
#if ( __STDC_VERSION__ >= 201112L ) || ( __cplusplus >= 201103L )
/* C11 support for unnamed unions/structs */
};
struct {
#endif
int ***E_F5;
int **l_min_F5;
int **l_max_F5;
int *k_min_F5;
int *k_max_F5;
int ***E_F3;
int **l_min_F3;
int **l_max_F3;
int *k_min_F3;
int *k_max_F3;
int ***E_C;
int **l_min_C;
int **l_max_C;
int *k_min_C;
int *k_max_C;
int ***E_M;
int **l_min_M;
int **l_max_M;
int *k_min_M;
int *k_max_M;
int ***E_M1;
int **l_min_M1;
int **l_max_M1;
int *k_min_M1;
int *k_max_M1;
int ***E_M2;
int **l_min_M2;
int **l_max_M2;
int *k_min_M2;
int *k_max_M2;
int **E_Fc;
int *l_min_Fc;
int *l_max_Fc;
int k_min_Fc;
int k_max_Fc;
int **E_FcH;
int *l_min_FcH;
int *l_max_FcH;
int k_min_FcH;
int k_max_FcH;
int **E_FcI;
int *l_min_FcI;
int *l_max_FcI;
int k_min_FcI;
int k_max_FcI;
int **E_FcM;
int *l_min_FcM;
int *l_max_FcM;
int k_min_FcM;
int k_max_FcM;
/* auxilary arrays for remaining set of coarse graining (k,l) > (k_max, l_max) */
int *E_F5_rem;
int *E_F3_rem;
int *E_C_rem;
int *E_M_rem;
int *E_M1_rem;
int *E_M2_rem;
int E_Fc_rem;
int E_FcH_rem;
int E_FcI_rem;
int E_FcM_rem;
#ifdef COUNT_STATES
unsigned long ***N_F5;
unsigned long ***N_C;
unsigned long ***N_M;
unsigned long ***N_M1;
#endif
#if ( __STDC_VERSION__ >= 201112L ) || ( __cplusplus >= 201103L )
/* C11 support for unnamed unions/structs */
};
};
#endif
};
struct vrna_mx_pf_s {
vrna_mx_type_e type;
unsigned int length;
FLT_OR_DBL *scale;
FLT_OR_DBL *expMLbase;
#if ( __STDC_VERSION__ >= 201112L ) || ( __cplusplus >= 201103L )
/* C11 support for unnamed unions/structs */
union {
struct {
#endif
FLT_OR_DBL *q;
FLT_OR_DBL *qb;
FLT_OR_DBL *qm;
FLT_OR_DBL *qm1;
FLT_OR_DBL *probs;
FLT_OR_DBL *q1k;
FLT_OR_DBL *qln;
FLT_OR_DBL *G;
FLT_OR_DBL qo;
FLT_OR_DBL *qm2;
FLT_OR_DBL qho;
FLT_OR_DBL qio;
FLT_OR_DBL qmo;
#if ( __STDC_VERSION__ >= 201112L ) || ( __cplusplus >= 201103L )
/* C11 support for unnamed unions/structs */
};
struct {
#endif
FLT_OR_DBL ***Q;
int **l_min_Q;
int **l_max_Q;
int *k_min_Q;
int *k_max_Q;
FLT_OR_DBL ***Q_B;
int **l_min_Q_B;
int **l_max_Q_B;
int *k_min_Q_B;
int *k_max_Q_B;
FLT_OR_DBL ***Q_M;
int **l_min_Q_M;
int **l_max_Q_M;
int *k_min_Q_M;
int *k_max_Q_M;
FLT_OR_DBL ***Q_M1;
int **l_min_Q_M1;
int **l_max_Q_M1;
int *k_min_Q_M1;
int *k_max_Q_M1;
FLT_OR_DBL ***Q_M2;
int **l_min_Q_M2;
int **l_max_Q_M2;
int *k_min_Q_M2;
int *k_max_Q_M2;
FLT_OR_DBL **Q_c;
int *l_min_Q_c;
int *l_max_Q_c;
int k_min_Q_c;
int k_max_Q_c;
FLT_OR_DBL **Q_cH;
int *l_min_Q_cH;
int *l_max_Q_cH;
int k_min_Q_cH;
int k_max_Q_cH;
FLT_OR_DBL **Q_cI;
int *l_min_Q_cI;
int *l_max_Q_cI;
int k_min_Q_cI;
int k_max_Q_cI;
FLT_OR_DBL **Q_cM;
int *l_min_Q_cM;
int *l_max_Q_cM;
int k_min_Q_cM;
int k_max_Q_cM;
/* auxilary arrays for remaining set of coarse graining (k,l) > (k_max, l_max) */
FLT_OR_DBL *Q_rem;
FLT_OR_DBL *Q_B_rem;
FLT_OR_DBL *Q_M_rem;
FLT_OR_DBL *Q_M1_rem;
FLT_OR_DBL *Q_M2_rem;
FLT_OR_DBL Q_c_rem;
FLT_OR_DBL Q_cH_rem;
FLT_OR_DBL Q_cI_rem;
FLT_OR_DBL Q_cM_rem;
#if ( __STDC_VERSION__ >= 201112L ) || ( __cplusplus >= 201103L )
/* C11 support for unnamed unions/structs */
};
};
#endif
};
int
vrna_mx_add(vrna_fold_compound_t *vc,
vrna_mx_type_e type,
unsigned int options);
int
vrna_mx_mfe_add(vrna_fold_compound_t *vc,
vrna_mx_type_e mx_type,
unsigned int options);
int
vrna_mx_pf_add( vrna_fold_compound_t *vc,
vrna_mx_type_e mx_type,
unsigned int options);
void
vrna_mx_mfe_free(vrna_fold_compound_t *vc);
void
vrna_mx_pf_free(vrna_fold_compound_t *vc);
#endif
vrna_mx_mfe_s::fc
int * fc
Energy from i to cutpoint (and vice versa if i>cut)
Definition: dp_matrices.h:62
vrna_mx_add
int vrna_mx_add(vrna_fold_compound_t *vc, vrna_mx_type_e type, unsigned int options)
Add Dynamic Programming (DP) matrices (allocate memory)
vrna_mx_mfe_s
Minimum Free Energy (MFE) Dynamic Programming (DP) matrices data structure required within the vrna_f...
Definition: dp_matrices.h:39
vrna_mx_mfe_s::fM1
int * fM1
Second ML array, only for unique multibrnach loop decomposition.
Definition: dp_matrices.h:64
vrna_mx_mfe_s::fML
int * fML
Multi-loop auxiliary energy array.
Definition: dp_matrices.h:63
FLT_OR_DBL
double FLT_OR_DBL
Typename for floating point number in partition function computations.
Definition: data_structures.h:39
vrna_fc_s
The most basic data structure required by many functions throughout the RNAlib.
Definition: data_structures.h:390
vrna_mx_mfe_s::length
unsigned int length
Length of the sequence, therefore an indicator of the size of the DP matrices.
Definition: dp_matrices.h:44
vrna_mx_mfe_s::fM2
int * fM2
Energy for a multibranch loop region with exactly two stems, extending to 3&#39; end. ...
Definition: dp_matrices.h:65
vrna_mx_mfe_free
void vrna_mx_mfe_free(vrna_fold_compound_t *vc)
Free memory occupied by the Minimum Free Energy (MFE) Dynamic Programming (DP) matrices.
VRNA_MX_WINDOW
DP matrices suitable for local structure prediction using window approach.
Definition: dp_matrices.h:27
data_structures.h
vrna_mx_mfe_s::ggg_local
int ** ggg_local
Energies of g-quadruplexes.
Definition: dp_matrices.h:88
vrna_mx_pf_free
void vrna_mx_pf_free(vrna_fold_compound_t *vc)
Free memory occupied by the Partition Function (PF) Dynamic Programming (DP) matrices.
vrna_mx_mfe_s::c_local
int ** c_local
Energy array, given that i-j pair.
Definition: dp_matrices.h:85
VRNA_MX_DEFAULT
Default DP matrices.
Definition: dp_matrices.h:26
vrna_mx_mfe_s::f3
int * f3
Energy of 3&#39; end.
Definition: dp_matrices.h:61
VRNA_MX_2DFOLD
DP matrices suitable for distance class partitioned structure prediction.
Definition: dp_matrices.h:31
vrna_mx_mfe_s::f5
int * f5
Energy of 5&#39; end.
Definition: dp_matrices.h:60
vrna_mx_mfe_s::Fc
int Fc
Minimum Free Energy of entire circular RNA.
Definition: dp_matrices.h:67
vrna_mx_type_e
vrna_mx_type_e
An enumerator that is used to specify the type of a polymorphic Dynamic Programming (DP) matrix data ...
Definition: dp_matrices.h:25
vrna_mx_mfe_s::c
int * c
Energy array, given that i-j pair.
Definition: dp_matrices.h:59
vrna_mx_mfe_s::fML_local
int ** fML_local
Multi-loop auxiliary energy array.
Definition: dp_matrices.h:87
vrna_mx_mfe_s::f3_local
int * f3_local
Energy of 5&#39; end.
Definition: dp_matrices.h:86
vrna_mx_mfe_s::ggg
int * ggg
Energies of g-quadruplexes.
Definition: dp_matrices.h:66
vrna_mx_pf_s
Partition function (PF) Dynamic Programming (DP) matrices data structure required within the vrna_fol...
Definition: dp_matrices.h:197