A thermodynamic matcher (TDM) is a specialized RNA folding program. Instead of spanning the complete search space of general RNA folding, a TDM spans only a defined subset of it. This subset might be defined via a graphical description (see Locomotif: From Graphical Motif Description to RNA Motif Search) or via a shape string (see Faster computation of exact RNA shape probabilities).
"Signatures/sig_tdm.gap" is for the later one. Given a shape string of a specific shape level, we have to generate a specialized grammar out of one of the four prototype grammars Grammars/gra_nodangle.gap Grammars/gra_overdangle.gap Grammars/gra_microstate.gap or Grammars/gra_macrostate.gap. This process itself is done with a GAP-L program. So one could say a GAP program generates a GAP program. Due to modularity it only generates the grammar, algebras, signatures and instances could simply be re-used.
"Signatures/sig_tdm.gap" is ready to cope with all four prototype grammars in all five shape levels, but not all functions will be needed for each specific grammar / level combination. See the comments in the file itself for further details. Note the special function convert
, which is not part of the shape string parsing process, but serves to add header and footer to the generated grammar.
Please have a look at the application RapidShapes, to see TDMs in action.