oxDNA Primer
What does oxDNA do?
In a nutshell, oxDNA is a simulation code that models nucleic acid behavior (DNA and RNA) at a coarse-grained level. The original model was introduced by T. E. Ouldridge, J. P. K. Doye, and A. A. Louis [3], and has evolved into an extensible simulation and analysis framework supporting oxDNA1, oxDNA2, oxRNA, and oxNA force fields.
oxDNA can run both molecular dynamics (MD) and Monte Carlo (MC) simulations. MD runs on CPUs or CUDA-enabled GPUs, while MC can use algorithms like Virtual Move Monte Carlo to accelerate equilibration and sampling. By simulating many nucleotides over time, it is possible to accurately determine average thermodynamic and mechanical behavior across systems ranging from simple duplexes to massive DNA origami assemblies.
Using a coarse-grained model to determine DNA behavior is quite different from approaches like all-atom molecular dynamics. Each method has strengths and limitations depending on the scientific question.
All-Atom Models: Pros and Cons
Coarse-Grained Models (oxDNA): Pros and Cons
How does it work?
In order to do anything, the code first needs a model of some problem of interest. This could be a simple DNA duplex, a Holliday junction, or a complex DNA origami nanorobot. You describe the model so the code can run simulation and analysis.
- Configuration File
- A description of the physical geometry, containing the 3D positions, velocities, and angular orientations of every nucleotide in the system. As an example, here's a simple conf file of an RNA 8-mer duplex: init.conf (https://github.com/lorenzo-rovigatti/oxDNA/blob/master/examples/RNA_DUPLEX_MELT/init.conf)zx
- Topology File
- A description of the chemical sequence and connectivity, detailing what nucleotides are present, their bases (A, T, G, C, U), and which nucleotides are covalently bonded to each other. Following the same example, here's a simple top file of the same RNA 8-mer duplex: https://github.com/lorenzo-rovigatti/oxDNA/blob/master/examples/RNA_DUPLEX_MELT/sim.top
- Input File
- Simulation parameters such as temperature, salt concentration, number of steps, and whether to use MD or MC methods. Here's the example of an input file to study the properties of the RNA 8-mer duplex: https://github.com/lorenzo-rovigatti/oxDNA/blob/master/examples/RNA_DUPLEX_MELT/input
- Observables
- A list of different physical quantities the code should return at the end of simulation. If you do not request observables, you only get the default trajectory. You can explicitly request outputs like hydrogen-bonding energy, distance between particles, or coaxial-stacking quantities, and most of these can also be analyzed post-simulation. This README calculates the melting temperatures based on the extrapolations to a series of temperatures: https://github.com/lorenzo-rovigatti/oxDNA/blob/master/examples/RNA_DUPLEX_MELT/README
Tools within OxEcosystem
The oxDNA project has grown far beyond a single simulation engine. It is now a rich ecosystem of interconnected tools designed to help design, simulate, and analyze nucleic acid nanotechnology workflows.
- oxDNA / oxRNA Engine
- The core C++/CUDA simulation engine responsible for running computational physics workloads.
- Oxpy
- A Python module that binds directly to the oxDNA engine and enables techniques like replica-exchange and well-tempered metadynamics.
- oxDNA Analysis Tools (oat)
- A Python toolkit for trajectory analysis, including alignment, nucleotide distance calculations, interduplex angles, and hydrogen-bond pattern comparisons.
- OxView
- A browser-based visualization and editing interface for loading, manipulating, and inspecting 3D configuration and topology files.
- Conversion Utilities
- Scripts and integrations (including scadnano and tacoxDNA) that convert CAD designs into oxDNA-ready topology and configuration files.
What do I need to know?
To begin, you just need to go to OxView to visualize and edit your structure, and OxCloud to simulate it right in your browser.
To have fine-grained control over all the tools the oxDNA ecosystem has to offer, you will need to be a little proficient with the command-line interface (CLI) and git for staying up-to-date with the latest code developments.
For advanced users, the oxpy (Python bindings) and oat APIs offer direct usability improvements over raw text inputs and outputs, enabling more fine-grained analysis and statistical calculations.
If you are new to nucleic acid biophysics, these foundational concepts are especially useful:
- Thermodynamics of base pairing and melting temperatures.
- Persistence length and mechanical rigidity of polymers.
- Free energy landscapes and rare-event kinetics (useful for Umbrella Sampling and Forward Flux Sampling).