Complex design example

Design a complex ensemble intend to predominantly adopt a 4-stranded stick figure target structure.

Material: RNA
Temperature: 23 C

While we illustrate complex design, we recommend performing test tube design so that it is possible to actively design against formation of off-target complexes that can compete with the desired on-target complex in solution (see tube design example notebook). Indeed, we show at the bottom of this example that a test tube analysis reveals that while the designed sequences perform well within the context of the complex ensemble (as intended by the complex design algorithm), the on-target complex is out-competed by off-target complexes in the context of a test tube ensemble.

In [1]:
# Import Python NUPACK module
from nupack import *
In [2]:
# Define physical model
my_model = Model(material='rna', celsius=23)

# Define sequence domains
da = Domain('N27', name='da')
db = Domain('N29', name='db')
dc = Domain('N25', name='dc')
dd = Domain('N18', name='dd')

# Define strands containing these domains
sa = TargetStrand([da], name='sa')
sb = TargetStrand([db], name='sb')
sc = TargetStrand([dc], name='sc')
sd = TargetStrand([dd], name='sd')

# Define a target complex
cstickfigure = TargetComplex([sa, sb, sc, sd], '..((((((((..((((((((((((...+))))))(((.........)))((((((..+.))))))))))))..((((((((..+.)))))))))))))))).', name='cstickfigure')

# Set a stop condition of 1% and a seed for random number generation to get a reproducible result for this demo
my_options = DesignOptions(f_stop=0.01, seed=93)

# Define and run the complex design job
my_design = complex_design(complexes=[cstickfigure], model=my_model, options=my_options)
my_results =[0]

# Display the design results
Domain results:
Domain Sequence
Strand results:
Strand Sequence
Objective function:
Objective type Value
Weighted ensemble defect 0.00757
Ensemble defect: 0.00757

On-target complex defects:
Complex Complex defect (nt) Normalized complex defect
cstickfigure 0.749 0.00757
In [3]:
# Analyze a test tube ensemble containing the designed sequences formaing all complexes of up to 4 strands
# Fromn the list of concentrations below, we see that the on-target complex "cstickfigure" is dominated by 
# many off-target complexes. This can be avoided by activately designing against formation of the off-target 
# complexes using test tube design. 

on_target = my_results.to_analysis(cstickfigure)
my_tube = Tube(strands={s: 1e-8 for s in on_target.strands}, 
               complexes=SetSpec(max_size=4, include=[on_target]), name='Tube')
tube_analysis(tubes=[my_tube], model=my_model)
Complex results:
Complex Pfunc ΔG (kcal/mol)
(sa) 1.0597e+6 -8.165
(sb) 1.8567e+6 -8.495
(sc) 1.1835e+6 -8.230
(sd) 1.6008e+2 -2.987
(sa+sa) 2.5625e+23 -31.720
(sa+sb) 4.0097e+20 -27.919
(sa+sd) 1.2607e+20 -27.238
(sb+sb) 2.4243e+16 -22.202
(sc+sa) 5.7933e+21 -29.490
(sc+sb) 1.1295e+18 -24.463
(sc+sc) 1.3968e+19 -25.943
(sc+sd) 2.1601e+18 -24.845
(sd+sb) 2.6258e+13 -18.184
(sd+sd) 1.0269e+7 -9.501
(sa+sa+sa) 1.0229e+37 -50.151
(sa+sa+sb) 6.0085e+33 -45.773
(sa+sa+sd) 1.4544e+40 -54.423
(sa+sb+sb) 2.4946e+31 -42.545
(sa+sb+sd) 2.7148e+34 -46.660
(sa+sd+sb) 1.7840e+28 -38.283
(sa+sd+sd) 6.0217e+27 -37.644
(sb+sb+sb) 2.8782e+25 -34.499
(sc+sa+sa) 6.0344e+35 -48.485
(sc+sa+sb) 1.0238e+35 -47.441
(sc+sa+sd) 7.2107e+29 -40.460
(sc+sb+sa) 5.9588e+29 -40.347
(sc+sb+sb) 9.2787e+28 -39.253
(sc+sb+sd) 8.6771e+25 -35.148
(sc+sc+sa) 1.3566e+33 -44.897
(sc+sc+sb) 1.1896e+30 -40.754
(sc+sc+sc) 3.6354e+30 -41.412
(sc+sc+sd) 4.6909e+29 -40.207
(sc+sd+sa) 4.5543e+41 -56.450
(sc+sd+sb) 1.2257e+32 -43.482
(sc+sd+sd) 7.3386e+24 -33.695
(sd+sb+sb) 1.4664e+25 -34.102
(sd+sd+sb) 2.5238e+21 -29.001
(sd+sd+sd) 1.1394e+13 -17.693
cstickfigure 1.8738e+53 -72.188
(sa+sa+sa+sa) 1.0299e+55 -74.546
(sa+sa+sa+sb) 9.2061e+51 -70.415
(sa+sa+sa+sd) 2.9627e+53 -72.458
(sa+sa+sb+sb) 1.5702e+45 -61.244
(sa+sa+sb+sd) 7.6242e+49 -67.594
(sa+sa+sd+sb) 2.0577e+48 -65.468
(sa+sa+sd+sd) 1.4858e+46 -62.566
(sa+sb+sa+sb) 2.0246e+48 -65.459
(sa+sb+sa+sd) 4.2256e+49 -67.247
(sa+sb+sb+sb) 3.8497e+42 -57.706
(sa+sb+sb+sd) 5.1050e+45 -61.938
(sa+sb+sd+sb) 3.8696e+42 -57.709
(sa+sb+sd+sd) 1.5428e+46 -62.588
(sa+sd+sa+sd) 2.0637e+56 -76.310
(sa+sd+sb+sb) 4.4292e+38 -52.369
(sa+sd+sb+sd) 5.4192e+38 -52.487
(sa+sd+sd+sb) 1.7867e+37 -50.479
(sa+sd+sd+sd) 3.8418e+34 -46.865
(sb+sb+sb+sb) 6.4718e+35 -48.527
(sc+sa+sa+sa) 6.3217e+51 -70.194
(sc+sa+sa+sb) 6.1181e+48 -66.109
(sc+sa+sa+sd) 8.3118e+49 -67.645
(sc+sa+sb+sa) 2.7527e+48 -65.639
(sc+sa+sb+sb) 4.3944e+46 -63.204
(sc+sa+sb+sd) 1.5949e+44 -59.898
(sc+sa+sc+sa) 1.4180e+48 -65.249
(sc+sa+sd+sa) 1.7063e+52 -70.778
(sc+sa+sd+sb) 2.1218e+41 -56.001
(sc+sa+sd+sd) 7.3319e+38 -52.665
(sc+sb+sa+sa) 3.8072e+44 -60.410
(sc+sb+sa+sb) 2.5332e+44 -60.170
(sc+sb+sa+sd) 1.1393e+40 -54.280
(sc+sb+sb+sa) 2.6186e+40 -54.769
(sc+sb+sb+sb) 5.4074e+39 -53.841
(sc+sb+sb+sd) 1.7050e+36 -49.097
(sc+sb+sc+sa) 1.7666e+44 -59.958
(sc+sb+sc+sb) 1.0917e+44 -59.675
(sc+sb+sd+sa) 9.4107e+47 -65.008
(sc+sb+sd+sb) 1.3407e+40 -54.375
(sc+sb+sd+sd) 3.0956e+33 -45.382
(sc+sc+sa+sa) 2.5123e+47 -64.231
(sc+sc+sa+sb) 2.4528e+47 -64.216
(sc+sc+sa+sd) 1.2799e+42 -57.058
(sc+sc+sb+sa) 2.9037e+42 -57.540
(sc+sc+sb+sb) 5.7716e+40 -55.235
(sc+sc+sb+sd) 3.9260e+37 -50.943
(sc+sc+sc+sa) 2.2602e+45 -61.458
(sc+sc+sc+sb) 7.0351e+41 -56.706
(sc+sc+sc+sc) 4.2920e+43 -59.125
(sc+sc+sc+sd) 4.3767e+41 -56.427
(sc+sc+sd+sa) 1.6042e+53 -72.097
(sc+sc+sd+sb) 1.7566e+43 -58.600
(sc+sc+sd+sd) 9.1479e+37 -51.440
(sc+sd+sa+sa) 1.2981e+57 -77.393
(sc+sd+sa+sd) 1.3168e+46 -62.495
(sc+sd+sb+sa) 6.4436e+49 -67.495
(sc+sd+sb+sb) 5.8549e+42 -57.953
(sc+sd+sb+sd) 5.1934e+39 -53.817
(sc+sd+sc+sa) 2.6029e+51 -69.672
(sc+sd+sc+sb) 2.8132e+43 -58.877
(sc+sd+sc+sd) 2.5098e+42 -57.455
(sc+sd+sd+sa) 3.3264e+51 -69.816
(sc+sd+sd+sb) 7.0230e+38 -52.640
(sc+sd+sd+sd) 1.7724e+31 -42.344
(sd+sb+sb+sb) 1.7512e+36 -49.112
(sd+sb+sd+sb) 2.0865e+36 -49.215
(sd+sd+sb+sb) 1.0407e+34 -46.096
(sd+sd+sd+sb) 6.7116e+27 -37.707
(sd+sd+sd+sd) 1.3787e+19 -25.935
Concentration results:
Complex Tube (M)
(sb) 9.999e-09
(sc+sd+sa) 9.746e-09
(sc) 2.511e-10
(sa+sd+sa+sd) 1.162e-10
(sd) 1.208e-11
(sa+sa+sd) 6.007e-12
(sa) 4.340e-12
(sc+sd+sa+sa) 2.055e-12
(sa+sd) 7.040e-13
(sc+sd) 6.248e-13
cstickfigure 3.900e-13
(sa+sb) 1.597e-13
(sc+sd+sd+sa) 9.703e-14
(sc+sa) 9.094e-14
(sa+sa) 7.765e-14
(sc+sb) 2.331e-14
(sa+sb+sd) 1.474e-14
(sc+sc+sd+sa) 1.316e-14
(sb+sb) 1.270e-14
(sc+sc) 1.136e-14
(sc+sd+sb) 3.449e-15
(sc+sd+sc+sa) 2.135e-16
(sd+sb) 1.928e-16
(sc+sa+sb) 1.563e-16
(sc+sd+sb+sa) 1.341e-16
(sc+sa+sd+sa) 2.701e-17
(sa+sb+sd+sd) 1.142e-17
(sa+sa+sa+sd) 9.052e-18
(sa+sa+sb+sd) 3.063e-18
(sc+sb+sd+sa) 1.959e-18
(sa+sb+sa+sd) 1.698e-18
(sa+sb+sb) 9.666e-19
(sc+sa+sa) 7.007e-19
(sc+sc+sd) 5.200e-19
(sc+sd+sa+sd) 3.841e-19
(sa+sb+sb+sd) 2.696e-19
(sa+sa+sa) 2.293e-19
(sc+sb+sb) 1.863e-19
(sa+sa+sb) 1.771e-19
(sc+sa+sa+sd) 1.316e-19
(sc+sc+sb) 9.409e-20
(sa+sa+sd+sb) 8.266e-20
(sc+sc+sa) 8.161e-20
(sa+sd+sd) 4.583e-20
(sa+sa+sa+sb) 2.007e-20
(sa+sa+sa+sa) 1.708e-20
(sc+sd+sb+sb) 1.602e-20
(sc+sa+sd) 1.543e-20
(sc+sc+sc) 1.133e-20
(sd+sb+sb) 1.047e-20
(sa+sd+sb) 9.688e-21
(sa+sa+sd+sd) 8.365e-21
(sc+sa+sb+sb) 6.525e-21
(sa+sb+sa+sb) 5.803e-21
(sc+sd+sc+sd) 3.793e-21
(sc+sd+sc+sb) 3.033e-21
(sc+sd+sd) 2.894e-21
(sc+sb+sd) 2.441e-21
(sc+sc+sd+sb) 1.894e-21
(sb+sb+sb) 1.466e-21
(sc+sc+sa+sb) 1.435e-21
(sd+sd) 1.057e-21
(sc+sb+sa) 9.098e-22
(sc+sb+sc+sb) 8.398e-22
(sc+sa+sa+sb) 6.910e-22
(sc+sa+sa+sa) 5.430e-22
(sc+sa+sb+sd) 3.319e-22
(sc+sa+sb+sa) 3.109e-22
(sa+sb+sd+sb) 2.044e-22
(sc+sd+sb+sd) 1.992e-22
(sc+sb+sa+sb) 3.762e-23
(sc+sb+sd+sb) 3.669e-23
(sc+sd+sd+sb) 2.693e-23
(sd+sd+sb) 2.526e-23
(sa+sb+sb+sb) 1.451e-23
(sc+sa+sc+sa) 6.310e-24
(sa+sa+sb+sb) 4.501e-24
(sd+sb+sd+sb) 2.031e-24
(sc+sc+sc+sd) 1.859e-24
(sc+sc+sa+sa) 1.118e-24
(sc+sb+sb+sb) 1.056e-24
(sc+sb+sc+sa) 1.034e-24
(sc+sc+sc+sa) 5.211e-25
(sc+sc+sc+sc) 5.126e-25
(sc+sc+sb+sb) 4.440e-25
(sc+sa+sd+sb) 4.416e-25
(sa+sd+sb+sd) 4.012e-25
(sc+sc+sc+sb) 2.133e-25
(sc+sc+sd+sd) 1.382e-25
(sd+sb+sb+sb) 1.216e-25
(sc+sc+sa+sd) 1.050e-25
(sc+sb+sa+sa) 4.300e-26
(sc+sb+sa+sd) 2.371e-26
(sa+sd+sb+sb) 2.339e-26
(sc+sa+sd+sd) 2.139e-26
(sc+sc+sb+sa) 1.699e-26
(sa+sd+sd+sb) 1.323e-26
(sd+sd+sb+sb) 1.013e-26
(sc+sb+sb+sd) 4.666e-27
(sc+sc+sb+sd) 4.233e-27
(sc+sb+sb+sa) 3.888e-27
(sb+sb+sb+sb) 3.207e-27
(sa+sd+sd+sd) 3.986e-28
(sc+sb+sd+sd) 1.187e-28
(sc+sd+sd+sd) 9.527e-30
(sd+sd+sd) 1.598e-30
(sd+sd+sd+sb) 9.156e-32
(sd+sd+sd+sd) 2.636e-39