oxdna2param.py

Note

This is a helper script. It can be called by the user, but normally it is not necessary to run.

This script tries to determine what the optimal EUCLIDEAN_CUTOFF and ANGLE_MAX parameters are for base pair detection in the oxDNA config file for a particular origami. Run with these optimal parameters, oxdna2contact.py will generate the most accurate contact map for the origami.

A basic 2-dimensional parameter sweep of the EUCLIDEAN_CUTOFF and ANGLE_MAX parameters is performed and an “optimal region” for these parameters is displayed as a heatmap. The “optimal region” is the region of parameter values where:

  1. The most scaffold-staple base pairs are detected

  2. No scaffold bases pair to multiple staple partners, and no staple bases pair to multiple scaffold base partners.

This method was developed from the observation that different tools (like scadnano or tacoxDNA) can vary widely on how they output the oxDNA format (see oxDNA Output Differences below). It was hypothesised that using default values of EUCLIDEAN_CUTOFF and ANGLE_MAX in oxdna2contact.py may not be acceptable for all oxDNA config files.

This script can be used to find Optimal Parameters for a Single Origami or, more usefully, good Consensus Parameters for Multiple Origamis. This script was used over 10 origamis exported as oxDNA by different tools to find the consensus EUCLIDEAN_CUTOFF and ANGLE_MAX parameters used as the default parameters in the oxdna2contact.py script.

Optimal Parameters for a Single Origami

To obtain optimal base pair detection parameters for a specific origami, run the following command:

python3 oxdna2param.py origami_name

This command takes the oxDNA topology file _assets/origami_name.top and oxDNA configuration file _assets/origami_name.dat (or, _assets/origami_name.oxdna), and produces an optimal parameters region plot _assets/origami_name.png.

Note

  • For larger M13 origamis, the script can take up to 30 minutes to complete.

  • Sometimes, an optimal parameter region will not exist.

  • This procedure should work equally well with oxRNA topology and config files.

For the 3D wireframe ball origami below, the optimal parameters region plot looks as follows:

3D ball origami Optimal base pair detection parameters for 3D ball origami

The bottom right heatmap shows that, for this origami, the oxdna2contact.py base pair detection parameters should be set in the range:

  • 1.35 =< EUCLIDEAN_CUTOFF <= 2.70 (oxDNA distance units)

  • 1.75 =< ANGLE_MAX <= 24.5 (degrees)

The other heatmaps show, for each unique combination of the detection parameters:

  • Scaffold (Monog) - Staple (Monog): The number of scaffold nucleotides paired with a single staple nucleotide (monogamous), where the staple nucleotide is also monogamous.

  • Scaffold (Monog) - Staple (Cheat): The number of monogamous scaffold nucleotides paired with staple nucleotides that are paired with >1 scaffold nucleotide.

  • Scaffold (Cheat): The number of scaffold nucleotides paired with >1 staple nucleotides.

The optimal parameter region heatmap (bottom right) is precisely:

  1. The “unique base pairs” region of the Scaffold (Monog) - Staple (Monog) heatmap where the Scaffold (Monog) - Staple (Cheat) and Scaffold (Cheat) heatmaps are 0, AND

  2. The sub-region with maximal value within this “unique base pairs” region.

Consensus Parameters for Multiple Origamis

Each time an origami has its range of optimal base pair detection parameters determined, a python pickle file called origami_name.p is produced and stored in the _assets/ directory. This pickle file stores the EUCLIDEAN_CUTOFF and ANGLE_MAX parameter values that are in the optimal region.

When the oxDNA files of many origamis (maybe produced by different design tools) have been analysed, a “consensus” set of parameters can be calculated by running:

python3 oxdna2param.py consensus

This command opens all of the python pickle files previously created, and computes the parameter region that is optimal for ALL of the origamis previously analysed. A value of the EUCLIDEAN_CUTOFF and ANGLE_MAX parameters can be picked from this consensus parameter region and used as good default parameters for the oxdna2contact.py script.

For 10 different origamis, exported as oxDNA both from tacoxDNA and from scadnano (20 oxDNA files in total), the consensus range was found to be approximately:

  • 1.35 =< EUCLIDEAN_CUTOFF <= 2.10 (oxDNA distance units)

  • 5.25 =< ANGLE_MAX <= 12.25 (degrees)

With mid-point:

  • EUCLIDEAN_CUTOFF = 1.75

  • ANGLE_MAX = 8.75

Consensus detection parameters

oxDNA Output Differences

Here are some examples of how different tools output the oxDNA config file (containing the nucleotide positions, orientations and velocities) in different ways.

  1. In general, the oxDNA files that tacoxDNA creates have helices grouped much more closely than oxDNA files produced by scadnano, as seen here for this origami nanopore:

Nanopore converted to oxDNA via tacoxDNA Nanopore converted to oxDNA via scadnano
  1. Insertions and deletions in cadnano designs are treated differently too. In oxDNA files generated by tacoxDNA, cadnano strand lengths and crossover positions are preserved. Insertions create more densely packed nucleotides and deletions create less densely packed nucleotides in the oxDNA config file (left). On the other hand, in oxDNA files generated by scadnano, distances between nucleotides are preserved instead. Insertions create longer helices and deletions shorter ones in the oxDNA config file (right): this means that scadnano allows crossover positions to move in the exported oxDNA.

Schematic Schematic, exported to oxDNA via tacoxDNA Schematic, exported to oxDNA via scadnano