Partition Function for Two Hybridized Sequences — ViennaRNA Package

# Partition Function for Two Hybridized Sequences

To simplify the implementation the partition function computation is done internally in a null model that does not include the duplex initiation energy, i.e. the entropic penalty for producing a dimer from two monomers). The resulting free energies and pair probabilities are initially relative to that null model. In a second step the free energies can be corrected to include the dimerization penalty, and the pair probabilities can be divided into the conditional pair probabilities given that a re dimer is formed or not formed. See Bernhart et al. [2006] for further details.

As for folding one RNA molecule, this computes the partition function of all possible structures and the base pair probabilities. Uses the same global #pf_scale variable to avoid overflows.

After computing the partition functions of all possible dimeres one can compute the probabilities of base pairs, the concentrations out of start concentrations and sofar and soaway.

Dimer formation is inherently concentration dependent. Given the free energies of the monomers A and B and dimers AB, AA, and BB one can compute the equilibrium concentrations, given input concentrations of A and B, see e.g. Dimitrov & Zuker (2004)

typedef struct vrna_dimer_conc_s vrna_dimer_conc_t

  Typename for the data structure that stores the dimer concentrations, vrna_dimer_conc_s, as required by vrna_pf_dimer_concentration().

      #include <ViennaRNA/concentrations.h>

typedef struct vrna_dimer_conc_s ConcEnt

  Backward compatibility typedef for vrna_dimer_conc_s.

      #include <ViennaRNA/concentrations.h>

vrna_dimer_conc_t *vrna_pf_dimer_concentrations(double FcAB, double FcAA, double FcBB, double FEA, double FEB, const double *startconc, const vrna_exp_param_t *exp_params)

  Given two start monomer concentrations a and b, compute the concentrations in thermodynamic equilibrium of all dimers and the monomers.

      #include <ViennaRNA/concentrations.h>

  This function takes an array ‘startconc’ of input concentrations with alternating entries for the initial concentrations of molecules A and B (terminated by two zeroes), then computes the resulting equilibrium concentrations from the free energies for the dimers. Dimer free energies should be the dimer-only free energies, i.e. the FcAB entries from the vrna_dimer_pf_t struct.

  Parameters:

    - FcAB – Free energy of AB dimer (FcAB entry)

    - FcAA – Free energy of AA dimer (FcAB entry)

    - FcBB – Free energy of BB dimer (FcAB entry)

    - FEA – Free energy of monomer A

    - FEB – Free energy of monomer B

    - startconc – List of start concentrations [a0],[b0],[a1],[b1],…,[an][bn],[0],[0]

    - exp_params – The precomputed Boltzmann factors

  Returns:

    vrna_dimer_conc_t array containing the equilibrium energies and start concentrations

double *vrna_equilibrium_constants(const double *dG_complexes, const double *dG_strands, const unsigned int **A, double kT, size_t strands, size_t complexes)

  Compute equilibrium constants for interacting RNA complexes.

      #include <ViennaRNA/concentrations.h>

  Given a set of partition functions for interacting RNA complexes this function computes the equilibrium constants for each complex. For instance, the equilibrium constant \( K_\text{AB} \) a dimer complex composed of two strands \( A \) and \( B \) can be easily computed from the partition functions \( Z_A \) and \( Z_B \) of the monomer strands and the partition function \( Z_{AB} \) of AB complexes, i.e.:

  \[ K_{AB} = \frac{Z_{AB}}{Z_A Z_B} \]

  SWIG Wrapper Notes:

    This function is available as overloaded function `equilibrium_constants()` where the last two parameters `strands` and `complexes` are optional. In case they are omitted, the respective numbers will be determined from the length of the input list parameters `dG_complexes` and `dG_strands`, respectively. See also `RNA.equilibrium_constants()` in the Python API.

  Parameters:

    - dG_complexes – The partition functions of the complexes (specified as ensemble free energies \( \Delta G = -RT \ln Z \) in units of \( kcal \cdot mol^{-1} \)

    - dG_strands – The partition functions of the monomer species (specified as ensemble free energies \( \Delta G = -RT \ln Z \) in units of \( kcal \cdot mol^{-1} \)

    - A – An \( N x M \) matrix indicating the composition of the individual complexes ( \( M \)), i.e. how many of the monomers ( \( N \) ) each complex consists of

    - kT – Thermodynamic temperature times Boltzmann constant in units of \( cal \cdot mol^{-1} \) (used for temperature scaling)

    - strands – The number of monomer species

    - complexes – The number of interacting complexes

  Returns:

    The equilibrium constants for each complex

vrna_dimer_pf_t vrna_pf_co_fold(const char *seq, char *structure, vrna_ep_t **pl)

  Calculate partition function and base pair probabilities of nucleic acid/nucleic acid dimers.

      #include <ViennaRNA/partfunc/global.h>

  This simplified interface to vrna_pf_dimer() computes the partition function and, if required, base pair probabilities for an RNA-RNA interaction using default options. Memory required for dynamic programming (DP) matrices will be allocated and free’d on-the-fly. Hence, after return of this function, the recursively filled matrices are not available any more for any post-processing.

  See also

  vrna_pf_dimer()

  Note

  In case you want to use the filled DP matrices for any subsequent post-processing step, or you require other conditions than specified by the default model details, use vrna_pf_dimer(), and the data structure vrna_fold_compound_t instead.

  Parameters:

    - seq – Two concatenated RNA sequences with a delimiting ‘&’ in between

    - structure – A pointer to the character array where position-wise pairing propensity will be stored. (Maybe NULL)

    - pl – A pointer to a list of vrna_ep_t to store pairing probabilities (Maybe NULL)

  Returns:

    vrna_dimer_pf_t structure containing a set of energies needed for concentration computations.

typedef struct vrna_dimer_pf_s vrna_dimer_pf_t

  Typename for the data structure that stores the dimer partition functions, vrna_dimer_pf_s, as returned by vrna_pf_dimer().

      #include <ViennaRNA/partfunc/global.h>

typedef struct vrna_dimer_pf_s cofoldF

  Backward compatibility typedef for vrna_dimer_pf_s.

      #include <ViennaRNA/partfunc/global.h>

int mirnatog

  Toggles no intrabp in 2nd mol.

      #include <ViennaRNA/part_func_co.h>

double F_monomer[2]

  Free energies of the two monomers.

      #include <ViennaRNA/part_func_co.h>

double *vrna_equilibrium_conc(const double *eq_constants, double *concentration_strands, const unsigned int **A, size_t num_strands, size_t num_complexes)

  Compute equilibrium concentration of interacting RNA complexes.

      #include <ViennaRNA/wrap_dlib.h>

  This function allows one to compute, given a set of initial RNA monomer concentrations, equilibrium concentrations for a set of interacting RNA complexes.

  SWIG Wrapper Notes:

    This function is available as overloaded function `equilibrium_conc()` where the last two parameters `num_strands` and `num_complexes` are optional. In case they are omitted, the respective numbers will be determined from the length of the input list parameters `eq_constants` and `concentration_strands`, respectively. Note, that the C implementation stores equilibrium concentrations for the monomer species in place within the `concentration_strands` parameter. In contrast to that, the scripting language wrappers will rather append them to the returned output list.

  Parameters:

    - eq_constants – The equilibrium constants for the individual complexes

    - concentration_strands – The initial concentrations of the monomer species (also used for output of the equilibrium concentrations for the monomer species)

    - A – An `NxM` matrix indicating the composition of the individual complexes (M), i.e. how many of the monomers (N) each complex consists of

    - num_strands – The number of monomer species

    - num_complexes – The number of interacting complexes

  Returns:

    The equilibrium concentrations for each complex