This is a part of Grammars/gra_pknot_microstate.gap. It is responsible for Strategy B computation of kissing hairpins for the program pKiss.
The overlay of two optimal pseudoknots must not necessarily yield an optimal kissing hairpin, since the overlay idea violates Bellman's principle of optimality. Thus the combination of two suboptimal pseudoknots might result in an energetically better kissing hairpin. This knowledge is the basis for Strategy B. This modification leads to higher memory consumption to store certain suboptimal pseudoknots.