1 #ifndef __VIENNA_RNA_PACKAGE_DATA_STRUCTURES_H__
2 #define __VIENNA_RNA_PACKAGE_DATA_STRUCTURES_H__
16 #define FLT_OR_DBL double
18 #define FLT_OR_DBL float
30 #define VRNA_GQUAD_MAX_STACK_SIZE 7
31 #define VRNA_GQUAD_MIN_STACK_SIZE 2
32 #define VRNA_GQUAD_MAX_LINKER_LENGTH 15
33 #define VRNA_GQUAD_MIN_LINKER_LENGTH 1
34 #define VRNA_GQUAD_MIN_BOX_SIZE ((4*VRNA_GQUAD_MIN_STACK_SIZE)+(3*VRNA_GQUAD_MIN_LINKER_LENGTH))
35 #define VRNA_GQUAD_MAX_BOX_SIZE ((4*VRNA_GQUAD_MAX_STACK_SIZE)+(3*VRNA_GQUAD_MAX_LINKER_LENGTH))
41 #define VRNA_VC_TYPE_SINGLE 1
46 #define VRNA_VC_TYPE_ALIGNMENT 2
50 #define ALLOC_NOTHING 0
57 #define ALLOC_PROBS 256
60 #define ALLOC_CIRC 1024
61 #define ALLOC_HYBRID 2048
62 #define ALLOC_UNIQ 4096
65 #define ALLOC_MFE_DEFAULT (ALLOC_F5 | ALLOC_C | ALLOC_FML)
67 #define ALLOC_PF_WO_PROBS (ALLOC_F | ALLOC_C | ALLOC_FML)
68 #define ALLOC_PF_DEFAULT (ALLOC_PF_WO_PROBS | ALLOC_PROBS | ALLOC_AUX)
73 #define VRNA_OPTION_MFE 1
75 #define VRNA_OPTION_PF 2
77 #define VRNA_OPTION_HYBRID 4
138 unsigned int allocated;
155 unsigned int allocated;
173 FLT_OR_DBL *expMLbase;
186 int mismatchExt[
NBPAIRS+1][5][5];
187 int mismatchI[
NBPAIRS+1][5][5];
188 int mismatch1nI[
NBPAIRS+1][5][5];
189 int mismatch23I[
NBPAIRS+1][5][5];
190 int mismatchH[
NBPAIRS+1][5][5];
191 int mismatchM[
NBPAIRS+1][5][5];
204 int Tetraloop_E[200];
205 char Tetraloops[1401];
209 char Hexaloops[1801];
213 int gquad [VRNA_GQUAD_MAX_STACK_SIZE + 1]
214 [3*VRNA_GQUAD_MAX_LINKER_LENGTH + 1];
228 double exphairpin[31];
231 double expmismatchExt[
NBPAIRS+1][5][5];
232 double expmismatchI[
NBPAIRS+1][5][5];
233 double expmismatch23I[
NBPAIRS+1][5][5];
234 double expmismatch1nI[
NBPAIRS+1][5][5];
235 double expmismatchH[
NBPAIRS+1][5][5];
236 double expmismatchM[
NBPAIRS+1][5][5];
237 double expdangle5[
NBPAIRS+1][5];
238 double expdangle3[
NBPAIRS+1][5];
248 double expDuplexInit;
252 char Tetraloops[1401];
253 double expTriloop[40];
255 char Hexaloops[1801];
257 double expMultipleCA;
258 double expMultipleCB;
259 double expgquad[VRNA_GQUAD_MAX_STACK_SIZE + 1]
260 [3*VRNA_GQUAD_MAX_LINKER_LENGTH + 1];
343 FLT_OR_DBL (*exp_f)(int,
369 short *sequence_encoding;
370 short *sequence_encoding2;
394 unsigned short **a2s;
518 typedef struct move {
528 typedef struct intermediate {
538 typedef struct path {
611 double energy_backtrack;
612 double opening_backtrack_x;
613 double opening_backtrack_y;
633 typedef struct node {
658 float fullStemEnergy;
750 short *reference_pt1;
751 short *reference_pt2;
754 unsigned int seq_length;
773 int **l_min_values_m;
774 int **l_max_values_m;
778 int **l_min_values_m1;
779 int **l_max_values_m1;
780 int *k_min_values_m1;
781 int *k_max_values_m1;
783 int **l_min_values_f;
784 int **l_max_values_f;
788 int **l_min_values_f3;
789 int **l_max_values_f3;
790 int *k_min_values_f3;
791 int *k_max_values_f3;
793 int **l_min_values_m2;
794 int **l_max_values_m2;
795 int *k_min_values_m2;
796 int *k_max_values_m2;
798 int *l_min_values_fc;
799 int *l_max_values_fc;
803 int *l_min_values_fcH;
804 int *l_max_values_fcH;
805 int k_min_values_fcH;
806 int k_max_values_fcH;
808 int *l_min_values_fcI;
809 int *l_max_values_fcI;
810 int k_min_values_fcI;
811 int k_max_values_fcI;
813 int *l_min_values_fcM;
814 int *l_max_values_fcM;
815 int k_min_values_fcM;
816 int k_max_values_fcM;
832 unsigned long ***N_F5;
833 unsigned long ***N_C;
834 unsigned long ***N_M;
835 unsigned long ***N_M1;
881 short *reference_pt1;
882 short *reference_pt2;
893 unsigned int seq_length;
911 int **l_min_values_b;
912 int **l_max_values_b;
916 int **l_min_values_m;
917 int **l_max_values_m;
921 int **l_min_values_m1;
922 int **l_max_values_m1;
923 int *k_min_values_m1;
924 int *k_max_values_m1;
926 int **l_min_values_m2;
927 int **l_max_values_m2;
928 int *k_min_values_m2;
929 int *k_max_values_m2;
931 int *l_min_values_qc;
932 int *l_max_values_qc;
936 int *l_min_values_qcH;
937 int *l_max_values_qcH;
938 int k_min_values_qcH;
939 int k_max_values_qcH;
941 int *l_min_values_qcI;
942 int *l_max_values_qcI;
943 int k_min_values_qcI;
944 int k_max_values_qcI;
946 int *l_min_values_qcM;
947 int *l_max_values_qcM;
948 int k_min_values_qcM;
949 int k_max_values_qcM;
955 FLT_OR_DBL *Q_M1_rem;
956 FLT_OR_DBL *Q_M2_rem;
974 unsigned int options);
978 unsigned int options);
Definition: data_structures.h:154
int l
Distance to second reference.
Definition: data_structures.h:719
Definition: data_structures.h:633
int * up_hp
A linear array that holds the number of allowed unpaired nucleotides in a hairpin loop...
Definition: data_structures.h:307
double temperature
Temperature used for loop contribution scaling.
Definition: data_structures.h:216
double temperature
Temperature used for loop contribution scaling.
Definition: data_structures.h:265
double FAB
all states with DuplexInit correction
Definition: data_structures.h:459
The soft constraints data structure.
Definition: data_structures.h:323
int w
longest unpaired region
Definition: data_structures.h:558
int dangles
Switch the energy model for dangling end contributions (0, 1, 2, 3)
unsigned int * mm1
Maximum matching matrix, reference struct 1 disallowed.
Definition: data_structures.h:739
double * exp_en_stack
Boltzmann weighted pseudo energy contribution per nucleotide involved in a stack. ...
Definition: data_structures.h:331
unsigned int maxD2
Maximum allowed base pair distance to second reference.
Definition: data_structures.h:736
int cutpoint
The position of the (cofold) cutpoint within the provided sequence. If there is no cutpoint...
Definition: data_structures.h:363
unsigned j
nucleotide position j
Definition: data_structures.h:501
char ** header
header line
Definition: data_structures.h:584
int contribs
[-c "SHIME"]
Definition: data_structures.h:583
unsigned int * referenceBPs1
Matrix containing number of basepairs of reference structure1 in interval [i,j].
Definition: data_structures.h:746
#define MAXLOOP
Definition: energy_const.h:28
Base pair with associated energy.
Definition: data_structures.h:130
float en
Free energy in kcal/mol.
Definition: data_structures.h:720
double ** boltzmann_factors
Boltzmann Factors of the energy contributions for unpaired sequence stretches.
Definition: data_structures.h:327
double * constraints
Backup storage for energy contributions of single nucleotides.
Definition: data_structures.h:324
short * S1
The input sequences in numeric form.
Definition: data_structures.h:734
Definition: data_structures.h:456
int * up_ml
A linear array that holds the number of allowed unpaired nucleotides in a multi branched loop...
Definition: data_structures.h:313
int * my_iindx
Index for moving in quadratic distancy dimensions.
Definition: data_structures.h:742
int * en_stack
Pseudo Energy contribution per base pair involved in a stack.
Definition: data_structures.h:330
paramT * P
Precomputed energy parameters and model details.
Definition: data_structures.h:730
double FcAB
true hybrid states only
Definition: data_structures.h:460
char * ptype
Precomputed array of pair types.
Definition: data_structures.h:866
The model details data structure and its corresponding modifiers.
Solution element returned from TwoDpfoldList.
Definition: data_structures.h:851
Definition: data_structures.h:518
double * Gi
free energies of interaction
Definition: data_structures.h:566
float energy
Free Energy of structure in kcal/mol.
Definition: data_structures.h:443
The datastructure that contains temperature scaled energy parameters.
Definition: data_structures.h:180
unsigned int * referenceBPs1
Matrix containing number of basepairs of reference structure1 in interval [i,j].
Definition: data_structures.h:884
float p
Probability.
Definition: data_structures.h:502
The hard constraints data structure.
Definition: data_structures.h:300
unsigned int maxD2
Maximum allowed base pair distance to second reference.
Definition: data_structures.h:870
Definition: data_structures.h:642
int * my_iindx
Index for moving in quadratic distancy dimensions.
Definition: data_structures.h:878
model_detailsT model_details
Model details to be used in the recursions.
Definition: data_structures.h:218
double FB
monomer B
Definition: data_structures.h:462
char * s
MFE representative structure in dot-bracket notation.
Definition: data_structures.h:721
The datastructure that contains temperature scaled Boltzmann weights of the energy parameters...
Definition: data_structures.h:225
char * ptype
Precomputed array of pair types.
Definition: data_structures.h:732
int length
length of longer sequence
Definition: data_structures.h:574
Collection of all free_energy of beeing unpaired values for output.
Definition: data_structures.h:580
int * up_int
A linear array that holds the number of allowed unpaired nucleotides in an interior loop...
Definition: data_structures.h:310
int * en_basepair
Energy contribution for base pairs.
Definition: data_structures.h:326
double Gikjl
full free energy for interaction between [k,i] k
Definition: data_structures.h:567
Definition: data_structures.h:676
double ** I
interior loops
Definition: data_structures.h:554
Definition: data_structures.h:359
Solution element from subopt.c.
Definition: data_structures.h:442
double ** M
multi loops
Definition: data_structures.h:555
constraints for cofolding
Definition: data_structures.h:591
Definition: data_structures.h:605
A base pair info structure.
Definition: data_structures.h:499
this datastructure is used as input parameter in functions of PS_dot.h and others ...
Definition: data_structures.h:94
double q
partition function
Definition: data_structures.h:854
double pf_scale
A scaling factor used by pf_fold() to avoid overflows.
unsigned int * bpdist
Matrix containing base pair distance of reference structure 1 and 2 on interval [i,j].
Definition: data_structures.h:886
Definition: data_structures.h:137
double ** H
hairpin loops
Definition: data_structures.h:553
Variables compound for 2Dfold MFE folding.
Definition: data_structures.h:729
double F0AB
Null model without DuplexInit.
Definition: data_structures.h:458
int k
k
Definition: data_structures.h:571
char * sequence
The input sequence.
Definition: data_structures.h:733
double A0
start concentration A
Definition: data_structures.h:469
int * up_ext
A linear array that holds the number of allowed unpaired nucleotides in an exterior loop...
Definition: data_structures.h:304
void * data
A pointer to the data object necessary for for pseudo energy contribution functions.
Definition: data_structures.h:353
unsigned int maxD1
Maximum allowed base pair distance to first reference.
Definition: data_structures.h:869
Sequence interval stack element used in subopt.c.
Definition: data_structures.h:433
Definition: data_structures.h:564
int l
j
Definition: data_structures.h:573
double ABc
End concentration AB.
Definition: data_structures.h:471
double alpha
Scaling factor for the thermodynamic temperature.
Definition: data_structures.h:266
char * ptype
Pair type array.
Definition: data_structures.h:371
int circ
backward compatibility variable.. this does not effect anything
double ** u_values
(the -u values * [-c "SHIME"]) * seq len
Definition: data_structures.h:585
Base pair.
Definition: data_structures.h:122
int l
Distance to second reference.
Definition: data_structures.h:853
unsigned int type
The type of the fold_compound.
Definition: data_structures.h:361
Stack of partial structures for backtracking.
Definition: data_structures.h:113
double ** E
exterior loop
Definition: data_structures.h:556
int len
sequence length
Definition: data_structures.h:581
int gquad
Allow G-quadruplex formation.
char * matrix
Upper triangular matrix encoding where a base pair or unpaired nucleotide is allowed.
Definition: data_structures.h:301
int k
Distance to first reference.
Definition: data_structures.h:852
#define NBPAIRS
Definition: energy_const.h:24
unsigned int * mm2
Maximum matching matrix, reference struct 2 disallowed.
Definition: data_structures.h:740
this datastructure is used as input parameter in functions of PS_dot.c
Definition: data_structures.h:104
int i
k
Definition: data_structures.h:570
Definition: data_structures.h:538
unsigned int * mm1
Maximum matching matrix, reference struct 1 disallowed.
Definition: data_structures.h:888
unsigned int * bpdist
Matrix containing base pair distance of reference structure 1 and 2 on interval [i,j].
Definition: data_structures.h:748
int length
length of the input sequence
Definition: data_structures.h:557
unsigned int * referenceBPs2
Matrix containing number of basepairs of reference structure2 in interval [i,j].
Definition: data_structures.h:747
double Gikjl_wo
Gikjl without contributions for prob_unpaired.
Definition: data_structures.h:569
int j
j
Definition: data_structures.h:572
The data structure that contains the complete model details used throughout the calculations.
Definition: model.h:206
Base pair data structure used in subopt.c.
Definition: data_structures.h:425
double temperature
Rescale energy parameters to a temperature in degC.
double * Pi
probabilities of interaction
Definition: data_structures.h:565
int * jindx
Index for moving in the triangular matrix qm1.
Definition: data_structures.h:879
int do_backtrack
Flag whether to do backtracing of the structure(s) or not.
Definition: data_structures.h:731
unsigned i
nucleotide position i
Definition: data_structures.h:500
int k
Distance to first reference.
Definition: data_structures.h:718
short * S1
The input sequences in numeric form.
Definition: data_structures.h:868
unsigned int maxD1
Maximum allowed base pair distance to first reference.
Definition: data_structures.h:735
contributions to p_u
Definition: data_structures.h:552
Definition: data_structures.h:481
int * iindx
index array to move through pr.
double pf_scale
Scaling factor to avoid over-/underflows.
Definition: data_structures.h:263
float ent
Pseudo entropy for .
Definition: data_structures.h:503
char * sequence
The input sequence.
Definition: data_structures.h:867
double B0
start concentration B
Definition: data_structures.h:470
int ** free_energies
Energy contribution for unpaired sequence stretches.
Definition: data_structures.h:325
unsigned int * mm2
Maximum matching matrix, reference struct 2 disallowed.
Definition: data_structures.h:889
char * ptype_pf_compat
ptype array indexed via iindx
Definition: data_structures.h:379
double * exp_en_basepair
Boltzmann Factors of the energy contribution for base pairs.
Definition: data_structures.h:328
model_detailsT model_details
Model details to be used in the recursions.
Definition: data_structures.h:273
unsigned int * referenceBPs2
Matrix containing number of basepairs of reference structure2 in interval [i,j].
Definition: data_structures.h:885
Definition: data_structures.h:468
Solution element returned from TwoDfoldList.
Definition: data_structures.h:717
int u_vals
number of different -u values
Definition: data_structures.h:582
double FA
monomer A
Definition: data_structures.h:461
char * structure
Structure in dot-bracket notation.
Definition: data_structures.h:444
char comp
1 iff pair is in mfe structure
Definition: data_structures.h:505
Variables compound for 2Dfold partition function folding.
Definition: data_structures.h:863
int oldAliEn
use old alifold energies (with gaps)