# Stochastic backtracking in the Ensemble
[Enumerating Suboptimal Structures]

Collaboration diagram for Stochastic backtracking in the Ensemble:

## Modules
| Stochastic Backtracking of Consensus Structures from Sequence Alignment(s)
| Stochastic Backtracking of Structures from Distance Based Partitioning

| Contains functions related to stochastic backtracking from a specified distance class.
## Functions
char * | pbacktrack (char *sequence)
| Sample a secondary structure from the Boltzmann ensemble according its probability .
char * | pbacktrack_circ (char *sequence)
| Sample a secondary structure of a circular RNA from the Boltzmann ensemble according its probability.
## Variables
int | st_back
| Flag indicating that auxilary arrays are needed throughout the computations. This is essential for stochastic backtracking.

## Function Documentation

char* pbacktrack | ( | char * | sequence | ) |

Sample a secondary structure from the Boltzmann ensemble according its probability
.

Precondition:
  pf_fold_par() or pf_fold() have to be called first to fill the partition function matrices

Parameters:

  | sequence | The RNA sequence

Returns:
  A sampled secondary structure in dot-bracket notation

char* pbacktrack_circ | ( | char * | sequence | ) |

Sample a secondary structure of a circular RNA from the Boltzmann ensemble according its probability.

This function does the same as pbacktrack() but assumes the RNA molecule to be circular

Precondition:
  pf_fold_par() or pf_fold_circ() have to be called first to fill the partition function matrices

Parameters:

  | sequence | The RNA sequence

Returns:
  A sampled secondary structure in dot-bracket notation

## Variable Documentation

int st_back

Flag indicating that auxilary arrays are needed throughout the computations. This is essential for stochastic backtracking.

Set this variable to 1 prior to a call of pf_fold() to ensure that all matrices needed for stochastic backtracking are filled in the forward recursions

See also:
  pbacktrack(), pbacktrack_circ