Compute various thermodynamic properties using the partition function. More...
Compute various thermodynamic properties using the partition function.
Many thermodynamic properties can be derived from the partition function
In particular, for nucleic acids in equilibrium the probabilty of a particular structural feature
follows Boltzmanns law, i.e.
The actual probabilities can then be obtained from the ratio of those structures containing and all structures, i.e.
Consequently, a particular secondary structure has equilibrium probability
which can be easily computed once and
are known.
On the other hand, efficient dynamic programming algorithms exist to compute the equilibrium probabilities
of base pairs without the need for exhaustive enumeration of
.
This interface provides the functions for all thermodynamic property computations implemented in RNAlib.
Files | |
file | equilibrium_probs.h |
Equilibrium Probability implementations. | |
file | heat_capacity.h |
Compute heat capacity for an RNA. | |
Data Structures | |
struct | vrna_heat_capacity_s |
A single result from heat capacity computations. More... | |
Typedefs | |
typedef void() | vrna_heat_capacity_callback(float temp, float heat_capacity, void *data) |
The callback for heat capacity predictions. More... | |
typedef struct vrna_heat_capacity_s | vrna_heat_capacity_t |
A single result from heat capacity computations. More... | |
Base pair probabilities and derived computations | |
int | vrna_pairing_probs (vrna_fold_compound_t *vc, char *structure) |
double | vrna_mean_bp_distance_pr (int length, FLT_OR_DBL *pr) |
Get the mean base pair distance in the thermodynamic ensemble from a probability matrix. More... | |
double | vrna_mean_bp_distance (vrna_fold_compound_t *vc) |
Get the mean base pair distance in the thermodynamic ensemble. More... | |
double | vrna_ensemble_defect_pt (vrna_fold_compound_t *fc, const short *pt) |
Compute the Ensemble Defect for a given target structure provided as a vrna_ptable. More... | |
double | vrna_ensemble_defect (vrna_fold_compound_t *fc, const char *structure) |
Compute the Ensemble Defect for a given target structure. More... | |
double * | vrna_positional_entropy (vrna_fold_compound_t *fc) |
Compute a vector of positional entropies. More... | |
vrna_ep_t * | vrna_stack_prob (vrna_fold_compound_t *vc, double cutoff) |
Compute stacking probabilities. More... | |
Multimer probabilities computations | |
void | vrna_pf_dimer_probs (double FAB, double FA, double FB, vrna_ep_t *prAB, const vrna_ep_t *prA, const vrna_ep_t *prB, int Alength, const vrna_exp_param_t *exp_params) |
Compute Boltzmann probabilities of dimerization without homodimers. More... | |
Structure probability computations | |
double | vrna_pr_structure (vrna_fold_compound_t *fc, const char *structure) |
Compute the equilibrium probability of a particular secondary structure. More... | |
double | vrna_pr_energy (vrna_fold_compound_t *vc, double e) |
Basic heat capacity function interface | |
vrna_heat_capacity_t * | vrna_heat_capacity (vrna_fold_compound_t *fc, float T_min, float T_max, float T_increment, unsigned int mpoints) |
Compute the specific heat for an RNA. More... | |
int | vrna_heat_capacity_cb (vrna_fold_compound_t *fc, float T_min, float T_max, float T_increment, unsigned int mpoints, vrna_heat_capacity_callback *cb, void *data) |
Compute the specific heat for an RNA (callback variant) More... | |
Simplified heat capacity computation | |
vrna_heat_capacity_t * | vrna_heat_capacity_simple (const char *sequence, float T_min, float T_max, float T_increment, unsigned int mpoints) |
Compute the specific heat for an RNA (simplified variant) More... | |
struct vrna_heat_capacity_s |
A single result from heat capacity computations.
Data Fields | |
float | temperature |
The temperature in °C. | |
float | heat_capacity |
The specific heat at this temperature in Kcal/(Mol * K) | |
typedef void() vrna_heat_capacity_callback(float temp, float heat_capacity, void *data) |
#include <ViennaRNA/heat_capacity.h>
The callback for heat capacity predictions.
temp | The current temperature this results corresponds to in °C |
heat_capacity | The heat capacity in Kcal/(Mol * K) |
data | Some arbitrary data pointer passed through by the function executing the callback |
typedef struct vrna_heat_capacity_s vrna_heat_capacity_t |
#include <ViennaRNA/heat_capacity.h>
A single result from heat capacity computations.
This is a convenience typedef for vrna_heat_capacity_s, i.e. results as obtained from vrna_heat_capacity()
double vrna_mean_bp_distance_pr | ( | int | length, |
FLT_OR_DBL * | pr | ||
) |
#include <ViennaRNA/equilibrium_probs.h>
Get the mean base pair distance in the thermodynamic ensemble from a probability matrix.
this can be computed from the pair probs as
length | The length of the sequence |
pr | The matrix containing the base pair probabilities |
double vrna_mean_bp_distance | ( | vrna_fold_compound_t * | vc | ) |
#include <ViennaRNA/equilibrium_probs.h>
Get the mean base pair distance in the thermodynamic ensemble.
this can be computed from the pair probs as
vc | The fold compound data structure |
double vrna_ensemble_defect_pt | ( | vrna_fold_compound_t * | fc, |
const short * | pt | ||
) |
#include <ViennaRNA/equilibrium_probs.h>
Compute the Ensemble Defect for a given target structure provided as a vrna_ptable.
Given a target structure , compute the average dissimilarity of a randomly drawn structure from the ensemble, i.e.:
with sequence length , the probability
of a base pair
, the probability
of nucleotide
being unpaired, and the indicator variable
if
, and
otherwise.
fc
must contain a valid base pair probability matrix. This means that partition function and base pair probabilities must have been computed using fc
before execution of this function!fc | A fold_compound with pre-computed base pair probabilities |
pt | A pair table representing a target structure |
double vrna_ensemble_defect | ( | vrna_fold_compound_t * | fc, |
const char * | structure | ||
) |
#include <ViennaRNA/equilibrium_probs.h>
Compute the Ensemble Defect for a given target structure.
This is a wrapper around vrna_ensemble_defect_pt(). Given a target structure , compute the average dissimilarity of a randomly drawn structure from the ensemble, i.e.:
with sequence length , the probability
of a base pair
, the probability
of nucleotide
being unpaired, and the indicator variable
if
, and
otherwise.
fc
must contain a valid base pair probability matrix. This means that partition function and base pair probabilities must have been computed using fc
before execution of this function!fc | A fold_compound with pre-computed base pair probabilities |
structure | A target structure in dot-bracket notation |
options
can be used. See also the description of vrna_ptable_from_string() for available options. (default: VRNA_BRACKETS_RND). double * vrna_positional_entropy | ( | vrna_fold_compound_t * | fc | ) |
#include <ViennaRNA/equilibrium_probs.h>
Compute a vector of positional entropies.
This function computes the positional entropies from base pair probabilities as
with unpaired probabilities .
Low entropy regions have little structural flexibility and the reliability of the predicted structure is high. High entropy implies many structural alternatives. While these alternatives may be functionally important, they make structure prediction more difficult and thus less reliable.
fc | A fold_compound with pre-computed base pair probabilities |
vrna_ep_t * vrna_stack_prob | ( | vrna_fold_compound_t * | vc, |
double | cutoff | ||
) |
#include <ViennaRNA/equilibrium_probs.h>
Compute stacking probabilities.
For each possible base pair , compute the probability of a stack
,
.
vc | The fold compound data structure with precomputed base pair probabilities |
cutoff | A cutoff value that limits the output to stacks with ![]() |
void vrna_pf_dimer_probs | ( | double | FAB, |
double | FA, | ||
double | FB, | ||
vrna_ep_t * | prAB, | ||
const vrna_ep_t * | prA, | ||
const vrna_ep_t * | prB, | ||
int | Alength, | ||
const vrna_exp_param_t * | exp_params | ||
) |
#include <ViennaRNA/equilibrium_probs.h>
Compute Boltzmann probabilities of dimerization without homodimers.
Given the pair probabilities and free energies (in the null model) for a dimer AB and the two constituent monomers A and B, compute the conditional pair probabilities given that a dimer AB actually forms. Null model pair probabilities are given as a list as produced by vrna_plist_from_probs(), the dimer probabilities 'prAB' are modified in place.
FAB | free energy of dimer AB |
FA | free energy of monomer A |
FB | free energy of monomer B |
prAB | pair probabilities for dimer |
prA | pair probabilities monomer |
prB | pair probabilities monomer |
Alength | Length of molecule A |
exp_params | The precomputed Boltzmann factors |
double vrna_pr_structure | ( | vrna_fold_compound_t * | fc, |
const char * | structure | ||
) |
#include <ViennaRNA/equilibrium_probs.h>
Compute the equilibrium probability of a particular secondary structure.
The probability of a particular secondary structure
can be computed as
from the structures free energy and the partition function
where is the gas constant and
the thermodynamic temperature.
fc
must have went through a call to vrna_pf() to fill the dynamic programming matrices with the corresponding partition function.fc | The fold compound data structure with precomputed partition function |
structure | The secondary structure to compute the probability for in dot-bracket notation |
double vrna_pr_energy | ( | vrna_fold_compound_t * | fc, |
double | e | ||
) |
#include <ViennaRNA/equilibrium_probs.h>
vrna_heat_capacity_t * vrna_heat_capacity | ( | vrna_fold_compound_t * | fc, |
float | T_min, | ||
float | T_max, | ||
float | T_increment, | ||
unsigned int | mpoints | ||
) |
#include <ViennaRNA/heat_capacity.h>
Compute the specific heat for an RNA.
This function computes an RNAs specific heat in a given temperature range from the partition function by numeric differentiation. The result is returned as a list of pairs of temperature in °C and specific heat in Kcal/(Mol*K).
Users can specify the temperature range for the computation from T_min
to T_max
, as well as the increment step size T_increment
. The latter also determines how many times the partition function is computed. Finally, the parameter mpoints
determines how smooth the curve should be. The algorithm itself fits a parabola to data points to calculate 2nd derivatives. Increasing this parameter produces a smoother curve.
fc | The vrna_fold_compound_t with the RNA sequence to analyze |
T_min | Lowest temperature in °C |
T_max | Highest temperature in °C |
T_increment | Stepsize for temperature incrementation in °C (a reasonable choice might be 1°C) |
mpoints | The number of interpolation points to calculate 2nd derivative (a reasonable choice might be 2, min: 1, max: 100) |
T_min
T_min
, T_max
, T_increment
, and mpoints
are omitted, they default to 0.0, 100.0, 1.0 and 2, respectively. int vrna_heat_capacity_cb | ( | vrna_fold_compound_t * | fc, |
float | T_min, | ||
float | T_max, | ||
float | T_increment, | ||
unsigned int | mpoints, | ||
vrna_heat_capacity_callback * | cb, | ||
void * | data | ||
) |
#include <ViennaRNA/heat_capacity.h>
Compute the specific heat for an RNA (callback variant)
Similar to vrna_heat_capacity(), this function computes an RNAs specific heat in a given temperature range from the partition function by numeric differentiation. Instead of returning a list of temperature/specific heat pairs, however, this function returns the individual results through a callback mechanism. The provided function will be called for each result and passed the corresponding temperature and specific heat values along with the arbitrary data as provided through the data
pointer argument.
Users can specify the temperature range for the computation from T_min
to T_max
, as well as the increment step size T_increment
. The latter also determines how many times the partition function is computed. Finally, the parameter mpoints
determines how smooth the curve should be. The algorithm itself fits a parabola to data points to calculate 2nd derivatives. Increasing this parameter produces a smoother curve.
fc | The vrna_fold_compound_t with the RNA sequence to analyze |
T_min | Lowest temperature in °C |
T_max | Highest temperature in °C |
T_increment | Stepsize for temperature incrementation in °C (a reasonable choice might be 1°C) |
mpoints | The number of interpolation points to calculate 2nd derivative (a reasonable choice might be 2, min: 1, max: 100) |
cb | The user-defined callback function that receives the individual results |
data | An arbitrary data structure that will be passed to the callback in conjunction with the results |
vrna_heat_capacity_t * vrna_heat_capacity_simple | ( | const char * | sequence, |
float | T_min, | ||
float | T_max, | ||
float | T_increment, | ||
unsigned int | mpoints | ||
) |
#include <ViennaRNA/heat_capacity.h>
Compute the specific heat for an RNA (simplified variant)
Similar to vrna_heat_capacity(), this function computes an RNAs specific heat in a given temperature range from the partition function by numeric differentiation. This simplified version, however, only requires the RNA sequence as input instead of a vrna_fold_compound_t data structure. The result is returned as a list of pairs of temperature in °C and specific heat in Kcal/(Mol*K).
Users can specify the temperature range for the computation from T_min
to T_max
, as well as the increment step size T_increment
. The latter also determines how many times the partition function is computed. Finally, the parameter mpoints
determines how smooth the curve should be. The algorithm itself fits a parabola to data points to calculate 2nd derivatives. Increasing this parameter produces a smoother curve.
sequence | The RNA sequence input (must be uppercase) |
T_min | Lowest temperature in °C |
T_max | Highest temperature in °C |
T_increment | Stepsize for temperature incrementation in °C (a reasonable choice might be 1°C) |
mpoints | The number of interpolation points to calculate 2nd derivative (a reasonable choice might be 2, min: 1, max: 100) |
T_min
T_min
, T_max
, T_increment
, and mpoints
are omitted, they default to 0.0, 100.0, 1.0 and 2, respectively.