1 #ifndef VIENNA_RNA_PACKAGE_HAIRPIN_LOOPS_H 2 #define VIENNA_RNA_PACKAGE_HAIRPIN_LOOPS_H 11 # define INLINE inline 114 energy = P->hairpin[size];
116 energy = P->hairpin[30] + (int)(P->lxc * log((size) / 30.));
127 strncpy(tl,
string, 6);
128 if ((ts = strstr(P->Tetraloops, tl)))
129 return P->Tetraloop_E[(ts - P->Tetraloops) / 7];
130 }
else if (size == 6) {
134 strncpy(tl,
string, 8);
135 if ((ts = strstr(P->Hexaloops, tl)))
136 return energy = P->Hexaloop_E[(ts - P->Hexaloops) / 9];
137 }
else if (size == 3) {
141 strncpy(tl,
string, 5);
142 if ((ts = strstr(P->Triloops, tl)))
143 return P->Triloop_E[(ts - P->Triloops) / 6];
145 return energy + (type > 2 ? P->TerminalAU : 0);
149 energy += P->mismatchH[type][si1][sj1];
241 q = P->exphairpin[u];
243 q = P->exphairpin[30] * exp(-(P->lxc * log(u / 30.)) * 10. / kT);
253 strncpy(tl,
string, 6);
254 if ((ts = strstr(P->Tetraloops, tl))) {
256 return (
FLT_OR_DBL)(P->exptetra[(ts - P->Tetraloops) / 7]);
258 q *= P->exptetra[(ts - P->Tetraloops) / 7];
262 0, 0, 0, 0, 0, 0, 0, 0, 0
264 strncpy(tl,
string, 8);
265 if ((ts = strstr(P->Hexaloops, tl)))
266 return (
FLT_OR_DBL)(P->exphex[(ts - P->Hexaloops) / 9]);
271 strncpy(tl,
string, 5);
272 if ((ts = strstr(P->Triloops, tl)))
273 return (
FLT_OR_DBL)(P->exptri[(ts - P->Triloops) / 6]);
282 q *= P->expmismatchH[type][si1][sj1];
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_loops.h:104
FLT_OR_DBL vrna_exp_E_hp_loop(vrna_fold_compound_t *vc, int i, int j)
High-Level function for hairpin loop energy evaluation (partition function variant) ...
vrna_md_t model_details
Model details to be used in the recursions.
Definition: params.h:95
vrna_md_t model_details
Model details to be used in the recursions.
Definition: params.h:151
double FLT_OR_DBL
Typename for floating point number in partition function computations.
Definition: data_structures.h:48
The most basic data structure required by many functions throughout the RNAlib.
Definition: data_structures.h:463
The datastructure that contains temperature scaled energy parameters.
Definition: params.h:57
General utility- and helper-functions used throughout the ViennaRNA Package.
Various data structures and pre-processor macros.
int vrna_eval_hp_loop(vrna_fold_compound_t *vc, int i, int j)
Evaluate free energy of a hairpin loop.
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_loops.h:229
Functions to deal with sets of energy parameters.
The data structure that contains temperature scaled Boltzmann weights of the energy parameters...
Definition: params.h:101
int vrna_BT_hp_loop(vrna_fold_compound_t *vc, 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:216
int vrna_E_ext_hp_loop(vrna_fold_compound_t *vc, int i, int j)
Evaluate the free energy of an exterior hairpin loop and consider possible hard constraints.
int vrna_E_hp_loop(vrna_fold_compound_t *vc, int i, int j)
Evaluate the free energy of a hairpin loop and consider hard constraints if they apply.
int vrna_eval_ext_hp_loop(vrna_fold_compound_t *vc, int i, int j)
Evaluate free energy of an exterior hairpin loop.
Base pair stack element.
Definition: data_structures.h:229