1#ifndef VIENNA_RNA_PACKAGE_LOOPS_HAIRPIN_H
2#define VIENNA_RNA_PACKAGE_LOOPS_HAIRPIN_H
11#ifdef VRNA_WARN_DEPRECATED
12# if defined(DEPRECATED)
15# if defined(__clang__)
16# define DEPRECATED(func, msg) func __attribute__ ((deprecated("", msg)))
17# elif defined(__GNUC__)
18# define DEPRECATED(func, msg) func __attribute__ ((deprecated(msg)))
20# define DEPRECATED(func, msg) func
23# define DEPRECATED(func, msg) func
159 energy = P->hairpin[size];
161 energy = P->hairpin[30] + (int)(P->lxc * log((size) / 30.));
172 memcpy(tl,
string,
sizeof(
char) * 6);
174 if ((ts = strstr(P->Tetraloops, tl)))
175 return P->Tetraloop_E[(ts - P->Tetraloops) / 7];
176 }
else if (size == 6) {
180 memcpy(tl,
string,
sizeof(
char) * 8);
182 if ((ts = strstr(P->Hexaloops, tl)))
183 return P->Hexaloop_E[(ts - P->Hexaloops) / 9];
184 }
else if (size == 3) {
188 memcpy(tl,
string,
sizeof(
char) * 5);
190 if ((ts = strstr(P->Triloops, tl)))
191 return P->Triloop_E[(ts - P->Triloops) / 6];
193 return energy + (type > 2 ? P->TerminalAU : 0);
197 energy += P->mismatchH[type][si1][sj1];
244 q = P->exphairpin[u];
246 q = P->exphairpin[30] * exp(-(P->lxc * log(u / 30.)) * 10. / kT);
256 memcpy(tl,
string,
sizeof(
char) * 6);
258 if ((ts = strstr(P->Tetraloops, tl))) {
260 return (
FLT_OR_DBL)(P->exptetra[(ts - P->Tetraloops) / 7]);
262 q *= P->exptetra[(ts - P->Tetraloops) / 7];
268 memcpy(tl,
string,
sizeof(
char) * 8);
270 if ((ts = strstr(P->Hexaloops, tl)))
271 return (
FLT_OR_DBL)(P->exphex[(ts - P->Hexaloops) / 9]);
276 memcpy(tl,
string,
sizeof(
char) * 5);
278 if ((ts = strstr(P->Triloops, tl)))
279 return (
FLT_OR_DBL)(P->exptri[(ts - P->Triloops) / 6]);
288 q *= P->expmismatchH[type][si1][sj1];
343#ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY
Various data structures and pre-processor macros.
The Basic Fold Compound API.
double FLT_OR_DBL
Typename for floating point number in partition function computations.
Definition: basic.h:43
Base pair stack element.
Definition: basic.h:143
vrna_md_t model_details
Model details to be used in the recursions.
Definition: basic.h:96
vrna_md_t model_details
Model details to be used in the recursions.
Definition: basic.h:154
The data structure that contains temperature scaled Boltzmann weights of the energy parameters.
Definition: basic.h:103
The datastructure that contains temperature scaled energy parameters.
Definition: basic.h:57
PRIVATE FLT_OR_DBL exp_E_Hairpin(int u, int type, short si1, short sj1, const char *string, vrna_exp_param_t *P)
Compute Boltzmann weight of a hairpin loop.
Definition: hairpin.h:232
int vrna_E_hp_loop(vrna_fold_compound_t *fc, int i, int j)
Evaluate the free energy of a hairpin loop and consider hard constraints if they apply.
int vrna_E_ext_hp_loop(vrna_fold_compound_t *fc, int i, int j)
Evaluate the free energy of an exterior hairpin loop and consider possible hard constraints.
int vrna_eval_hp_loop(vrna_fold_compound_t *fc, int i, int j)
Evaluate free energy of a hairpin loop.
FLT_OR_DBL vrna_exp_E_hp_loop(vrna_fold_compound_t *fc, int i, int j)
High-Level function for hairpin loop energy evaluation (partition function variant)
PRIVATE int E_Hairpin(int size, int type, int si1, int sj1, const char *string, vrna_param_t *P)
Compute the Energy of a hairpin-loop.
Definition: hairpin.h:149
int vrna_eval_ext_hp_loop(vrna_fold_compound_t *fc, int i, int j)
Evaluate free energy of an exterior hairpin loop.
The most basic data structure required by many functions throughout the RNAlib.
Definition: fold_compound.h:148
int vrna_BT_hp_loop(vrna_fold_compound_t *fc, int i, int j, int en, vrna_bp_stack_t *bp_stack, int *stack_count)
Backtrack a hairpin loop closed by .
int special_hp
Include special hairpin contributions for tri, tetra and hexaloops.
Definition: model.h:208
Functions to deal with sets of energy parameters.
General utility- and helper-functions used throughout the ViennaRNA Package.