1 #ifndef VIENNA_RNA_PACKAGE_CONCENTRATIONS_H 2 #define VIENNA_RNA_PACKAGE_CONCENTRATIONS_H 3 4 #ifdef VRNA_WARN_DEPRECATED 5 # if defined(__clang__) 6 # define DEPRECATED(func, msg) func __attribute__ ((deprecated("", msg))) 7 # elif defined(__GNUC__) 8 # define DEPRECATED(func, msg) func __attribute__ ((deprecated(msg))) 9 # else 10 # define DEPRECATED(func, msg) func 11 # endif 12 #else 13 # define DEPRECATED(func, msg) func 14 #endif 15 16 /** 17 * @file concentrations.h 18 * @ingroup pf_fold cofold pf_cofold 19 * @brief Concentration computations for RNA-RNA interactions 20 */ 21 22 /** 23 * @{ 24 * @ingroup pf_cofold 25 */ 26 27 /** @brief Typename for the data structure that stores the dimer concentrations, #vrna_dimer_conc_s, as required by vrna_pf_dimer_concentration() */ 28 typedef struct vrna_dimer_conc_s vrna_dimer_conc_t; 29 30 31 #ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY 32 33 /** 34 * @brief Backward compatibility typedef for #vrna_dimer_conc_s 35 */ 36 typedef struct vrna_dimer_conc_s ConcEnt; 37 38 #endif 39 40 #include <ViennaRNA/params/basic.h> 41 42 /** 43 * @brief Data structure for concentration dependency computations 44 */ 45 struct vrna_dimer_conc_s { 46 double Ac_start; /**< @brief start concentration A */ 47 double Bc_start; /**< @brief start concentration B */ 48 double ABc; /**< @brief End concentration AB */ 49 double AAc; 50 double BBc; 51 double Ac; 52 double Bc; 53 }; 54 55 56 /** 57 * @brief Given two start monomer concentrations a and b, compute the 58 * concentrations in thermodynamic equilibrium of all dimers and the monomers. 59 * 60 * This function takes an array 'startconc' of input concentrations with alternating 61 * entries for the initial concentrations of molecules A and B (terminated by 62 * two zeroes), then computes the resulting equilibrium concentrations 63 * from the free energies for the dimers. Dimer free energies should be the 64 * dimer-only free energies, i.e. the FcAB entries from the #vrna_dimer_pf_t struct. 65 * 66 * @param FcAB Free energy of AB dimer (FcAB entry) 67 * @param FcAA Free energy of AA dimer (FcAB entry) 68 * @param FcBB Free energy of BB dimer (FcAB entry) 69 * @param FEA Free energy of monomer A 70 * @param FEB Free energy of monomer B 71 * @param startconc List of start concentrations [a0],[b0],[a1],[b1],...,[an][bn],[0],[0] 72 * @param exp_params The precomputed Boltzmann factors 73 * @return vrna_dimer_conc_t array containing the equilibrium energies and start concentrations 74 */ 75 vrna_dimer_conc_t *vrna_pf_dimer_concentrations(double FcAB, 76 double FcAA, 77 double FcBB, 78 double FEA, 79 double FEB, 80 const double *startconc, 81 const vrna_exp_param_t *exp_params); 82 83 84 /** 85 * @} 86 */ 87 88 #ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY 89 90 /* 91 ################################################# 92 # DEPRECATED FUNCTIONS # 93 ################################################# 94 */ 95 96 /** 97 * @brief Given two start monomer concentrations a and b, compute the 98 * concentrations in thermodynamic equilibrium of all dimers and the monomers. 99 * 100 * This function takes an array 'startconc' of input concentrations with alternating 101 * entries for the initial concentrations of molecules A and B (terminated by 102 * two zeroes), then computes the resulting equilibrium concentrations 103 * from the free energies for the dimers. Dimer free energies should be the 104 * dimer-only free energies, i.e. the FcAB entries from the #vrna_dimer_pf_t struct. 105 * 106 * @deprecated{ Use vrna_pf_dimer_concentrations() instead!} 107 * 108 * @param FEAB Free energy of AB dimer (FcAB entry) 109 * @param FEAA Free energy of AA dimer (FcAB entry) 110 * @param FEBB Free energy of BB dimer (FcAB entry) 111 * @param FEA Free energy of monomer A 112 * @param FEB Free energy of monomer B 113 * @param startconc List of start concentrations [a0],[b0],[a1],[b1],...,[an][bn],[0],[0] 114 * @return vrna_dimer_conc_t array containing the equilibrium energies and start concentrations 115 */ 116 DEPRECATED(vrna_dimer_conc_t *get_concentrations(double FEAB, 117 double FEAA, 118 double FEBB, 119 double FEA, 120 double FEB, 121 double *startconc), 122 "Use vrna_pf_dimer_concentrations() instead"); 123 124 #endif 125 126 #endif 127