Loading / Saving Energy Parameter Sets

Read and Write energy parameter sets from and to files or strings

Defines

VRNA_PARAMETER_FORMAT_DEFAULT
#include <ViennaRNA/params/io.h>

Default Energy Parameter File format.

Enums

enum parset

Values:

enumerator UNKNOWN
enumerator QUIT
enumerator S
enumerator S_H
enumerator HP
enumerator HP_H
enumerator B
enumerator B_H
enumerator IL
enumerator IL_H
enumerator MMH
enumerator MMH_H
enumerator MMI
enumerator MMI_H
enumerator MMI1N
enumerator MMI1N_H
enumerator MMI23
enumerator MMI23_H
enumerator MMM
enumerator MMM_H
enumerator MME
enumerator MME_H
enumerator D5
enumerator D5_H
enumerator D3
enumerator D3_H
enumerator INT11
enumerator INT11_H
enumerator INT21
enumerator INT21_H
enumerator INT22
enumerator INT22_H
enumerator ML
enumerator TL
enumerator TRI
enumerator HEX
enumerator NIN
enumerator MISC

Functions

int vrna_params_load(const char fname[], unsigned int options)
#include <ViennaRNA/params/io.h>

Load energy parameters from a file.

SWIG Wrapper Notes:

This function is available as overloaded function params_load(fname=””, options=VRNA_PARAMETER_FORMAT_DEFAULT). Here, the empty filename string indicates to load default RNA parameters, i.e. this is equivalent to calling vrna_params_load_defaults(). See, e.g. RNA.fold_compound.params_load() in the Python API.

Parameters:
Returns:

Non-zero on success, 0 on failure

int vrna_params_save(const char fname[], unsigned int options)
#include <ViennaRNA/params/io.h>

Save energy parameters to a file.

SWIG Wrapper Notes:

This function is available as overloaded function params_save(fname, options=VRNA_PARAMETER_FORMAT_DEFAULT). See, e.g. RNA.params_save() in the Python API.

Parameters:
  • fname – A filename (path) for the file where the current energy parameters will be written to

  • options – File format bit-mask (usually VRNA_PARAMETER_FORMAT_DEFAULT)

Returns:

Non-zero on success, 0 on failure

int vrna_params_load_from_string(const char *string, const char *name, unsigned int options)
#include <ViennaRNA/params/io.h>

Load energy paramters from string.

The string must follow the default energy parameter file convention! The optional name argument allows one to specify a name for the parameter set which is stored internally.

SWIG Wrapper Notes:

This function is available as overloaded function params_load_from_string(string, name=””, options=VRNA_PARAMETER_FORMAT_DEFAULT). See, e.g. RNA.params_load_from_string() in the Python API.

Parameters:
  • string – A 0-terminated string containing energy parameters

  • name – A name for the parameter set in string (Maybe NULL)

  • options – File format bit-mask (usually VRNA_PARAMETER_FORMAT_DEFAULT)

Returns:

Non-zero on success, 0 on failure

int vrna_params_load_defaults(void)
#include <ViennaRNA/params/io.h>

Load default RNA energy parameter set.

This is a convenience function to load the Turner 2004 RNA free energy parameters. It’s the same as calling vrna_params_load_RNA_Turner2004()

SWIG Wrapper Notes:

This function is available as overloaded function params_load(). See, e.g. RNA.params_load() in the Python API.

Returns:

Non-zero on success, 0 on failure

int vrna_params_load_RNA_Turner2004(void)
#include <ViennaRNA/params/io.h>

Load Turner 2004 RNA energy parameter set.

SWIG Wrapper Notes:

This function is available as function params_load_RNA_Turner2004(). See, e.g. RNA.params_load_RNA_Turner2004() in the Python API.

Warning

This function also resets the default geometric parameters as stored in vrna_md_t to those of RNA. Only subsequently initialized vrna_md_t structures will be affected by this change.

Returns:

Non-zero on success, 0 on failure

int vrna_params_load_RNA_Turner1999(void)
#include <ViennaRNA/params/io.h>

Load Turner 1999 RNA energy parameter set.

SWIG Wrapper Notes:

This function is available as function params_load_RNA_Turner1999(). See, e.g. RNA.params_load_RNA_Turner1999() in the Python API.

Warning

This function also resets the default geometric parameters as stored in vrna_md_t to those of RNA. Only subsequently initialized vrna_md_t structures will be affected by this change.

Returns:

Non-zero on success, 0 on failure

int vrna_params_load_RNA_Andronescu2007(void)
#include <ViennaRNA/params/io.h>

Load Andronsecu 2007 RNA energy parameter set.

SWIG Wrapper Notes:

This function is available as function params_load_RNA_Andronescu2007(). See, e.g. RNA.params_load_RNA_Andronescu2007() in the Python API.

Warning

This function also resets the default geometric parameters as stored in vrna_md_t to those of RNA. Only subsequently initialized vrna_md_t structures will be affected by this change.

Returns:

Non-zero on success, 0 on failure

int vrna_params_load_RNA_Langdon2018(void)
#include <ViennaRNA/params/io.h>

Load Langdon 2018 RNA energy parameter set.

SWIG Wrapper Notes:

This function is available as function params_load_RNA_Langdon2018(). See, e.g. RNA.params_load_RNA_Langdon2018() in the Python API.

Warning

This function also resets the default geometric parameters as stored in vrna_md_t to those of RNA. Only subsequently initialized vrna_md_t structures will be affected by this change.

Returns:

Non-zero on success, 0 on failure

int vrna_params_load_RNA_misc_special_hairpins(void)
#include <ViennaRNA/params/io.h>

Load Misc Special Hairpin RNA energy parameter set.

SWIG Wrapper Notes:

This function is available as function params_load_RNA_misc_special_hairpins(). See, e.g. RNA.params_load_RNA_misc_special_hairpins() in the Python API.

Warning

This function also resets the default geometric parameters as stored in vrna_md_t to those of RNA. Only subsequently initialized vrna_md_t structures will be affected by this change.

Returns:

Non-zero on success, 0 on failure

int vrna_params_load_DNA_Mathews2004(void)
#include <ViennaRNA/params/io.h>

Load Mathews 2004 DNA energy parameter set.

SWIG Wrapper Notes:

This function is available as function params_load_DNA_Mathews2004(). See, e.g. RNA.params_load_DNA_Mathews2004() in the Python API.

Warning

This function also resets the default geometric parameters as stored in vrna_md_t to those of DNA. Only subsequently initialized vrna_md_t structures will be affected by this change.

Returns:

Non-zero on success, 0 on failure

int vrna_params_load_DNA_Mathews1999(void)
#include <ViennaRNA/params/io.h>

Load Mathews 1999 DNA energy parameter set.

SWIG Wrapper Notes:

This function is available as function params_load_DNA_Mathews1999(). See, e.g. RNA.params_load_DNA_Mathews1999() in the Python API.

Warning

This function also resets the default geometric parameters as stored in vrna_md_t to those of DNA. Only subsequently initialized vrna_md_t structures will be affected by this change.

Returns:

Non-zero on success, 0 on failure

const char *last_parameter_file(void)
#include <ViennaRNA/params/io.h>

Get the file name of the parameter file that was most recently loaded.

Returns:

The file name of the last parameter file, or NULL if parameters are still at defaults

void read_parameter_file(const char fname[])
#include <ViennaRNA/params/io.h>

Read energy parameters from a file.

Deprecated:

Use vrna_params_load() instead!

Parameters:
  • fname – The path to the file containing the energy parameters

void write_parameter_file(const char fname[])
#include <ViennaRNA/params/io.h>

Write energy parameters to a file.

Deprecated:

Use vrna_params_save() instead!

Parameters:
  • fname – A filename (path) for the file where the current energy parameters will be written to

enum parset gettype(const char *ident)
#include <ViennaRNA/params/io.h>
char *settype(enum parset s)
#include <ViennaRNA/params/io.h>