Even energy distribution in RNA designs

  • 3
  • Article
  • Updated 5 years ago
General bot tendencies


I have long been interested in even energy distribution in RNA designs. One of the first things I noticed when looking at the lab designs of Nupack and Vienna - primarily in Viennas designs - was the lack even energy distribution and I saw that a relatively even distribution of energy was necessary to a design fold correct.

Here are some background articles.

Energy, structure and symmetric colors
Even energy distribution continued
Even energy distribution revisited

I have been thinking about writing some more about this. Because I think we can use these energy numbers, though not perfect, to make better designs. Since I now know that energy measurements are not fully accurate, I could just as well have call it even base pair distribution. :)

Mat suggested that I picked some of my good designs first. Based on those I can roughly show something about what is good distribution of energy between stems and in stems.

I picked 5 different of my winning designs. I picked 5 less good designs from Vienna and Nupack.

The reason for this unequal comparison, is that I’m interested in highlighting what makes the difference between a good and a bad design. What is typical of a good design and one that gets in trouble.

I also looked at 5 good designs from Mat. Mat generally use a slightly lower GC ratio than me, but it is working. So I want that interval to show for my strategies. Last I also picked 5 good designs from EternaBot, because I’m interested in highlighting where it differs from Mat and I, plus Vienna and Nupack.

I have dragged out a lot of numbers and done some simple math. I have pointed out some features in the RNA designs, like comparison of end quads across the design and energy totals in stems across a design, that I think will be interesting working further with for improving bot algorithms.

This is not a complete comparison as it involves few examples, rather an inspirational one. But I use these examples to point to tendencies which would be interesting looking into, for general bot improvement. I’m sure some of you can come up with more sophisticated ways of using these spots of comparisons, so we can get made some smarter RNA bot algorithm strategies.

Note, I’m aware the synthesized designs by Vienna is from its old energy model. I assume the new one to do better. But I post this anyway, as I think it can be helpful to highlight what can be a problem in a design.

The designs and numbers can be viewed at bottom at this document. There will be some minor differences between the number registration on the different designs as I was changing approach while I was at the comparison.

GC pairs at closing basepair

Nupack usually does places GC-pairs in junctions, which is generally good. Vienna does not as often and it often leads it into trouble as it makes instabilities elsewhere crack open. Our EternaBot has tendencies similar to those of Vienna, with not always using closing GC pairs. However it more often passes in EternaBot designs, which I think is due to EternaBot having a more even energy distribution compared to Vienna. Similar it doesn’t have dirty loops and multiloops which provokes the weaknesses to break open.

Use of GU base pairs

For the NUPACK designs I don't recall seeing even one single GU used. Neither do I recall that EternaBot uses GU’s. Whereas Vienna overuses GU’s. It generally uses too many of them and put too many of those in shorter stems, making them vulnerable instead of stabilizing them.

I think both is a flaw - overuse and zero use. For the early Eterna designs it did made sense not using too many GU’s as most of the designs were small and had stems that were rather short. GU’s under these conditions mostly makes trouble. However GU’s do add complexity to the sequence and make it more likely that it is not self complementary places it should not be. I asked Mat if he used GU’s this way, and he said yes. In designs that have long stems 7+ and more of them, having GU base pairs help. (Designs that crave GU)

Also if used right, typically in longer stems, they seem to have a relaxing effect on the design - generally reducing instability in the SHAPE data. In some of the cloud labs with real long stems, designs with GU’s were prevalent among the high scoring designs. It also seems that non-canonical base pairs that Brourd has experimented with, has a similar effect as the GU’s in that respect.

It would be good if a bot had access to a catalog of similar shapes so it could get a range of what amount of GU ratio there is the winning part of the designs. This is something both Mat and I automatically do when we design. We either check similar shapes for their optimal GU ratio or have a feel for it for it from earlier designing.

Having GU’s in, is of more importance when the sequence gets longer. Knowing which amount of GU’s or non complementary base pairs is normal and helpful for a particular length of stem will be useful. Both for adding variation and stabilization. So I think EternaBot needs to learn to use them as well. [Note: this is why adding stem length information to EternaDrone may help. jandersonlee]

Dirty loops and multiloops

Mat, I and EternaBot do not make multiloop ring and end loops dirty - don’t overuse other bases than A’s. Similar to most human players. This is something that Mat, jandersonlee and others have pointed out earlier too. That an easy way to improve Vienna was to cut all those dirty loop areas out. Same would go for NUPACK. I think the main reason NUPACK designs do better than Vienna designs - when they don’t misfold, is that their generally higher GC-ratio keeps the stacks in check and prevents the dirty bases in end loops and multiloop to implode and match up elsewhere.

Dirty loops will not be as big a problem if more of the general rules for RNA designs are followed. And nature is obviously getting its RNA loops dirty, based on some of the natural RNA’s I have seen. But the structure need to be strong on its own to keep stable. The main problem with dirty loops is that they add to the complementarity factor. As long as loops are mainly yellow and a little blue and red, no problems, as the stem structure will mostly have enough GC pairs to stick where it should. (Clean Halo)

GC ratio pr length of stem

What can be seen from the comparison between the robot designs and player designs is that typically Mat and I have fairly the same range of GC percentage per same length of stem. Where Nupack generally has a much higher ratio and Vienna has a much lower ratio but they both cover a wider range than we do. Also their GC percentage in different stems of same lengths, jumps much more around than Mat’s and mine.

Mat’s and my designs go from a high GC ratio for the real short stems, to a more generally lower GC range for longer stems. I have a tendency to lay in the high end of using too many GC pairs. The more GC-pairs added, means an increased risk for them being complementary somewhere else. (Numbers behind)

Energy distribution pr length of stem

What becomes visible with the numbers from bot designs, compared to Mat’s and mine designs, is that the stems used in the bot designs are much more spread out in energy total difference than those I used. The total energy for same length of stem, is much closer together for ours. (Link to numbers)

Energy distribution between stems of the same length

Another thing I see as a huge problem in Vienna in particular, is that though a design have several stems of the exact same length, their individual energy total can vary wildly, when compared with each other. Whereas Mat and my designs that have similar length stems, also have these stems have a rather similar GC ratio and similar energy. Both when I compare energy in stems of the same length between Mat and I, between my own designs with similar length stems or and in the individual design.

Stems of the same length in both Mat’s and my designs have similar energy totals and GC ratio:
Stems of the same length in mine different design have similar energy totals and GC ratio. Stems of the same length in one of my designs, has similar energy totals and GC ratio.

Where for Nupack and Vienna, I see much a bigger variance for the same parameters:
Stems of the same length in both Vienna and Nupack have a wider range of energy values and GC ratio. Stems of the same length in Vienna in particular - in Nupack only to some degree have different energy values and GC ratio. Stems of the same length in one of Vienna’s designs, have different energy values and GC ratio.

Numbers for comparison between Mat, Eli, EternaBot, Vienna and Nupack

Safe range

Getting a safe range for a specific feature of RNA designing. A thing that would make sense is to only count in the GC ratio from the stems that are actually stable. For making a safe range judgment for a stem of a specific length, I only wish to have fully stable stems included.

Here is an example of why. Here is the ratio from 7 base-pair long stems in Eterna bot design. The whole GC ratio is 42 to 71 % GC, but the stable range is only 42 to 52%.

57% GC pairs, (not stable) total energy -14,3 (2) QE (-2,2 + -3,3)/2 = -2,8 D (1,1)
42% GC pairs, total energy -10,7 (1,5) QE (-0,9 + -2,4)/2 = -1,7 D (1,5)
71% GC pairs, (not stable) total energy -13,6 (1,9) QE (-2,4 + -2,1)/2 = 2,3 D (0,3)
42% GC pairs, total energy -11,5 (1,6) QE (-2,4 + -2,4)/2 = -2,4 D (0)

Similar can be done with other factors for RNA design we are interested in. Like we want to know the GU ratio per length of stem - but only in the stable stems. Then it will give us a much more precise range of what is a safe and good choice.

GC ratio on design basis

Mats and my designs GC content lays in a much narrower range, whereas Vienna spreads to both or either side - typically a very lower GC ratio. EternaBot also lay in a lower range, however as it does a much more even energy distribution, it generally doesn’t harm the design as much.

NUPACK has a way too high overall GC ratio for its design in general. The more GC-pairs in a design, which are strong base-pairs and love to fold, the more likely it is that they fold up somewhere else where they are planned. One is simply giving the design more chances to misbehave. Increasing the chances for a mispairing real bad.

Vienna has rather set its GC ratio too low. So low that some stems that receive too few or even sometimes 0 GC pairs and actually breaks apart. But what mainly goes wrong in the Vienna designs is the wildly uneven energy distribution. Plus that dirty loops and multiloops just adds to the trouble. Also in the multiloop ring, base colors are unevenly distributed. Which makes things worse.

Uneven energy distribution is something that Nupack does not at all do to the same degree. In Vienna designs stems of the same length in the same design can have huge difference in GC ratio. This is also a problem and has a part in making the design unstable. I think there is an upper limit on how big energy difference in percentage, there can be in same length stems. However I don’t know with real long stems if they are better to tolerate. I also suspect that more uneven energy is tolerated, if the design is somehow split up in sections. Then sections can vary in energy distribution.

At least this design suggest that it could be so. One I hit on randomly when playing with RFAM. There is very high GC amount in the right stem, but low in the left one. In comparison. Or does this mean that for individual sections on the hook, quite different energy distribution is allowed? What could explain this case is that the longer the stem, there will usually be a lower percentage of GC.


And for both Vienna and Nupack, a big part of the problem is also in the many other than Adenine bases they put as single bases in loops and multiloop ring.

Since I generally use a rather fixed range of GC-ratio for each stem of a particular length (warying with stem length of cause), that also means that no matter which design I do, that has different kinds of length, the stems will not end up having wildly different amount of GC-pairs - but still mainly a good GC ratio for a particular length of stem. The variation that would be picked out if I made numbers for more of my winners, is that I would use a lot of GC-pairs for the short stems, somewhat less for the mid length stems and generally even less for the real long stems, 9 bp and up. That also means a relatively even energy of distribution for the overall design.

Energy density range inside designs

I calculated the energy density per stem and divided it with stem length.

My designs (90’ish)
Design 1: Energy density range 1,4 to 2 = 0,6
Design 2: Energy density range 1,4 to 1,7 = 0,3
Design 3: Energy density range 1,5 to 2,2 = 0,7
Design 4: Energy density range 1,4 to 1,8 = 0,4
Design 5: Energy density range 1,8 to 2,1 = 0,3

Vienna (80’ish)
Design 1: Energy density range 1,1 to 2,3 = 1,2
Design 2: Energy density range 1,1 to 1,7 = 0,6
Design 3: Energy density range 1 to 2.5 = 1,5
Design 4: Energy density range 1,3 to 1,6 = 0,3
Design 5: Energy density range 0,4 to 1,9 = 1,5

Full list of energy density comparison

Notice that there is a much higher spread inside the low scoring designs. Also notice that the energy density range of Vienna starts lower than mine. Not only do I think there is an optimal max difference, I also believe there is a good general range.

The well scoring designs land in a much narrower range. The energy density in their stems are much more in sync, despite them having different stem length and that each length of stem has a slightly different optimal GC ratio and energy. The shorter stems taking a higher GC ratio than the longer stems. Which results in difference in energy density.

Note that two of the bot designs land do in the safer range. None the less they score bad, so these designs have problems that will have to be identified with another method.

0,6 energy density range.


For this one, in some of the stems all the GC-pairs are located in one end of the stem. Or there is too few of them per stem to hold it together. The one 4 bp stem with only one GC-pair. And weaknesses turns up in those area.

0,3 Energy density range


This one has other things wrong with it. Like weak base pairs around the internal loops. Most of the GC pairs are distributed in the middle of the stems. And only reason it doesn’t go worse is because the stems are rather long, which has a stabilizing effect on its own.

Skewed energy distribution inside stems

What I also think is bad, are the stems in which one end is filled with GC and the other end is with AU's (or GU's). Though they have a fair GC and AU ratio taken on average, the skewed distribution causes weakness to the stem and overall puzzle structure. A weak half of a stem with only or mainly AU’s is what opens up for the dirty loops to misbehave.

Such a skewed distribution is generally not called for in real small RNA designs. It might be seen a bit more in a real long sequence (big) design. As a means to get things varied, some less optimal patterns will have to be put in use. But still I think it is rare. (Huge RNA)

Difference in end quad energy inside stems

For each design I looked at, I noted the energy in the end quads and calculated their difference.

For the stems that do break in Vienna designs, the quads in each end of the breaking stem, often have a wildly different energy. Where the pattern for Mats and my designs are a not too far distance in energy in the end quads. EternaBot does have a somewhat more uneven energy distribution in end quads for the same stem.

Mat and I have a different pattern from Vienna and Nupack. EternaBot comes in the middle, but closer to us than the other bots.

Each end quad has a very uneven energy distribution. This stem also have skewed base pair distribution.


This is not best example as the c’s in loop area can disturb a lot too. As Mat commented: thats a lot of green. But the one that gave me the idea for demonstration. Notice the different values in the end quads. 0,9 and 3,3. Very far apart and that characterizes some of the stems that breaks. Perhaps except necks. Necks seems to be exceptions. They can tolerate quite a low energy at neck/hook. But if both end quads are low, they will often break too. And if there is a huge difference, the one with the least negative energy is most often the first quad to go. This method can’t stand on its own, as in the end all that matters is that a stem is stable and that can’t always be inferred with numbers. But I think that this in addition to other strategies, can help us make the bots make better designs. I also think that longer stems can tolerate a bigger difference between energy in their end quads than short ones. Stems 4 bp and up sometimes have a bigger difference in End quad distance than the shorter stems, and still doing well. General pattern though is that it is best not have end quads too different, and not too different either when comparing to similar length stems.

Watch the end quads in my designs. The energy is very even in quad ends of a stem.


More even quad energies inside each stem, than with its neighbour stem


Actually scary even. I don’t think that too even energy is always a good idea either. (I have seen some stems with several quads of same energy in line - which wasn’t too stable) In particular multiloops seems to like to not have the same end quad of same energy value. Though some cases will pass. There is sometimes a difference between multiloop/neck quad and the other end quads in a multiloop.


End quad difference in multiloops

However Multiloop demands some variance. If all quads around the multiloop are same value, trouble can arise. Complementarity Mat would say, energy I would say. And I think we will both will be right.

Also the energy in the quads of a multiloop must not be too uneven. So very negative in one quad and very little negative in another isn’t good. There is a safe average range of energy. Multiloops mostly do bad if they are all having -3,4 in the end quads around the multiloop. Also multiloops generally did bad if they had too little negative energy. I made a bunch of spreadsheets a while back and this was the conclusion I came to. I have been seeing this for long time. This is why I have been rambling about end quads for multiloops and stems.

Spreadsheet for the Star lab
Spreadsheet for the Bulged Star

4 ways seems to tolerate all GC closing quads a bit better. But generally multiloops don’t need to have double GC closings at each stem, they regularly get grumpy if they get it. Something that jandersonlee is also saying and Mat has been practicing in his lab designs. Also they prefer not having AU closing quads. Later we have seen in Brourd’s lab designs and multiloops with AU and GU closings, that they are fully possible. But they usually take not too short stems to succeed.

Thx to jandersonlee and Mat for discussions and ideas through time.
Photo of Eli Fisker

Eli Fisker

  • 2216 Posts
  • 477 Reply Likes

Posted 5 years ago

  • 3
Photo of Eli Fisker

Eli Fisker

  • 2216 Posts
  • 477 Reply Likes
Strategy ideas

Multiloop end quad Strategy

Rank all the multiloop quads in relation to each other. They must not be too far apart in energy values and they must not be too far outside out of a safe average range for stable multiloops of that size.

This is a strategy for the energy in the closing quads surrounding a multiloop. I have set the mean average of a good multiloop to 2,7 kcal. Loosely based on some spreadsheets I made a long time back when I was first trying to look into this. I didn’t got the work finished back then, just took note that the good multiloops seemed not to have all their closing quads totally high negative energy like -3,4. Actually multiloops also seemed to dislike generally if all the energy quads had exactly the same energy. And that a multiloop typically were breaking if a quad got below -1,5, so they disliked too big differences between closing energy quads. or if all the quads were rather like below a certain mean. So basically there seemed to be an optimal range for which to put the energies

Give +2 if multiloop quad energy average is in this range: (2,5 to 2,9)
Give +1 if multiloop quad energy average is in this range: (2,3 to 3,1)
Penalize exponentially for each 0,1 energy difference in either way, that multiloop quad energy range differs outside the 2,3-3,1 range.

Give - 1 if all closing quad energies are the same. Its worse if there are more stems than 3. So give -2 if there are 4 stems and -3 if there are 5.

This is a rough strategy of catching bad mutiloops. Numbers of stems in a multiloop, numbers of bases between the stems, length of the stems attached and totally adjacency between stems, will all affect too. I’m hoping that this can serve as a starting point on which to make more further and more precise strategies for stabilizing multiloops.

Double quad strategy

Strategy. Penalize each double high energy quad like -3,4 or -3,3 in a row when touching multi loop or end loop. The more there are, the bigger the risk of them splitting the site. Give -1 per each

Half penalty in 4 bp stems and down. No penalty in neck

Strategy - Even energy distribution - inside stem version

+2 if energy difference in the two end quads are less than 33%
+1 if energy difference in two end quads are up to 67%
0 if energy difference is above 67% - Penalize exponentially.

For stems longer than 9 bp - give half the penalty.

Longer necks are more tolerant to differences in energy in their end quads. For necks the length of 5 bp and up, give 3/4 penalty.

Strategy - Even energy distribution - inside stem version 2

It is bad for particular the shorter stems if there is a big energy difference between the end quads.

For stems 4 bp and below

Give -2 if quad difference is 1,2 or bigger.
Give -1 if quad difference is 0,4 or bigger.

For stems 5 bp and above

Quad difference on 1,2 is allowed, but generally it is still advisable to keep them not too far apart in energy.

Give +1 if energy difference is below 0,6
Give 0 if energy difference is between 0,7-1,2
Give -1 for difference above 1,3

Longer stems are less sensitive and can better get away with weaker closing base pairs and low energy end quads. However it is still not a good idea having them too different. Give half penalty for stems of 9bp+

I have seen 3 bp stem with big end quad difference, but then they are rare. This one was working according to the SHAPE data.

Strategy for End quads

End quad range for a single stem length has to be lower than the end quad range for a whole design. Similar End quad density for a stem has to be lower than end quad density range for a whole design. (Background)

Strategy - Even energy end quads

This strategy I made on 6 basepairs stems. I think a similar approach can be taken for shorter and longer stems.

In general
Give +1 if end quad energy is higher than next quad after.

For cases with dual end quad energy above -3,5 kcal

Give +1 if dual end quads have a higher collective energy than -3,5
Give -1 if end quad energy is lower than next quad after. The bigger the difference, the worse. Penalizing exponentially would be good here.
Sub strategy: Give -1 if the value in the end quad is lower than next quad, and the end quad value x 2 is lower than the tetraloop energy. (This interval will change with bigger loops, but the energy/sequence of the end loops helps decide if the stem stay stable)
Give -1 if dual end quad is 6,6 or above. However no penalty in the neck.

For cases with dual end quad is below, -3,5

Give -1 if the end quad has much lower negative energy than the next quad, that also increases trouble. (I think this could be general for all end quads, no matter their position) Penalizing exponentially would be good here.

Strategy - Similar quads

Totally even energy isn’t always the thing best to have difference in energy between end quad and middle. Usually in good designs the negative numbers are higher at ends of stems than in the middle. At least on average and particular in shorter stems. If the numbers are low at end, the numbers in middle should be higher to make sure the stem forms. But that is not the first option I would go for.

For two identical energy values in quad next to each other. give -1. If 3 or more quads have totally similar energy penalize with -1 pr each extra quad over two similar.

Other interesting features to hold up against each other

General quad features I think could be interesting weighing against each other.

Multiloops - Weighing of closing quad energy against each other.

Bulges - Weighing of closing quads energy against each other.

Internal loops. Weighing of closing quads against each other.

End loops - Weighing of loop energy against similar size loops.

Stems - Weighing of closing quads against each other. Weighing against of closing quads in nearby similar length stems

Weighing of stem energy total against stem energy total of similar length stem.

Weighing of stem total against design average quad total

Weighing of energy density in differently length stems against one another. Determine safe range and good variance.

Weighing of stem energy density towards of total design energy density.

Thoughts for the future

I can't fully test my strategies, because I can't dig up energies across labs other by hand so my strategies are an estimate and will have to be adjusted. So they are more like pointers to features of RNA that I think it would interesting to take a closer look at. Feel free to improve and work on with them.

One more thing. At one of the earlier developers meeting, I remember one of the scientists said that only end quad energy of a stem is rather accurate. I also think we need to have looked at sequence too. Energy will only catch some things. Sequence is needed for designing precision.
Photo of Brourd


  • 433 Posts
  • 79 Reply Likes

According to this NUPACK design 02 sequence, synthesized as a part of the EteRNA R45-46 FMN Aptamer with Single Binding Site project.


It would appear that the level of exposure shown in your screenshot is not repeated. Do you have any other examples for that particular strategy?
Photo of Eli Fisker

Eli Fisker

  • 2216 Posts
  • 477 Reply Likes
Good catch, Brourd! Right now I don't have another example. One of these will often pass. But I think more of them makes for trouble.
Photo of JR


  • 235 Posts
  • 17 Reply Likes
I agree with your GU observation.
" However GU’s do add complexity to the sequence and make it more likely that it is not self complementary places it should not be. I asked Mat if he used GU’s this way, and he said yes."
Those lone Gs will pair with anything, even an "A", maybe that's how RNA makes
it's ability to multitask?
My puzzle solver script used no GU pairs and ranked just as high as any other solver script. I avoided the pairing just because I wanted to keep the script "simple".
Photo of Eli Fisker

Eli Fisker

  • 2216 Posts
  • 477 Reply Likes
Those lone Gs will pair with anything, even an "A", maybe that's how RNA makes
it's ability to multitask?

I agree. The ability to swap around between different potential pairs standard and nonstandard.