#!/usr/bin/env python # coding: utf-8 # # Test tube design example # # Design a test tube ensemble intended to contain a 4-stranded stick figure at 1 M. # # Material: RNA # Temperature: 23 C # 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') #Define a target test tube containing all off-target complexes of up to 4 strands tstickfigure = TargetTube(on_targets={cstickfigure: 1e-06}, off_targets=SetSpec(max_size=4), name='tfigure') # 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 test tube design job my_design = tube_design(tubes=[tstickfigure], model=my_model, options=my_options) my_results = my_design.run(trials=1)[0] # Display the design results my_results # In[3]: # For more detail, display the analysis results performed on the designed tube ensemble my_results.analysis_result