1 #ifndef VIENNA_RNA_PACKAGE_LOOPS_HAIRPIN_H 2 #define VIENNA_RNA_PACKAGE_LOOPS_HAIRPIN_H 10 #ifdef VRNA_WARN_DEPRECATED 11 # if defined(DEPRECATED) 14 # if defined(__clang__) 15 # define DEPRECATED(func, msg) func __attribute__ ((deprecated("", msg))) 16 # elif defined(__GNUC__) 17 # define DEPRECATED(func, msg) func __attribute__ ((deprecated(msg))) 19 # define DEPRECATED(func, msg) func 22 # define DEPRECATED(func, msg) func 26 # define INLINE inline 158 energy = P->hairpin[size];
160 energy = P->hairpin[30] + (int)(P->lxc * log((size) / 30.));
171 memcpy(tl,
string,
sizeof(
char) * 6);
173 if ((ts = strstr(P->Tetraloops, tl)))
174 return P->Tetraloop_E[(ts - P->Tetraloops) / 7];
175 }
else if (size == 6) {
179 memcpy(tl,
string,
sizeof(
char) * 8);
181 if ((ts = strstr(P->Hexaloops, tl)))
182 return energy = P->Hexaloop_E[(ts - P->Hexaloops) / 9];
183 }
else if (size == 3) {
187 memcpy(tl,
string,
sizeof(
char) * 5);
189 if ((ts = strstr(P->Triloops, tl)))
190 return P->Triloop_E[(ts - P->Triloops) / 6];
192 return energy + (type > 2 ? P->TerminalAU : 0);
196 energy += P->mismatchH[type][si1][sj1];
243 q = P->exphairpin[u];
245 q = P->exphairpin[30] * exp(-(P->lxc * log(u / 30.)) * 10. / kT);
255 memcpy(tl,
string,
sizeof(
char) * 6);
257 if ((ts = strstr(P->Tetraloops, tl))) {
259 return (
FLT_OR_DBL)(P->exptetra[(ts - P->Tetraloops) / 7]);
261 q *= P->exptetra[(ts - P->Tetraloops) / 7];
267 memcpy(tl,
string,
sizeof(
char) * 8);
269 if ((ts = strstr(P->Hexaloops, tl)))
270 return (
FLT_OR_DBL)(P->exphex[(ts - P->Hexaloops) / 9]);
275 memcpy(tl,
string,
sizeof(
char) * 5);
277 if ((ts = strstr(P->Triloops, tl)))
278 return (
FLT_OR_DBL)(P->exptri[(ts - P->Triloops) / 6]);
287 q *= P->expmismatchH[type][si1][sj1];
342 #ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY 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:148
int special_hp
Include special hairpin contributions for tri, tetra and hexaloops.
Definition: model.h:204
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_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 .
vrna_md_t model_details
Model details to be used in the recursions.
Definition: basic.h:94
vrna_md_t model_details
Model details to be used in the recursions.
Definition: basic.h:151
double FLT_OR_DBL
Typename for floating point number in partition function computations.
Definition: basic.h:43
The most basic data structure required by many functions throughout the RNAlib.
Definition: fold_compound.h:132
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.
The datastructure that contains temperature scaled energy parameters.
Definition: basic.h:56
Various data structures and pre-processor macros.
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) ...
The data structure that contains temperature scaled Boltzmann weights of the energy parameters...
Definition: basic.h:101
int vrna_eval_ext_hp_loop(vrna_fold_compound_t *fc, int i, int j)
Evaluate free energy of an exterior hairpin loop.
int vrna_eval_hp_loop(vrna_fold_compound_t *fc, int i, int j)
Evaluate free energy of a hairpin loop.
Base pair stack element.
Definition: basic.h:142
Functions to deal with sets of energy parameters.
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:231
General utility- and helper-functions used throughout the ViennaRNA Package.