All relevant functions to retrieve and copy pre-calculated energy parameter sets as well as reading/writing the energy parameter set from/to file(s). More…
// typedefs typedef struct vrna_param_s vrna_param_t typedef struct vrna_exp_param_s vrna_exp_param_t typedef struct vrna_param_s paramT typedef struct vrna_exp_param_s pf_paramT // structs struct vrna_exp_param_s struct vrna_param_s // global functions vrna_param_t* vrna_params (vrna_md_t* md) vrna_param_t* vrna_params_copy (vrna_param_t* par) vrna_exp_param_t* vrna_exp_params (vrna_md_t* md) vrna_exp_param_t* vrna_exp_params_comparative ( unsigned int n_seq, vrna_md_t* md ) vrna_exp_param_t* vrna_exp_params_copy (vrna_exp_param_t* par) void vrna_params_subst ( vrna_fold_compound_t* vc, vrna_param_t* par ) void vrna_exp_params_subst ( vrna_fold_compound_t* vc, vrna_exp_param_t* params ) void vrna_exp_params_rescale ( vrna_fold_compound_t* vc, double* mfe ) void vrna_params_reset ( vrna_fold_compound_t* vc, vrna_md_t* md_p ) void vrna_exp_params_reset ( vrna_fold_compound_t* vc, vrna_md_t* md_p ) void vrna_params_prepare ( vrna_fold_compound_t* vc, unsigned int options ) vrna_param_t* get_parameter_copy (vrna_param_t* par) vrna_exp_param_t* get_scaled_pf_parameters (void) vrna_exp_param_t* get_boltzmann_factors ( double temperature, double betaScale, vrna_md_t md, double pf_scale ) vrna_exp_param_t* get_boltzmann_factor_copy (vrna_exp_param_t* parameters) vrna_exp_param_t* get_scaled_alipf_parameters (unsigned int n_seq) vrna_exp_param_t* get_boltzmann_factors_ali ( unsigned int n_seq, double temperature, double betaScale, vrna_md_t md, double pf_scale ) vrna_param_t* scale_parameters (void) vrna_param_t* get_scaled_parameters ( double temperature, vrna_md_t md ) vrna_param_t* copy_parameters (void) vrna_param_t* set_parameters (vrna_param_t* dest) vrna_exp_param_t* scale_pf_parameters (void) vrna_exp_param_t* copy_pf_param (void) vrna_exp_param_t* set_pf_param (vrna_param_t* dest) // macros #define VRNA_GQUAD_MAX_BOX_SIZE #define VRNA_GQUAD_MAX_LINKER_LENGTH #define VRNA_GQUAD_MAX_STACK_SIZE #define VRNA_GQUAD_MIN_BOX_SIZE #define VRNA_GQUAD_MIN_LINKER_LENGTH #define VRNA_GQUAD_MIN_STACK_SIZE
typedef struct vrna_param_s vrna_param_t
typedef struct vrna_exp_param_s vrna_exp_param_t
typedef struct vrna_param_s paramT
typedef struct vrna_exp_param_s pf_paramT
vrna_param_t* vrna_params (vrna_md_t* md)
If a NULL pointer is passed for the model details parameter, the default model parameters are stored within the requested vrna_param_t structure.
Parameters:
md | A pointer to the model details to store inside the structure (Maybe NULL) |
Returns:
A pointer to the memory location where the requested parameters are stored
See also:
vrna_param_t* vrna_params_copy (vrna_param_t* par)
If NULL is passed as parameter, a default set of energy parameters is created and returned.
Parameters:
par | The free energy parameters that are to be copied (Maybe NULL) |
Returns:
A copy or a default set of the (provided) parameters
See also:
vrna_exp_param_t* vrna_exp_params (vrna_md_t* md)
This function returns a data structure that contains all necessary precomputed energy contributions for each type of loop.
In contrast to vrna_params() , the free energies within this data structure are stored as their Boltzmann factors, i.e.
:math:` exp(-E / kT) `
where :math:` E ` is the free energy.
If a NULL pointer is passed for the model details parameter, the default model parameters are stored within the requested vrna_exp_param_t structure.
Parameters:
md | A pointer to the model details to store inside the structure (Maybe NULL) |
Returns:
A pointer to the memory location where the requested parameters are stored
See also:
vrna_md_t , vrna_md_set_default() , vrna_params() , vrna_rescale_pf_params()
vrna_exp_param_t* vrna_exp_params_comparative ( unsigned int n_seq, vrna_md_t* md )
If a NULL pointer is passed for the model details parameter, the default model parameters are stored within the requested vrna_exp_param_t structure.
Parameters:
n_seq | The number of sequences in the alignment |
md | A pointer to the model details to store inside the structure (Maybe NULL) |
Returns:
A pointer to the memory location where the requested parameters are stored
See also:
vrna_md_t , vrna_md_set_default() , vrna_exp_params() , vrna_params()
vrna_exp_param_t* vrna_exp_params_copy (vrna_exp_param_t* par)
If NULL is passed as parameter, a default set of energy parameters is created and returned.
Parameters:
par | The free energy parameters that are to be copied (Maybe NULL) |
Returns:
A copy or a default set of the (provided) parameters
See also:
void vrna_params_subst ( vrna_fold_compound_t* vc, vrna_param_t* par )
Passing NULL as second argument leads to a reset of the energy parameters within vc to their default values. Otherwise, the energy parameters provided will be copied over into vc.
SWIG Wrapper Notes This function is attached to vrna_fc_s objects as params_subst() method.
Parameters:
vc | The vrna_fold_compound_t that is about to receive updated energy parameters |
par | The energy parameters used to substitute those within vc (Maybe NULL) |
See also:
vrna_params_reset() , vrna_param_t , vrna_md_t , vrna_params()
void vrna_exp_params_subst ( vrna_fold_compound_t* vc, vrna_exp_param_t* params )
This function can be used to properly assign new energy parameters for partition function computations to a vrna_fold_compound_t . For this purpose, the data of the provided pointer params
will be copied into vc
and a recomputation of the partition function scaling factor is issued, if the pf_scale
attribute of params
is less than 1.0
.
Passing NULL as second argument leads to a reset of the energy parameters within vc to their default values
Parameters:
vc | The fold compound data structure |
params | A pointer to the new energy parameters |
void vrna_exp_params_rescale ( vrna_fold_compound_t* vc, double* mfe )
This function may be used to (automatically) rescale the Boltzmann factors used in partition function computations. Since partition functions over subsequences can easily become extremely large, the RNAlib internally rescales them to avoid numerical over- and/or underflow. Therefore, a proper scaling factor \(s\) needs to be chosen that in turn is then used to normalize the corresponding partition functions \(\hat{q}[i,j] = q[i,j] / s^{(j-i+1)}\) .
This function provides two ways to automatically adjust the scaling factor.
Passing NULL
as second parameter activates the automatic guess mode . Here, the scaling factor is recomputed according to a mean free energy of 184.3*length
cal for random sequences. On the other hand, if the MFE for a sequence is known, it can be used to recompute a more robust scaling factor, since it represents the lowest free energy of the entire ensemble of structures, i.e. the highest Boltzmann factor. To activate this second mode of automatic adjustment according to MFE , a pointer to the MFE value needs to be passed as second argument. This value is then taken to compute the scaling factor as :math:` s = exp((sfact * MFE) / kT / length )` , where sfact is an additional scaling weight located in the vrna_md_t data structure of exp_params
in vc
.
The computed scaling factor \(s\) will be stored as pf_scale
attribute of the exp_params
data structure in vc
.
SWIG Wrapper Notes This function is attached to vrna_fc_s objects as overloaded exp_params_rescale() method.
When no parameter is passed to this method, the resulting action is the same as passing NULL as second parameter to vrna_exp_params_rescale() , i.e. default scaling of the partition function. Passing an energy in kcal/mol, e.g. as retrieved by a previous call to the mfe() method, instructs all subsequent calls to scale the partition function accordingly.
Parameters:
vc | The fold compound data structure |
mfe | A pointer to the MFE (in kcal/mol) or NULL |
Note
This recomputation only takes place if the pf_scale
attribute of the exp_params
data structure contained in vc
has a value below 1.0
.
See also:
vrna_exp_params_subst() , vrna_md_t , vrna_exp_param_t , vrna_fold_compound_t
void vrna_params_reset ( vrna_fold_compound_t* vc, vrna_md_t* md_p )
This function allows one to rescale free energy parameters for subsequent structure prediction or evaluation according to a set of model details, e.g. temperature values. To do so, the caller provides either a pointer to a set of model details to be used for rescaling, or NULL if global default setting should be used.
SWIG Wrapper Notes This function is attached to vrna_fc_s objects as overloaded params_reset() method.
When no parameter is passed to this method, the resulting action is the same as passing NULL as second parameter to vrna_params_reset() , i.e. global default model settings are used. Passing an object of type vrna_md_s resets the fold compound according to the specifications stored within the vrna_md_s object.
Parameters:
vc | The fold compound data structure |
md_p | A pointer to the new model details (or NULL for reset to defaults) |
See also:
vrna_exp_params_reset() , vrna_params_subs()
void vrna_exp_params_reset ( vrna_fold_compound_t* vc, vrna_md_t* md_p )
This function allows one to rescale Boltzmann factors for subsequent partition function computations according to a set of model details, e.g. temperature values. To do so, the caller provides either a pointer to a set of model details to be used for rescaling, or NULL if global default setting should be used.
SWIG Wrapper Notes This function is attached to vrna_fc_s objects as overloaded exp_params_reset() method.
When no parameter is passed to this method, the resulting action is the same as passing NULL as second parameter to vrna_exp_params_reset() , i.e. global default model settings are used. Passing an object of type vrna_md_s resets the fold compound according to the specifications stored within the vrna_md_s object.
Parameters:
vc | The fold compound data structure |
md_p | A pointer to the new model details (or NULL for reset to defaults) |
vrna_exp_param_t* get_scaled_pf_parameters (void)
get a data structure of type vrna_exp_param_t which contains the Boltzmann weights of several energy parameters scaled according to the current temperature
Deprecated Use vrna_exp_params() instead!
Returns:
The data structure containing Boltzmann weights for use in partition function calculations
vrna_exp_param_t* get_boltzmann_factors ( double temperature, double betaScale, vrna_md_t md, double pf_scale )
This function returns a data structure that contains all necessary precalculated Boltzmann factors for each loop type contribution.
In contrast to get_scaled_pf_parameters() , this function enables setting of independent temperatures for both, the individual energy contributions as well as the thermodynamic temperature used in :math:` exp(-Delta G / kT) `
Deprecated Use vrna_exp_params() instead!
Parameters:
temperature | The temperature in degrees Celcius used for (re-)scaling the energy contributions |
betaScale | A scaling value that is used as a multiplication factor for the absolute temperature of the system |
md | The model details to be used |
pf_scale | The scaling factor for the Boltzmann factors |
Returns:
A set of precomputed Boltzmann factors
vrna_exp_param_t* get_boltzmann_factor_copy (vrna_exp_param_t* parameters)
Deprecated Use vrna_exp_params_copy() instead!
Parameters:
parameters | The input data structure that shall be copied |
Returns:
A copy of the provided Boltzmann factor data set
See also:
vrna_exp_param_t* get_scaled_alipf_parameters (unsigned int n_seq)
vrna_exp_param_t* get_boltzmann_factors_ali ( unsigned int n_seq, double temperature, double betaScale, vrna_md_t md, double pf_scale )
vrna_param_t* scale_parameters (void)
Deprecated Use vrna_params() instead!
Returns:
A set of precomputed energy contributions
Note
OpenMP: This function relies on several global model settings variables and thus is not to be considered threadsafe. See get_scaled_parameters() for a completely threadsafe implementation.
vrna_param_t* get_scaled_parameters ( double temperature, vrna_md_t md )
Call this function to retrieve precomputed energy contributions, i.e. scaled according to the temperature passed. Furthermore, this function assumes a data structure that contains the model details as well, such that subsequent folding recursions are able to retrieve the correct model settings
Deprecated Use vrna_params() instead!
Parameters:
temperature | The temperature in degrees Celcius |
md | The model details |
Returns:
precomputed energy contributions and model settings
See also: