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.));
118 if(size < 3)
return energy;
123 strncpy(tl,
string, 6);
124 if ((ts=strstr(P->Tetraloops, tl)))
125 return (P->Tetraloop_E[(ts - P->Tetraloops)/7]);
129 strncpy(tl,
string, 8);
130 if ((ts=strstr(P->Hexaloops, tl)))
131 return (energy = P->Hexaloop_E[(ts - P->Hexaloops)/9]);
134 char tl[6]={0,0,0,0,0,0}, *ts;
135 strncpy(tl,
string, 5);
136 if ((ts=strstr(P->Triloops, tl))) {
137 return (P->Triloop_E[(ts - P->Triloops)/6]);
139 return (energy + (type>2 ? P->TerminalAU : 0));
142 energy += P->mismatchH[type][si1][sj1];
229 q = P->exphairpin[u];
231 q = P->exphairpin[30] * exp( -(P->lxc*log( u/30.))*10./kT);
237 char tl[7]={0,0,0,0,0,0,0}, *ts;
238 strncpy(tl,
string, 6);
239 if ((ts=strstr(P->Tetraloops, tl))){
241 return (
FLT_OR_DBL)(P->exptetra[(ts-P->Tetraloops)/7]);
243 q *= P->exptetra[(ts-P->Tetraloops)/7];
247 char tl[9]={0,0,0,0,0,0,0,0,0}, *ts;
248 strncpy(tl,
string, 8);
249 if ((ts=strstr(P->Hexaloops, tl)))
250 return (
FLT_OR_DBL)(P->exphex[(ts-P->Hexaloops)/9]);
253 char tl[6]={0,0,0,0,0,0}, *ts;
254 strncpy(tl,
string, 5);
255 if ((ts=strstr(P->Triloops, tl)))
256 return (
FLT_OR_DBL)(P->exptri[(ts-P->Triloops)/6]);
263 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:93
vrna_md_t model_details
Model details to be used in the recursions.
Definition: params.h:149
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:454
The datastructure that contains temperature scaled energy parameters.
Definition: params.h:55
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:218
Functions to deal with sets of energy parameters.
The data structure that contains temperature scaled Boltzmann weights of the energy parameters...
Definition: params.h:99
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:218
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:222