model.h
Go to the documentation of this file.
#ifndef VIENNA_RNA_PACKAGE_MODEL_H
#define VIENNA_RNA_PACKAGE_MODEL_H
#ifdef DEPRECATION_WARNINGS
# ifdef __GNUC__
# define DEPRECATED(func) func __attribute__ ((deprecated))
# else
# define DEPRECATED(func) func
# endif
#else
# define DEPRECATED(func) func
#endif
/* make this interface backward compatible with RNAlib < 2.2.0 */
#define VRNA_BACKWARD_COMPAT
#ifndef NBASES
#define NBASES 8
#endif
typedef struct vrna_md_s vrna_md_t;
#define VRNA_MODEL_DEFAULT_TEMPERATURE 37.0
#define VRNA_MODEL_DEFAULT_PF_SCALE -1
#define VRNA_MODEL_DEFAULT_BETA_SCALE 1.
#define VRNA_MODEL_DEFAULT_DANGLES 2
#define VRNA_MODEL_DEFAULT_SPECIAL_HP 1
#define VRNA_MODEL_DEFAULT_NO_LP 0
#define VRNA_MODEL_DEFAULT_NO_GU 0
#define VRNA_MODEL_DEFAULT_NO_GU_CLOSURE 0
#define VRNA_MODEL_DEFAULT_CIRC 0
#define VRNA_MODEL_DEFAULT_GQUAD 0
#define VRNA_MODEL_DEFAULT_CANONICAL_BP 0
#define VRNA_MODEL_DEFAULT_UNIQ_ML 0
#define VRNA_MODEL_DEFAULT_ENERGY_SET 0
#define VRNA_MODEL_DEFAULT_BACKTRACK 1
#define VRNA_MODEL_DEFAULT_BACKTRACK_TYPE 'F'
#define VRNA_MODEL_DEFAULT_COMPUTE_BPP 1
#define VRNA_MODEL_DEFAULT_MAX_BP_SPAN -1
#define VRNA_MODEL_DEFAULT_WINDOW_SIZE -1
#define VRNA_MODEL_DEFAULT_LOG_ML 0
#define VRNA_MODEL_DEFAULT_ALI_OLD_EN 0
#define VRNA_MODEL_DEFAULT_ALI_RIBO 0
#define VRNA_MODEL_DEFAULT_ALI_CV_FACT 1.
#define VRNA_MODEL_DEFAULT_ALI_NC_FACT 1.
#ifdef VRNA_BACKWARD_COMPAT
#ifndef MAXALPHA
#define MAXALPHA 20
#endif
#endif
struct vrna_md_s {
double temperature;
double betaScale;
int dangles;
int special_hp;
int noLP;
int noGU;
int noGUclosure;
int logML;
int circ;
int gquad;
int canonicalBPonly;
int uniq_ML;
int energy_set;
int backtrack;
char backtrack_type;
int compute_bpp;
char nonstandards[33];
int max_bp_span;
int min_loop_size;
int window_size;
int oldAliEn;
int ribo;
double cv_fact;
double nc_fact;
double sfact;
int rtype[8];
short alias[MAXALPHA+1];
int pair[MAXALPHA+1][MAXALPHA+1];
};
void
vrna_md_set_default(vrna_md_t *md);
void
vrna_md_update(vrna_md_t *md);
char *
vrna_md_option_string(vrna_md_t *md);
void
vrna_md_set_nonstandards(vrna_md_t *md, const char *ns);
void
vrna_md_defaults_reset(vrna_md_t *md_p);
void
vrna_md_defaults_temperature(double T);
double
vrna_md_defaults_temperature_get(void);
void
vrna_md_defaults_betaScale(double b);
double
vrna_md_defaults_betaScale_get(void);
void
vrna_md_defaults_dangles(int d);
int
vrna_md_defaults_dangles_get(void);
void
vrna_md_defaults_special_hp(int flag);
int
vrna_md_defaults_special_hp_get(void);
void
vrna_md_defaults_noLP(int flag);
int
vrna_md_defaults_noLP_get(void);
void
vrna_md_defaults_noGU(int flag);
int
vrna_md_defaults_noGU_get(void);
void
vrna_md_defaults_noGUclosure(int flag);
int
vrna_md_defaults_noGUclosure_get(void);
void
vrna_md_defaults_logML(int flag);
int
vrna_md_defaults_logML_get(void);
void
vrna_md_defaults_circ(int flag);
int
vrna_md_defaults_circ_get(void);
void
vrna_md_defaults_gquad(int flag);
int
vrna_md_defaults_gquad_get(void);
void
vrna_md_defaults_uniq_ML(int flag);
int
vrna_md_defaults_uniq_ML_get(void);
void
vrna_md_defaults_energy_set(int e);
int
vrna_md_defaults_energy_set_get(void);
void
vrna_md_defaults_backtrack(int flag);
int
vrna_md_defaults_backtrack_get(void);
void
vrna_md_defaults_backtrack_type(char t);
char
vrna_md_defaults_backtrack_type_get(void);
void
vrna_md_defaults_compute_bpp(int flag);
int
vrna_md_defaults_compute_bpp_get(void);
void
vrna_md_defaults_max_bp_span(int span);
int
vrna_md_defaults_max_bp_span_get(void);
void
vrna_md_defaults_min_loop_size(int size);
int
vrna_md_defaults_min_loop_size_get(void);
void
vrna_md_defaults_window_size(int size);
int
vrna_md_defaults_window_size_get(void);
void
vrna_md_defaults_oldAliEn(int flag);
int
vrna_md_defaults_oldAliEn_get(void);
void
vrna_md_defaults_ribo(int flag);
int
vrna_md_defaults_ribo_get(void);
void
vrna_md_defaults_cv_fact(double factor);
double
vrna_md_defaults_cv_fact_get(void);
void
vrna_md_defaults_nc_fact(double factor);
double
vrna_md_defaults_nc_fact_get(void);
void
vrna_md_defaults_sfact(double factor);
double
vrna_md_defaults_sfact_get(void);
#ifdef VRNA_BACKWARD_COMPAT
#define model_detailsT vrna_md_t /* restore compatibility of struct rename */
/* BEGIN deprecated global variables: */
extern double temperature;
extern double pf_scale;
extern int dangles;
extern int tetra_loop;
extern int noLonelyPairs;
extern int noGU;
extern int no_closingGU;
extern int circ;
extern int gquad;
extern int canonicalBPonly;
extern int uniq_ML;
extern int energy_set;
extern int do_backtrack;
extern char backtrack_type;
extern char *nonstandards;
extern int max_bp_span;
extern int oldAliEn;
extern int ribo;
extern double cv_fact;
extern double nc_fact;
extern int logML;
/* END deprecated global variables: */
void
set_model_details(vrna_md_t *md);
char *
option_string(void);
#endif
#endif
energy_set
int energy_set
0 = BP; 1=any mit GC; 2=any mit AU-parameter
vrna_md_defaults_sfact
void vrna_md_defaults_sfact(double factor)
Set the default scaling factor used to avoid under-/overflows in partition function computation...
vrna_md_s::backtrack
int backtrack
Specifies whether or not secondary structures should be backtraced.
Definition: model.h:224
vrna_md_update
void vrna_md_update(vrna_md_t *md)
Update the model details data structure.
vrna_md_defaults_noLP_get
int vrna_md_defaults_noLP_get(void)
Get default behavior for prediction of canonical secondary structures.
vrna_md_defaults_min_loop_size_get
int vrna_md_defaults_min_loop_size_get(void)
Get default minimal loop size.
vrna_md_set_default
void vrna_md_set_default(vrna_md_t *md)
Apply default model details to a provided vrna_md_t data structure.
vrna_md_defaults_sfact_get
double vrna_md_defaults_sfact_get(void)
Get the default scaling factor used to avoid under-/overflows in partition function computation...
vrna_md_defaults_max_bp_span_get
int vrna_md_defaults_max_bp_span_get(void)
Get default maximal base pair span.
vrna_md_s::nonstandards
char nonstandards[33]
contains allowed non standard bases
Definition: model.h:227
vrna_md_defaults_backtrack_type_get
char vrna_md_defaults_backtrack_type_get(void)
Get default backtrack type, i.e. which DP matrix is used.
tetra_loop
int tetra_loop
Include special stabilizing energies for some tri-, tetra- and hexa-loops;.
cv_fact
double cv_fact
This variable controls the weight of the covariance term in the energy function of alignment folding ...
vrna_md_s::alias
short alias[MAXALPHA+1]
alias of an integer nucleotide representation
Definition: model.h:241
vrna_md_defaults_backtrack_get
int vrna_md_defaults_backtrack_get(void)
Get default behavior for whether to backtrack secondary structures.
backtrack_type
char backtrack_type
A backtrack array marker for inverse_fold()
vrna_md_s::special_hp
int special_hp
Include special hairpin contributions for tri, tetra and hexaloops.
Definition: model.h:214
vrna_md_s::compute_bpp
int compute_bpp
Specifies whether or not backward recursions for base pair probability (bpp) computation will be perf...
Definition: model.h:226
vrna_md_defaults_circ
void vrna_md_defaults_circ(int flag)
Set default behavior whether input sequences are circularized.
vrna_md_defaults_temperature_get
double vrna_md_defaults_temperature_get(void)
Get default temperature for energy evaluation of loops.
logML
int logML
if nonzero use logarithmic ML energy in energy_of_struct
vrna_md_defaults_window_size_get
int vrna_md_defaults_window_size_get(void)
Get default window size for sliding window structure prediction approaches.
vrna_md_defaults_noGU
void vrna_md_defaults_noGU(int flag)
Set default behavior for treatment of G-U wobble pairs.
vrna_md_defaults_betaScale
void vrna_md_defaults_betaScale(double b)
Set default scaling factor of thermodynamic temperature in Boltzmann factors.
noGU
int noGU
Global switch to forbid/allow GU base pairs at all.
temperature
double temperature
Rescale energy parameters to a temperature in degC.
nonstandards
char * nonstandards
contains allowed non standard base pairs
ribo
int ribo
use ribosum matrices
do_backtrack
int do_backtrack
do backtracking, i.e. compute secondary structures or base pair probabilities
vrna_md_s::noLP
int noLP
Only consider canonical structures, i.e. no 'lonely' base pairs.
Definition: model.h:215
vrna_md_defaults_max_bp_span
void vrna_md_defaults_max_bp_span(int span)
Set default maximal base pair span.
vrna_md_defaults_dangles
void vrna_md_defaults_dangles(int d)
Set default dangle model for structure prediction.
vrna_md_s::uniq_ML
int uniq_ML
Flag to ensure unique multibranch loop decomposition during folding.
Definition: model.h:222
vrna_md_defaults_oldAliEn_get
int vrna_md_defaults_oldAliEn_get(void)
Get default behavior for whether to use old energy model for comparative structure prediction...
vrna_md_s::noGU
int noGU
Do not allow GU pairs.
Definition: model.h:216
vrna_md_defaults_temperature
void vrna_md_defaults_temperature(double T)
Set default temperature for energy evaluation of loops.
vrna_md_defaults_nc_fact_get
double vrna_md_defaults_nc_fact_get(void)
vrna_md_defaults_special_hp
void vrna_md_defaults_special_hp(int flag)
Set default behavior for lookup of tabulated free energies for special hairpin loops, such as Tri-, Tetra-, or Hexa-loops.
vrna_md_s::cv_fact
double cv_fact
Covariance scaling factor for consensus structure prediction.
Definition: model.h:237
nc_fact
double nc_fact
This variable controls the magnitude of the penalty for non-compatible sequences in the covariance te...
vrna_md_defaults_energy_set_get
int vrna_md_defaults_energy_set_get(void)
Get default energy set.
vrna_md_s::oldAliEn
int oldAliEn
Use old alifold energy model.
Definition: model.h:235
vrna_md_s::window_size
int window_size
Size of the sliding window for locally optimal structure predition.
Definition: model.h:234
vrna_md_defaults_ribo_get
int vrna_md_defaults_ribo_get(void)
Get default behavior for whether to use Ribosum Scoring in comparative structure prediction.
vrna_md_s::logML
int logML
Use logarithmic scaling for multi loops.
Definition: model.h:218
vrna_md_defaults_uniq_ML
void vrna_md_defaults_uniq_ML(int flag)
Set default behavior for creating additional matrix for unique multibranch loop prediction.
vrna_md_s::max_bp_span
int max_bp_span
maximum allowed base pair span
Definition: model.h:228
vrna_md_option_string
char * vrna_md_option_string(vrna_md_t *md)
Get a corresponding commandline parameter string of the options in a vrna_md_t.
vrna_md_defaults_special_hp_get
int vrna_md_defaults_special_hp_get(void)
Get default behavior for lookup of tabulated free energies for special hairpin loops, such as Tri-, Tetra-, or Hexa-loops.
uniq_ML
int uniq_ML
do ML decomposition uniquely (for subopt)
vrna_md_s::rtype
int rtype[8]
Reverse base pair type array.
Definition: model.h:240
vrna_md_defaults_circ_get
int vrna_md_defaults_circ_get(void)
Get default behavior whether input sequences are circularized.
vrna_md_defaults_reset
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...
set_model_details
void set_model_details(vrna_md_t *md)
Set default model details.
vrna_md_defaults_min_loop_size
void vrna_md_defaults_min_loop_size(int size)
Set default minimal loop size.
vrna_md_s
The data structure that contains the complete model details used throughout the calculations.
Definition: model.h:187
vrna_md_defaults_energy_set
void vrna_md_defaults_energy_set(int e)
Set default energy set.
vrna_md_s::sfact
double sfact
Scaling factor for partition function scaling.
Definition: model.h:239
vrna_md_defaults_cv_fact
void vrna_md_defaults_cv_fact(double factor)
Set the default covariance scaling factor used in comparative structure prediction.
pf_scale
double pf_scale
A scaling factor used by pf_fold() to avoid overflows.
vrna_md_defaults_logML
void vrna_md_defaults_logML(int flag)
Set default behavior recomputing free energies of multibranch loops using a logarithmic model...
vrna_md_s::gquad
int gquad
Include G-quadruplexes in structure prediction.
Definition: model.h:220
vrna_md_defaults_noLP
void vrna_md_defaults_noLP(int flag)
Set default behavior for prediction of canonical secondary structures.
MAXALPHA
#define MAXALPHA
Maximal length of alphabet.
Definition: model.h:174
vrna_md_defaults_window_size
void vrna_md_defaults_window_size(int size)
Set default window size for sliding window structure prediction approaches.
vrna_md_defaults_gquad
void vrna_md_defaults_gquad(int flag)
Set default behavior for treatment of G-Quadruplexes.
vrna_md_defaults_backtrack_type
void vrna_md_defaults_backtrack_type(char t)
Set default backtrack type, i.e. which DP matrix is used.
oldAliEn
int oldAliEn
use old alifold energies (with gaps)
vrna_md_defaults_backtrack
void vrna_md_defaults_backtrack(int flag)
Set default behavior for whether to backtrack secondary structures.
vrna_md_defaults_noGU_get
int vrna_md_defaults_noGU_get(void)
Get default behavior for treatment of G-U wobble pairs.
canonicalBPonly
int canonicalBPonly
vrna_md_s::backtrack_type
char backtrack_type
Specifies in which matrix to backtrack.
Definition: model.h:225
vrna_md_defaults_oldAliEn
void vrna_md_defaults_oldAliEn(int flag)
Set default behavior for whether to use old energy model for comparative structure prediction...
vrna_md_defaults_uniq_ML_get
int vrna_md_defaults_uniq_ML_get(void)
Get default behavior for creating additional matrix for unique multibranch loop prediction.
gquad
int gquad
Allow G-quadruplex formation.
vrna_md_defaults_ribo
void vrna_md_defaults_ribo(int flag)
Set default behavior for whether to use Ribosum Scoring in comparative structure prediction.
vrna_md_s::ribo
int ribo
Use ribosum scoring table in alifold energy model.
Definition: model.h:236
vrna_md_defaults_compute_bpp_get
int vrna_md_defaults_compute_bpp_get(void)
Get the default behavior for whether to compute base pair probabilities after partition function comp...
vrna_md_s::pair
int pair[MAXALPHA+1][MAXALPHA+1]
Integer representation of a base pair.
Definition: model.h:242
vrna_md_defaults_cv_fact_get
double vrna_md_defaults_cv_fact_get(void)
Get the default covariance scaling factor used in comparative structure prediction.
vrna_md_s::temperature
double temperature
The temperature used to scale the thermodynamic parameters.
Definition: model.h:188
vrna_md_s::dangles
int dangles
Specifies the dangle model used in any energy evaluation (0,1,2 or 3)
Definition: model.h:190
noLonelyPairs
int noLonelyPairs
Global switch to avoid/allow helices of length 1.
vrna_md_defaults_betaScale_get
double vrna_md_defaults_betaScale_get(void)
Get default scaling factor of thermodynamic temperature in Boltzmann factors.
vrna_md_s::circ
int circ
Assume RNA to be circular instead of linear.
Definition: model.h:219
vrna_md_defaults_gquad_get
int vrna_md_defaults_gquad_get(void)
Get default behavior for treatment of G-Quadruplexes.
vrna_md_s::canonicalBPonly
int canonicalBPonly
remove non-canonical bp's from constraint structures
Definition: model.h:221
max_bp_span
int max_bp_span
Maximum allowed base pair span.
vrna_md_defaults_compute_bpp
void vrna_md_defaults_compute_bpp(int flag)
Set the default behavior for whether to compute base pair probabilities after partition function comp...
vrna_md_defaults_nc_fact
void vrna_md_defaults_nc_fact(double factor)
vrna_md_defaults_noGUclosure
void vrna_md_defaults_noGUclosure(int flag)
Set default behavior for G-U pairs as closing pair for loops.
no_closingGU
int no_closingGU
GU allowed only inside stacks if set to 1.
vrna_md_defaults_logML_get
int vrna_md_defaults_logML_get(void)
Get default behavior recomputing free energies of multibranch loops using a logarithmic model...
vrna_md_s::noGUclosure
int noGUclosure
Do not allow loops to be closed by GU pair.
Definition: model.h:217
circ
int circ
backward compatibility variable.. this does not effect anything
vrna_md_s::energy_set
int energy_set
Specifies the energy set that defines set of compatible base pairs.
Definition: model.h:223
dangles
int dangles
Switch the energy model for dangling end contributions (0, 1, 2, 3)
vrna_md_s::min_loop_size
int min_loop_size
Minimum size of hairpin loops.
Definition: model.h:230
vrna_md_defaults_dangles_get
int vrna_md_defaults_dangles_get(void)
Get default dangle model for structure prediction.
vrna_md_defaults_noGUclosure_get
int vrna_md_defaults_noGUclosure_get(void)
Get default behavior for G-U pairs as closing pair for loops.
vrna_md_s::betaScale
double betaScale
A scaling factor for the thermodynamic temperature of the Boltzmann factors.
Definition: model.h:189