# Hairpin formation

## Introduction

In this example, you will simulate a single strand of length 18 and sequence GCGTTGCTTCTCCAACGC at 334 K (~61 °C) in three different ways:

• with a molecular dynamics (MD) simulation of the sequence-averaged (SA) model. The input file is inputMD.
• with an MD simulation of the sequence-dependent (SD) model. The input file is inputMD_seq_dep.
• with a Monte Carlo (MC) simulation of the SA model in which two base pairs are connected by mutual traps (i.e. additional attractive interactions between two nucleotides). The input file is inputTRAP.

The traps act between the pairs depicted in blue and red in the sequence GCGTTGCTTCTCCAACGC. The details of the interaction associated to the traps can be changed in the file hairpin_forces.dat.

This strand, if T is sufficiently low, tends to form an hairpin with a 6-base long stem and a 6-base long loop. The temperature has been chosen to be close to the melting temperature of such a hairpin in the SA version of the model

This document explains how to prepare the hairpin example (see Preparation) and how to run it (Running). Section Results contains results and plots extracted from the simulation output. In the following, $EXEC refers to the oxDNA executable. ## Preparation The script run.sh generates the input files and runs all the three simulations, one after the other. With the default input files, each simulation, lasting ${\displaystyle 10^{8}}$ steps by default, takes approximately one hour on a modern CPU. The default run.sh expects$EXEC to be in the ../.. directory. If this is not the case, open run.sh and change the variable CODEDIR accordingly.

If you only want to generate the initial configuration, you can issue ./run.sh --generate-only. Then you can run the simulations by yourself. The generated initial configuration files are initial.top (which contains the topology) and initial.conf (which contains positions and orientations of the nucleotides).

## Running

##### Figure 2: Same as Figure 1, but for the SD model.

If mutual traps between stem base-pairs are introduced, then the equilibrium properties of the hairpin are changed and, even if the SA model is employed, the hairpin is always (after the initial equilibration) in its folded conformation. The use of mutual traps can highly decrease the simulation time required by the folding of strands into target structures (like DNA origami or DNA constructs).