RNAlib-2.6.3
 
Loading...
Searching...
No Matches
model.h
Go to the documentation of this file.
1#ifndef VIENNA_RNA_PACKAGE_MODEL_H
2#define VIENNA_RNA_PACKAGE_MODEL_H
3
17#ifndef NBASES
18#define NBASES 8
19#endif
20
22typedef struct vrna_md_s vrna_md_t;
23
31#define VRNA_MODEL_DEFAULT_TEMPERATURE 37.0
32
38#define VRNA_MODEL_DEFAULT_PF_SCALE -1
39
45#define VRNA_MODEL_DEFAULT_BETA_SCALE 1.
46
52#define VRNA_MODEL_DEFAULT_DANGLES 2
53
59#define VRNA_MODEL_DEFAULT_SPECIAL_HP 1
60
66#define VRNA_MODEL_DEFAULT_NO_LP 0
67
73#define VRNA_MODEL_DEFAULT_NO_GU 0
74
80#define VRNA_MODEL_DEFAULT_NO_GU_CLOSURE 0
81
86#define VRNA_MODEL_DEFAULT_CIRC 0
87
93#define VRNA_MODEL_DEFAULT_GQUAD 0
94
100#define VRNA_MODEL_DEFAULT_UNIQ_ML 0
101
107#define VRNA_MODEL_DEFAULT_ENERGY_SET 0
108
113#define VRNA_MODEL_DEFAULT_BACKTRACK 1
114
120#define VRNA_MODEL_DEFAULT_BACKTRACK_TYPE 'F'
121
127#define VRNA_MODEL_DEFAULT_COMPUTE_BPP 1
128
134#define VRNA_MODEL_DEFAULT_MAX_BP_SPAN -1
135
141#define VRNA_MODEL_DEFAULT_WINDOW_SIZE -1
142
148#define VRNA_MODEL_DEFAULT_LOG_ML 0
149
154#define VRNA_MODEL_DEFAULT_ALI_OLD_EN 0
155
161#define VRNA_MODEL_DEFAULT_ALI_RIBO 0
162
168#define VRNA_MODEL_DEFAULT_ALI_CV_FACT 1.
169
174#define VRNA_MODEL_DEFAULT_ALI_NC_FACT 1.
175
176
177#define VRNA_MODEL_DEFAULT_PF_SMOOTH 1
178
182#define VRNA_MODEL_DEFAULT_SALT 1.021
183
184
188#define VRNA_MODEL_DEFAULT_SALT_MLLOWER 6
189
190
194#define VRNA_MODEL_DEFAULT_SALT_MLUPPER 24
195
196
200#define VRNA_MODEL_DEFAULT_SALT_DPXINIT 99999
201
202#define VRNA_MODEL_SALT_DPXINIT_FACT_RNA -45.324
203#define VRNA_MODEL_SALT_DPXINIT_FACT_DNA -58.389
204
205
206#define VRNA_MODEL_DEFAULT_SALT_DPXINIT_FACT VRNA_MODEL_SALT_DPXINIT_FACT_RNA
207
208/* Geometric parameters for RNA and DNA */
209
210#define VRNA_MODEL_HELICAL_RISE_RNA 2.8
211#define VRNA_MODEL_HELICAL_RISE_DNA 3.4
215#define VRNA_MODEL_DEFAULT_HELICAL_RISE VRNA_MODEL_HELICAL_RISE_RNA
216
217#define VRNA_MODEL_BACKBONE_LENGTH_RNA 6.0
218#define VRNA_MODEL_BACKBONE_LENGTH_DNA 6.76
222#define VRNA_MODEL_DEFAULT_BACKBONE_LENGTH VRNA_MODEL_BACKBONE_LENGTH_RNA
223
224
225#ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY
226
227#ifndef MAXALPHA
231#define MAXALPHA 20
232#endif
233
234#endif
235
245struct vrna_md_s {
246 double temperature;
247 double betaScale;
274 int noLP;
275 int noGU;
277 int logML;
278 int circ;
279 int gquad;
285 char nonstandards[64];
295 int ribo;
296 double cv_fact;
297 double nc_fact;
298 double sfact;
299 int rtype[8];
300 short alias[MAXALPHA + 1];
301 int pair[MAXALPHA + 1][MAXALPHA + 1];
302 float pair_dist[7][7];
303 double salt;
313};
314
315
324void
326
327
340void
342
343
354vrna_md_t *
356 const vrna_md_t *md_from);
357
358
364char *
366
367
368void
369vrna_md_set_nonstandards(vrna_md_t *md,
370 const char *ns_bases);
371
372
392void
394
395
403void
405
406
414double
416
417
427void
429
430
438double
440
441
442void
443vrna_md_defaults_pf_smooth(int s);
444
445
446int
447vrna_md_defaults_pf_smooth_get(void);
448
449
457void
459
460
468int
470
471
479void
481
482
490int
492
493
501void
503
504
512int
514
515
523void
525
526
534int
536
537
545void
547
548
556int
558
559
567void
569
570
578int
580
581
589void
591
592
600int
602
603
611void
613
614
622int
624
625
635void
637
638
646int
648
649
657void
659
660
668int
670
671
679void
681
682
690int
692
693
701void
703
704
712char
714
715
723void
725
726
734int
736
737
745void
747
748
756int
758
759
767void
769
770
778int
780
781
789void
791
792
800int
802
803
814void
816
817
825int
827
828
836void
838
839
847int
849
850
858void
860
861
869double
871
872
880void
882
883
891double
893
894
902void
904
905
913double
915
916
922void
924
925
930double
932
933
939void
941
942
947int
949
950
956void
958
959
964int
966
967
974void
976
977
984int
986
987
988void
989vrna_md_defaults_saltDPXInitFact(float value);
990
991
992float
993vrna_md_defaults_saltDPXInitFact_get(void);
994
995
996void
997vrna_md_defaults_helical_rise(float value);
998
999
1000float
1001vrna_md_defaults_helical_rise_get(void);
1002
1003
1004void
1005vrna_md_defaults_backbone_length(float value);
1006
1007
1008float
1009vrna_md_defaults_backbone_length_get(void);
1010
1011
1012#ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY
1013
1014#define model_detailsT vrna_md_t /* restore compatibility of struct rename */
1015
1016/* BEGIN deprecated global variables: */
1017
1029extern double temperature;
1030
1042extern double pf_scale;
1043
1065extern int dangles;
1066
1072extern int tetra_loop;
1073
1081extern int noLonelyPairs;
1082
1086extern int noGU;
1087
1091extern int no_closingGU;
1092
1096extern int circ;
1097
1101extern int gquad;
1102
1106extern int uniq_ML;
1107
1115extern int energy_set;
1116
1123extern int do_backtrack;
1124
1132extern char backtrack_type;
1133
1141extern char *nonstandards;
1142
1148extern int max_bp_span;
1149
1153extern int oldAliEn;
1154
1158extern int ribo;
1159
1160extern double cv_fact;
1161
1162extern double nc_fact;
1163
1165extern int logML;
1166
1168extern double salt;
1169
1171extern int saltDPXInit;
1172
1173extern float helical_rise;
1174extern float backbone_length;
1175
1176/* END deprecated global variables: */
1177
1191void
1193
1194
1195char *
1196option_string(void);
1197
1198
1199#endif
1204#endif
double nc_fact
This variable controls the magnitude of the penalty for non-compatible sequences in the covariance te...
double cv_fact
This variable controls the weight of the covariance term in the energy function of alignment folding ...
double betaScale
A scaling factor for the thermodynamic temperature of the Boltzmann factors.
Definition model.h:247
float backbone_length
Definition model.h:312
int backtrack
Specifies whether or not secondary structures should be backtraced.
Definition model.h:282
int ribo
Use ribosum scoring table in alifold energy model.
Definition model.h:295
char nonstandards[64]
contains allowed non standard bases
Definition model.h:285
int saltDPXInit
User-provided salt correction for duplex initialization (in dcal/mol). If set to 99999 the default sa...
Definition model.h:306
float saltDPXInitFact
Definition model.h:310
int energy_set
Specifies the energy set that defines set of compatible base pairs.
Definition model.h:281
double temperature
The temperature used to scale the thermodynamic parameters.
Definition model.h:246
double cv_fact
Co-variance scaling factor for consensus structure prediction.
Definition model.h:296
int max_bp_span
maximum allowed base pair span
Definition model.h:286
short alias[MAXALPHA+1]
alias of an integer nucleotide representation
Definition model.h:300
double salt
Salt (monovalent) concentration (M) in buffer.
Definition model.h:303
float helical_rise
Definition model.h:311
int noLP
Only consider canonical structures, i.e. no 'lonely' base pairs.
Definition model.h:274
int saltMLUpper
Upper bound of multiloop size to use in loop salt correction linear fitting.
Definition model.h:305
int noGUclosure
Do not allow loops to be closed by GU pair.
Definition model.h:276
int circ
Assume RNA to be circular instead of linear.
Definition model.h:278
float pair_dist[7][7]
Base pair dissimilarity, a.k.a. distance matrix.
Definition model.h:302
int pf_smooth
A flat specifying whether energies in Boltzmann factors need to be smoothed.
Definition model.h:248
int min_loop_size
Minimum size of hairpin loops.
Definition model.h:288
int compute_bpp
Specifies whether or not backward recursions for base pair probability (bpp) computation will be perf...
Definition model.h:284
int pair[MAXALPHA+1][MAXALPHA+1]
Integer representation of a base pair.
Definition model.h:301
int oldAliEn
Use old alifold energy model.
Definition model.h:294
double sfact
Scaling factor for partition function scaling.
Definition model.h:298
char backtrack_type
Specifies in which matrix to backtrack.
Definition model.h:283
double nc_fact
Scaling factor to weight co-variance contributions of non-canonical pairs.
Definition model.h:297
int window_size
Size of the sliding window for locally optimal structure prediction.
Definition model.h:293
int saltMLLower
Lower bound of multiloop size to use in loop salt correction linear fitting.
Definition model.h:304
int rtype[8]
Reverse base pair type array.
Definition model.h:299
int noGU
Do not allow GU pairs.
Definition model.h:275
int dangles
Specifies the dangle model used in any energy evaluation (0,1,2 or 3)
Definition model.h:249
int special_hp
Include special hairpin contributions for tri, tetra and hexaloops.
Definition model.h:273
int uniq_ML
Flag to ensure unique multi-branch loop decomposition during folding.
Definition model.h:280
int logML
Use logarithmic scaling for multiloops.
Definition model.h:277
int gquad
Include G-quadruplexes in structure prediction.
Definition model.h:279
int vrna_md_defaults_energy_set_get(void)
Get default energy set.
int vrna_md_defaults_saltDPXInit_get(void)
Get user-provided salt correciton for duplex initialization If value is 99999 the default value from ...
#define MAXALPHA
Maximal length of alphabet.
Definition model.h:231
int ribo
use ribosum matrices
void vrna_md_defaults_gquad(int flag)
Set default behavior for treatment of G-Quadruplexes.
int vrna_md_defaults_saltMLLower_get(void)
Get the default multiloop size lower bound for loop salt correciton linear fitting.
int noLonelyPairs
Global switch to avoid/allow helices of length 1.
char vrna_md_defaults_backtrack_type_get(void)
Get default backtrack type, i.e. which DP matrix is used.
int vrna_md_defaults_ribo_get(void)
Get default behavior for whether to use Ribosum Scoring in comparative structure prediction.
int max_bp_span
Maximum allowed base pair span.
int vrna_md_defaults_special_hp_get(void)
Get default behavior for lookup of tabulated free energies for special hairpin loops,...
char * vrna_md_option_string(vrna_md_t *md)
Get a corresponding commandline parameter string of the options in a vrna_md_t.
int vrna_md_defaults_oldAliEn_get(void)
Get default behavior for whether to use old energy model for comparative structure prediction.
int gquad
Allow G-quadruplex formation.
char * nonstandards
contains allowed non standard base pairs
int vrna_md_defaults_saltMLUpper_get(void)
Get the default multiloop size upper bound for loop salt correciton linear fitting.
double vrna_md_defaults_salt_get(void)
Get the default salt concentration.
void vrna_md_defaults_noLP(int flag)
Set default behavior for prediction of canonical secondary structures.
void vrna_md_update(vrna_md_t *md)
Update the model details data structure.
void vrna_md_defaults_logML(int flag)
Set default behavior recomputing free energies of multi-branch loops using a logarithmic model.
void vrna_md_defaults_sfact(double factor)
Set the default scaling factor used to avoid under-/overflows in partition function computation.
void vrna_md_defaults_oldAliEn(int flag)
Set default behavior for whether to use old energy model for comparative structure prediction.
void vrna_md_defaults_max_bp_span(int span)
Set default maximal base pair span.
void vrna_md_defaults_circ(int flag)
Set default behavior whether input sequences are circularized.
int tetra_loop
Include special stabilizing energies for some tri-, tetra- and hexa-loops;.
int vrna_md_defaults_noGUclosure_get(void)
Get default behavior for G-U pairs as closing pair for loops.
void vrna_md_defaults_uniq_ML(int flag)
Set default behavior for creating additional matrix for unique multi-branch loop prediction.
double salt
salt concentration
int vrna_md_defaults_min_loop_size_get(void)
Get default minimal loop size.
int vrna_md_defaults_noGU_get(void)
Get default behavior for treatment of G-U wobble pairs.
int vrna_md_defaults_window_size_get(void)
Get default window size for sliding window structure prediction approaches.
int vrna_md_defaults_dangles_get(void)
Get default dangle model for structure prediction.
void vrna_md_defaults_backtrack_type(char t)
Set default backtrack type, i.e. which DP matrix is used.
int uniq_ML
do ML decomposition uniquely (for subopt)
void vrna_md_defaults_reset(vrna_md_t *md_p)
Reset the global default model details to a specific set of parameters, or their initial values.
int dangles
Switch the energy model for dangling end contributions (0, 1, 2, 3)
double vrna_md_defaults_nc_fact_get(void)
void vrna_md_defaults_window_size(int size)
Set default window size for sliding window structure prediction approaches.
void vrna_md_defaults_saltMLLower(int lower)
Set the default multiloop size lower bound for loop salt correciton linear fitting.
int logML
if nonzero use logarithmic ML energy in energy_of_struct
char backtrack_type
A backtrack array marker for inverse_fold()
void vrna_md_set_default(vrna_md_t *md)
Apply default model details to a provided vrna_md_t data structure.
void vrna_md_defaults_energy_set(int e)
Set default energy set.
int vrna_md_defaults_backtrack_get(void)
Get default behavior for whether to backtrack secondary structures.
int vrna_md_defaults_noLP_get(void)
Get default behavior for prediction of canonical secondary structures.
void vrna_md_defaults_ribo(int flag)
Set default behavior for whether to use Ribosum Scoring in comparative structure prediction.
int vrna_md_defaults_logML_get(void)
Get default behavior recomputing free energies of multi-branch loops using a logarithmic model.
double vrna_md_defaults_temperature_get(void)
Get default temperature for energy evaluation of loops.
void vrna_md_defaults_backtrack(int flag)
Set default behavior for whether to backtrack secondary structures.
void vrna_md_defaults_noGU(int flag)
Set default behavior for treatment of G-U wobble pairs.
int vrna_md_defaults_compute_bpp_get(void)
Get the default behavior for whether to compute base pair probabilities after partition function comp...
int vrna_md_defaults_max_bp_span_get(void)
Get default maximal base pair span.
vrna_md_t * vrna_md_copy(vrna_md_t *md_to, const vrna_md_t *md_from)
Copy/Clone a vrna_md_t model.
int no_closingGU
GU allowed only inside stacks if set to 1.
void vrna_md_defaults_saltDPXInit(int value)
Set user-provided salt correciton for duplex initialization If value is 99999 the default value from ...
double vrna_md_defaults_sfact_get(void)
Get the default scaling factor used to avoid under-/overflows in partition function computation.
int vrna_md_defaults_uniq_ML_get(void)
Get default behavior for creating additional matrix for unique multi-branch loop prediction.
double temperature
Rescale energy parameters to a temperature in degC.
void set_model_details(vrna_md_t *md)
Set default model details.
double vrna_md_defaults_betaScale_get(void)
Get default scaling factor of thermodynamic temperature in Boltzmann factors.
int noGU
Global switch to forbid/allow GU base pairs at all.
void vrna_md_defaults_salt(double salt)
Set the default salt concentration.
void vrna_md_defaults_min_loop_size(int size)
Set default minimal loop size.
void vrna_md_defaults_nc_fact(double factor)
int oldAliEn
use old alifold energies (with gaps)
void vrna_md_defaults_dangles(int d)
Set default dangle model for structure prediction.
void vrna_md_defaults_cv_fact(double factor)
Set the default co-variance scaling factor used in comparative structure prediction.
int vrna_md_defaults_circ_get(void)
Get default behavior whether input sequences are circularized.
double pf_scale
A scaling factor used by pf_fold() to avoid overflows.
int do_backtrack
do backtracking, i.e. compute secondary structures or base pair probabilities
void vrna_md_defaults_noGUclosure(int flag)
Set default behavior for G-U pairs as closing pair for loops.
double vrna_md_defaults_cv_fact_get(void)
Get the default co-variance scaling factor used in comparative structure prediction.
int vrna_md_defaults_gquad_get(void)
Get default behavior for treatment of G-Quadruplexes.
void vrna_md_defaults_betaScale(double b)
Set default scaling factor of thermodynamic temperature in Boltzmann factors.
void vrna_md_defaults_compute_bpp(int flag)
Set the default behavior for whether to compute base pair probabilities after partition function comp...
void vrna_md_defaults_saltMLUpper(int upper)
Set the default multiloop size upper bound for loop salt correciton linear fitting.
int circ
backward compatibility variable.. this does not effect anything
void vrna_md_defaults_temperature(double T)
Set default temperature for energy evaluation of loops.
int energy_set
0 = BP; 1=any with GC; 2=any with AU-parameter
int saltDPXInit
Salt correction for duplex initialization.
void vrna_md_defaults_special_hp(int flag)
Set default behavior for lookup of tabulated free energies for special hairpin loops,...
The data structure that contains the complete model details used throughout the calculations.
Definition model.h:245