Abstract
NUPACK is a growing software suite for the analysis and design of nucleic acid structures, devices, and systems serving the needs of researchers in the fields of nucleic acid nanotechnology, molecular programming, synthetic biology, and across the life sciences. NUPACK algorithms have pioneered the treatment of complex and test tube ensembles containing arbitrary numbers of interacting strand species, providing crucial tools for capturing concentration effects essential to analyzing and designing the intermolecular interactions that are a hallmark of these fields. Analysis and design of multitube ensembles enable reaction pathway engineering of dynamic hybridization cascades and structural engineering including the possibility of pseudoknots. The all-new NUPACK 4 scientific code base offers enhanced physical models (coaxial and dangle stacking subensembles), dramatic speedups (20–120× for test tube analysis), increased scalability for large complexes (e.g., 30,000 nt), mixed materials (specified at nucleotide resolution), and diverse hard and soft sequence constraints for design. The all-new NUPACK web app (nupack.org) facilitates rapid job submission and result inspection with NUPACK 4 algorithms running in parallel on a hybrid cloud compute cluster that scales dynamically in response to user demand. NUPACK 4 algorithms can also be run locally using the all-new NUPACK Python module.
Keywords: DNA, RNA, 2′OMe-RNA, secondary structure, base-pairing, hybridization, complex ensemble, test tube ensemble, multitube ensemble, mixed-materials, equilibrium, partition function, concentration, ensemble defect, analysis, design, reaction pathway engineering, structural engineering including pseudoknots


Introduction
We are engaged in a multidecade effort to develop NUPACK (Nucleic Acid Package), a growing software suite for the analysis and design of nucleic acid structures, devices, and systems. NUPACK algorithms − are formulated in terms of nucleic acid secondary structure (i.e., the base-pairs of a set of nucleic acid strands) based on empirical free energy models that have great utility for analyzing and designing functional nucleic acid systems. Mixed-material calculations are supported (RNA/DNA or RNA/2′OMe-RNA) with the material specified at nucleotide resolution.
Problems and Ensembles
NUPACK algorithms address two fundamental classes of problems:
• Sequence analysis: given a set of nucleic acid strands, analyze the base-pairing properties over a specified ensemble.
• Sequence design: given a set of desired base-pairing properties, design the sequences of a set of nucleic acid strands over a specified ensemble subject to diverse user-specified sequence constraints.
NUPACK algorithms operate over two fundamental ensembles:
• Complex ensemble: the ensemble of all (unpseudoknotted connected) secondary structures for an arbitrary number of interacting nucleic acid strands.
• Test tube ensemble: the ensemble of a dilute solution containing an arbitrary number of nucleic acid strand species (introduced at user-specified concentrations) interacting to form an arbitrary number of complex species.
NUPACK formulates and solves each of the four fundamental equilibrium problems defined on these ensembles: (1) equilibrium complex analysis; (2) equilibrium complex design; (3) equilibrium test tube analysis; and (4) equilibrium test tube design. Furthermore, to enable reaction pathway engineering of dynamic hybridization cascades, NUPACK formulates and solves: (5) kinetic test tube design using a multitube ensemble. Multitube ensembles also enable structural engineering including the possibility of pseudoknots.
The Importance of Concentration Information
Note that a complex ensemble is subsidiary to a test tube ensemble, so complex analysis is inherent in test tube analysis (but not vice versa), and complex design is inherent in test tube design (but not vice versa). As it is typically infeasible to experimentally study a single complex in isolation, we recommend analyzing and designing nucleic acid strands in a test tube ensemble that contains the complex of interest as well as other competing complexes that might form in solution. For example, if one is experimentally studying strands A and B that are intended to predominantly form a secondary structure within the ensemble of complex A·B, one should not presuppose that the strands do indeed form A·B and simply analyze or design the base-pairing properties of that complex. Instead, it is more physically relevant to analyze or design a test tube ensemble containing strands A and B interacting to form multiple complex species (e.g., A, B, A·A, A·B, B·B) so as to capture both concentration information (how much A·B forms?) and structural information (what are the base-pairing properties of A·B when it does form?).
All-New NUPACK 4 Scientific Code Base
NUPACK 4 analysis algorithms employ a new unified dynamic programming framework that provides enhanced secondary structure models (coaxial and dangle stacking subensembles), dramatic speedups (e.g., 20–120× for analysis of test tube ensembles), enhanced scalability for large complexes (e.g., an arbitrary number of strands comprising a total of 30,000 nt, and mixed materials (specified at nucleotide resolution). NUPACK 4 design algorithms leverage these performance benefits and support both hard constraints (that must be obeyed by the designed sequences; e.g., diversity and biological sequence constraints) and soft constraints (that penalize but do not prohibit suboptimal sequences; e.g., sequence symmetry and energy match constraints) for multitube ensembles.
All-New Cloud-Based NUPACK Web App
Following its launch in 2007, usage of the NUPACK web app (nupack.org) increased to the point where the underlying static compute cluster was frequently overwhelmed by user demand. To provide a scalable resource for the worldwide research community, we rearchitected the NUPACK web app from the ground up to exploit a hybrid cloud compute cluster that scales dynamically in response to user demand. The all-new NUPACK web app integrates diverse components to create an intuitive and powerful analysis and design environment:
• Algorithms: mathematically rigorous, physically sound, computationally efficient scientific algorithms. −
• Hardware: a hybrid cloud compute cluster combining local hardware and scalable cloud hardware.
• Interface: an intuitive web interface for rapid job submission and result inspection.
• Graphics: publication-quality client-side graphics to enable straightforward interpretation of results, interactive data, and efficient preparation of talks and papers.
Researchers can run jobs and inspect results within the NUPACK web app, which leverages the NUPACK 4 scientific code base as its backend.
All-New NUPACK Python Module
Alternatively, researchers can script and run jobs locally using the all-new NUPACK 4 Python module, providing the flexibility to interact with the broader Python ecosystem.
Outline
To provide a foundation for describing the NUPACK web app, we begin by defining the physical model, relevant physical quantities, and the design formulation. For the convenience of the reader, definitions and descriptions are drawn from the original algorithms papers, − but are here organized into a single unified presentation for easy perusal. We then summarize the features of the Analysis, Design, and Utilities pages of the NUPACK web app:
• Analysis page: Analyze the equilibrium base-pairing properties of one or more test tube ensembles (and subsidiary complex ensembles). These are the all-purpose sequence analysis tools.
• Design page: Design the sequences for one or more test tube ensembles (and subsidiary complex ensembles). These are the all-purpose sequence design tools.
• Utilities page: Analyze, design, or prepare figures for a single complex ensemble. These are quick tools applicable when your ensemble is a single complex.
Physical Model
Sequence
The sequence, ϕ, of one or more interacting strands is specified as a list of nucleotides ϕ a for a = 1, ..., |ϕ|, where ϕ a specifies both the material and base.
• For RNA nucleotides: ϕ a ∈ {rA, rC, rG, rU}.
• For DNA nucleotides: ϕ a ∈ {dA, dC, dG, dT}.
• For 2′OMe-RNA nucleotides: ϕ a ∈ {mA, mC, mG, mU}.
Hence, for a mixed-material system (RNA/DNA or RNA/2′OMe-RNA), the sequence alphabet contains eight letters rather than four. Sequences are specified 5′ to 3′. The material need only be specified when there is a change in material (e.g., rACGdAT denotes a strand with 3 RNA nucleotides followed by 2 DNA nucleotides). For single-material jobs, the material prefix can be omitted for all nucleotides (e.g., ACGUU for an RNA-only job or ACGTT for a DNA-only job), and nucleotides rU, mU, and dT are converted interchangeably as appropriate. For sequence design, sequence constraints can be specified using IUPAC degenerate nucleotide codes (see Table ).
1. IUPAC Degenerate Nucleotide Codes for RNA .
| Code | Nucleotides |
|---|---|
| rM | rA or rC |
| rR | rA or rG |
| rW | rA or rU |
| rS | rC or rG |
| rY | rC or rU |
| rK | rG or rU |
| rV | rA, rC, or rG |
| rH | rA, rC, or rU |
| rD | rA, rG, or rU |
| rB | rC, rG, or rU |
| rN | rA, rC, rG, or rU |
For 2′OMe-RNA codes, “m” replaces “r” (e.g., “mS” instead of “rS”). For DNA codes, “d” replaces “r” and “T” replaces “U” (e.g., “dT” instead of “rU”). For mixed-material jobs, a nucleotide that can be either material has a wildcard prefix “w” (e.g., for an RNA/DNA job, “wS” is equivalent to “rS or dS”).
Secondary Structure
A secondary structure, s, of one or more interacting nucleic acid strands is defined by a set of base pairs, each a Watson–Crick pair or a wobble pair (e.g., see Figure a).
• For RNA base pairs, Watson–Crick pairs are rA·rU and rC·rG and wobble pairs are rG·rU.
• For DNA base pairs, Watson–Crick pairs are dA·dT and dC·dG and there are no wobble pairs (dG and dT are considered to form mismatch dG × dT and not a wobble pair).
• For 2′OMe-RNA base pairs, Watson–Crick pairs are mA·mU and mC·mG and wobble pairs are mG·mU.
• For RNA/DNA mixed-material base pairs, Watson–Crick pairs are rG·dC, dG·rC, rA·dT, dA·rU and wobble pairs are rG·dT; dG and rU are considered to form mismatch dG × rU and not a wobble pair.
• For RNA/2′OMe-RNA mixed-material base pairs, Watson–Crick pairs are rG·mC, mG·rC, rA·mU, and mA·rU and wobble pairs are rG·mU and mG·rU.
1.
Complex and test tube ensembles. (a) A (connected unpseudoknotted) secondary structure for a complex of 3 strands with strand ordering π = ABC. An arrowhead denotes the 3′ end of each strand. (b) A test tube ensemble containing strand species Ψ0 = {A, B, C} interacting to form all complex species Ψ of up to L max = 3 strands. Adapted from ref . Copyright 2020 American Chemical Society.
A polymer graph representation of a secondary structure is constructed by ordering the strands around a circle, drawing the backbones in succession from 5′ to 3′ around the circumference with a nick between each strand, and drawing straight lines connecting paired bases. A secondary structure is unpseudoknotted if there exists a strand ordering for which the polymer graph has no crossing lines, or pseudoknotted if all strand orderings contain crossing lines. A secondary structure is connected if no subset of the strands is free of (i.e., unpaired to) the others.
Secondary structures may be specified in one of three ways for NUPACK calculations (see Table for examples):
• dot-parens-plus notation: each unpaired base is represented by a dot, each base pair by matching parentheses, and each nick between strands by a plus.
• run-length encoded (RLE) dot-parens-plus notation: as a shorthand for dot-parens-plus, any sequence of consecutive characters in dot-parens-plus may be replaced by the character followed by a number.
• DU+ notation: Using DU+ notation, a duplex is denoted by D followed by the number of base pairs and an unpaired region is denoted by U followed by the number of unpaired nucleotides. Each duplex is followed immediately by the substructure (specified in DU+ notation) that is “enclosed” by the duplex. If this substructure includes more than one element, parentheses are used to denote scope. A nick between strands is specified by a “+”.
In mathematical expressions, it is convenient to represent secondary structure s using a structure matrix S(s) with entries S a,b (s) = 1 if structure s contains base pair a·b and S a,b (s) = 0 otherwise. Abusing notation, the entry S a,a (s) = 1 if base a is unpaired in structure s and 0 otherwise. Hence, S(s) is a symmetric matrix with row and column sums of 1.
2. Secondary Structure Notation: Dot-Parens Plus, Run-Length Encoded (RLE) Dot-Parens-Plus, and DU+.

For each secondary structure, the first nucleotide is depicted in red.
Complex Ensemble
Consider a complex of L distinct strands (each with a unique identifier in {1, ..., L}) corresponding to strand ordering π (e.g., see Figure a). The complex ensemble Γ(ϕ) contains all connected polymer graphs with no crossing lines (i.e., all unpseudoknotted secondary structures). As a matter of algorithmic necessity, all of the dynamic programs in NUPACK operate on complex ensemble Γ(ϕ) treating all strands as distinct. However, in the laboratory, strands with the same sequence are typically indistinguishable with respect to experimental observables. For comparison to experimental data, physical quantities calculated over ensemble Γ(ϕ) are postprocessed to obtain the corresponding quantities calculated over complex ensemble Γ(ϕ) in which strands of the same species are treated as indistinguishable. The ensemble Γ(ϕ) ⊆ Γ(ϕ) is a maximal subset of distinct secondary structures for strand ordering π. Two secondary structures are indistinguishable if their polymer graphs can be rotated so that all strands are mapped onto indistinguishable strands, all base pairs are mapped onto base pairs, and all unpaired bases are mapped onto unpaired bases; otherwise the structures are distinct.
Test Tube Ensemble
A test tube ensemble is a dilute solution containing a set of strand species, Ψ0, introduced at user-specified concentrations, that interact to form a set of complex species, Ψ, each corresponding to a different strand ordering treating strands of the same species as indistinguishable (e.g., see Figure b). , For L strands, there are (L – 1) strand orderings if all strands are different species (e.g., complexes π = ABC and π = ACB for L = 3 and strands A, B, C), but fewer than (L – 1) strand orderings if some strands are of the same species (e.g., complex π = AAA for L = 3 with three A strands). By the Representation Theorem, a secondary structure in the complex ensemble for one strand ordering does not appear in the complex ensemble for any other strand ordering, averting redundancy. It is often convenient to define Ψ to contain all complex species of up to L max strands, although Ψ can be defined to contain arbitrary complex species formed from the strand species in Ψ0.
Multitube Ensemble
Consider a multitube ensemble comprising the set of test tubes, Ω, where tube h ∈ Ω contains the set of strand species Ψ h interacting to form the set of complex species Ψ h . The set of all complexes in the multitube ensemble is then Ψ ≡ ∪ h∈ΩΨ h . Note that the multitube ensemble encompasses the complex and test tube ensembles as subsidiary special cases.
Loop-Based Free Energy Model
For each (unpseudoknotted connected) secondary structure s ∈ Γ(ϕ), the free energy, , is estimated as the sum of the empirically determined free energies of the constituent loops − plus a strand association penalty, ΔG assoc, applied L – 1 times for a complex of L strands
| 1 |
The secondary structure of Figure illustrates the different loop types, with loop free energy, ΔG(loop), modeled as follows: ,,−
• A hairpin loop is closed by a single base-pair i·j. The loop free energy, ΔG i,j , depends on sequence and loop size.
• An interior loop is closed by two base pairs (i·j and d·e with i < d < e < j). The loop free energy, ΔG i,d,e,j depends on sequence, loop size, and loop asymmetry. Bulge loops (where either d = i + 1 or e = j – 1) and stack loops (where both d = i + 1 and e = j – 1) are treated as special cases of interior loops.
• A multiloop is closed by three or more base pairs. The loop free energy is modeled as the sum of three material-dependent penalties: (1) ΔG init for formation of a multiloop, (2) ΔG bp for each closing base pair, (3) ΔG nt for each unpaired nucleotide inside the multiloop; plus two sequence-dependent terms: (4) ΔG i,j , a penalty for each closing pair i·j, (5) ΔG stacking, an optional coaxial and dangle stacking bonus.
• An exterior loop contains a nick between strands and any number of closing base pairs. The exterior loop free energy is the sum of ΔG i,j over all closing base pairs i·j plus an optional coaxial and dangle stacking bonus, ΔG stacking. Hence, an unpaired strand has a free energy of zero, corresponding to the reference state.
See Sections S3–S5 of Reference for details on the functional form of loop-based free energy models.
2.
Loop-based free energy model for a complex. Canonical loop types for a complex with strand ordering π = ABC. Adapted from ref . Copyright 2020 American Chemical Society.
Coaxial and Dangle Stacking
Within a multiloop or an exterior loop, there is a subensemble of coaxial stacking states between adjacent closing base pairs and dangle stacking states between closing base pairs and adjacent unpaired bases. Within a multiloop or exterior loop, a base pair can form one coaxial stack with an adjacent base pair, or can form a dangle stack with at most two adjacent unpaired bases; unpaired bases can either form no stack, or can form a dangle stack with at most one adjacent base pair (see Figure ).
3.

Coaxial and dangle stacking states for multiloops and exterior loops. (a) Stacking subensemble for the multiloop of Figure . (b, c) Stacking subensembes for two exterior loops from Figure . Adapted from ref . Copyright 2020 American Chemical Society.
For a given multiloop or exterior loop, the energetic contributions of all possible coaxial and dangle stacking states are enumerated so as to calculate the free energy
| 2 |
where ω indexes the possible stacking states within the loop and x indexes the individual stacks (coaxial or dangle) within a stacking state. Here, k is the Boltzmann constant and T is temperature. The free energy of a multiloop or exterior loop is augmented by the corresponding ΔG stacking bonus. Hence, a secondary structure s continues to be defined as a set of base pairs, and the stacking states within a given multiloop or exterior loop are treated as a structural subensemble that contributes in a Boltzmann-weighted fashion to the free energy model for the loop. Let s ∥ ∈ s denote a stacking state of the paired and unpaired bases in s. We may equivalently define the free energy of secondary structure s in terms of the stacking state free energies
| 3 |
for all stacking states s ∥ ∈ s
| 4 |
Let Γ ∥(ϕ) denote the ensemble of stacking states corresponding to the complex ensemble of secondary structures Γ(ϕ).
NUPACK supports the following coaxial and dangle stacking formulations:
• All stacking (default): complex ensemble with coaxial and dangle stacking.
• Coaxial stacking: complex ensemble with coaxial stacking.
• Dangle stacking: complex ensemble with dangle stacking.
• No stacking: complex ensemble without coaxial or dangle stacking.
Symmetry Correction
For a secondary structure s ∈ Γ(ϕ) with an R-fold rotational symmetry, there is an R-fold reduction in distinguishable conformational space, so the free energy must be adjusted by a symmetry correction
| 5 |
where
| 6 |
Because the symmetry factor R(ϕ, s) is a global property of each secondary structure s ∈ Γ(ϕ), it is not suitable for use with dynamic programs that treat multiple subproblems simultaneously without access to global structural information. As a result, dynamic programs operate on ensemble Γ(ϕ) using physical model and then the Distinguishability Correction Theorem enables exact conversion of physical quantities to ensemble Γ(ϕ) using physical model ΔG(ϕ, s). Interestingly, ensembles Γ(ϕ) and Γ(ϕ) both have utility when examining the physical properties of a complex as they provide related but different perspectives, akin to complementary thought experiments.
Free Energy Parameters
NUPACK supports temperature-dependent parameter sets with nearest-neighbor sequence dependence that provide loop free energies and enthalpies for single-material jobs (RNA, DNA, or 2′OMe-RNA), including:
• rna06: RNA parameters based on (Mathews et al.), (Mathews et al.), and (Lu et al.) with additional parameters , including coaxial stacking , and dangle stacking ,, in a user-specified concentration of Na+.
• dna04.2: DNA parameters based on (SantaLucia) and (SantaLucia and Hicks) with additional parameters including coaxial stacking, dangle stacking, , GT internal mismatch values, ,− internal asymmetry values, and terminal mismatch values , in user-specified concentrations of Na+, K+, NH4 +, and Mg2+. ,,,
• merna06: 2′OMe-RNA parameters for calculations in 0.12 M Na+ based on (Kierzek et al.) using stack loop, coaxial stacking, terminal base pair, and strand association values from rna-merna06 and all other values from rna06.
or mixed-material jobs (RNA/DNA or RNA/2′OMe-RNA), including:
• rna-dna06: RNA/DNA parameters for hybrid stack loops, hybrid internal mismatches, , and chimeric stack loops with additional parameters for mixed-material loops; for use in conjunction with single-material parameter sets rna06 and dna04.2 in a user-specified concentration of Na+.
• rna-merna06: RNA/2′OMe-RNA parameters based on hybrid stack loops with additional parameters for mixed-material loops; for use in conjunction with single-material parameter sets rna06 and merna06 in 0.12 M Na+.
Free energies are expressed in kcal/mol.
Historical Options
For backward compatibility with NUPACK 3, NUPACK 4 also supports historical stacking formulations (without coaxial stacking and with approximate dangle stacking) and parameter sets. The default physical models for NUPACK 3 can be reproduced as follows:
• For RNA: Parameters: rna95 (NUPACK3); Ensemble: Some dangles (NUPACK3).
• For DNA: Parameters: dna04 (NUPACK3); Ensemble: Some dangles (NUPACK3).
Salts
NUPACK supports the following salt conditions:
• For RNA single-material jobs using rna06: Sodium: the concentration of sodium ions, [Na+], is specified in units of molar (default: 1.0, range: [0.05,1.0]); Magnesium: only 0.0 M [Mg2+] is supported.
• For DNA single-material jobs using dna04.2: Sodium: the sum of the concentrations of (monovalent) sodium, potassium, and ammonium ions, [Na+] + [K+] + [NH4 +], is specified in units of molar (default: 1.0, range: [0.05,1.1]); , Magnesium: the concentration of (divalent) magnesium ions, [Mg2+], is specified in units of molar (default: 0.0, range: [0.0,0.2]). ,
• For 2′OMe-RNA single-material jobs using merna06, the only supported salt conditions are 0.12 M [Na+].
For RNA/DNA mixed-material jobs using rna-dna06: Sodium: the concentration of sodium ions, [Na+], is specified in units of molar (default: 1.0, range: [0.12,1.0]); Magnesium: only 0.0 M [Mg2+] is supported.
• For RNA/2′OMe-RNA mixed-material jobs using rna-merna06, the only supported salt conditions are 0.12 M [Na+].
Physical Quantities
Consider a multitube ensemble comprising the set of test tubes, Ω, where tube h ∈ Ω contains a set of strand species Ψ h interacting to form a set of complex species Ψ h . Let j ∈ Ψ h denote a complex with sequence ϕ j and complex ensembles Γ(ϕ j ) (treating all strands as distinct) and Γ(ϕ j ) (treating strands of the same species as indistinguishable). NUPACK calculates a number of physical quantities over these ensembles. ,
Partition Function
For complex j, the partition function evaluated over ensemble Γ(ϕ j ) treating strands of the same species as indistinguishable is
| 7 |
Complex Free Energy
For complex j, the complex free energy is
| 8 |
Secondary Structure Free Energy
For complex j, the secondary structure free energy for s treating strands of the same species as indistinguishable is ΔG(ϕ j , s), given by ().
Equilibrium Structure Probability
For complex j, the equilibrium structure probability of any secondary structure s ∈ Γ(ϕ j ) treating strands of the same species as indistinguishable is
| 9 |
Boltzmann-Sampled Structures
For complex j, a set of J Boltzmann-sampled structures from ensemble Γ(ϕ j ) treating strands of the same species as indistinguishable is denoted
| 10 |
Boltzmann-sampled structures are available only via the NUPACK Python module.
Equilibrium Base-pairing Probabilities
For complex j, the base-pairing probability matrix P̅(ϕ j ) has entries P̅ a,b (ϕ j ) ∈ [0, 1] corresponding to the equilibrium base-pairing probability
| 11 |
representing the equilibrium probability that base pair a·b forms within ensemble Γ̅(ϕ j ), treating all strands as distinct. Here, S(s) is the structure matrix and p̅(s) is the equilibrium probability of structure s ∈ Γ̅(ϕ j ) treating all strands as distinct. Abusing notation, the entry P̅ a,a (ϕ j ) ∈ [0, 1] denotes the equilibrium probability that base a is unpaired over ensemble Γ(ϕ j ). Hence, P̅(ϕ j ) is a symmetric matrix with row and column sums of 1. In NUPACK graphics, the diagonal entries denoting unpaired bases are depicted as an extra column to the right of the matrix.
MFE Proxy Structure
For complex j, the minimum free energy (MFE) stacking state s MFE (ϕ j ) ∈ Γ ∥(ϕ j ) treating all strands as distinct is
| 12 |
The corresponding MFE proxy structure is
| 13 |
defined as the secondary structure containing the MFE stacking state within its subensemble. The free energy of the MFE proxy structure is reported as
| 14 |
treating strands of the same species as indistinguishable, which satisfies the inequality
| 15 |
relative to the complex free energy. There may be more than one MFE stacking state, each corresponding to the same or different MFE proxy structures. If there are multiple MFE proxy structures, the NUPACK web app presents only one of them; to see multiple MFE proxy structures, use the NUPACK Python module. The NUPACK Python module also provides the option to perform the structure search of eq over ensemble Γ(ϕ j ) instead of Γ̅(ϕ j ), so that the MFE proxy structure is determined treating strands of the same species as indistinguishable.
Suboptimal Proxy Structures
For complex j, the set of suboptimal proxy structures with stacking states within a specified ΔG gap ≥ 0 of the MFE stacking state is denoted as
| 16 |
Suboptimal proxy structures are available only via the NUPACK Python module, including the option to perform the structure search of eq over ensemble Γ(ϕ j ) instead of Γ̅(ϕ j ), so that the MFE proxy structure and the suboptimal proxy structures in the requested energy gap are determined treating strands of the same species as indistinguishable.
Complex Ensemble Defect
For complex j with target structure s j , the complex ensemble defect
| 17 |
represents the equilibrium number of incorrectly paired nucleotides over the ensemble Γ̅(ϕ j ) relative to target structure s j . , Here, P̅(ϕ j ) is the equilibrium base-pairing probability matrix and S(s j ) is the target structure matrix for s j . The normalized complex ensemble defect is then
| 18 |
representing the equilibrium fraction of incorrectly paired nucleotides evaluated over the ensemble of complex j relative to target structure s j .
Complex Ensemble Size
For complex j, the number of secondary structures in the complex ensemble, treating all strands as distinct, is
| 19 |
The corresponding number of stacking states is
| 20 |
Equilibrium Complex Concentrations
For the set of complexes Ψ h in test tube h, the set of equilibrium complex concentrations is denoted
| 21 |
These concentrations are the unique solution to the strictly convex optimization problem
| 22 |
| 23 |
expressed in terms of the previously calculated set of partition functions Q Ψh . Here, the constraints impose conservation of mass: A is the stoichiometry matrix such that A i,j is the number of strands of type i in complex j, and x i is the total concentration of strand i present in the test tube. Based on dimensional analysis, , the convex optimization problem is formulated in terms of mole fractions, but for convenience, NUPACK accepts molar strand concentrations, [i]0 = x i ρH2O, as inputs and returns molar complex concentrations, [j] = x j ρH2O, as outputs, where ρH2O is the molarity of water. Hence, the user specifies the set of molar strand concentrations [i]0 ∀i ∈ Ψ h and NUPACK calculates the set of molar complex concentrations [j] ∀j ∈ Ψ h .
Test Tube Fraction of Bases Unpaired
For a test tube h ∈ Ω containing the set of complexes Ψ h , the test tube fraction of bases unpaired
| 24 |
denotes the fraction of bases that are unpaired in tube h at equilibrium, which is calculated based on the set of equilibrium concentrations x Ψh and the set of base-pairing probability matrices P Ψ h .
Test Tube Ensemble Pair Fractions
For a test tube h ∈ Ω containing the set of complexes Ψ h , the test tube ensemble pair fraction
| 25 |
denotes the fraction of A strands that form base pair a A·b B in tube h. Correspondingly,
| 26 |
denotes the fraction of B strands that form base pair a A·b B in tube h. These base-pairing observables depend on the set of equilibrium concentrations x Ψh and the set of base-pairing probability matrices P Ψ h . The number of distinct bases in the test tube is
| 27 |
representing the total number of bases in all |Ψ h | strand species. Numbering the distinct bases from 1 to N distinct, the ensemble pair fractions are then stored as an (asymmetric) N distinct × N distinct matrix with the fraction of each nucleotide that is unpaired stored on the diagonal. Hence, the matrix of test tube ensemble pair fractions is asymmetric with row and column sums of 1. In NUPACK graphics, the diagonal entries denoting unpaired bases are depicted as an extra column to the right of the matrix.
Test Tube Ensemble Defect
Consider test tube h ∈ Ω containing a set of desired on-target complexes, Ψ h , and a set of undesired off-target complexes, Ψ h . The set of complexes in the test tube is then:
| 28 |
Let each on-target complex, j ∈ Ψ h , have a user-specified target secondary structure, s j , and a user-specified target concentration, y h,j . Let each off-target complex, j ∈ Ψ h , have a vanishing target concentration (y h,j = 0) and no target structure (s j = Ø). The test tube ensemble defect,
| 29 |
represents the equilibrium concentration of incorrectly paired nucleotides over the ensemble of test tube h. Here, x h,j is the equilibrium concentration of complex j in tube h. For each on-target complex, j ∈ Ψ h , the first term in the sum represents the structural defect, quantifying the concentration of nucleotides that are in an incorrect base-pairing state within the ensemble of complex j, and the second term in the sum represents the concentration defect, quantifying the concentration of nucleotides that are in an incorrect base-pairing state because there is a deficiency in the concentration of complex j. For each off-target complex, j ∈ Ψ h , the structural and concentration defects are identically zero, since y h,j = 0. This does not mean that the defects associated with off-targets are ignored. By conservation of mass, nonzero off-target concentrations imply deficiencies in on-target concentrations, and these concentration defects are quantified by the equation above. The normalized test tube ensemble defect is then denoted
| 30 |
representing the equilibrium fraction of incorrectly paired nucleotides in tube h. Here,
| 31 |
is the total concentration of nucleotides in tube h. As approaches zero, each on-target complex, j ∈ Ψ h , approaches its target concentration, y h,j , and is dominated by its target structure, s j , and each off-target complex, j ∈ Ψ h , forms with vanishing target concentration.
Multitube Ensemble Defect
For the set of test tubes Ω, the multitube ensemble defect,
| 32 |
represents the average equilibrium fraction of incorrectly paired nucleotides over the set of test tubes Ω.
Design Formulation
NUPACK provides a framework for engineering reaction pathways for dynamic hybridization cascades (e.g., shape and sequence transduction using small conditional RNAs , ) or for engineering pseudoknotted structures (e.g., RNA origamis). In either case, sequence design is performed over a multitube ensemble (see Figure for a cautionary tale emphasizing the advantages of test tube design over complex design). ,
4.
A cautionary tale: the advantages of test tube design over complex design. (a) Complex design. Sequence design formulated in the context of a complex (left) ensures that at equilibrium the target structure dominates the structural ensemble of the complex (center). Unfortunately, subsequent test tube analysis reveals that the desired on-target complex occurs at negligible concentration relative to other undesired off-target complexes (right). With complex design, neither the concentration of the desired on-target complex, nor the concentrations of undesired off-target complexes are considered. As a result, sequences that are successfully optimized to predominantly adopt a target secondary structure in the context of an on-target complex, may nonetheless fail to ensure that this complex forms at appreciable concentration when the strands are introduced into a test tube. (b) Test tube design. Sequence design formulated in the context of a test tube (left) ensures that at equilibrium the desired on-target complex is dominated by its target structure and forms at approximately its target concentration, and that undesired off-target complexes form at negligible concentrations (center). Subsequent test tube analysis (right) provides no new information and no unpleasant surprises since the design and analysis ensembles are identical. Adapted from ref . Copyright 2014 American Chemical Society.
For reaction pathway engineering, sequence design is formulated as a multistate optimization problem using a set of target test tubes to represent elementary steps of the reaction pathway, as well as to model crosstalk between components. Note that kinetic design of a test tube ensemble is achieved by performing equilibrium optimization of a multitube ensemble: each target test tube isolates different subsets of components in local equilibrium, enabling optimization of kinetically significant states that would appear insignificant if all components were allowed to interact in a single ensemble.
For engineering structures including the possibility of pseudoknots, each target test tube contains only complex ensembles comprising unpseudoknotted structures, but by imposing sequence constraints between tubes, it is possible to collectively impose pseudoknotted design requirements.
In a multitube design ensemble, each target test tube contains a set of desired on-target complexes, each with a target secondary structure and target concentration, and a set of undesired off-target complexes, each with vanishing target concentration. Optimization of the multitube ensemble defect, representing the average equilibrium fraction of incorrectly paired nucleotides over the design ensemble, implements both a positive design paradigm (designing for desired properties) and a negative design paradigm (designing against unwanted properties). Defect weights can be specified to prioritize or deprioritize design quality for different portions of the design ensemble. Sequence design is performed subject to user-specified hard constraints that prohibit sequences violating the constraints and soft constraints that penalize (but do not prohibit) suboptimal sequences.
Reaction Pathways
Consider a set of nucleic acid molecules intended to execute a prescribed hybridization cascade. For example, the reaction pathway of Figure describes small conditional RNAs (scRNAs) that upon binding to input X, perform shape and sequence transduction to form a Dicer substrate targeting an independent output Y for silencing. A reaction pathway specifies the elementary steps (each a self-assembly or disassembly operation in which complexes form or break) by which the molecules are intended to interact, the desired secondary structure for each on-pathway complex, and the complementarity relationships between sequence domains in the molecules. In the reaction pathway of Figure , there are two elementary steps (Step 1: X + A·B → X·A + B, Step 2: B + C → B·C) involving six on-pathway complexes (X, A·B, X·A, B, C, B·C) and numerous sequence domains (“a*” reverse complementary to “a”, “b*” reverse complementary to “b”, and so on).
5.
Reaction pathway schematic. Conditional Dicer substrate formation via shape and sequence transduction with small conditional RNAs (scRNAs). scRNA A·B detects input X (comprising sequence “a-b-c”), leading to production of Dicer substrate B·C (targeting independent sequence “w-x-y-z”). Step 1: X displaces A from B via toehold-mediated 3-way branch migration and spontaneous dissociation. Step 2: B assembles with C via loop/toehold nucleation and 3-way branch migration to form Dicer substrate B·C. See ref for additional reaction pathway case studies. Adapted from ref . Copyright 2017 American Chemical Society.
In addition to specifying a set of desired on-pathway elementary steps, each reaction pathway also implicitly specifies a much larger set of off-pathway interactions, corresponding to undesired crosstalk between components within the pathway or with components from other unrelated reaction pathways. To perform sequence design for reaction pathway engineering, we formulate a multistate optimization problem to explicitly design for on-pathway elementary steps (a positive design paradigm) and against off-pathway crosstalk (a negative design paradigm).
Multitube Design Ensemble
A multitube design problem is specified as a set of target test tubes, Ω. Each tube, h ∈ Ω, contains a set of desired on-target complexes, Ψ h , and a set of undesired off-target complexes, Ψ h . For each on-target complex, j ∈ Ψ h , the user specifies a target secondary structure, s j , and a target concentration, y h,j . For each off-target complex, j ∈ Ψ h , the target concentration is vanishing (y h,j = 0) and there is no target structure (s j = Ø). Note that complex j may have a different target concentration, y h,j , in each tube h (e.g., may be an on-target in one tube and an off-target in another tube). By contrast, complex j has the same target structure, s j , in all tubes where it appears as an on-target (the target structure is ignored in any tubes where complex j appears as on off-target).
The set of complexes in tube h is then Ψ h ≡ Ψ h ∪ Ψ h and the set of all complexes in multistate test tube ensemble Ω is Ψ ≡ ∪ h∈ΩΨ h . Let
| 33 |
denote the set of sequences for the complexes in Ψ.
Consider specification of the multitube ensemble, Ω, for the design of N orthogonal systems for a reaction pathway of M elementary steps. One elementary step tube is specified for each step m = 0, ..., M for each system n = 1, ..., N (treating formation of the initial reactants as a precursor “Step 0”). Additionally, a single global crosstalk tube is specified to minimize off-pathway interactions between the reactive species generated during all elementary steps of all systems. The total number of target test tubes is then |Ω| = N × (M + 1) + 1.
Target Test Tubes
Figure depicts target test tubes for the reaction pathway of Figure . There are three elementary step tubes, each containing on-target complexes corresponding to the products of the corresponding step: the Step 0 tube contains on-targets X, A·B, and C; the Step 1 tube contains on-targets X·A and B; the Step 2 tube contains on-target B·C. Each elementary step tube contains a set of on-target complexes (each with a target secondary structure and target concentration), corresponding to the on-pathway hybridization products for a given step, and a set of undesired off-target complexes (each with vanishing target concentration), corresponding to on-pathway reactants and off-pathway hybridization crosstalk for a given step. Hence, these elementary step tubes design for full conversion of cognate reactants into cognate products and against local crosstalk between these same reactants.
6.
Target test tubes. Left: Elementary step tubes. Step 0 tube: target X and scRNAs A·B and C. Step 1 tube: X·A and B. Step 2 tube: Dicer substrate B·C. Each target test tube contains the depicted on-target complexes corresponding to the on-pathway products for a given step (each with the depicted target secondary structure and a target concentration of 10 nM) as well as off-target complexes (not depicted) corresponding to on-pathway reactants and off-pathway crosstalk for a given step. To design N orthogonal systems, there are three elementary step tubes for each system n = 1, ..., N. Right: Global crosstalk tube. Contains the depicted on-target complexes corresponding to reactive species generated during Steps 0, 1, 2 as well as off-target complexes (not depicted) corresponding to off-pathway interactions between these reactive species. To design N orthogonal systems, the global crosstalk tube contains a set of on-targets and off-targets for each system n = 1, ..., N. Adapted from ref . Copyright 2017 American Chemical Society.
To simultaneously design N orthogonal systems, three elementary step tubes of the type shown in Figure (left) are specified for each system. Furthermore, to design against off-pathway interactions within and between systems, a single global crosstalk tube is specified (right). In the global crosstalk tube, the on-target complexes correspond to all reactive species generated during all elementary steps (m = 0, 1, 2) for all systems (n = 1, ..., N); the off-target complexes correspond to noncognate interactions between these reactive species. Crucially, the global crosstalk tube ensemble omits the cognate products that the reactive species are intended to form (they appear as neither on-targets nor off-targets). Hence, all reactive species in the global crosstalk tube are forced to either perform no reaction (remaining as desired on-targets) or undergo a crosstalk reaction (forming undesired off-targets), providing the basis for minimization of global crosstalk during sequence optimization. To design 8 orthogonal systems for this reaction pathway, the total number of target test tubes is then |Ω| = 8 × 3 + 1 = 25. See section S2.2 of ref for a general description of how to specify target test tubes for a given reaction pathway and a number of illustrative case studies.
Note that each target test tube isolates a different subset of the system components in local equilibrium, enabling optimization of kinetically significant states that would appear insignificant if all components were allowed to interact in a single ensemble. For example, the Step 1 tube in Figure simultaneously optimizes for high-yield production of unstructured intermediate B and against appreciable formation of off-target dimer B·B, promoting rapid nucleation of the unstructured toehold in B with the loop of hairpin C during the next step of the reaction pathway.
Note also that for a tube containing a given set of system components, the cognate products of their interactions can be excluded from the ensemble (appearing as neither on-targets nor off-targets), enabling optimization for high-yield well-structured reactants and against crosstalk. For example, in Figure , the Step 0 tube excludes the cognate product of Step 1 (X·A) from the ensemble in order to optimize formation of initial reactants X, A·B, and C and discourage competing crosstalk interactions (e.g., X·X, A·A, X·C).
Design Objective Function
The design objective function is the multitube ensemble defect, of eq , representing the average equilibrium fraction of incorrectly paired nucleotides over the multitube ensemble, Ω. Test tube ensemble defect optimization implements a positive design paradigm (stabilize on-targets) and a negative design paradigm (destabilize off-targets) at two levels: a) designing for the on-target structure and against all off-target structures within the structural ensemble of each on-target complex, , and b) designing for the target concentration of each on-target complex and against the formation of all off-target complexes within the ensemble of the test tube. , Both paradigms are crucial at both levels in order to achieve high-quality test tube designs with a low test tube ensemble defect. ,
Defect Weights
To prioritize or deprioritize design quality for a portion of the design ensemble, the defect-weighted objective function, , incorporates user-specified defect weights, , for the multitube ensemble or for any domain, strand, complex, or tube. With the default value of unity for all weights, is simply the multitube ensemble defect, . With custom defect weights in the range [0, ∞), the physical meaning of the objective function is distorted in the service of adjusting design priorities. Increasing the weight for a tube, complex, strand or domain will lead to a corresponding increase in the allocation of effort to designing this entity, typically leading to a corresponding reduction in the defect contribution of the entity. Likewise, decreasing the weight for a domain, strand, complex, or tube will lead to a corresponding decrease in the allocation of effort to designing this entity, typically leading to a corresponding increase in the defect contribution of the entity.
Hard Constraints
Sequence design is performed subject to user-specified hard constraints that prohibit sequences violating the constraints. NUPACK supports the following types of hard constraints: ,
• Assignment constraints: Constrain consecutive nucleotides to have a specified sequence (specified 5′ to 3′ using degenerate nucleotide codes; see Table ); specify an assignment constraint by defining a domain.
• Match constraints: Force a concatenation of one list of domains and an equal-length concatenation of another list of domains to have identical sequences.
• Complementarity constraints: Force a concatenation of one list of domains to be the reverse Watson–Crick complement of an equal-length concatenation of another list of domains (optionally allow wobble complements). Note that nucleotides that are base-paired in the target structure of an on-target complex are automatically assigned a complementarity constraint.
• Diversity constraints: Force every word of a specified length to contain a specified degree of sequence diversity, either globally or for a concatenated list of domains (e.g., require every subsequence of length 4 to have at least 2 nucleotide types).
• Similarity constraints: Force a concatenation of a list of domains to match an equal-length reference sequence to within a specified fractional range (e.g., require 45%–55% GC content by imposing a similarity constraint of 45%–55% to a sequence that is poly-S).
• Window constraints: Force a concatenation of a list of domains to be a subsequence of a source sequence (e.g., the source sequence is an mRNA), or more generally, a subsequence of one of multiple source sequences.
• Library constraints: Force a concatenation of a list of domains to have sequences drawn from a concatenated list of libraries. Each library contains a set of alternative sequences of equal length (e.g., a library of toehold sequences or a library of codons).
• Pattern constraints: Prevent a list of patterns from appearing globally or in a concatenation of a list of domains (e.g., prevent GGGG, which is prone to forming G-quadruplexes that are not accounted for in the empirical physical model).
Let denote the user-specified set of hard constraints for a design problem.
Soft Constraints
Additionally, the user may specify soft constraints that use auxiliary objective functions,
| 34 |
to penalize (rather than prohibit) suboptimal sequences during the design process. Here, f k (ϕΨ) ∈ [0, 1] is the penalty function for soft constraint k and w k ∈ [0, ∞) (default: 1) is the corresponding user-specified weight. Soft constraints can reduce design cost relative to the corresponding hard constraint by making it easier for the optimization process to identify candidate sequence mutations. Soft constraints can also increase flexibility by enabling specification of new design goals (e.g., designing two toeholds to have comparable binding strength) for which there is no hard constraint analog. NUPACK supports the following types of soft constraints:
• Similarity constraints: Penalize a concatenation of a list of domains if it does not match an equal-length reference sequence to within a specified fractional range (e.g., prioritize 45%–55% GC content by imposing a similarity constraint of 45%–55% to a sequence that is poly-S).
• Pattern constraints: Penalize a list of patterns if they appear globally or in a concatenation of a list of domains (e.g., penalize GGGG, which is prone to forming G-quadruplexes that are not accounted for in the empirical physical model).
• Symmetry constraints: Penalize a subsequence of a specified word length: (1) if the word appears in more than one location in the design, (2) if the reverse complement of the word appears elsewhere in a location that is not intended to form a duplex with the word, or (3) if the word is self-complementary.
• Energy match constraints: Penalize a set of duplexes (e.g., toeholds and toehold complements) if their structure free energies deviate from each other, or alternatively from a specified reference free energy.
Let denote the user-specified set of soft constraints for a design problem.
Constrained Multitube Design Problem
To design a set of sequences, ΦΨ, for a multitube ensemble, Ω, subject to user-specified hard constraints and soft constraints , the constrained multitube design problem is
| 35 |
where is the multitube ensemble defect including user-specified defect weights . The sequence design algorithm seeks to iteratively reduce the augmented objective function (weighted ensemble defect plus weighted soft constraints) below the stop condition
| 36 |
for user-specified f stop ∈ (0, 1) while satisfying the hard constraints in .
Analysis Page
The Analysis page of the NUPACK web app enables users to analyze the equilibrium concentration and base-pairing properties of a multitube ensemble containing one or more test tubes. Each test tube ensemble contains a user-specified set of strand species, each introduced at a user-specified concentration.
Input
The Analysis Input page allows the user to specify the physical model and components for the multitube ensemble:
• Material: Specify a single-material job (RNA, DNA, or 2′OMe-RNA) or mixed-material job (RNA/DNA or RNA/2′OMe-RNA).
• Temperature: Specify the temperature in Celsius (or select “Melt” and specify a minimum temperature, increment, and maximum temperature to simulate the multitube ensemble for a range of temperatures).
-
• Model options: Optionally specify details of the physical model:
− Parameters: Select from available free energy parameter sets.
− Ensemble: Specify the coaxial and dangle stacking formulation.
− Salts: Specify salt concentrations.
For each test tube within the multitube ensemble, specify the following:
• Tube name: Specify the name of the test tube.
• Strands: Specify the name, sequence, and concentration of each strand species.
- • Complexes: Specify the complex species in the test tube in any of three ways:
- − Max complex size: Automatically generate all complexes up to a specified maximum number of strands (default: 1).
- − Include complex: explicitly specify complexes to include in the test tube ensemble (that would otherwise not be included based on the specified “Max complex size”).
- − Exclude complex: explicitly specify complexes to exclude from the test tube ensemble (that would otherwise be included based on the specified “Max complex size”).
Computation
For each complex in the multitube ensemble, the partition function, equilibrium base-pairing probabilities, and minimum free energy (MFE) proxy structure are calculated using a unified dynamic programming framework. , If the same strand species are present in more than one tube of a multitube ensemble, the algorithms achieve significant cost savings relative to analyzing each tube in the ensemble separately. For each test tube ensemble, the equilibrium complex concentrations are the solution to a strictly convex optimization problem (formulated in terms of calculated partition functions and user-specified strand concentrations), which is solved efficiently in the dual form. The equilibrium complex concentrations and base-pairing probabilities are then used to calculate the test tube fraction of bases unpaired and test tube ensemble pair fractions. In order to analyze the tube properties for a different set of strand concentrations, it is not necessary to rerun the dynamic programs to calculate partition functions, equilibrium base-pairing probabilities, and MFE proxy structures; only the convex optimization problem must be solved again, and this can be rapidly done from within the Results page.
Results
The Analysis Results page summarizes the equilibrium concentration and base-pairing properties of each test tube in the multitube ensemble; use the dropdown to examine the results for a given tube.
• Temperature slider: For calculations that specified a temperature range, use the temperature slider to examine results over the range of simulated temperatures.
• Melt profile: For calculations that specified a temperature range, the melt profile depicts the equilibrium fraction of bases unpaired in the test tube as a function of temperature.
- • Equilibrium complex concentrations: The bar graph depicts the equilibrium concentration of each complex that forms with appreciable concentration in the test tube (adjust the display filters to alter which complex concentrations are shown). Click any bar to display equilibrium base-pairing information for the corresponding complex:
- − MFE structure: Depicts the MFE proxy structure for the complex. In the default view, each base is shaded with the probability that it adopts the depicted base-pairing state at equilibrium, revealing which portions of the structure usefully summarize equilibrium structural features of the complex ensemble.
- − Pair probabilities: Depicts equilibrium base-pairing probabilities for the complex. By definition, these data are independent of concentration and of all other complexes in solution. The area and color of each dot scale with the equilibrium probability of the corresponding base pair. With this convention, the matrix is symmetric, as denoted by a diagonal line. In the column at right, the area and color of each dot scale with the equilibrium probability that the corresponding base is unpaired within the complex ensemble. Optional black circles depict each base pair or unpaired base in the MFE proxy structure.
• Test tube ensemble pair fractions: Depicts equilibrium base-pairing information for the test tube ensemble, taking into account the equilibrium concentration and base-pairing properties of each complex. The area and color of the dot at row i and column j scale with the equilibrium fraction of base i that is paired to base j in solution. With this convention, the matrix can be asymmetric. In the column at right, the area and color of the dot in row i scales with the equilibrium fraction of base i that is unpaired within the test tube ensemble.
Information can be exported to the Design or Utilities pages:
• To Design: For a given complex, export the MFE proxy structure to the Design page to redesign the sequence.
• To Utilities: For a given complex, export the MFE proxy structure and sequence information to the Utilities page to annotate publication quality graphics, or to do quick analysis or design calculations in the context of the complex ensemble.
For individual plots, download graphics for editing in vector graphics programs or download data for local plotting. Alternatively, all job data and plots can be downloaded as a single compressed file.
Design Page
The Design page of the NUPACK web app allows users to perform sequence design over a multitube ensemble comprising one or more target test tubes. See Design Formulation for details on how to formulate a multitube design problem.
Input
The Design Input page allows the user to specify the physical model and components for the multitube ensemble:
• Material: Specify a single-material job (RNA, DNA, or 2′OMe-RNA) or mixed-material job (RNA/DNA or RNA/2′OMe-RNA).
• Temperature: Specify the temperature in Celsius.
• Trials: Specify the number of independent design trials.
- • Model options: Optionally specify details of the physical model:
- − Parameters: Select from available free energy pa- rameter sets.
- − Ensemble: Specify the coaxial and dangle stacking formulation.
- − Salts: Specify salt concentrations.
- • Algorithm settings: Optionally specify algorithm settings:
- − Stop condition: Specify a stop condition in the range (0,1). The design algorithm will attempt to reduce the augmented objective function (weighted ensemble defect plus weighted soft constraints) below the stop condition while satisfying hard constraints.
- − Max design time: Specify the maximum design time.
- − Random seed: Specify a non-zero integer for a re- producible design trial (default: 0; corresponding to a random trial).
- − Wobble mutations: Globally prohibit (default) or allow wobble mutations. Wobble mutations can also be allowed locally when specifying complementarity hard constraints.
Specify all components that appear in one or more target test tubes within the multitube ensemble:
• Domains: Specify sequence domains. A domain is a set of consecutive nucleotides that appear as a subsequence of one or more strands in the design, specified as a name and a sequence (specified 5′ to 3′ using degenerate nucleotide codes; see Table ). Note that specification of a domain using degenerate nucleotide codes represents an implicit hard sequence constraint.
• Strands: Specify target strands. Each target strand is a single RNA, DNA, or 2′OMe-RNA molecule specified as a name and a sequence (specified 5′ to 3′ in terms of previously specified domains).
• Target complexes: Specify target complexes. Each target complex is an on-target and/or off-target complex specified as a name and an ordered list of strands (i.e., an ordering of strands around a circle in a polymer graph) and a complex name. If the complex is to be used as an on-target complex in at least one target test tube, it is specified with an on-target secondary structure (specified in dot-parens-plus, RLE dot-parents-plus, or DU+ notation); the target structure will be ignored in target test tubes where a complex appears as an off-target complex.
For each target test tube in the multitube ensemble, specify the following:
• Target tube name: Specify the name of the target test tube.
• On-target complexes: Specify a set of on-target complexes (from the previously specified set of target complexes that include a target secondary structure), each with a target concentration.
- • Off-target complexes: Specify off-target complexes in any of three ways:
- − Max complex size: Automatically generate the set of all off-target complexes up to a specified maximum number of strands (default: 1).
- − Include complex: Explicitly specify off-target complexes to include in the test tube ensemble (that would otherwise not be included based on the specified “Max complex size”).
- − Exclude complex: Explicitly specify off-target complexes to exclude from the test tube ensemble (that would otherwise be included based on the specified “Max complex size”).
Note that any complex included as an on-target complex will not be included as an off-target complex. Note also that if an off-target is specified using a target complex for which a target structure has been specified, the target structure is ignored (by definition, there is no target structure for an off-target complex). Note further that used together, “Max complex size” and “Exclude complex” provide a powerful combination for specifying target test tubes. With “Max Complex Size”, it is possible to specify a large set of off-target complexes formed from a set of system components. With “Exclude complex”, it is further possible to remove from this large set all of the cognate products that should form between these system components (so they appear as neither on-targets nor off-targets in the tube ensemble). For example, with this approach, the reactive species in a global crosstalk tube can be forced to either perform no reaction (remaining as desired on-targets) or to undergo a crosstalk reaction (forming undesired off-targets), enabling minimization of global crosstalk during sequence optimization.
Optionally specify hard constraints, soft constraints, and/or defect weights for the multitube ensemble:
• Hard constraints: Specify hard constraints that prohibit sequences that violate the constraints, including match constraints, complementarity constraints, diversity constraints, similarity constraints, window constraints, library constraints, and pattern constraints.
• Soft constraints: Specify soft constraints that penalize (but do not prohibit) suboptimal sequences, including similarity constraints, pattern constraints, symmetry constraints, and energy match constraints.
• Defect weights: Specify defect weights to prioritize or deprioritize design quality for any combination of domain, strand, complex, or tube. Note that a defect weight can be specified as either an absolute weight or as a multiplier of existing weights.
See Design Formulation for details.
Computation
The sequence design algorithm seeks to iteratively reduce the augmented objective function (weighted multitube ensemble defect plus weighted soft constraints) below a stop condition while satisfying the specified hard constraints. During sequence optimization, candidate mutations to a random initial sequence are efficiently evaluated over the multitube ensemble by estimating the multitube ensemble defect using test tube ensemble focusing, hierarchical ensemble decomposition, and conditional physical quantities calculated within subensembles. − The progress page displays, for each independent design trial, the augmented objective function as a function of design time.
Results
The following two plots summarize the design results for each independent design trial:
- • Augmented objective function: This plot displays, for each independent design trial, the augmented objective function comprising:
- − The weighted objective function, incorporating any defect weights specified by the user. With the default value of unity for all weights, this reduces to the multitube ensemble defect.
- − The weighted soft constraint contribution for each soft constraint type specified by the user.
- • Multitube ensemble defect: This plot displays, for each independent design trial, the multitube ensemble defect, representing the average equilibrium fraction of incorrectly paired nucleotides over the multitube ensemble. For each design trial, the defect contributions within the multitube ensemble come in two varieties:
- − The structural defect component quantifies the fraction of nucleotides that are in the incorrect base-pairing state within the correct complex.
- − The concentration defect component quantifies the fraction of nucleotides that are in an incorrect base-pairing state because they are not in the correct complex.
Click on the bar for any design trial to explore details for that design trial:
- • Tube defects: This plot displays, for each target test tube, the test tube ensemble defect, representing the equilibrium concentration of incorrectly paired nucleotides over the ensemble of the test tube. For each target test tube, the defect contributions come in two varieties:
- − The structural defect component represents the equilibrium concentration of nucleotides that are in the incorrect base-pairing state within the correct complex.
- − The concentration defect component represents the equilibrium concentration of nucleotides that are in an incorrect base-pairing state because they are not in the correct complex.
• Sequences: Sequence design results are displayed for each sequence domain and each strand in the design ensemble.
Click on the bar for any tube to explore details for that tube:
- • On-target complex contribution to tube defect: This plot displays, for each on-target complex, the contribution to the test tube ensemble defect, representing the equilibrium concentration of incorrectly paired nucleotides over the ensemble of the test tube. For each on-target complex, the defect contributions come in two varieties:
- − The structural defect component represents the equilibrium concentration of nucleotides that are in the incorrect base-pairing state within the ensemble of the complex.
- − The concentration defect component represents the equilibrium concentration of nucleotides that are in an incorrect base-pairing state because there is a deficiency in the concentration of the complex.
• On-target complex defect: This plot displays, for each on-target complex in the test tube, the complex ensemble defect, representing the equilibrium number of incorrectly paired nucleotides over the ensemble of the complex.
• On-target complex concentration: This plot displays, for each on-target complex in the test tube, the equilibrium complex concentration and the target concentration.
• Off-target complex concentration: This plot displays the equilibrium complex concentration for each off-target complex that forms appreciably in the test tube.
Click on the bar for any on-target complex to explore details for that complex:
• Target structure: Depicts the target secondary structure for the on-target complex. By default, each base is shaded with the probability that it adopts the depicted base-pairing state at equilibrium within the complex ensemble. Optionally, each base is shaded according to its identity.
• Pair probabilities: Depicts equilibrium base-pairing probabilities for the on-target complex. By definition, these data are independent of concentration and of all other complexes in solution. The area and color of each dot scale with the equilibrium probability of the corresponding base pair. With this convention, the matrix is symmetric, as denoted by a diagonal line. In the column at right, the area and color of each dot scale with the equilibrium probability that the corresponding base is unpaired within the complex ensemble. Optional black circles depict each base pair or unpaired base in the target structure.
Information can be exported to the Analysis or Utilities pages:
• To Analysis: For the multitube ensemble, a given target test tube, or a given on-target complex, export the designed sequences to the Analysis page for further equilibrium analysis.
• To Utilities: For a given on-target complex, export the target structure and designed sequences to the Utilities page to annotate publication quality graphics, or to do quick analysis or design calculations in the context of the complex ensemble.
For individual plots, download graphics for editing in vector graphics programs or download data for local plotting. Alternatively, all job data and plots can be downloaded as a single compressed file.
Utilities Page
The Utilities page of the NUPACK web app allows users to analyze, design, or annotate the equilibrium properties of a complex. The page accepts as input either sequence information, structure information, or both, performing diverse functions based on the information provided, including:
• Evaluation and display of equilibrium base-pairing information for a specified secondary structure in the context of the complex to which it belongs.
• Automatic layout, rendering, and annotation of secondary structures specified in dot-parens-plus, RLE dot-parens-plus, or DU+ notation.
• Sequence analysis or design for a complex ensemble.
For individual plots, download graphics for editing in vector graphics programs or download data for local plotting. Alternatively, all job data and plots can be downloaded as a single compressed file.
Information can be exported to the Analysis or Design pages:
• To Analysis: For the specified complex, export the strand sequences to the Analysis page to analyze in the context of a test tube ensemble.
• To Design: For the specified complex, export the specified structure to the Design page to design the sequence in the context of a test tube ensemble, carrying along any specified sequence constraints.
Note that for a given complex ensemble:
• The Analysis page displays results through the lens of the MFE proxy structure.
• The Design page displays results through the lens of the target structure.
• The Utilities page displays results through the lens of a user-specified structure.
Methods Summary
NUPACK Web App Frontend
The NUPACK web app frontend is written in TypeScript using the React library for user interface logic and Semantic UI for user interface visuals. Bar graphs are generated using Plotly. Structure drawing and concentration calculations are written in C++17 and compiled to WebAssembly to run in the browser.
NUPACK Web App Control Plane
The NUPACK web app control plane is written in Kotlin using PostgreSQL for metadata, AWS S3 for job storage, Redis for caching and communications, and Kubernetes for orchestration of worker containers and scaling clusters.
NUPACK Web App Backend
The NUPACK 4 backend is written in C++17 using libsimdpp for SIMD operations, armadillo for linear algebra, Taskflow for task parallelization, and gecode for constraint solving.
NUPACK Python Module
The NUPACK 4 Python module is written in C++17 with bindings to Python 3.8+. The numpy, scipy, and pandas packages are used to provide flexible user-friendly numerical interfaces.
Resources
NUPACK Documentation
Documentation is provided within the web app via the Overview page, the Definitions page, the expandable help text next to each item within the interface, and via the Intros and Demos for the Analysis, Design, and Utilities pages. Documentation for the NUPACK 4 Python module is provided via the NUPACK 4 User Guide (docs.nupack.org) including example jobs.
NUPACK Software
NUPACK is a non-profit resource within the Beckman Institute at Caltech. Non-commercial academic users can subscribe to NUPACK to run jobs via the web app on the scalable hybrid cloud compute cluster subject to the NUPACK Terms, or to download the NUPACK 4 Python module subject to the NUPACK Software License Agreement (nupack.org). Commercial users can inquire about obtaining a commercial subscription and license by contacting info@nupack.org.
NUPACK Technical Support
For technical support, feature requests, or bug reports, please contact support@nupack.org.
Acknowledgments
We thank all the NUPACK users who have helped out as alpha and beta testers over the years, as well as the many NUPACK users who have emailed support@nupack.org to request features or report bugs. We thank M. Kirk for assistance in validating NUPACK subscription and user account features. This work was supported by the National Science Foundation (CTMC NSF-CHE-2317395, Software Elements NSF-OAC-1835414, INSPIRE NSF-CHE-1643606, Expeditions in Computing NSF-CCF-1317694, XSEDE NSF-ACI-1548562), by the National Institutes of Health (National Research Service Award T32 GM007616), by the Gordon and Betty Moore Foundation (GBMF2809), by the Schmidt Academy for Software Engineering at Caltech, by the AWS/IST cloud credit program at Caltech, and by the Beckman Institute at Caltech (PMTC).
#.
M.E.F., J.H., and C.T.N. contributed equally to this work.
The authors declare the following competing financial interest(s): A patent.
References
- Zadeh J. N., Steenberg C. D., Bois J. S., Wolfe B. R., Pierce M. B., Khan A. R., Dirks R. M., Pierce N. A.. NUPACK: Analysis and design of nucleic acid systems. J. Comput. Chem. 2011;32:170–173. doi: 10.1002/jcc.21596. [DOI] [PubMed] [Google Scholar]
- Dirks R. M., Pierce N. A.. A partition function algorithm for nucleic acid secondary structure including pseudoknots. J. Comput. Chem. 2003;24:1664–1677. doi: 10.1002/jcc.10296. [DOI] [PubMed] [Google Scholar]
- Dirks R. M., Lin M., Winfree E., Pierce N. A.. Paradigms for computational nucleic acid design. Nucleic Acids Res. 2004;32:1392–1403. doi: 10.1093/nar/gkh291. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Dirks R. M., Pierce N. A.. An algorithm for computing nucleic acid base-pairing probabilities including pseudoknots. J. Comput. Chem. 2004;25:1295–1304. doi: 10.1002/jcc.20057. [DOI] [PubMed] [Google Scholar]
- Dirks R. M., Bois J. S., Schaeffer J. M., Winfree E., Pierce N. A.. Thermodynamic analysis of interacting nucleic acid strands. SIAM Rev. 2007;49:65–88. doi: 10.1137/060651100. [DOI] [Google Scholar]
- Zadeh J. N., Wolfe B. R., Pierce N. A.. Nucleic acid sequence design via efficient ensemble defect optimization. J. Comput. Chem. 2011;32:439–452. doi: 10.1002/jcc.21633. [DOI] [PubMed] [Google Scholar]
- Wolfe B. R., Pierce N. A.. Sequence design for a test tube of interacting nucleic acid strands. ACS Synth. Biol. 2015;4:1086–1100. doi: 10.1021/sb5002196. [DOI] [PubMed] [Google Scholar]
- Wolfe B. R., Porubsky N. J., Zadeh J. N., Dirks R. M., Pierce N. A.. Constrained multistate sequence design for nucleic acid reaction pathway engineering. J. Am. Chem. Soc. 2017;139:3134–3144. doi: 10.1021/jacs.6b12693. [DOI] [PubMed] [Google Scholar]
- Fornace M. E., Porubsky N. J., Pierce N. A.. A unified dynamic programming framework for the analysis of interacting nucleic acid strands: Enhanced models, scalability, and speed. ACS Synth. Biol. 2020;9:2665–2678. doi: 10.1021/acssynbio.9b00523. [DOI] [PubMed] [Google Scholar]
- Nanjundiah A., Fornace M. E., Schulte S. J., Pierce N. A.. Models and algorithms for equilibrium analysis of mixed-material nucleic acid systems. ACS Synth. Biol. 2026;15:74–87. doi: 10.1021/acssynbio.5c00470. [DOI] [PubMed] [Google Scholar]
- SantaLucia J. Jr., Hicks D.. The thermodynamics of DNA structural motifs. Annu. Rev. Biophys. Biomol. Struct. 2004;33:415–440. doi: 10.1146/annurev.biophys.32.110601.141800. [DOI] [PubMed] [Google Scholar]
- Sugimoto N., Nakano M., Nakano S.. Thermodynamics-structure relationship of single mismatches in RNA/DNA duplexes. Biochemistry. 2000;39:11270–11281. doi: 10.1021/bi000819p. [DOI] [PubMed] [Google Scholar]
- Kierzek E., Mathews D. H., Ciesielska A., Turner D. H., Kierzek R.. Nearest neighbor parameters for Watson-Crick complementary heteroduplexes formed between 2′-O-methyl RNA and RNA oligonucleotides. Nucleic Acids Res. 2006;34:3609–3614. doi: 10.1093/nar/gkl232. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Zadeh, J. N. Algorithms for Nucleic Acid Sequence Design. Ph.D. Thesis; California Institute of Technology, 2010. [Google Scholar]
- Tinoco I. Jr., Uhlenbeck O. C., Levine M. D.. Estimation of secondary structure in ribonucleic acids. Nature. 1971;230:362–367. doi: 10.1038/230362a0. [DOI] [PubMed] [Google Scholar]
- Serra M. J., Turner D. H.. Predicting thermodynamic properties of RNA. Methods Enzymol. 1995;259:242–261. doi: 10.1016/0076-6879(95)59047-1. [DOI] [PubMed] [Google Scholar]
- SantaLucia J. Jr.. A unified view of polymer, dumbbell, and oligonucleotide DNA nearest-neighbor thermodynamics. Proc. Natl. Acad. Sci. U. S. A. 1998;95:1460–1465. doi: 10.1073/pnas.95.4.1460. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Bloomfield, V. A. ; Crothers, D. M. ; Tinoco, I., Jr. (2000) Nucleic Acids: Structures, Properties, and Functions; (University Science Books, Sausalito, CA). [Google Scholar]
- Xia T. B., SantaLucia J. Jr., Burkard M. E., Kierzek R., Schroeder S. J., Jiao X. Q., Cox C., Turner D. H.. Thermodynamic parameters for an expanded nearest-neighbor model for formation of RNA duplexes with Watson-Crick base pairs. Biochemistry. 1998;37:14719–14735. doi: 10.1021/bi9809425. [DOI] [PubMed] [Google Scholar]
- Mathews D. H., Sabina J., Zuker M., Turner D. H.. Expanded sequence dependence of thermodynamic parameters improves prediction of RNA secondary structure. J. Mol. Biol. 1999;288:911–940. doi: 10.1006/jmbi.1999.2700. [DOI] [PubMed] [Google Scholar]
- Lu Z. J., Turner D. H., Mathews D. H.. A set of nearest neighbor parameters for predicting the enthalpy change of RNA secondary structure formation. Nucleic Acids Res. 2006;34:4912–4924. doi: 10.1093/nar/gkl472. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Turner D. H., Mathews D. H.. NNDB: The nearest neighbor parameter database for predicting stability of nucleic acid secondary structure. Nucleic Acids Res. 2010;38:D280–D282. doi: 10.1093/nar/gkp892. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Mathews D. H., Disney M. D., Childs J. L., Schroeder S. J., Zuker M., Turner D. H.. Incorporating chemical modification constraints into a dynamic programming algorithm for prediction of RNA secondary structure. Proc. Natl. Acad. Sci. U. S. A. 2004;101:7287–7292. doi: 10.1073/pnas.0401799101. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Zuker M.. Mfold web server for nucleic acid folding and hybridization prediction. Nucleic Acids Res. 2003;31:3406–3415. doi: 10.1093/nar/gkg595. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Peyret, N. Prediction of Nucleic Acid Hybridization: Parameters and Algorithms. Thesis; Wayne State University, 2000. [Google Scholar]
- Bommarito S., Peyret N., SantaLucia J.. Thermodynamic parameters for DNA sequences with dangling ends. Nucleic Acids Res. 2000;28:1929–1934. doi: 10.1093/nar/28.9.1929. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Allawi H. T., SantaLucia J. Jr.. Thermodynamics and NMR of internal G·T mismatches in DNA. Biochemistry. 1997;36:10581–10594. doi: 10.1021/bi962590c. [DOI] [PubMed] [Google Scholar]
- Allawi H. T., SantaLucia J. Jr.. Nearest-neighbor thermodynamics of internal A·C mismatches in DNA: Sequence dependence and pH effects. Biochemistry. 1998;37:9435–9444. doi: 10.1021/bi9803729. [DOI] [PubMed] [Google Scholar]
- Allawi H. T., SantaLucia J. Jr.. Nearest neighbor thermodynamic parameters for internal G·A mismatches in DNA. Biochemistry. 1998;37:2170–2179. doi: 10.1021/bi9724873. [DOI] [PubMed] [Google Scholar]
- Allawi H., SantaLucia J. Jr.. Thermodynamics of internal C·T mismatches in DNA. Nucleic Acids Res. 1998;26:2694–2701. doi: 10.1093/nar/26.11.2694. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Peyret N., Seneviratne P. A., Allawi H. T., SantaLucia J. Jr.. Nearest-neighbor thermodynamics and NMR of DNA sequences with internal A·A, C·C, G·G, and T·T mismatches. Biochemistry. 1999;38:3468–3477. doi: 10.1021/bi9825091. [DOI] [PubMed] [Google Scholar]
- Mittal A., Turner D. H., Mathews D. H.. NNDB: An expanded database of nearest neighbor parameters for predicting stability of nucleic acid secondary structures. J. Mol. Biol. 2024;436:168549. doi: 10.1016/j.jmb.2024.168549. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Koehler R. T., Peyret N.. Thermodynamic properties of DNA sequences: characteristic values for the human genome. Bioinformatics. 2005;21:3333–3339. doi: 10.1093/bioinformatics/bti530. [DOI] [PubMed] [Google Scholar]
- Sugimoto N., Nakano S., Katoh M., Matsumura A., Nakamuta H., Ohmichi T., Yoneyama M., Sasaki M.. Thermodynamic parameters to predict stability of RNA/DNA hybrid duplexes. Biochemistry. 1995;34:11211–11216. doi: 10.1021/bi00035a029. [DOI] [PubMed] [Google Scholar]
- Watkins N. E., Kennelly W. J., Tsay M. J., Tuin A., Swenson L., Lee H. R., Morosyuk S., Hicks D. A., SantaLucia J.. Thermodynamic contributions of single internal rA·dA, rC·dC, rG·dG and rU·dT mismatches in RNA/DNA duplexes. Nucleic Acids Res. 2011;39:1894–1902. doi: 10.1093/nar/gkq905. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Nakano S.-i., Kanzaki T., Sugimoto N.. Influences of ribonucleotide on a duplex conformation and its thermal stability: Study with the chimeric RNA-DNA strands. J. Am. Chem. Soc. 2004;126:1088–1095. doi: 10.1021/ja037314h. [DOI] [PubMed] [Google Scholar]
- Hochrein L. M., Schwarzkopf M., Shahgholi M., Yin P., Pierce N. A.. Conditional Dicer substrate formation via shape and sequence transduction with small conditional RNAs. J. Am. Chem. Soc. 2013;135:17322–17330. doi: 10.1021/ja404676x. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Hanewich-Hollatz M. H., Chen Z., Hochrein L. M., Huang J., Pierce N. A.. Conditional guide RNAs: Programmable conditional regulation of CRISPR/Cas function in bacterial and mammalian cells via dynamic RNA nanotechnology. ACS Cent. Sci. 2019;5:1241–1249. doi: 10.1021/acscentsci.9b00340. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Geary C., Rothemund P. W. K., Andersen E. S.. A single-stranded architecture for cotranscriptional folding of RNA nanostructures. Science. 2014;345:799–804. doi: 10.1126/science.1253920. [DOI] [PubMed] [Google Scholar]
- Porubsky, N. J. Enhanced Algorithms for Analysis and Design of Nucleic Acid Acid Reaction Pathways. Ph.D. Thesis; California Institute of Technology, 2020. [Google Scholar]
- Seeman N. C.. Nucleic acid junctions and lattices. J. Theor. Biol. 1982;99:237–247. doi: 10.1016/0022-5193(82)90002-9. [DOI] [PubMed] [Google Scholar]
- Kanapickas, P. Libsimdpp, 2017, https://github.com/p12tic/libsimdpp.
- Sanderson C., Curtin R.. Armadillo: A template-based C++ library for linear algebra. J. Open Source Softw. 2016;1:26. doi: 10.21105/joss.00026. [DOI] [Google Scholar]
- Huang T.-W., Lin D.-L., Lin C.-X., Lin Y.. Taskflow: A lightweight parallel and heterogeneous task graph computing system. IEEE Trans. IEEE Trans. Parallel Distrib. Syst. 2022;33:1303–1320. doi: 10.1109/TPDS.2021.3104255. [DOI] [Google Scholar]
- Gecode Team . Gecode: Generic Constraint Development Environment, 2022, https://www.gecode.org.
- Harris C. R., Millman K. J., Van Der Walt S. J., Gommers Ralf., Virtanen P., Cournapeau D., Wieser E., Taylor J., Berg S., Smith N. J.. et al. Array programming with NumPy. Nature. 2020;585:357–362. doi: 10.1038/s41586-020-2649-2. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Virtanen P., Gommers R., Oliphant T. E., Haberland M., Reddy T., Cournapeau D., Burovski E., Peterson P., Weckesser W., Bright J.. et al. SciPy 1.0: Fundamental algorithms for scientific computing in Python. Nat. Methods. 2020;17:261–272. doi: 10.1038/s41592-019-0686-2. [DOI] [PMC free article] [PubMed] [Google Scholar]
- McKinney W.. et al. Pandas: A foundational Python library for data analysis and statistics. Python High Perform. Sci. Comput. 2011;14:1–9. [Google Scholar]





