00001 #ifndef __VIENNA_RNA_PACKAGE_DATA_STRUCTURES_H__
00002 #define __VIENNA_RNA_PACKAGE_DATA_STRUCTURES_H__
00003
00004 #include "energy_const.h"
00010
00011 #define LARGE_PF
00012 #ifdef LARGE_PF
00013 #define FLT_OR_DBL double
00014 #else
00015 #define FLT_OR_DBL float
00016 #endif
00017
00018 #ifndef NBASES
00019 #define NBASES 8
00020 #endif
00021
00022 #ifndef MAXALPHA
00023
00026 #define MAXALPHA 20
00027 #endif
00028
00032 #define MAXDOS 1000
00033
00034 #define VRNA_GQUAD_MAX_STACK_SIZE 7
00035 #define VRNA_GQUAD_MIN_STACK_SIZE 2
00036 #define VRNA_GQUAD_MAX_LINKER_LENGTH 15
00037 #define VRNA_GQUAD_MIN_LINKER_LENGTH 1
00038 #define VRNA_GQUAD_MIN_BOX_SIZE ((4*VRNA_GQUAD_MIN_STACK_SIZE)+(3*VRNA_GQUAD_MIN_LINKER_LENGTH))
00039 #define VRNA_GQUAD_MAX_BOX_SIZE ((4*VRNA_GQUAD_MAX_STACK_SIZE)+(3*VRNA_GQUAD_MAX_LINKER_LENGTH))
00040
00041
00042
00043
00044
00045
00046
00047
00048
00052 typedef struct plist {
00053 int i;
00054 int j;
00055 float p;
00056 int type;
00057 } plist;
00058
00062 typedef struct cpair {
00063 int i,j,mfe;
00064 float p, hue, sat;
00065 } cpair;
00066
00071 typedef struct {
00072 float X;
00073 float Y;
00074 } COORDINATE;
00075
00079 typedef struct sect {
00080 int i;
00081 int j;
00082 int ml;
00083 } sect;
00084
00088 typedef struct bondT {
00089 unsigned int i;
00090 unsigned int j;
00091 } bondT;
00092
00096 typedef struct bondTEn {
00097 int i;
00098 int j;
00099 int energy;
00100 } bondTEn;
00101
00106 typedef struct{
00107 int dangles;
00113 int special_hp;
00114 int noLP;
00115 int noGU;
00116 int noGUclosure;
00117 int logML;
00118 int circ;
00119 int gquad;
00120 } model_detailsT;
00121
00125 typedef struct{
00126 int id;
00127 int stack[NBPAIRS+1][NBPAIRS+1];
00128 int hairpin[31];
00129 int bulge[MAXLOOP+1];
00130 int internal_loop[MAXLOOP+1];
00131 int mismatchExt[NBPAIRS+1][5][5];
00132 int mismatchI[NBPAIRS+1][5][5];
00133 int mismatch1nI[NBPAIRS+1][5][5];
00134 int mismatch23I[NBPAIRS+1][5][5];
00135 int mismatchH[NBPAIRS+1][5][5];
00136 int mismatchM[NBPAIRS+1][5][5];
00137 int dangle5[NBPAIRS+1][5];
00138 int dangle3[NBPAIRS+1][5];
00139 int int11[NBPAIRS+1][NBPAIRS+1][5][5];
00140 int int21[NBPAIRS+1][NBPAIRS+1][5][5][5];
00141 int int22[NBPAIRS+1][NBPAIRS+1][5][5][5][5];
00142 int ninio[5];
00143 double lxc;
00144 int MLbase;
00145 int MLintern[NBPAIRS+1];
00146 int MLclosing;
00147 int TerminalAU;
00148 int DuplexInit;
00149 int Tetraloop_E[200];
00150 char Tetraloops[1401];
00151 int Triloop_E[40];
00152 char Triloops[241];
00153 int Hexaloop_E[40];
00154 char Hexaloops[1801];
00155 int TripleC;
00156 int MultipleCA;
00157 int MultipleCB;
00158 int gquad [VRNA_GQUAD_MAX_STACK_SIZE + 1]
00159 [3*VRNA_GQUAD_MAX_LINKER_LENGTH + 1];
00160
00161 double temperature;
00163 model_detailsT model_details;
00165 } paramT;
00166
00170 typedef struct{
00171 int id;
00172 double expstack[NBPAIRS+1][NBPAIRS+1];
00173 double exphairpin[31];
00174 double expbulge[MAXLOOP+1];
00175 double expinternal[MAXLOOP+1];
00176 double expmismatchExt[NBPAIRS+1][5][5];
00177 double expmismatchI[NBPAIRS+1][5][5];
00178 double expmismatch23I[NBPAIRS+1][5][5];
00179 double expmismatch1nI[NBPAIRS+1][5][5];
00180 double expmismatchH[NBPAIRS+1][5][5];
00181 double expmismatchM[NBPAIRS+1][5][5];
00182 double expdangle5[NBPAIRS+1][5];
00183 double expdangle3[NBPAIRS+1][5];
00184 double expint11[NBPAIRS+1][NBPAIRS+1][5][5];
00185 double expint21[NBPAIRS+1][NBPAIRS+1][5][5][5];
00186 double expint22[NBPAIRS+1][NBPAIRS+1][5][5][5][5];
00187 double expninio[5][MAXLOOP+1];
00188 double lxc;
00189 double expMLbase;
00190 double expMLintern[NBPAIRS+1];
00191 double expMLclosing;
00192 double expTermAU;
00193 double expDuplexInit;
00194 double exptetra[40];
00195 double exptri[40];
00196 double exphex[40];
00197 char Tetraloops[1401];
00198 double expTriloop[40];
00199 char Triloops[241];
00200 char Hexaloops[1801];
00201 double expTripleC;
00202 double expMultipleCA;
00203 double expMultipleCB;
00204 double expgquad[VRNA_GQUAD_MAX_STACK_SIZE + 1]
00205 [3*VRNA_GQUAD_MAX_LINKER_LENGTH + 1];
00206
00207 double kT;
00208 double pf_scale;
00210 double temperature;
00211 double alpha;
00218 model_detailsT model_details;
00220 } pf_paramT;
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00234 typedef struct {
00235 int i;
00236 int j;
00237 } PAIR;
00238
00242 typedef struct {
00243 int i;
00244 int j;
00245 int array_flag;
00246 } INTERVAL;
00247
00251 typedef struct {
00252 float energy;
00253 char *structure;
00254 } SOLUTION;
00255
00256
00257
00258
00259
00260
00261
00265 typedef struct cofoldF {
00266
00267 double F0AB;
00268 double FAB;
00269 double FcAB;
00270 double FA;
00271 double FB;
00272 } cofoldF;
00273
00277 typedef struct ConcEnt {
00278 double A0;
00279 double B0;
00280 double ABc;
00281 double AAc;
00282 double BBc;
00283 double Ac;
00284 double Bc;
00285 } ConcEnt;
00286
00290 typedef struct pairpro{
00291 struct plist *AB;
00292 struct plist *AA;
00293 struct plist *A;
00294 struct plist *B;
00295 struct plist *BB;
00296 }pairpro;
00297
00308 typedef struct {
00309 unsigned i;
00310 unsigned j;
00311 float p;
00312 float ent;
00313 short bp[8];
00314 char comp;
00315 } pair_info;
00316
00317
00318
00319
00320
00321
00322
00323
00327 typedef struct move {
00328 int i;
00329 int j;
00330 int when;
00331 int E;
00332 } move_t;
00333
00337 typedef struct intermediate {
00338 short *pt;
00339 int Sen;
00340 int curr_en;
00341 move_t *moves;
00342 } intermediate_t;
00343
00347 typedef struct path {
00348 double en;
00349 char *s;
00350 } path_t;
00351
00352
00353
00354
00355
00356
00357
00361 typedef struct pu_contrib {
00362 double **H;
00363 double **I;
00364 double **M;
00365 double **E;
00366 int length;
00367 int w;
00368 } pu_contrib;
00369
00373 typedef struct interact {
00374 double *Pi;
00375 double *Gi;
00376 double Gikjl;
00378 double Gikjl_wo;
00379 int i;
00380 int k;
00381 int j;
00382 int l;
00383 int length;
00384 } interact;
00385
00389 typedef struct pu_out {
00390 int len;
00391 int u_vals;
00392 int contribs;
00393 char **header;
00394 double **u_values;
00395 } pu_out;
00396
00400 typedef struct constrain{
00401 int *indx;
00402 char *ptype;
00403 } constrain;
00404
00405
00406
00407
00408
00409
00410
00414 typedef struct {
00415 int i;
00416 int j;
00417 int end;
00418 char *structure;
00419 double energy;
00420 double energy_backtrack;
00421 double opening_backtrack_x;
00422 double opening_backtrack_y;
00423 int offset;
00424 double dG1;
00425 double dG2;
00426 double ddG;
00427 int tb;
00428 int te;
00429 int qb;
00430 int qe;
00431 } duplexT;
00432
00433
00434
00435
00436
00437
00438
00442 typedef struct node {
00443 int k;
00444 int energy;
00445 struct node *next;
00446 } folden;
00447
00451 typedef struct {
00452 int i;
00453 int j;
00454 int u;
00455 char *structure;
00456 float energy;
00457 float Duplex_El;
00458 float Duplex_Er;
00459 float Loop_E;
00460 float Loop_D;
00461 float pscd;
00462 float psct;
00463 float pscg;
00464 float Duplex_Ol;
00465 float Duplex_Or;
00466 float Duplex_Ot;
00467 float fullStemEnergy;
00468 } snoopT;
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00485 typedef struct dupVar{
00486 int i;
00487 int j;
00488 int end;
00489 char *pk_helix;
00490 char *structure;
00491 double energy;
00492 int offset;
00493 double dG1;
00494 double dG2;
00495 double ddG;
00496 int tb;
00497 int te;
00498 int qb;
00499 int qe;
00500 int inactive;
00501 int processed;
00502 } dupVar;
00503
00504
00505
00506
00507
00508
00509
00510
00511
00526 typedef struct{
00527 int k;
00528 int l;
00529 float en;
00530 char *s;
00531 } TwoDfold_solution;
00532
00538 typedef struct{
00539 paramT *P;
00540 int do_backtrack;
00541 char *ptype;
00542 char *sequence;
00543 short *S, *S1;
00544 unsigned int maxD1;
00545 unsigned int maxD2;
00548 unsigned int *mm1;
00549 unsigned int *mm2;
00551 int *my_iindx;
00553 double temperature;
00554
00555 unsigned int *referenceBPs1;
00556 unsigned int *referenceBPs2;
00557 unsigned int *bpdist;
00559 short *reference_pt1;
00560 short *reference_pt2;
00561 int circ;
00562 int dangles;
00563 unsigned int seq_length;
00564
00565 int ***E_F5;
00566 int ***E_F3;
00567 int ***E_C;
00568 int ***E_M;
00569 int ***E_M1;
00570 int ***E_M2;
00571
00572 int **E_Fc;
00573 int **E_FcH;
00574 int **E_FcI;
00575 int **E_FcM;
00576
00577 int **l_min_values;
00578 int **l_max_values;
00579 int *k_min_values;
00580 int *k_max_values;
00581
00582 int **l_min_values_m;
00583 int **l_max_values_m;
00584 int *k_min_values_m;
00585 int *k_max_values_m;
00586
00587 int **l_min_values_m1;
00588 int **l_max_values_m1;
00589 int *k_min_values_m1;
00590 int *k_max_values_m1;
00591
00592 int **l_min_values_f;
00593 int **l_max_values_f;
00594 int *k_min_values_f;
00595 int *k_max_values_f;
00596
00597 int **l_min_values_f3;
00598 int **l_max_values_f3;
00599 int *k_min_values_f3;
00600 int *k_max_values_f3;
00601
00602 int **l_min_values_m2;
00603 int **l_max_values_m2;
00604 int *k_min_values_m2;
00605 int *k_max_values_m2;
00606
00607 int *l_min_values_fc;
00608 int *l_max_values_fc;
00609 int k_min_values_fc;
00610 int k_max_values_fc;
00611
00612 int *l_min_values_fcH;
00613 int *l_max_values_fcH;
00614 int k_min_values_fcH;
00615 int k_max_values_fcH;
00616
00617 int *l_min_values_fcI;
00618 int *l_max_values_fcI;
00619 int k_min_values_fcI;
00620 int k_max_values_fcI;
00621
00622 int *l_min_values_fcM;
00623 int *l_max_values_fcM;
00624 int k_min_values_fcM;
00625 int k_max_values_fcM;
00626
00627
00628 int *E_F5_rem;
00629 int *E_F3_rem;
00630 int *E_C_rem;
00631 int *E_M_rem;
00632 int *E_M1_rem;
00633 int *E_M2_rem;
00634
00635 int E_Fc_rem;
00636 int E_FcH_rem;
00637 int E_FcI_rem;
00638 int E_FcM_rem;
00639
00640 #ifdef COUNT_STATES
00641 unsigned long ***N_F5;
00642 unsigned long ***N_C;
00643 unsigned long ***N_M;
00644 unsigned long ***N_M1;
00645 #endif
00646 } TwoDfold_vars;
00647
00660 typedef struct{
00661 int k;
00662 int l;
00663 FLT_OR_DBL q;
00664 } TwoDpfold_solution;
00665
00672 typedef struct{
00673
00674 unsigned int alloc;
00675 char *ptype;
00676 char *sequence;
00677 short *S, *S1;
00678 unsigned int maxD1;
00679 unsigned int maxD2;
00681 double temperature;
00682 double init_temp;
00683 FLT_OR_DBL *scale;
00684 FLT_OR_DBL pf_scale;
00685 pf_paramT *pf_params;
00686
00687 int *my_iindx;
00688 int *jindx;
00690 short *reference_pt1;
00691 short *reference_pt2;
00692
00693 unsigned int *referenceBPs1;
00694 unsigned int *referenceBPs2;
00695 unsigned int *bpdist;
00697 unsigned int *mm1;
00698 unsigned int *mm2;
00700 int circ;
00701 int dangles;
00702 unsigned int seq_length;
00703
00704 FLT_OR_DBL ***Q;
00705 FLT_OR_DBL ***Q_B;
00706 FLT_OR_DBL ***Q_M;
00707 FLT_OR_DBL ***Q_M1;
00708 FLT_OR_DBL ***Q_M2;
00709
00710 FLT_OR_DBL **Q_c;
00711 FLT_OR_DBL **Q_cH;
00712 FLT_OR_DBL **Q_cI;
00713 FLT_OR_DBL **Q_cM;
00714
00715 int **l_min_values;
00716 int **l_max_values;
00717 int *k_min_values;
00718 int *k_max_values;
00719
00720 int **l_min_values_b;
00721 int **l_max_values_b;
00722 int *k_min_values_b;
00723 int *k_max_values_b;
00724
00725 int **l_min_values_m;
00726 int **l_max_values_m;
00727 int *k_min_values_m;
00728 int *k_max_values_m;
00729
00730 int **l_min_values_m1;
00731 int **l_max_values_m1;
00732 int *k_min_values_m1;
00733 int *k_max_values_m1;
00734
00735 int **l_min_values_m2;
00736 int **l_max_values_m2;
00737 int *k_min_values_m2;
00738 int *k_max_values_m2;
00739
00740 int *l_min_values_qc;
00741 int *l_max_values_qc;
00742 int k_min_values_qc;
00743 int k_max_values_qc;
00744
00745 int *l_min_values_qcH;
00746 int *l_max_values_qcH;
00747 int k_min_values_qcH;
00748 int k_max_values_qcH;
00749
00750 int *l_min_values_qcI;
00751 int *l_max_values_qcI;
00752 int k_min_values_qcI;
00753 int k_max_values_qcI;
00754
00755 int *l_min_values_qcM;
00756 int *l_max_values_qcM;
00757 int k_min_values_qcM;
00758 int k_max_values_qcM;
00759
00760
00761 FLT_OR_DBL *Q_rem;
00762 FLT_OR_DBL *Q_B_rem;
00763 FLT_OR_DBL *Q_M_rem;
00764 FLT_OR_DBL *Q_M1_rem;
00765 FLT_OR_DBL *Q_M2_rem;
00766
00767 FLT_OR_DBL Q_c_rem;
00768 FLT_OR_DBL Q_cH_rem;
00769 FLT_OR_DBL Q_cI_rem;
00770 FLT_OR_DBL Q_cM_rem;
00771
00772 } TwoDpfold_vars;
00773
00774 #endif