RNAlib-2.2.0RC0
hairpin_loops.h File Reference

Energy evaluation of hairpin loops for MFE and partition function calculations. More...

+ Include dependency graph for hairpin_loops.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

PRIVATE int E_Hairpin (int size, int type, int si1, int sj1, const char *string, paramT *P)
 Compute the Energy of a hairpin-loop. More...
 
PRIVATE double exp_E_Hairpin (int u, int type, short si1, short sj1, const char *string, pf_paramT *P)
 Compute Boltzmann weight $e^{-\Delta G/kT} $ of a hairpin loop. More...
 
PRIVATE int E_hp_loop (int i, int j, vrna_fold_compound *vc)
 High-Level function for hairpin loop energy evaluation.
 
PRIVATE double exp_E_hp_loop (int i, int j, vrna_fold_compound *vc)
 High-Level function for hairpin loop energy evaluation (partition function variant) More...
 

Detailed Description

Energy evaluation of hairpin loops for MFE and partition function calculations.

Function Documentation

PRIVATE int E_Hairpin ( int  size,
int  type,
int  si1,
int  sj1,
const char *  string,
paramT P 
)

Compute the Energy of a hairpin-loop.

To evaluate the free energy of a hairpin-loop, several parameters have to be known. A general hairpin-loop has this structure:

      a3 a4
    a2     a5
    a1     a6
      X - Y
      |   |
      5'  3'

where X-Y marks the closing pair [e.g. a (G,C) pair]. The length of this loop is 6 as there are six unpaired nucleotides (a1-a6) enclosed by (X,Y). The 5' mismatching nucleotide is a1 while the 3' mismatch is a6. The nucleotide sequence of this loop is "a1.a2.a3.a4.a5.a6"

Note
The parameter sequence should contain the sequence of the loop in capital letters of the nucleic acid alphabet if the loop size is below 7. This is useful for unusually stable tri-, tetra- and hexa-loops which are treated differently (based on experimental data) if they are tabulated.
See also
scale_parameters()
paramT
Warning
Not (really) thread safe! A threadsafe implementation will replace this function in a future release!
Energy evaluation may change due to updates in global variable "tetra_loop"
Parameters
sizeThe size of the loop (number of unpaired nucleotides)
typeThe pair type of the base pair closing the hairpin
si1The 5'-mismatching nucleotide
sj1The 3'-mismatching nucleotide
stringThe sequence of the loop
PThe datastructure containing scaled energy parameters
Returns
The Free energy of the Hairpin-loop in dcal/mol
PRIVATE double exp_E_Hairpin ( int  u,
int  type,
short  si1,
short  sj1,
const char *  string,
pf_paramT P 
)

Compute Boltzmann weight $e^{-\Delta G/kT} $ of a hairpin loop.

multiply by scale[u+2]

See also
get_scaled_pf_parameters()
pf_paramT
E_Hairpin()
Warning
Not (really) thread safe! A threadsafe implementation will replace this function in a future release!
Energy evaluation may change due to updates in global variable "tetra_loop"
Parameters
uThe size of the loop (number of unpaired nucleotides)
typeThe pair type of the base pair closing the hairpin
si1The 5'-mismatching nucleotide
sj1The 3'-mismatching nucleotide
stringThe sequence of the loop
PThe datastructure containing scaled Boltzmann weights of the energy parameters
Returns
The Boltzmann weight of the Hairpin-loop
PRIVATE double exp_E_hp_loop ( int  i,
int  j,
vrna_fold_compound vc 
)

High-Level function for hairpin loop energy evaluation (partition function variant)

See also
E_hp_loop() for it's free energy counterpart