<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dna.physics.ox.ac.uk/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Randisi</id>
	<title>OxDNA - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://dna.physics.ox.ac.uk/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Randisi"/>
	<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=Special:Contributions/Randisi"/>
	<updated>2026-04-24T17:35:39Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=How_To_Write_An_Interaction&amp;diff=1086</id>
		<title>How To Write An Interaction</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=How_To_Write_An_Interaction&amp;diff=1086"/>
		<updated>2018-02-01T11:37:58Z</updated>

		<summary type="html">&lt;p&gt;Randisi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The oxDNA program is written in such a way to be easily modifiable to perform research in previously unplanned research directions. One of the most common ways of doing so is to write a new interaction, to simulate a different DNA/RNA model or to simulate something else entirely, including patchy particles.&lt;br /&gt;
&lt;br /&gt;
This section (currently a stub) is going to explain briefly what is needed to write such an interaction.&lt;br /&gt;
&lt;br /&gt;
== Files to create ==&lt;br /&gt;
# &#039;&#039;&#039;Interaction Header&#039;&#039;&#039; - this is the header file of your interaction. Contains the C++ header of the interaction, and should be saved in the directory &amp;lt;tt&amp;gt;src/Interactions&amp;lt;/tt&amp;gt; with extension &amp;lt;tt&amp;gt;.h&amp;lt;/tt&amp;gt;. The faster way to write it is probably to copy the one of an existing interaction that is somewhat similar to the interaction you want to write and modify it until you&#039;re happy with it. The name of the file should be as close as the one of the class defining the interaction, with the extension &amp;lt;tt&amp;gt;.h&amp;lt;/tt&amp;gt; common to all header files. Therefore, if your interaction defines the class &amp;lt;tt&amp;gt;MyInteraction&amp;lt;/tt&amp;gt;, the file could be called &amp;lt;tt&amp;gt;MyInteraction.h&amp;lt;/tt&amp;gt;.&lt;br /&gt;
# &#039;&#039;&#039;Interaction Source&#039;&#039;&#039; - this is the source file of your interaction. Like the header, it should be saved in the &amp;lt;tt&amp;gt;src/Interactions&amp;lt;/tt&amp;gt; directory, but it should have extension &amp;lt;tt&amp;gt;.cpp&amp;lt;/tt&amp;gt;. Again, the best way to write one is to look at the &amp;lt;tt&amp;gt;.cpp&amp;lt;/tt&amp;gt; file of an interaction similar to the one you are going to write and modify it as needed. The name should be the same as the header file, with the only difference that the extension should be &amp;lt;tt&amp;gt;.cpp&amp;lt;/tt&amp;gt; instead of &amp;lt;tt&amp;gt;.h&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Files to modify ==&lt;br /&gt;
Here and in the following we are assuming that your interaction defines a class &amp;lt;tt&amp;gt;MyInteraction&amp;lt;/tt&amp;gt;, and is saved in the files &amp;lt;tt&amp;gt;MyInteraction.h&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;MyInteraction.cpp&amp;lt;/tt&amp;gt;. Your interaction will of course have a more informative name, so make sure to modify the following files accordingly.&lt;br /&gt;
# &amp;lt;tt&amp;gt;src/CMakeLists.txt&amp;lt;/tt&amp;gt; - this files contains information on how to compile oxDNA, i.e. which files to use to produce the oxDNA executable and how to do it. The files containing the interactions are listed in the block that starts with &amp;lt;tt&amp;gt; SET(interactions_SOURCES &amp;lt;/tt&amp;gt;. Add a line containing &amp;lt;tt&amp;gt;MyInteraction.cpp&amp;lt;/tt&amp;gt; to the list, so that the source file will be included in the build. The header file will be included by the source file (provided it contains the appropriate &amp;lt;tt&amp;gt;#include&amp;lt;/tt&amp;gt; directive).&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;tt&amp;gt;src/Interactions/InteractionFactory.cpp&amp;lt;/tt&amp;gt; Now your file will be compiled, but it&#039;s still disjoint from the rest of the program. In order to make sure that the oxDNA program can use your interaction, you must modify the &amp;lt;tt&amp;gt;InteractionFactory.cpp&amp;lt;/tt&amp;gt; file to use your interaction.&lt;br /&gt;
## Add the header file &amp;lt;tt&amp;gt;#include &amp;quot;MyInteraction.h&amp;quot;&amp;lt;/tt&amp;gt; together with the other interaction header files, at the beginning of the file.&lt;br /&gt;
## In the function &amp;lt;tt&amp;gt;make_interaction&amp;lt;/tt&amp;gt; there&#039;s a long list of statements that create a different type of interaction depending on the value of the &amp;lt;tt&amp;gt;interaction_type&amp;lt;/tt&amp;gt; string in the oxDNA input file. Add your own interaction there, making sure not to mask any previously defined interactions. The syntax of the code of block might change, but currently it&#039;s just a bunch of lines like &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; &amp;lt;tt&amp;gt;else if(inter_type.compare(&amp;quot;DNA_nomesh&amp;quot;) == 0) return new DNAInteraction_nomesh&amp;lt;number&amp;gt;();&amp;lt;br&amp;gt;  else if(inter_type.compare(&amp;quot;DNA2_nomesh&amp;quot;) == 0) return new DNA2Interaction_nomesh&amp;lt;number&amp;gt;();&amp;lt;br&amp;gt;   else if(inter_type.compare(&amp;quot;LJ&amp;quot;) == 0) return new LJInteraction&amp;lt;number&amp;gt;();&amp;lt;br&amp;gt;  else if(inter_type.compare(&amp;quot;DNA_relax&amp;quot;) == 0) return new DNAInteraction_relax&amp;lt;number&amp;gt;();&amp;lt;br&amp;gt;   else if(inter_type.compare(&amp;quot;RNA&amp;quot;) == 0) return new RNAInteraction&amp;lt;number&amp;gt;();&amp;lt;/tt&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; so you would just add the line &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; &amp;lt;tt&amp;gt;else if(inter_type.compare(&amp;quot;my_interaction&amp;quot;) == 0) return new MyInteraction&amp;lt;number&amp;gt;();&amp;lt;/tt&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; somewhere over there.&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=Main_Page&amp;diff=1082</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=Main_Page&amp;diff=1082"/>
		<updated>2018-01-17T14:40:49Z</updated>

		<summary type="html">&lt;p&gt;Randisi: Added the link to the page &amp;quot;How to write an interaction&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== oxDNA == &lt;br /&gt;
&lt;br /&gt;
oxDNA is a simulation code originally developed to implement the coarse-grained DNA model introduced by T. E. Ouldridge, J. P. K. Doye and A. A. Louis. It has been since reworked and it is now an extensible simulation+analysis framework. It natively supports simulations of DNA (oxDNA and oxDNA2) and RNA (oxRNA) on both CPUs and NVIDIA GPUs.&lt;br /&gt;
&lt;br /&gt;
The code implements Monte Carlo and Molecular Dynamics. The developers are L. Rovigatti, F. Romano, P. Šulc, B. Snodin, F. Randisi and T. E. Ouldridge in the [http://physchem.ox.ac.uk/~doye/jon/ Doye] and [http://www-thphys.physics.ox.ac.uk/people/ArdLouis/ Louis] groups at the University of Oxford. Additionally, Molecular Dynamics simulations modeling DNA-linked nanoparticles have been implemented by J. Hendricks, T. Fochtman, and B. Walcutt in the [http://self-assembly.net/ Patitz] group at the University of Arkansas.&lt;br /&gt;
&lt;br /&gt;
The oxDNA and oxRNA models are intended to provide a physical representation of the thermodynamic and mechanical properties of single- and double-stranded DNA and RNA, as well as the transition between the two. At the same time, the representation of DNA and RNA is sufficiently simple to allow access to assembly processes which occur on long timescales, beyond the reach of atomistic simulations. Basic examples include duplex formation from single strands, and the folding of a self-complementary single strand into a hairpin. These are the underlying processes of the fast-growing field of  [http://en.wikipedia.org/wiki/DNA_nanotechnology DNA nanotechnology] and RNA nanotechnology, as well as many biophysical uses of DNA/RNA, allowing the model to be used to understand these fascinating systems.&lt;br /&gt;
&lt;br /&gt;
There also exists an implementation of the oxDNA and oxDNA2 models for [http://lammps.sandia.gov/ LAMMPS] in the USER-CGDNA package, developed by [http://www.oliverhenrich.com/ Oliver Henrich] (with the help of Tom E. Ouldridge, F. Romano and L. Rovigatti). The package documentation can be found [http://lammps.sandia.gov/doc/Section_packages.html#user-cgdna here], while the code is available [https://ccpforge.cse.rl.ac.uk/gf/project/cgdna/ here].&lt;br /&gt;
&lt;br /&gt;
* [[Download and Installation]]&lt;br /&gt;
&lt;br /&gt;
* [[Features]]&lt;br /&gt;
&lt;br /&gt;
* [[DNA model introduction]]&lt;br /&gt;
&lt;br /&gt;
* [[RNA model introduction]]&lt;br /&gt;
&lt;br /&gt;
* [[Documentation]]&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Examples|Examples]]&lt;br /&gt;
&lt;br /&gt;
* [[Screenshots|Screenshots and movies]]&lt;br /&gt;
&lt;br /&gt;
* [[Gallery of studied systems]]&lt;br /&gt;
&lt;br /&gt;
* [[Publications]]&lt;br /&gt;
&lt;br /&gt;
* [[Gallery of Journal Covers]]&lt;br /&gt;
&lt;br /&gt;
* [[License and Copyright]]&lt;br /&gt;
&lt;br /&gt;
* [[Previous version]]&lt;br /&gt;
&lt;br /&gt;
* [[Contact information]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[How To Write An Interaction]]&lt;br /&gt;
&lt;br /&gt;
== News ==&lt;br /&gt;
* Code implementing [[DNA_model_introduction#oxDNA2|oxDNA2]], a new version of the oxDNA model, is now included in the latest release. See the recent arXiv publication [http://arxiv.org/abs/1504.00821] for more information about the new model.&lt;br /&gt;
* Follow the latest updates about oxDNA on our twitter account: [https://twitter.com/ox_dna ox_dna]&lt;br /&gt;
* You can post questions about the installation and usage of our code to the newly created [http://sourceforge.net/p/oxdna/discussion/ Discussion forum] for oxDNA at sourceforge.net&lt;br /&gt;
&lt;br /&gt;
== Acknowledgments ==&lt;br /&gt;
&lt;br /&gt;
We thank our co-workers C. Matek, R. Harrison and W. Smith for having contributed bits of code and/or material for the examples and our webmasters Russell Jones and Greg Agacinski for maintaining the website.&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=How_To_Write_An_Interaction&amp;diff=1081</id>
		<title>How To Write An Interaction</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=How_To_Write_An_Interaction&amp;diff=1081"/>
		<updated>2018-01-17T14:40:01Z</updated>

		<summary type="html">&lt;p&gt;Randisi: Creating the guideline&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The oxDNA program is written in such a way to be easily modifiable to perform research in previously unplanned research directions. One of the most common ways of doing so is to write a new interaction, to simulate a different DNA/RNA model or to simulate something else entirely, including patchy particles.&lt;br /&gt;
&lt;br /&gt;
This section (currently a stub) is going to explain briefly what is needed to write such an interaction.&lt;br /&gt;
&lt;br /&gt;
== Files to create ==&lt;br /&gt;
# &#039;&#039;&#039;Interaction Header&#039;&#039;&#039; - this is the header file of your interaction. Contains the C++ header of the interaction, and should be saved in the directory &amp;lt;tt&amp;gt;src/Interactions&amp;lt;/tt&amp;gt; with extension &amp;lt;tt&amp;gt;.h&amp;lt;/tt&amp;gt;. The faster way to write it is probably to copy the one of an existing interaction that is somewhat similar to the interaction you want to write and modify it until you&#039;re happy with it. The name of the file should be as close as the one of the class defining the interaction, with the extension &amp;lt;tt&amp;gt;.h&amp;lt;/tt&amp;gt; common to all header files. Therefore, if your interaction defines the class &amp;lt;tt&amp;gt;MyInteraction&amp;lt;/tt&amp;gt;, the file could be called &amp;lt;tt&amp;gt;MyInteraction.h&amp;lt;/tt&amp;gt;.&lt;br /&gt;
# &#039;&#039;&#039;Interaction Source&#039;&#039;&#039; - this is the source file of your interaction. Like the header, it should be saved in the &amp;lt;tt&amp;gt;src/Interactions&amp;lt;/tt&amp;gt; directory, but it should have extension &amp;lt;tt&amp;gt;.cpp&amp;lt;/tt&amp;gt;. Again, the best way to write one is to look at the &amp;lt;tt&amp;gt;.cpp&amp;lt;/tt&amp;gt; file of an interaction similar to the one you are going to write and modify it as needed. The name should be the same as the header file, with the only difference that the extension should be &amp;lt;tt&amp;gt;.cpp&amp;lt;/tt&amp;gt; instead of &amp;lt;tt&amp;gt;.h&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Files to modify ==&lt;br /&gt;
Here and in the following we are assuming that your interaction defines a class &amp;lt;tt&amp;gt;MyInteraction&amp;lt;/tt&amp;gt;, and is saved in the files &amp;lt;tt&amp;gt;MyInteraction.h&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;MyInteraction.cpp&amp;lt;/tt&amp;gt;. Your interaction will of course have a more informative name, so make sure to modify the following files accordingly.&lt;br /&gt;
# &amp;lt;tt&amp;gt;src/CMakeLists.txt&amp;lt;/tt&amp;gt; - this files contains information on how to compile oxDNA, i.e. which files to use to produce the oxDNA executable and how to do it. The files containing the interactions are listed in the block that starts with &amp;lt;tt&amp;gt; SET(interactions_SOURCES &amp;lt;/tt&amp;gt;. Add a line containing &amp;lt;tt&amp;gt;MyInteraction.cpp&amp;lt;/tt&amp;gt; to the list, so that the source file will be included in the build. The header file will be included by the source file (provided it contains the appropriate &amp;lt;tt&amp;gt;#include&amp;lt;/tt&amp;gt; directive).&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;tt&amp;gt;src/Interactions/InteractionFactory.cpp&amp;lt;/tt&amp;gt; Now your file will be compiled, but it&#039;s still disjoint from the rest of the program. In order to make sure that the oxDNA program can use your interaction, you must modify the &amp;lt;tt&amp;gt;InteractionFactory.cpp&amp;lt;/tt&amp;gt; file to use your interaction.&lt;br /&gt;
## Add the header file &amp;lt;tt&amp;gt;#include &amp;quot;JordanInteraction.h&amp;quot;&amp;lt;/tt&amp;gt; together with the other interaction header files, at the beginning of the file.&lt;br /&gt;
## In the function &amp;lt;tt&amp;gt;make_interaction&amp;lt;/tt&amp;gt; there&#039;s a long list of statements that create a different type of interaction depending on the value of the &amp;lt;tt&amp;gt;interaction_type&amp;lt;/tt&amp;gt; string in the oxDNA input file. Add your own interaction there, making sure not to mask any previously defined interactions. The syntax of the code of block might change, but currently it&#039;s just a bunch of lines like &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; &amp;lt;tt&amp;gt;else if(inter_type.compare(&amp;quot;DNA_nomesh&amp;quot;) == 0) return new DNAInteraction_nomesh&amp;lt;number&amp;gt;();&amp;lt;br&amp;gt;  else if(inter_type.compare(&amp;quot;DNA2_nomesh&amp;quot;) == 0) return new DNA2Interaction_nomesh&amp;lt;number&amp;gt;();&amp;lt;br&amp;gt;   else if(inter_type.compare(&amp;quot;LJ&amp;quot;) == 0) return new LJInteraction&amp;lt;number&amp;gt;();&amp;lt;br&amp;gt;  else if(inter_type.compare(&amp;quot;DNA_relax&amp;quot;) == 0) return new DNAInteraction_relax&amp;lt;number&amp;gt;();&amp;lt;br&amp;gt;   else if(inter_type.compare(&amp;quot;RNA&amp;quot;) == 0) return new RNAInteraction&amp;lt;number&amp;gt;();&amp;lt;/tt&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; so you would just add the line &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; &amp;lt;tt&amp;gt;else if(inter_type.compare(&amp;quot;my_interaction&amp;quot;) == 0) return new MyInteraction&amp;lt;number&amp;gt;();&amp;lt;/tt&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; somewhere over there.&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=Screenshots_and_movies&amp;diff=1065</id>
		<title>Screenshots and movies</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=Screenshots_and_movies&amp;diff=1065"/>
		<updated>2017-07-21T15:43:58Z</updated>

		<summary type="html">&lt;p&gt;Randisi: added youtube link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;See our [https://www.youtube.com/channel/UCz3DCaoBsa9MvVSrVhyoU4A youtube channel] for more videos&lt;br /&gt;
=== single-stranded DNA ===&lt;br /&gt;
[[Image:image_ssdna.png]]&lt;br /&gt;
&lt;br /&gt;
=== double-stranded DNA ===&lt;br /&gt;
[[Image:image_dsdna.png]]&lt;br /&gt;
&lt;br /&gt;
=== Plectoneme formation ===&lt;br /&gt;
https://pbs.twimg.com/media/Bk7P2EqCEAAz3Yk.png&lt;br /&gt;
&lt;br /&gt;
See also the following movies:&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|Njpp_DWAhBg}}&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|3GusNEYkRM4}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DNA cage ===&lt;br /&gt;
[[Image:chiral474.png]]&lt;br /&gt;
&lt;br /&gt;
=== DNA tetrahedron (double sides) ===&lt;br /&gt;
[[Image:tetrahedron_large.png]]&lt;br /&gt;
&lt;br /&gt;
=== DNA tetrahedron ===&lt;br /&gt;
http://www-thphys.physics.ox.ac.uk/people/PetrSulc/images/image.png&lt;br /&gt;
&lt;br /&gt;
=== DNA tile ===&lt;br /&gt;
[[Image:3tile.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Formation of a duplex in the simulation box ===&lt;br /&gt;
{{#ev:youtube|9S85iI9IYB4}}&lt;br /&gt;
&lt;br /&gt;
=== Strand displacement ===&lt;br /&gt;
http://www-thphys.physics.ox.ac.uk/people/PetrSulc/images/stateB.png&lt;br /&gt;
Invading strand attached by toehold&lt;br /&gt;
&lt;br /&gt;
http://www-thphys.physics.ox.ac.uk/people/PetrSulc/images/stateC.png&lt;br /&gt;
Invading and victim strands that are not coaxially stacked&lt;br /&gt;
&lt;br /&gt;
http://www-thphys.physics.ox.ac.uk/people/PetrSulc/images/stateX.png&lt;br /&gt;
Invading and victim strands that are coaxially stacked&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A movie of part of the strand displacement process. It shows the invading strand attached by toehold and then displacing several base pairs of the victim strand:&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|l2frV1Gd830}}&lt;br /&gt;
&lt;br /&gt;
=== DX tile ===&lt;br /&gt;
http://www-thphys.physics.ox.ac.uk/people/PetrSulc/images/tilechimera.png&lt;br /&gt;
&lt;br /&gt;
=== Kissing hairpin ===&lt;br /&gt;
[[Image:hairpin_kiss2.png]]&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=DNA_model_introduction&amp;diff=1050</id>
		<title>DNA model introduction</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=DNA_model_introduction&amp;diff=1050"/>
		<updated>2017-03-23T17:15:53Z</updated>

		<summary type="html">&lt;p&gt;Randisi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The model treats DNA as a string of rigid nucleotides, which interact through potentials which depend on the position and orientation of the nucleotides. The interactions are:&lt;br /&gt;
#Sugar-phosphate backbone connectivity,&lt;br /&gt;
#Excluded volume,&lt;br /&gt;
#Hydrogen bonding,&lt;br /&gt;
#Nearest-neighbour stacking,&lt;br /&gt;
#Cross-stacking between base-pair steps in a duplex,&lt;br /&gt;
#Coaxial stacking.&lt;br /&gt;
&lt;br /&gt;
This interactions are illustrated below. Orientational modulations of the stacking potential encourage the bases to form coplanar stacks, the twist arising from the different length scales of the backbone separation and the optimum stacking separation. The possibility of unstacking allows single strands to be very flexible. Hydrogen bonding  can occur between complementary bases when they are anti-aligned, leading to the formation of double helical structures.&lt;br /&gt;
&lt;br /&gt;
http://www-thphys.physics.ox.ac.uk/people/ThomasOuldridge/Site/The_model.png&lt;br /&gt;
&lt;br /&gt;
(a) Model interaction sites with their interaction ranges (the typical range of an interaction is twice the radius of the sphere shown).&lt;br /&gt;
&lt;br /&gt;
(b) Representation of these interaction site in a visualisation that makes the planarity of the base clear.&lt;br /&gt;
&lt;br /&gt;
(c) A duplex in this representation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://www-thphys.physics.ox.ac.uk/people/ThomasOuldridge/Site/interactions.png&lt;br /&gt;
&lt;br /&gt;
Indication of the interactions which hold together a typical duplex. V(b.b.) indicates the phosphate-sugar backbone connectivity.&lt;br /&gt;
&lt;br /&gt;
In the original model, all complementary base pairs and stacking partners interact with the same strength (there is no attractive interaction between non-complementary bases). A sequence-dependent parameterisation of the hydrogen-bonding and stacking interactions is included as an option in the code release.&lt;br /&gt;
The melting temperatures of a set of short DNA oligomers in the sequence-dependent coarse-grained model, compared to the melting temperatures as predicted by SantaLucia&#039;s nearest-neighbor model ([http://www.pnas.org/content/95/4/1460.full]), are available here: [http://www-thphys.physics.ox.ac.uk/people/PetrSulc/data/CG_model_Tm.txt]&lt;br /&gt;
&lt;br /&gt;
The original model incorporates electrostatics only through the short-ranged excluded volume. For this reason, it is only appropriate for the study of systems at high salt concentration, when electrostatic interactions are strongly screened. It also does not incorporate the differentiation between the major and minor grooves of DNA double helices. &lt;br /&gt;
&lt;br /&gt;
===oxDNA2===&lt;br /&gt;
&lt;br /&gt;
A new version of the oxDNA model, called oxDNA2, has been released in 2015 ([http://arxiv.org/abs/1504.00821],[http://scitation.aip.org/content/aip/journal/jcp/142/23/10.1063/1.4921957]). It introduces different widths for the major and minor DNA double helical grooves (an example double helix is shown below), a new electrostatic interaction which allows DNA to be studied at salt concentrations equivalent to 0.1M &amp;lt;nowiki&amp;gt;[NaCl]&amp;lt;/nowiki&amp;gt; and above, improved large-scale structure prediction, and differentiation between AA and TT stacking strengths.&lt;br /&gt;
&lt;br /&gt;
https://dna.physics.ox.ac.uk/images/3/37/Perfect_yesmm_nopov.png&lt;br /&gt;
&lt;br /&gt;
The oxDNA2 model is included in the latest release of the oxDNA code. It can be used in a very similar way to the original oxDNA model. Only a couple of lines in the input file must be added. Firstly, the following line must be included:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
interaction_type = DNA2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the salt concentration for the simulation must be specified. For example, to run a simulation with a salt concentration of 0.5M, one should write:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
salt_concentration = 0.5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Everything else should work in the same way as it does for the original oxDNA model.&lt;br /&gt;
&lt;br /&gt;
===Simulation units===&lt;br /&gt;
The code uses units for energy, mass, length and time that are convenient for a typical system. The relationship between simulation units (SU) and SI units is given below.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! Simulation unit &lt;br /&gt;
! Physical unit&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of length&lt;br /&gt;
| 8.518x10&amp;lt;math&amp;gt;^{-10}&amp;lt;/math&amp;gt; m = 0.8518 nm&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of energy&lt;br /&gt;
| thermal energy at 3000K - approximately 4.142x10&amp;lt;math&amp;gt;^{-20}&amp;lt;/math&amp;gt; J = 41.42 pN nm&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of temperature      &lt;br /&gt;
| 3000 K&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of force&lt;br /&gt;
| 4.863x10&amp;lt;math&amp;gt;^{-11}&amp;lt;/math&amp;gt; N = 48.63 pN&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of mass&lt;br /&gt;
| 5.24x10&amp;lt;math&amp;gt;^{-25}&amp;lt;/math&amp;gt; kg&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of time&lt;br /&gt;
| 3.03x10&amp;lt;math&amp;gt;^{-12}&amp;lt;/math&amp;gt; s = 3.03 ps&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of force constant (1 unit force/1 unit length)&lt;br /&gt;
| 57.09 pN/nm&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of torque (1 unit force * 1 unit length)&lt;br /&gt;
| 41.423 pN * nM&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Useful conversions===&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| Boltzmann&#039;s constant - in simulation units, we set Boltzmann&#039;s constant to 1 so that we can measure temperature and energy with the same unit. Therefore in simulation units energy/K Boltzmann&#039;s constant is 0.001/3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The model and its performance is discussed in detail in the following references (the thesis provides the most complete analysis):&lt;br /&gt;
&lt;br /&gt;
T. E. Ouldridge, D.Phil. Thesis, University of Oxford, 2011.&lt;br /&gt;
[http://ora.ox.ac.uk/objects/uuid:b2415bb2-7975-4f59-b5e2-8c022b4a3719 Coarse-grained modelling of DNA and DNA self-assembly]&lt;br /&gt;
&lt;br /&gt;
T. E. Ouldridge, A. A. Louis and J. P. K. Doye, J. Chem. Phys, 134, 085101 (2011)&lt;br /&gt;
[http://link.aip.org/link/?JCP/134/085101 Structural, mechanical and thermodynamic properties of a coarse-grained DNA model] ([http://arxiv.org/abs/arXiv:1009.4480 arXiv])&lt;br /&gt;
&lt;br /&gt;
P. Šulc, F. Romano, T. E. Ouldridge, L. Rovigatti, J. P. K. Doye, A. A. Louis, &#039;&#039;J. Chem. Phys.&#039;&#039; &#039;&#039;&#039;137&#039;&#039;&#039;, 135101 (2012)&lt;br /&gt;
[http://jcp.aip.org/resource/1/jcpsa6/v137/i13/p135101_s1 Sequence-dependent thermodynamics of a coarse-grained DNA model] ([http://arxiv.org/abs/1207.3391 arxiv])&lt;br /&gt;
&lt;br /&gt;
B. E. K. Snodin, F. Randisi, M. Mosayebi, P. Šulc, J. S. Schreck, F. Romano, T. E. Ouldridge, R. Tsukanov, E. Nir, A. A. Louis, J. P. K. Doye,  &#039;&#039;J. Chem. Phys.&#039;&#039; &#039;&#039;&#039;142&#039;&#039;&#039;, 234901 (2015)&lt;br /&gt;
[http://scitation.aip.org/content/aip/journal/jcp/142/23/10.1063/1.4921957 Introducing Improved Structural Properties and Salt Dependence into a Coarse-Grained Model of DNA] ([http://arxiv.org/abs/1504.00821 arXiv])&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=DNA_model_introduction&amp;diff=1049</id>
		<title>DNA model introduction</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=DNA_model_introduction&amp;diff=1049"/>
		<updated>2017-03-12T13:13:00Z</updated>

		<summary type="html">&lt;p&gt;Randisi: hopefully resolved some ambiguities regarding simulation units&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The model treats DNA as a string of rigid nucleotides, which interact through potentials which depend on the position and orientation of the nucleotides. The interactions are:&lt;br /&gt;
#Sugar-phosphate backbone connectivity,&lt;br /&gt;
#Excluded volume,&lt;br /&gt;
#Hydrogen bonding,&lt;br /&gt;
#Nearest-neighbour stacking,&lt;br /&gt;
#Cross-stacking between base-pair steps in a duplex,&lt;br /&gt;
#Coaxial stacking.&lt;br /&gt;
&lt;br /&gt;
This interactions are illustrated below. Orientational modulations of the stacking potential encourage the bases to form coplanar stacks, the twist arising from the different length scales of the backbone separation and the optimum stacking separation. The possibility of unstacking allows single strands to be very flexible. Hydrogen bonding  can occur between complementary bases when they are anti-aligned, leading to the formation of double helical structures.&lt;br /&gt;
&lt;br /&gt;
http://www-thphys.physics.ox.ac.uk/people/ThomasOuldridge/Site/The_model.png&lt;br /&gt;
&lt;br /&gt;
(a) Model interaction sites with their interaction ranges (the typical range of an interaction is twice the radius of the sphere shown).&lt;br /&gt;
&lt;br /&gt;
(b) Representation of these interaction site in a visualisation that makes the planarity of the base clear.&lt;br /&gt;
&lt;br /&gt;
(c) A duplex in this representation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://www-thphys.physics.ox.ac.uk/people/ThomasOuldridge/Site/interactions.png&lt;br /&gt;
&lt;br /&gt;
Indication of the interactions which hold together a typical duplex. V(b.b.) indicates the phosphate-sugar backbone connectivity.&lt;br /&gt;
&lt;br /&gt;
In the original model, all complementary base pairs and stacking partners interact with the same strength (there is no attractive interaction between non-complementary bases). A sequence-dependent parameterisation of the hydrogen-bonding and stacking interactions is included as an option in the code release.&lt;br /&gt;
The melting temperatures of a set of short DNA oligomers in the sequence-dependent coarse-grained model, compared to the melting temperatures as predicted by SantaLucia&#039;s nearest-neighbor model ([http://www.pnas.org/content/95/4/1460.full]), are available here: [http://www-thphys.physics.ox.ac.uk/people/PetrSulc/data/CG_model_Tm.txt]&lt;br /&gt;
&lt;br /&gt;
The original model incorporates electrostatics only through the short-ranged excluded volume. For this reason, it is only appropriate for the study of systems at high salt concentration, when electrostatic interactions are strongly screened. It also does not incorporate the differentiation between the major and minor grooves of DNA double helices. &lt;br /&gt;
&lt;br /&gt;
===oxDNA2===&lt;br /&gt;
&lt;br /&gt;
A new version of the oxDNA model, called oxDNA2, has been released in 2015 ([http://arxiv.org/abs/1504.00821],[http://scitation.aip.org/content/aip/journal/jcp/142/23/10.1063/1.4921957]). It introduces different widths for the major and minor DNA double helical grooves (an example double helix is shown below), a new electrostatic interaction which allows DNA to be studied at salt concentrations equivalent to 0.1M &amp;lt;nowiki&amp;gt;[NaCl]&amp;lt;/nowiki&amp;gt; and above, improved large-scale structure prediction, and differentiation between AA and TT stacking strengths.&lt;br /&gt;
&lt;br /&gt;
https://dna.physics.ox.ac.uk/images/3/37/Perfect_yesmm_nopov.png&lt;br /&gt;
&lt;br /&gt;
The oxDNA2 model is included in the latest release of the oxDNA code. It can be used in a very similar way to the original oxDNA model. Only a couple of lines in the input file must be added. Firstly, the following line must be included:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
interaction_type = DNA2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the salt concentration for the simulation must be specified. For example, to run a simulation with a salt concentration of 0.5M, one should write:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
salt_concentration = 0.5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Everything else should work in the same way as it does for the original oxDNA model.&lt;br /&gt;
&lt;br /&gt;
===Simulation units===&lt;br /&gt;
The code uses units for energy, mass, length and time that are convenient for a typical system. The relationship between simulation units (SU) and SI units is given below.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! Simulation unit &lt;br /&gt;
! Physical unit&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of length&lt;br /&gt;
| 8.518x10&amp;lt;math&amp;gt;^{-10}&amp;lt;/math&amp;gt; m = 0.8518 nm&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of energy&lt;br /&gt;
| thermal energy at 3000K - approximately 4.142x10&amp;lt;math&amp;gt;^{-20}&amp;lt;/math&amp;gt; J = 41.42 pN nm&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of temperature      &lt;br /&gt;
| 3000 K&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of force&lt;br /&gt;
| 4.863x10&amp;lt;math&amp;gt;^{-11}&amp;lt;/math&amp;gt; N = 48.63 pN&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of mass&lt;br /&gt;
| 5.24x10&amp;lt;math&amp;gt;^{-25}&amp;lt;/math&amp;gt; kg&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of time&lt;br /&gt;
| 3.03x10&amp;lt;math&amp;gt;^{-12}&amp;lt;/math&amp;gt; s = 3.03 ps&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of force constant (1 unit force/1 unit length)&lt;br /&gt;
| 57.09 pN/nm&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of torque (1 unit force * 1 unit length)&lt;br /&gt;
| 41.423 pN * nM&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Useful conversions===&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| Boltzmann&#039;s constant - in simulation units, we set Boltzmann&#039;s constant to 1 so that we can measure temperature and energy with the same unit. Therefore in simulation units energy/K Boltzmann&#039;s constant is 0.001/3.&lt;br /&gt;
| 0.000333397109 simulation units/K&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The model and its performance is discussed in detail in the following references (the thesis provides the most complete analysis):&lt;br /&gt;
&lt;br /&gt;
T. E. Ouldridge, D.Phil. Thesis, University of Oxford, 2011.&lt;br /&gt;
[http://ora.ox.ac.uk/objects/uuid:b2415bb2-7975-4f59-b5e2-8c022b4a3719 Coarse-grained modelling of DNA and DNA self-assembly]&lt;br /&gt;
&lt;br /&gt;
T. E. Ouldridge, A. A. Louis and J. P. K. Doye, J. Chem. Phys, 134, 085101 (2011)&lt;br /&gt;
[http://link.aip.org/link/?JCP/134/085101 Structural, mechanical and thermodynamic properties of a coarse-grained DNA model] ([http://arxiv.org/abs/arXiv:1009.4480 arXiv])&lt;br /&gt;
&lt;br /&gt;
P. Šulc, F. Romano, T. E. Ouldridge, L. Rovigatti, J. P. K. Doye, A. A. Louis, &#039;&#039;J. Chem. Phys.&#039;&#039; &#039;&#039;&#039;137&#039;&#039;&#039;, 135101 (2012)&lt;br /&gt;
[http://jcp.aip.org/resource/1/jcpsa6/v137/i13/p135101_s1 Sequence-dependent thermodynamics of a coarse-grained DNA model] ([http://arxiv.org/abs/1207.3391 arxiv])&lt;br /&gt;
&lt;br /&gt;
B. E. K. Snodin, F. Randisi, M. Mosayebi, P. Šulc, J. S. Schreck, F. Romano, T. E. Ouldridge, R. Tsukanov, E. Nir, A. A. Louis, J. P. K. Doye,  &#039;&#039;J. Chem. Phys.&#039;&#039; &#039;&#039;&#039;142&#039;&#039;&#039;, 234901 (2015)&lt;br /&gt;
[http://scitation.aip.org/content/aip/journal/jcp/142/23/10.1063/1.4921957 Introducing Improved Structural Properties and Salt Dependence into a Coarse-Grained Model of DNA] ([http://arxiv.org/abs/1504.00821 arXiv])&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=DNA_model_introduction&amp;diff=1047</id>
		<title>DNA model introduction</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=DNA_model_introduction&amp;diff=1047"/>
		<updated>2017-03-08T12:44:42Z</updated>

		<summary type="html">&lt;p&gt;Randisi: /* Simulation units */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The model treats DNA as a string of rigid nucleotides, which interact through potentials which depend on the position and orientation of the nucleotides. The interactions are:&lt;br /&gt;
#Sugar-phosphate backbone connectivity,&lt;br /&gt;
#Excluded volume,&lt;br /&gt;
#Hydrogen bonding,&lt;br /&gt;
#Nearest-neighbour stacking,&lt;br /&gt;
#Cross-stacking between base-pair steps in a duplex,&lt;br /&gt;
#Coaxial stacking.&lt;br /&gt;
&lt;br /&gt;
This interactions are illustrated below. Orientational modulations of the stacking potential encourage the bases to form coplanar stacks, the twist arising from the different length scales of the backbone separation and the optimum stacking separation. The possibility of unstacking allows single strands to be very flexible. Hydrogen bonding  can occur between complementary bases when they are anti-aligned, leading to the formation of double helical structures.&lt;br /&gt;
&lt;br /&gt;
http://www-thphys.physics.ox.ac.uk/people/ThomasOuldridge/Site/The_model.png&lt;br /&gt;
&lt;br /&gt;
(a) Model interaction sites with their interaction ranges (the typical range of an interaction is twice the radius of the sphere shown).&lt;br /&gt;
&lt;br /&gt;
(b) Representation of these interaction site in a visualisation that makes the planarity of the base clear.&lt;br /&gt;
&lt;br /&gt;
(c) A duplex in this representation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://www-thphys.physics.ox.ac.uk/people/ThomasOuldridge/Site/interactions.png&lt;br /&gt;
&lt;br /&gt;
Indication of the interactions which hold together a typical duplex. V(b.b.) indicates the phosphate-sugar backbone connectivity.&lt;br /&gt;
&lt;br /&gt;
In the original model, all complementary base pairs and stacking partners interact with the same strength (there is no attractive interaction between non-complementary bases). A sequence-dependent parameterisation of the hydrogen-bonding and stacking interactions is included as an option in the code release.&lt;br /&gt;
The melting temperatures of a set of short DNA oligomers in the sequence-dependent coarse-grained model, compared to the melting temperatures as predicted by SantaLucia&#039;s nearest-neighbor model ([http://www.pnas.org/content/95/4/1460.full]), are available here: [http://www-thphys.physics.ox.ac.uk/people/PetrSulc/data/CG_model_Tm.txt]&lt;br /&gt;
&lt;br /&gt;
The original model incorporates electrostatics only through the short-ranged excluded volume. For this reason, it is only appropriate for the study of systems at high salt concentration, when electrostatic interactions are strongly screened. It also does not incorporate the differentiation between the major and minor grooves of DNA double helices. &lt;br /&gt;
&lt;br /&gt;
===oxDNA2===&lt;br /&gt;
&lt;br /&gt;
A new version of the oxDNA model, called oxDNA2, has been released in 2015 ([http://arxiv.org/abs/1504.00821],[http://scitation.aip.org/content/aip/journal/jcp/142/23/10.1063/1.4921957]). It introduces different widths for the major and minor DNA double helical grooves (an example double helix is shown below), a new electrostatic interaction which allows DNA to be studied at salt concentrations equivalent to 0.1M &amp;lt;nowiki&amp;gt;[NaCl]&amp;lt;/nowiki&amp;gt; and above, improved large-scale structure prediction, and differentiation between AA and TT stacking strengths.&lt;br /&gt;
&lt;br /&gt;
https://dna.physics.ox.ac.uk/images/3/37/Perfect_yesmm_nopov.png&lt;br /&gt;
&lt;br /&gt;
The oxDNA2 model is included in the latest release of the oxDNA code. It can be used in a very similar way to the original oxDNA model. Only a couple of lines in the input file must be added. Firstly, the following line must be included:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
interaction_type = DNA2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the salt concentration for the simulation must be specified. For example, to run a simulation with a salt concentration of 0.5M, one should write:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
salt_concentration = 0.5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Everything else should work in the same way as it does for the original oxDNA model.&lt;br /&gt;
&lt;br /&gt;
===Simulation units===&lt;br /&gt;
The code uses units for energy, mass, length and time that are convenient for a typical system. The relationship between simulation units (SU) and SI units is given below.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! Simulation unit &lt;br /&gt;
! Physical unit&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of length&lt;br /&gt;
| 8.518x10&amp;lt;math&amp;gt;^{-10}&amp;lt;/math&amp;gt; m = 0.8518 nm&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of energy (equivalent to thermal energy at 3000K)&lt;br /&gt;
| 4.142x10&amp;lt;math&amp;gt;^{-20}&amp;lt;/math&amp;gt; J = 41.42 pN nm&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of temperature      &lt;br /&gt;
| 3000 K&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of force&lt;br /&gt;
| 4.863x10&amp;lt;math&amp;gt;^{-11}&amp;lt;/math&amp;gt; N = 48.63 pN&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of mass&lt;br /&gt;
| 5.24x10&amp;lt;math&amp;gt;^{-25}&amp;lt;/math&amp;gt; kg&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of time&lt;br /&gt;
| 3.03x10&amp;lt;math&amp;gt;^{-12}&amp;lt;/math&amp;gt; s = 3.03 ps&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of force constant (1 unit force/1 unit length)&lt;br /&gt;
| 57.09 pN/nm&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of torque (1 unit force * 1 unit length)&lt;br /&gt;
| 41.423 pN * nM&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Useful conversions===&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| Boltzmann&#039;s constant =&lt;br /&gt;
| 0.000333397109 simulation units/K&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The model and its performance is discussed in detail in the following references (the thesis provides the most complete analysis):&lt;br /&gt;
&lt;br /&gt;
T. E. Ouldridge, D.Phil. Thesis, University of Oxford, 2011.&lt;br /&gt;
[http://ora.ox.ac.uk/objects/uuid:b2415bb2-7975-4f59-b5e2-8c022b4a3719 Coarse-grained modelling of DNA and DNA self-assembly]&lt;br /&gt;
&lt;br /&gt;
T. E. Ouldridge, A. A. Louis and J. P. K. Doye, J. Chem. Phys, 134, 085101 (2011)&lt;br /&gt;
[http://link.aip.org/link/?JCP/134/085101 Structural, mechanical and thermodynamic properties of a coarse-grained DNA model] ([http://arxiv.org/abs/arXiv:1009.4480 arXiv])&lt;br /&gt;
&lt;br /&gt;
P. Šulc, F. Romano, T. E. Ouldridge, L. Rovigatti, J. P. K. Doye, A. A. Louis, &#039;&#039;J. Chem. Phys.&#039;&#039; &#039;&#039;&#039;137&#039;&#039;&#039;, 135101 (2012)&lt;br /&gt;
[http://jcp.aip.org/resource/1/jcpsa6/v137/i13/p135101_s1 Sequence-dependent thermodynamics of a coarse-grained DNA model] ([http://arxiv.org/abs/1207.3391 arxiv])&lt;br /&gt;
&lt;br /&gt;
B. E. K. Snodin, F. Randisi, M. Mosayebi, P. Šulc, J. S. Schreck, F. Romano, T. E. Ouldridge, R. Tsukanov, E. Nir, A. A. Louis, J. P. K. Doye,  &#039;&#039;J. Chem. Phys.&#039;&#039; &#039;&#039;&#039;142&#039;&#039;&#039;, 234901 (2015)&lt;br /&gt;
[http://scitation.aip.org/content/aip/journal/jcp/142/23/10.1063/1.4921957 Introducing Improved Structural Properties and Salt Dependence into a Coarse-Grained Model of DNA] ([http://arxiv.org/abs/1504.00821 arXiv])&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=DNA_model_introduction&amp;diff=1025</id>
		<title>DNA model introduction</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=DNA_model_introduction&amp;diff=1025"/>
		<updated>2016-12-08T15:57:35Z</updated>

		<summary type="html">&lt;p&gt;Randisi: Turns out the proportionality constant in Hooke&amp;#039;s law is actually called &amp;#039;force constant&amp;#039; in English.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The model treats DNA as a string of rigid nucleotides, which interact through potentials which depend on the position and orientation of the nucleotides. The interactions are:&lt;br /&gt;
#Sugar-phosphate backbone connectivity,&lt;br /&gt;
#Excluded volume,&lt;br /&gt;
#Hydrogen bonding,&lt;br /&gt;
#Nearest-neighbour stacking,&lt;br /&gt;
#Cross-stacking between base-pair steps in a duplex,&lt;br /&gt;
#Coaxial stacking.&lt;br /&gt;
&lt;br /&gt;
This interactions are illustrated below. Orientational modulations of the stacking potential encourage the bases to form coplanar stacks, the twist arising from the different length scales of the backbone separation and the optimum stacking separation. The possibility of unstacking allows single strands to be very flexible. Hydrogen bonding  can occur between complementary bases when they are anti-aligned, leading to the formation of double helical structures.&lt;br /&gt;
&lt;br /&gt;
http://www-thphys.physics.ox.ac.uk/people/ThomasOuldridge/Site/The_model.png&lt;br /&gt;
&lt;br /&gt;
(a) Model interaction sites with their interaction ranges (the typical range of an interaction is twice the radius of the sphere shown).&lt;br /&gt;
&lt;br /&gt;
(b) Representation of these interaction site in a visualisation that makes the planarity of the base clear.&lt;br /&gt;
&lt;br /&gt;
(c) A duplex in this representation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://www-thphys.physics.ox.ac.uk/people/ThomasOuldridge/Site/interactions.png&lt;br /&gt;
&lt;br /&gt;
Indication of the interactions which hold together a typical duplex. V(b.b.) indicates the phosphate-sugar backbone connectivity.&lt;br /&gt;
&lt;br /&gt;
In the original model, all complementary base pairs and stacking partners interact with the same strength (there is no attractive interaction between non-complementary bases). A sequence-dependent parameterisation of the hydrogen-bonding and stacking interactions is included as an option in the code release.&lt;br /&gt;
The melting temperatures of a set of short DNA oligomers in the sequence-dependent coarse-grained model, compared to the melting temperatures as predicted by SantaLucia&#039;s nearest-neighbor model ([http://www.pnas.org/content/95/4/1460.full]), are available here: [http://www-thphys.physics.ox.ac.uk/people/PetrSulc/data/CG_model_Tm.txt]&lt;br /&gt;
&lt;br /&gt;
The original model incorporates electrostatics only through the short-ranged excluded volume. For this reason, it is only appropriate for the study of systems at high salt concentration, when electrostatic interactions are strongly screened. It also does not incorporate the differentiation between the major and minor grooves of DNA double helices. &lt;br /&gt;
&lt;br /&gt;
===oxDNA2===&lt;br /&gt;
&lt;br /&gt;
A new version of the oxDNA model, called oxDNA2, has been released in 2015 ([http://arxiv.org/abs/1504.00821],[http://scitation.aip.org/content/aip/journal/jcp/142/23/10.1063/1.4921957]). It introduces different widths for the major and minor DNA double helical grooves (an example double helix is shown below), a new electrostatic interaction which allows DNA to be studied at salt concentrations equivalent to 0.1M &amp;lt;nowiki&amp;gt;[NaCl]&amp;lt;/nowiki&amp;gt; and above, improved large-scale structure prediction, and differentiation between AA and TT stacking strengths.&lt;br /&gt;
&lt;br /&gt;
https://dna.physics.ox.ac.uk/images/3/37/Perfect_yesmm_nopov.png&lt;br /&gt;
&lt;br /&gt;
The oxDNA2 model is included in the latest release of the oxDNA code. It can be used in a very similar way to the original oxDNA model. Only a couple of lines in the input file must be added. Firstly, the following line must be included:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
interaction_type = DNA2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the salt concentration for the simulation must be specified. For example, to run a simulation with a salt concentration of 0.5M, one should write:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
salt_concentration = 0.5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Everything else should work in the same way as it does for the original oxDNA model.&lt;br /&gt;
&lt;br /&gt;
===Simulation units===&lt;br /&gt;
The code uses units for energy, mass, length and time that are convenient for a typical system. The relationship between simulation units (SU) and SI units is given below.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! Simulation unit &lt;br /&gt;
! Physical unit&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of length&lt;br /&gt;
| 8.518x10&amp;lt;math&amp;gt;^{-10}&amp;lt;/math&amp;gt; m = 0.8518 nm&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of energy&lt;br /&gt;
| 4.142x10&amp;lt;math&amp;gt;^{-20}&amp;lt;/math&amp;gt; J&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of temperature      &lt;br /&gt;
| 3000 K&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of force&lt;br /&gt;
| 4.863x10&amp;lt;math&amp;gt;^{-11}&amp;lt;/math&amp;gt; N = 48.63 pN&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of mass&lt;br /&gt;
| 5.24x10&amp;lt;math&amp;gt;^{-25}&amp;lt;/math&amp;gt; kg&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of time&lt;br /&gt;
| 3.03x10&amp;lt;math&amp;gt;^{-12}&amp;lt;/math&amp;gt; s = 3.03 ps&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of force constant (1 unit force/1 unit length)&lt;br /&gt;
| 57.09 pN/nm&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of torque (1 unit force * 1 unit length)&lt;br /&gt;
| 41.423 pN * nM&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The model and its performance is discussed in detail in the following references (the thesis provides the most complete analysis):&lt;br /&gt;
&lt;br /&gt;
T. E. Ouldridge, D.Phil. Thesis, University of Oxford, 2011.&lt;br /&gt;
[http://ora.ox.ac.uk/objects/uuid:b2415bb2-7975-4f59-b5e2-8c022b4a3719 Coarse-grained modelling of DNA and DNA self-assembly]&lt;br /&gt;
&lt;br /&gt;
T. E. Ouldridge, A. A. Louis and J. P. K. Doye, J. Chem. Phys, 134, 085101 (2011)&lt;br /&gt;
[http://link.aip.org/link/?JCP/134/085101 Structural, mechanical and thermodynamic properties of a coarse-grained DNA model] ([http://arxiv.org/abs/arXiv:1009.4480 arXiv])&lt;br /&gt;
&lt;br /&gt;
P. Šulc, F. Romano, T. E. Ouldridge, L. Rovigatti, J. P. K. Doye, A. A. Louis, &#039;&#039;J. Chem. Phys.&#039;&#039; &#039;&#039;&#039;137&#039;&#039;&#039;, 135101 (2012)&lt;br /&gt;
[http://jcp.aip.org/resource/1/jcpsa6/v137/i13/p135101_s1 Sequence-dependent thermodynamics of a coarse-grained DNA model] ([http://arxiv.org/abs/1207.3391 arxiv])&lt;br /&gt;
&lt;br /&gt;
B. E. K. Snodin, F. Randisi, M. Mosayebi, P. Šulc, J. S. Schreck, F. Romano, T. E. Ouldridge, R. Tsukanov, E. Nir, A. A. Louis, J. P. K. Doye,  &#039;&#039;J. Chem. Phys.&#039;&#039; &#039;&#039;&#039;142&#039;&#039;&#039;, 234901 (2015)&lt;br /&gt;
[http://scitation.aip.org/content/aip/journal/jcp/142/23/10.1063/1.4921957 Introducing Improved Structural Properties and Salt Dependence into a Coarse-Grained Model of DNA] ([http://arxiv.org/abs/1504.00821 arXiv])&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=DNA_model_introduction&amp;diff=1024</id>
		<title>DNA model introduction</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=DNA_model_introduction&amp;diff=1024"/>
		<updated>2016-12-08T15:26:46Z</updated>

		<summary type="html">&lt;p&gt;Randisi: Adding simulation units for elastic constant and torque, plus couple minor edits.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The model treats DNA as a string of rigid nucleotides, which interact through potentials which depend on the position and orientation of the nucleotides. The interactions are:&lt;br /&gt;
#Sugar-phosphate backbone connectivity,&lt;br /&gt;
#Excluded volume,&lt;br /&gt;
#Hydrogen bonding,&lt;br /&gt;
#Nearest-neighbour stacking,&lt;br /&gt;
#Cross-stacking between base-pair steps in a duplex,&lt;br /&gt;
#Coaxial stacking.&lt;br /&gt;
&lt;br /&gt;
This interactions are illustrated below. Orientational modulations of the stacking potential encourage the bases to form coplanar stacks, the twist arising from the different length scales of the backbone separation and the optimum stacking separation. The possibility of unstacking allows single strands to be very flexible. Hydrogen bonding  can occur between complementary bases when they are anti-aligned, leading to the formation of double helical structures.&lt;br /&gt;
&lt;br /&gt;
http://www-thphys.physics.ox.ac.uk/people/ThomasOuldridge/Site/The_model.png&lt;br /&gt;
&lt;br /&gt;
(a) Model interaction sites with their interaction ranges (the typical range of an interaction is twice the radius of the sphere shown).&lt;br /&gt;
&lt;br /&gt;
(b) Representation of these interaction site in a visualisation that makes the planarity of the base clear.&lt;br /&gt;
&lt;br /&gt;
(c) A duplex in this representation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://www-thphys.physics.ox.ac.uk/people/ThomasOuldridge/Site/interactions.png&lt;br /&gt;
&lt;br /&gt;
Indication of the interactions which hold together a typical duplex. V(b.b.) indicates the phosphate-sugar backbone connectivity.&lt;br /&gt;
&lt;br /&gt;
In the original model, all complementary base pairs and stacking partners interact with the same strength (there is no attractive interaction between non-complementary bases). A sequence-dependent parameterisation of the hydrogen-bonding and stacking interactions is included as an option in the code release.&lt;br /&gt;
The melting temperatures of a set of short DNA oligomers in the sequence-dependent coarse-grained model, compared to the melting temperatures as predicted by SantaLucia&#039;s nearest-neighbor model ([http://www.pnas.org/content/95/4/1460.full]), are available here: [http://www-thphys.physics.ox.ac.uk/people/PetrSulc/data/CG_model_Tm.txt]&lt;br /&gt;
&lt;br /&gt;
The original model incorporates electrostatics only through the short-ranged excluded volume. For this reason, it is only appropriate for the study of systems at high salt concentration, when electrostatic interactions are strongly screened. It also does not incorporate the differentiation between the major and minor grooves of DNA double helices. &lt;br /&gt;
&lt;br /&gt;
===oxDNA2===&lt;br /&gt;
&lt;br /&gt;
A new version of the oxDNA model, called oxDNA2, has been released in 2015 ([http://arxiv.org/abs/1504.00821],[http://scitation.aip.org/content/aip/journal/jcp/142/23/10.1063/1.4921957]). It introduces different widths for the major and minor DNA double helical grooves (an example double helix is shown below), a new electrostatic interaction which allows DNA to be studied at salt concentrations equivalent to 0.1M &amp;lt;nowiki&amp;gt;[NaCl]&amp;lt;/nowiki&amp;gt; and above, improved large-scale structure prediction, and differentiation between AA and TT stacking strengths.&lt;br /&gt;
&lt;br /&gt;
https://dna.physics.ox.ac.uk/images/3/37/Perfect_yesmm_nopov.png&lt;br /&gt;
&lt;br /&gt;
The oxDNA2 model is included in the latest release of the oxDNA code. It can be used in a very similar way to the original oxDNA model. Only a couple of lines in the input file must be added. Firstly, the following line must be included:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
interaction_type = DNA2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the salt concentration for the simulation must be specified. For example, to run a simulation with a salt concentration of 0.5M, one should write:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
salt_concentration = 0.5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Everything else should work in the same way as it does for the original oxDNA model.&lt;br /&gt;
&lt;br /&gt;
===Simulation units===&lt;br /&gt;
The code uses units for energy, mass, length and time that are convenient for a typical system. The relationship between simulation units (SU) and SI units is given below.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! Simulation unit &lt;br /&gt;
! Physical unit&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of length&lt;br /&gt;
| 8.518x10&amp;lt;math&amp;gt;^{-10}&amp;lt;/math&amp;gt; m = 0.8518 nm&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of energy&lt;br /&gt;
| 4.142x10&amp;lt;math&amp;gt;^{-20}&amp;lt;/math&amp;gt; J&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of temperature      &lt;br /&gt;
| 3000 K&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of force&lt;br /&gt;
| 4.863x10&amp;lt;math&amp;gt;^{-11}&amp;lt;/math&amp;gt; N = 48.63 pN&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of mass&lt;br /&gt;
| 5.24x10&amp;lt;math&amp;gt;^{-25}&amp;lt;/math&amp;gt; kg&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of time&lt;br /&gt;
| 3.03x10&amp;lt;math&amp;gt;^{-12}&amp;lt;/math&amp;gt; s = 3.03 ps&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of elastic constant (1 unit force/1 unit length)&lt;br /&gt;
| 57.09 pN/nm&lt;br /&gt;
|-&lt;br /&gt;
| 1 unit of torque (1 unit force * 1 unit length)&lt;br /&gt;
| 41.423 pN * nM&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The model and its performance is discussed in detail in the following references (the thesis provides the most complete analysis):&lt;br /&gt;
&lt;br /&gt;
T. E. Ouldridge, D.Phil. Thesis, University of Oxford, 2011.&lt;br /&gt;
[http://ora.ox.ac.uk/objects/uuid:b2415bb2-7975-4f59-b5e2-8c022b4a3719 Coarse-grained modelling of DNA and DNA self-assembly]&lt;br /&gt;
&lt;br /&gt;
T. E. Ouldridge, A. A. Louis and J. P. K. Doye, J. Chem. Phys, 134, 085101 (2011)&lt;br /&gt;
[http://link.aip.org/link/?JCP/134/085101 Structural, mechanical and thermodynamic properties of a coarse-grained DNA model] ([http://arxiv.org/abs/arXiv:1009.4480 arXiv])&lt;br /&gt;
&lt;br /&gt;
P. Šulc, F. Romano, T. E. Ouldridge, L. Rovigatti, J. P. K. Doye, A. A. Louis, &#039;&#039;J. Chem. Phys.&#039;&#039; &#039;&#039;&#039;137&#039;&#039;&#039;, 135101 (2012)&lt;br /&gt;
[http://jcp.aip.org/resource/1/jcpsa6/v137/i13/p135101_s1 Sequence-dependent thermodynamics of a coarse-grained DNA model] ([http://arxiv.org/abs/1207.3391 arxiv])&lt;br /&gt;
&lt;br /&gt;
B. E. K. Snodin, F. Randisi, M. Mosayebi, P. Šulc, J. S. Schreck, F. Romano, T. E. Ouldridge, R. Tsukanov, E. Nir, A. A. Louis, J. P. K. Doye,  &#039;&#039;J. Chem. Phys.&#039;&#039; &#039;&#039;&#039;142&#039;&#039;&#039;, 234901 (2015)&lt;br /&gt;
[http://scitation.aip.org/content/aip/journal/jcp/142/23/10.1063/1.4921957 Introducing Improved Structural Properties and Salt Dependence into a Coarse-Grained Model of DNA] ([http://arxiv.org/abs/1504.00821 arXiv])&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=Making_a_simulation_movie_with_a_running_plot&amp;diff=1021</id>
		<title>Making a simulation movie with a running plot</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=Making_a_simulation_movie_with_a_running_plot&amp;diff=1021"/>
		<updated>2016-11-08T14:03:38Z</updated>

		<summary type="html">&lt;p&gt;Randisi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Examples]]&lt;br /&gt;
&lt;br /&gt;
oxDNA simulations can be very informative to look at if presented in the form of a movie. Here we&#039;ll see how to make one with &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt;, a lightweight visualisation tool that can draw oxDNA configurations natively. It&#039;s so lightweight that can quickly render configurations with thousands of nucleotides, unlike other visualisation tools we&#039;ve tried in the past. &lt;br /&gt;
&lt;br /&gt;
== Making a movie ==&lt;br /&gt;
&lt;br /&gt;
The only pre-requisite for this tutorial is cogli1, a very simple visualization program that can be downloaded [https://sourceforge.net/projects/cogli1/ here]. Note that some of the options used in the tutorial require the bleeding-edge version, which can be checked out with the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn checkout svn://svn.code.sf.net/p/cogli1/code/ cogli1-code&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make a movie, we are going to load a trajectory in &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt;, choose a view, and then export each frame in the simulation as a trajectory file. Then we&#039;ll render them in &amp;lt;tt&amp;gt;povray&amp;lt;/tt&amp;gt; and convert them in a movie with &amp;lt;tt&amp;gt;mencoder&amp;lt;/tt&amp;gt;. Make sure these programs are installed before running this tutorial.&lt;br /&gt;
&lt;br /&gt;
# Open the trajectory with &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt;:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::cogli1 --always-centre -I -v -m -t prova.top trajectory.dat&amp;lt;/pre&amp;gt;The only necessary option is &amp;lt;tt&amp;gt;-t&amp;lt;/tt&amp;gt; (though you will want to use &amp;lt;tt&amp;gt;-m&amp;lt;/tt&amp;gt; if you&#039;re using the DNA2 interaction), which specifies the topology file. The others are nice for this particular system and for many others, but you might or might not want to use them for the system you&#039;re working on. Their use is as follows:&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;-I&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*: rotate the system to attempt fix its orientation in space. Simulated objects often float freely in solution and can rotate very sharply from a snapshot to the other, so that a movie would be confusing. This tries to copmensate for that. This does fail from time to time, so you might want to double check that everything works fine before rendering the final, hi-quality version of your images.&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;-v&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*: Start the simulation with a centered configuration.&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;--always-centre&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*: Move the system around to keep its center of mass to the centre of the simulation box throughout all the frames&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;-m&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*:Show oxDNA2 nucleotides, which present major-minor groove asimmetry (just like real DNA), unlike oxDNA1.&lt;br /&gt;
#:Several other options can be used. You can see the documentation for &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt; by launching it without any other arguments.&lt;br /&gt;
# Find a view that you like by moving the configuration around, zooming in, zooming out, etc. See the &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt; documentation for details on how to do this. Verify that the view is good for every frame in your trajectory by skimming through it, holding the + button. When you are satisfied that you&#039;ve found a good view, just press &lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::u&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: to save the simulation snapshot to a &amp;lt;tt&amp;gt;.cpy&amp;lt;/tt&amp;gt; file. An example of a good view for this system is saved in &amp;lt;tt&amp;gt; sample_view.cpy &amp;lt;/tt&amp;gt;.&lt;br /&gt;
# Now let&#039;s export each trajectory frames to &amp;lt;tt&amp;gt;.pov&amp;lt;/tt&amp;gt;.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::cogli1 -o -l view.cpy -t prova.top trajectory.dat&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: where &amp;lt;tt&amp;gt; view.cpy&amp;lt;/tt&amp;gt; is the name of your view. Note the -o option, which tells cogli1 to generate pov files without showing any GUI window. This will produce as many &amp;lt;tt&amp;gt;.pov&amp;lt;/tt&amp;gt; files as there are simulation snapshots, and each of them will generate a movie frame. You can edit any &amp;lt;tt&amp;gt;.pov&amp;lt;/tt&amp;gt; file if you so wish, replace it with one taken from another view, or with something copletely different if you feel like playing Tyler Durden :)&lt;br /&gt;
# Rendering the images in povray can take a long, time, so first we&#039;re going to do that with a low resolution to quickly create a preview. Use the command:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#:: for d in $(ls -v1 *.pov); do povray -D +H600 +W860 $d; done&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: in order to generate the png images at a low resolution, with 600 pixels of height and 860 of width (i.e. with a format of 16:10). Further decrease the resolution if you want it to run even faster, or change the aspect ration as you please.&lt;br /&gt;
# Encode the povray images in a &amp;lt;tt&amp;gt;.avi&amp;lt;/tt&amp;gt; movie with the commands&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
#::mencoder mf://@storyboard.txt -mf w=860:h=600:fps=6:type=png -ovc xvid -xvidencopts bitrate=200 -o preview.avi&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:Notice that the width and height of the movie should be the same as the one used in the povray command above.&lt;br /&gt;
#:;w and h&lt;br /&gt;
#::respectively the width and hegiht of the movie (in pixels, here 3200 and 2400). This should be the same as the output_*.png files if you don&#039;t want the screen to view to be distorted.&lt;br /&gt;
#:;fps&lt;br /&gt;
#::the number of frames per second (here 6).&lt;br /&gt;
#:;png&lt;br /&gt;
#::the type of image (here png)&lt;br /&gt;
#:;ovc&lt;br /&gt;
#::the codec used (here  &amp;lt;tt&amp;gt;xvid&amp;lt;/tt&amp;gt;)&lt;br /&gt;
#:;xvidencopts bitrate&lt;br /&gt;
#:: the bitrate, which is an option of the xvid codec (here set to 200)&lt;br /&gt;
#:;o&lt;br /&gt;
#::the name of the movie file (here &amp;lt;tt&amp;gt;output.avi&amp;lt;/tt&amp;gt;).&lt;br /&gt;
# Visualise the movie with the editor of choice and verify that everything is fine. Go back to the previous points if you see that something isn&#039;t quite right.&lt;br /&gt;
# If you&#039;re happy with the view of the movie, you might want to actually use a better resolution. Notice that povray might take a few hours or days to render the scenes depending on your GPU. Notice that if you are going to make a video with a running plot in the top/bottom part of the screen and the simulation movie in the other (i.e. using the &amp;lt;tt&amp;gt;append&amp;lt;/tt&amp;gt; below) you&#039;ll need to accomodate the resolution for that, so that if e.g. you want to keep the aspect ratio of the video at 16:10 and your plot takes e.g. 20% of the screen you&#039;ll want to use a resolution of 1920x1000, so that the plot can be created with a resolution of 1920x200 and the composite frames have a resolution of 1920x1200. The encoded video is higher quality for the same amount of disk space if you allow &amp;lt;tt&amp;gt;mencoder&amp;lt;/tt&amp;gt; to compress it in time as well as in space. This is done by using the two-pass mode as described below:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::for d in $(ls -v1 *.pov); do povray -D +A +H1200 +W1920 $d; done&lt;br /&gt;
#::ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
#::mencoder mf://@storyboard.txt -mf w=1920:h=1200:fps=6:type=png -ovc xvid -xvidencopts pass=1 -o /dev/null&lt;br /&gt;
#::mencoder mf://@storyboard.txt -mf w=1920:h=1200:fps=6:type=png -ovc xvid -xvidencopts pass=2:bitrate=3000 -o output.avi&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Your video is ready! Enjoy :-D See below how to add a running plot superimposed to the video or above it.&lt;br /&gt;
&lt;br /&gt;
== Adding a running plot ==&lt;br /&gt;
Sometimes a system undergoes a structural change that can be seen in the variation of some physical quantity. It&#039;s then nice to show the plot updating as the system&#039;s configuration evolves. To do that: , but &lt;br /&gt;
# create the &amp;lt;tt&amp;gt;.png&amp;lt;/tt&amp;gt; frames as we do in the section above (again, you probably want to do this in 2 steps if your system is demanding to render on your machine).&lt;br /&gt;
# Create the plots of the quantity you want to show. Here we&#039;ll use gnuplot. This can be done with e.g. the following &amp;lt;tt&amp;gt;gnuplot&amp;lt;/tt&amp;gt; commands, which should work in &amp;lt;tt&amp;gt;gnuplot&amp;lt;/tt&amp;gt; &amp;gt;=4.6. If you&#039;re stuck with an old version of gnuplot that doesn&#039;t support for loops, you can use another program to generate a text file that writes the instructions to be performed at every iteration of the loop, and then run the resulting script in gnuplot. In this example we&#039;ll create plots for the energy of the system, which is not a terribly informative quantity for this system and so I might change this example to something else in the future.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::set terminal png linewidth 4 font &#039;arial,28pt&#039; size 3200,600&lt;br /&gt;
#::set xrange [25e3:25e3*40]&lt;br /&gt;
#::set yrange [-1.42; -1.24]&lt;br /&gt;
#::set xlabel &#039;time [SU]&#039;&lt;br /&gt;
#::set ylabel &#039;Energy/# particles [SU]&#039;&lt;br /&gt;
#::set grid&lt;br /&gt;
#::unset key&lt;br /&gt;
#::do for [i = 0:39]{ set out &#039;plot_&#039;.i.&#039;.png&#039;;  plot &#039;energy.dat&#039; every 1000::1000::1000*(i+1) w lp }&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
notice that several things should be changed here according to your needs, including: &lt;br /&gt;
#*the terminal type (to change the font, resolution, linewidth, etc). The resolution should be compatible with the one of the simulation snapshots (see last point above).&lt;br /&gt;
#*the xrange, to make sure that it fits all the points, just barely).&lt;br /&gt;
#*the yrange, to make sure that everything fits as needed).&lt;br /&gt;
#*the plot command, to change the appearence of the plot, the line-type, how many frames do we have, whether to print the observable only when we have a frame or for all the frames up until a point, (type &amp;lt;tt&amp;gt; help every&amp;lt;/tt&amp;gt; in gnuplot to learn more about that) etc.&lt;br /&gt;
#*possibly adding some modifiers before plotting, including title, etc.&lt;br /&gt;
#*any other edit you might wish to make&lt;br /&gt;
#After both points above are finished, you can compose the images by either pasting the plots on the simulation snapshots, or appending the images together. This can easily be done with `convert` on linux and cygwin, with either of the following 2 lines: &lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::TO SUPERIMPOSE THE PLOT TO THE SIMULATION SNAPSHOT``&lt;br /&gt;
#::for i in {0..39}; do convert trajectory.dat_${i}_time_*.png plot_${i}.png -composite output_${i}.png; done&lt;br /&gt;
#::OR TO APPEND IT ABOVE IT&lt;br /&gt;
#::for i in {0..39}; do convert trajectory.dat_${i}_time_*.png plot_${i}.png -append output_${i}.png; done&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:swap the order of the plots and the simulations snapshots above to have the plot display below the simulation system instead.&lt;br /&gt;
# Convert the png files into a movie, with &amp;lt;tt&amp;gt;mencoder&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;ffmpeg&amp;lt;/tt&amp;gt;, as usual, with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
mencoder mf://@storyboard.txt -mf w=3200:h=2400:fps=6:type=png -ovc xvid -xvidencopts bitrate=200 -o output.avi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An example of this thing is the movie that I&#039;m attaching here [[sample movie]]&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=Making_a_simulation_movie_with_a_running_plot&amp;diff=1020</id>
		<title>Making a simulation movie with a running plot</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=Making_a_simulation_movie_with_a_running_plot&amp;diff=1020"/>
		<updated>2016-11-08T14:02:54Z</updated>

		<summary type="html">&lt;p&gt;Randisi: Adding 2-pass mencoder mode &amp;amp; increasing bitrate of final version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Examples]]&lt;br /&gt;
&lt;br /&gt;
oxDNA simulations can be very informative to look at if presented in the form of a movie. Here we&#039;ll see how to make one with &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt;, a lightweight visualisation tool that can draw oxDNA configurations natively. It&#039;s so lightweight that can quickly render configurations with thousands of nucleotides, unlike other visualisation tools we&#039;ve tried in the past. &lt;br /&gt;
&lt;br /&gt;
== Making a movie ==&lt;br /&gt;
&lt;br /&gt;
The only pre-requisite for this tutorial is cogli1, a very simple visualization program that can be downloaded [https://sourceforge.net/projects/cogli1/ here]. Note that some of the options used in the tutorial require the bleeding-edge version, which can be checked out with the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn checkout svn://svn.code.sf.net/p/cogli1/code/ cogli1-code&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make a movie, we are going to load a trajectory in &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt;, choose a view, and then export each frame in the simulation as a trajectory file. Then we&#039;ll render them in &amp;lt;tt&amp;gt;povray&amp;lt;/tt&amp;gt; and convert them in a movie with &amp;lt;tt&amp;gt;mencoder&amp;lt;/tt&amp;gt;. Make sure these programs are installed before running this tutorial.&lt;br /&gt;
&lt;br /&gt;
# Open the trajectory with &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt;:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::cogli1 --always-centre -I -v -m -t prova.top trajectory.dat&amp;lt;/pre&amp;gt;The only necessary option is &amp;lt;tt&amp;gt;-t&amp;lt;/tt&amp;gt; (though you will want to use &amp;lt;tt&amp;gt;-m&amp;lt;/tt&amp;gt; if you&#039;re using the DNA2 interaction), which specifies the topology file. The others are nice for this particular system and for many others, but you might or might not want to use them for the system you&#039;re working on. Their use is as follows:&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;-I&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*: rotate the system to attempt fix its orientation in space. Simulated objects often float freely in solution and can rotate very sharply from a snapshot to the other, so that a movie would be confusing. This tries to copmensate for that. This does fail from time to time, so you might want to double check that everything works fine before rendering the final, hi-quality version of your images.&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;-v&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*: Start the simulation with a centered configuration.&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;--always-centre&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*: Move the system around to keep its center of mass to the centre of the simulation box throughout all the frames&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;-m&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*:Show oxDNA2 nucleotides, which present major-minor groove asimmetry (just like real DNA), unlike oxDNA1.&lt;br /&gt;
#:Several other options can be used. You can see the documentation for &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt; by launching it without any other arguments.&lt;br /&gt;
# Find a view that you like by moving the configuration around, zooming in, zooming out, etc. See the &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt; documentation for details on how to do this. Verify that the view is good for every frame in your trajectory by skimming through it, holding the + button. When you are satisfied that you&#039;ve found a good view, just press &lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::u&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: to save the simulation snapshot to a &amp;lt;tt&amp;gt;.cpy&amp;lt;/tt&amp;gt; file. An example of a good view for this system is saved in &amp;lt;tt&amp;gt; sample_view.cpy &amp;lt;/tt&amp;gt;.&lt;br /&gt;
# Now let&#039;s export each trajectory frames to &amp;lt;tt&amp;gt;.pov&amp;lt;/tt&amp;gt;.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::cogli1 -o -l view.cpy -t prova.top trajectory.dat&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: where &amp;lt;tt&amp;gt; view.cpy&amp;lt;/tt&amp;gt; is the name of your view. Note the -o option, which tells cogli1 to generate pov files without showing any GUI window. This will produce as many &amp;lt;tt&amp;gt;.pov&amp;lt;/tt&amp;gt; files as there are simulation snapshots, and each of them will generate a movie frame. You can edit any &amp;lt;tt&amp;gt;.pov&amp;lt;/tt&amp;gt; file if you so wish, replace it with one taken from another view, or with something copletely different if you feel like playing Tyler Durden :)&lt;br /&gt;
# Rendering the images in povray can take a long, time, so first we&#039;re going to do that with a low resolution to quickly create a preview. Use the command:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#:: for d in $(ls -v1 *.pov); do povray -D +H600 +W860 $d; done&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: in order to generate the png images at a low resolution, with 600 pixels of height and 860 of width (i.e. with a format of 16:10). Further decrease the resolution if you want it to run even faster, or change the aspect ration as you please.&lt;br /&gt;
# Encode the povray images in a &amp;lt;tt&amp;gt;.avi&amp;lt;/tt&amp;gt; movie with the commands&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
#::mencoder mf://@storyboard.txt -mf w=860:h=600:fps=6:type=png -ovc xvid -xvidencopts bitrate=200 -o preview.avi&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:Notice that the width and height of the movie should be the same as the one used in the povray command above.&lt;br /&gt;
#:;w and h&lt;br /&gt;
#::respectively the width and hegiht of the movie (in pixels, here 3200 and 2400). This should be the same as the output_*.png files if you don&#039;t want the screen to view to be distorted.&lt;br /&gt;
#:;fps&lt;br /&gt;
#::the number of frames per second (here 6).&lt;br /&gt;
#:;png&lt;br /&gt;
#::the type of image (here png)&lt;br /&gt;
#:;ovc&lt;br /&gt;
#::the codec used (here  &amp;lt;tt&amp;gt;xvid&amp;lt;/tt&amp;gt;)&lt;br /&gt;
#:;xvidencopts bitrate&lt;br /&gt;
#:: the bitrate, which is an option of the xvid codec (here set to 200)&lt;br /&gt;
#:;o&lt;br /&gt;
#::the name of the movie file (here &amp;lt;tt&amp;gt;output.avi&amp;lt;/tt&amp;gt;).&lt;br /&gt;
# Visualise the movie with the editor of choice and verify that everything is fine. Go back to the previous points if you see that something isn&#039;t quite right.&lt;br /&gt;
# If you&#039;re happy with the view of the movie, you might want to actually use a better resolution. Notice that povray might take a few hours or days to render the scenes depending on your GPU. Notice that if you are going to make a video with a running plot in the top/bottom part of the screen and the simulation movie in the other (i.e. using the &amp;lt;tt&amp;gt;append&amp;lt;/tt&amp;gt; below) you&#039;ll need to accomodate the resolution for that, so that if e.g. you want to keep the aspect ratio of the video at 16:10 and your plot takes e.g. 20% of the screen you&#039;ll want to use a resolution of 1920x1000, so that the plot can be created with a resolution of 1920x200 and the composite frames have a resolution of 1920x1200. The encoded video is higher quality for the same amount of disk space if you allow &amp;lt;tt&amp;gt;mencoder&amp;lt;/tt&amp;gt; to compress it in time as well as in space. This is done by using the two-pass mode as described below:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::for d in $(ls -v1 *.pov); do povray -D +A +H1200 +W1920 $d; done&lt;br /&gt;
#::ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
#::mencoder mf://@storyboard.txt -mf w=1920:h=1200:fps=6:type=png -ovc xvid -xvidencopts pass=1 -o /dev/null &amp;lt;/pre&amp;gt;&lt;br /&gt;
#::mencoder mf://@storyboard.txt -mf w=1920:h=1200:fps=6:type=png -ovc xvid -xvidencopts pass=2:bitrate=3000 -o output.avi&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Your video is ready! Enjoy :-D See below how to add a running plot superimposed to the video or above it.&lt;br /&gt;
&lt;br /&gt;
== Adding a running plot ==&lt;br /&gt;
Sometimes a system undergoes a structural change that can be seen in the variation of some physical quantity. It&#039;s then nice to show the plot updating as the system&#039;s configuration evolves. To do that: , but &lt;br /&gt;
# create the &amp;lt;tt&amp;gt;.png&amp;lt;/tt&amp;gt; frames as we do in the section above (again, you probably want to do this in 2 steps if your system is demanding to render on your machine).&lt;br /&gt;
# Create the plots of the quantity you want to show. Here we&#039;ll use gnuplot. This can be done with e.g. the following &amp;lt;tt&amp;gt;gnuplot&amp;lt;/tt&amp;gt; commands, which should work in &amp;lt;tt&amp;gt;gnuplot&amp;lt;/tt&amp;gt; &amp;gt;=4.6. If you&#039;re stuck with an old version of gnuplot that doesn&#039;t support for loops, you can use another program to generate a text file that writes the instructions to be performed at every iteration of the loop, and then run the resulting script in gnuplot. In this example we&#039;ll create plots for the energy of the system, which is not a terribly informative quantity for this system and so I might change this example to something else in the future.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::set terminal png linewidth 4 font &#039;arial,28pt&#039; size 3200,600&lt;br /&gt;
#::set xrange [25e3:25e3*40]&lt;br /&gt;
#::set yrange [-1.42; -1.24]&lt;br /&gt;
#::set xlabel &#039;time [SU]&#039;&lt;br /&gt;
#::set ylabel &#039;Energy/# particles [SU]&#039;&lt;br /&gt;
#::set grid&lt;br /&gt;
#::unset key&lt;br /&gt;
#::do for [i = 0:39]{ set out &#039;plot_&#039;.i.&#039;.png&#039;;  plot &#039;energy.dat&#039; every 1000::1000::1000*(i+1) w lp }&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
notice that several things should be changed here according to your needs, including: &lt;br /&gt;
#*the terminal type (to change the font, resolution, linewidth, etc). The resolution should be compatible with the one of the simulation snapshots (see last point above).&lt;br /&gt;
#*the xrange, to make sure that it fits all the points, just barely).&lt;br /&gt;
#*the yrange, to make sure that everything fits as needed).&lt;br /&gt;
#*the plot command, to change the appearence of the plot, the line-type, how many frames do we have, whether to print the observable only when we have a frame or for all the frames up until a point, (type &amp;lt;tt&amp;gt; help every&amp;lt;/tt&amp;gt; in gnuplot to learn more about that) etc.&lt;br /&gt;
#*possibly adding some modifiers before plotting, including title, etc.&lt;br /&gt;
#*any other edit you might wish to make&lt;br /&gt;
#After both points above are finished, you can compose the images by either pasting the plots on the simulation snapshots, or appending the images together. This can easily be done with `convert` on linux and cygwin, with either of the following 2 lines: &lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::TO SUPERIMPOSE THE PLOT TO THE SIMULATION SNAPSHOT``&lt;br /&gt;
#::for i in {0..39}; do convert trajectory.dat_${i}_time_*.png plot_${i}.png -composite output_${i}.png; done&lt;br /&gt;
#::OR TO APPEND IT ABOVE IT&lt;br /&gt;
#::for i in {0..39}; do convert trajectory.dat_${i}_time_*.png plot_${i}.png -append output_${i}.png; done&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:swap the order of the plots and the simulations snapshots above to have the plot display below the simulation system instead.&lt;br /&gt;
# Convert the png files into a movie, with &amp;lt;tt&amp;gt;mencoder&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;ffmpeg&amp;lt;/tt&amp;gt;, as usual, with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
mencoder mf://@storyboard.txt -mf w=3200:h=2400:fps=6:type=png -ovc xvid -xvidencopts bitrate=200 -o output.avi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An example of this thing is the movie that I&#039;m attaching here [[sample movie]]&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=Making_a_simulation_movie_with_a_running_plot&amp;diff=1019</id>
		<title>Making a simulation movie with a running plot</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=Making_a_simulation_movie_with_a_running_plot&amp;diff=1019"/>
		<updated>2016-11-07T21:03:18Z</updated>

		<summary type="html">&lt;p&gt;Randisi: Added to Category:Examples&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Examples]]&lt;br /&gt;
&lt;br /&gt;
oxDNA simulations can be very informative to look at if presented in the form of a movie. Here we&#039;ll see how to make one with &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt;, a lightweight visualisation tool that can draw oxDNA configurations natively. It&#039;s so lightweight that can quickly render configurations with thousands of nucleotides, unlike other visualisation tools we&#039;ve tried in the past. &lt;br /&gt;
&lt;br /&gt;
== Making a movie ==&lt;br /&gt;
&lt;br /&gt;
The only pre-requisite for this tutorial is cogli1, a very simple visualization program that can be downloaded [https://sourceforge.net/projects/cogli1/ here]. Note that some of the options used in the tutorial require the bleeding-edge version, which can be checked out with the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn checkout svn://svn.code.sf.net/p/cogli1/code/ cogli1-code&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make a movie, we are going to load a trajectory in &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt;, choose a view, and then export each frame in the simulation as a trajectory file. Then we&#039;ll render them in &amp;lt;tt&amp;gt;povray&amp;lt;/tt&amp;gt; and convert them in a movie with &amp;lt;tt&amp;gt;mencoder&amp;lt;/tt&amp;gt;. Make sure these programs are installed before running this tutorial.&lt;br /&gt;
&lt;br /&gt;
# Open the trajectory with &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt;:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::cogli1 --always-centre -I -v -m -t prova.top trajectory.dat&amp;lt;/pre&amp;gt;The only necessary option is &amp;lt;tt&amp;gt;-t&amp;lt;/tt&amp;gt; (though you will want to use &amp;lt;tt&amp;gt;-m&amp;lt;/tt&amp;gt; if you&#039;re using the DNA2 interaction), which specifies the topology file. The others are nice for this particular system and for many others, but you might or might not want to use them for the system you&#039;re working on. Their use is as follows:&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;-I&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*: rotate the system to attempt fix its orientation in space. Simulated objects often float freely in solution and can rotate very sharply from a snapshot to the other, so that a movie would be confusing. This tries to copmensate for that. This does fail from time to time, so you might want to double check that everything works fine before rendering the final, hi-quality version of your images.&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;-v&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*: Start the simulation with a centered configuration.&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;--always-centre&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*: Move the system around to keep its center of mass to the centre of the simulation box throughout all the frames&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;-m&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*:Show oxDNA2 nucleotides, which present major-minor groove asimmetry (just like real DNA), unlike oxDNA1.&lt;br /&gt;
#:Several other options can be used. You can see the documentation for &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt; by launching it without any other arguments.&lt;br /&gt;
# Find a view that you like by moving the configuration around, zooming in, zooming out, etc. See the &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt; documentation for details on how to do this. Verify that the view is good for every frame in your trajectory by skimming through it, holding the + button. When you are satisfied that you&#039;ve found a good view, just press &lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::u&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: to save the simulation snapshot to a &amp;lt;tt&amp;gt;.cpy&amp;lt;/tt&amp;gt; file. An example of a good view for this system is saved in &amp;lt;tt&amp;gt; sample_view.cpy &amp;lt;/tt&amp;gt;.&lt;br /&gt;
# Now let&#039;s export each trajectory frames to &amp;lt;tt&amp;gt;.pov&amp;lt;/tt&amp;gt;.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::cogli1 -o -l view.cpy -t prova.top trajectory.dat&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: where &amp;lt;tt&amp;gt; view.cpy&amp;lt;/tt&amp;gt; is the name of your view. Note the -o option, which tells cogli1 to generate pov files without showing any GUI window. This will produce as many &amp;lt;tt&amp;gt;.pov&amp;lt;/tt&amp;gt; files as there are simulation snapshots, and each of them will generate a movie frame. You can edit any &amp;lt;tt&amp;gt;.pov&amp;lt;/tt&amp;gt; file if you so wish, replace it with one taken from another view, or with something copletely different if you feel like playing Tyler Durden :)&lt;br /&gt;
# Rendering the images in povray can take a long, time, so first we&#039;re going to do that with a low resolution to quickly create a preview. Use the command:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#:: for d in $(ls -v1 *.pov); do povray -D +H600 +W860 $d; done&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: in order to generate the png images at a low resolution, with 600 pixels of height and 860 of width (i.e. with a format of 16:10). Further decrease the resolution if you want it to run even faster, or change the aspect ration as you please.&lt;br /&gt;
# Encode the povray images in a &amp;lt;tt&amp;gt;.avi&amp;lt;/tt&amp;gt; movie with the commands&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
#::mencoder mf://@storyboard.txt -mf w=860:h=600:fps=6:type=png -ovc xvid -xvidencopts bitrate=200 -o preview.avi&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:Notice that the width and height of the movie should be the same as the one used in the povray command above.&lt;br /&gt;
#:;w and h&lt;br /&gt;
#::respectively the width and hegiht of the movie (in pixels, here 3200 and 2400). This should be the same as the output_*.png files if you don&#039;t want the screen to view to be distorted.&lt;br /&gt;
#:;fps&lt;br /&gt;
#::the number of frames per second (here 6).&lt;br /&gt;
#:;png&lt;br /&gt;
#::the type of image (here png)&lt;br /&gt;
#:;ovc&lt;br /&gt;
#::the codec used (here  &amp;lt;tt&amp;gt;xvid&amp;lt;/tt&amp;gt;)&lt;br /&gt;
#:;xvidencopts bitrate&lt;br /&gt;
#:: the bitrate, which is an option of the xvid codec (here set to 200)&lt;br /&gt;
#:;o&lt;br /&gt;
#::the name of the movie file (here &amp;lt;tt&amp;gt;output.avi&amp;lt;/tt&amp;gt;).&lt;br /&gt;
# Visualise the movie with the editor of choice and verify that everything is fine. Go back to the previous points if you see that something isn&#039;t quite right.&lt;br /&gt;
# If you&#039;re happy with the view of the movie, you might want to actually use a better resolution. Notice that povray might take a few hours or days to render the scenes depending on your GPU. Notice that if you are going to make a video with a running plot in the top/bottom part of the screen and the simulation movie in the other (i.e. using the &amp;lt;tt&amp;gt;append&amp;lt;/tt&amp;gt; below) you&#039;ll need to accomodate the resolution for that, so that if e.g. you want to keep the aspect ratio of the video at 16:10 and your plot takes e.g. 20% of the screen you&#039;ll want to use a resolution of 1920x1000, so that the plot can be created with a resolution of 1920x200 and the composite frames have a resolution of 1920x1200.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::for d in $(ls -v1 *.pov); do povray -D +A +H1200 +W1920 $d; done&lt;br /&gt;
#::ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
#::mencoder mf://@storyboard.txt -mf w=1920:h=1200:fps=6:type=png -ovc xvid -xvidencopts bitrate=600 -o output.avi&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Your video is ready! Enjoy :-D See below how to add a running plot superimposed to the video or above it.&lt;br /&gt;
&lt;br /&gt;
== Adding a running plot ==&lt;br /&gt;
Sometimes a system undergoes a structural change that can be seen in the variation of some physical quantity. It&#039;s then nice to show the plot updating as the system&#039;s configuration evolves. To do that: , but &lt;br /&gt;
# create the &amp;lt;tt&amp;gt;.png&amp;lt;/tt&amp;gt; frames as we do in the section above (again, you probably want to do this in 2 steps if your system is demanding to render on your machine).&lt;br /&gt;
# Create the plots of the quantity you want to show. Here we&#039;ll use gnuplot. This can be done with e.g. the following &amp;lt;tt&amp;gt;gnuplot&amp;lt;/tt&amp;gt; commands, which should work in &amp;lt;tt&amp;gt;gnuplot&amp;lt;/tt&amp;gt; &amp;gt;=4.6. If you&#039;re stuck with an old version of gnuplot that doesn&#039;t support for loops, you can use another program to generate a text file that writes the instructions to be performed at every iteration of the loop, and then run the resulting script in gnuplot. In this example we&#039;ll create plots for the energy of the system, which is not a terribly informative quantity for this system and so I might change this example to something else in the future.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::set terminal png linewidth 4 font &#039;arial,28pt&#039; size 3200,600&lt;br /&gt;
#::set xrange [25e3:25e3*40]&lt;br /&gt;
#::set yrange [-1.42; -1.24]&lt;br /&gt;
#::set xlabel &#039;time [SU]&#039;&lt;br /&gt;
#::set ylabel &#039;Energy/# particles [SU]&#039;&lt;br /&gt;
#::set grid&lt;br /&gt;
#::unset key&lt;br /&gt;
#::do for [i = 0:39]{ set out &#039;plot_&#039;.i.&#039;.png&#039;;  plot &#039;energy.dat&#039; every 1000::1000::1000*(i+1) w lp }&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
notice that several things should be changed here according to your needs, including: &lt;br /&gt;
#*the terminal type (to change the font, resolution, linewidth, etc). The resolution should be compatible with the one of the simulation snapshots (see last point above).&lt;br /&gt;
#*the xrange, to make sure that it fits all the points, just barely).&lt;br /&gt;
#*the yrange, to make sure that everything fits as needed).&lt;br /&gt;
#*the plot command, to change the appearence of the plot, the line-type, how many frames do we have, whether to print the observable only when we have a frame or for all the frames up until a point, (type &amp;lt;tt&amp;gt; help every&amp;lt;/tt&amp;gt; in gnuplot to learn more about that) etc.&lt;br /&gt;
#*possibly adding some modifiers before plotting, including title, etc.&lt;br /&gt;
#*any other edit you might wish to make&lt;br /&gt;
#After both points above are finished, you can compose the images by either pasting the plots on the simulation snapshots, or appending the images together. This can easily be done with `convert` on linux and cygwin, with either of the following 2 lines: &lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::TO SUPERIMPOSE THE PLOT TO THE SIMULATION SNAPSHOT``&lt;br /&gt;
#::for i in {0..39}; do convert trajectory.dat_${i}_time_*.png plot_${i}.png -composite output_${i}.png; done&lt;br /&gt;
#::OR TO APPEND IT ABOVE IT&lt;br /&gt;
#::for i in {0..39}; do convert trajectory.dat_${i}_time_*.png plot_${i}.png -append output_${i}.png; done&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:swap the order of the plots and the simulations snapshots above to have the plot display below the simulation system instead.&lt;br /&gt;
# Convert the png files into a movie, with &amp;lt;tt&amp;gt;mencoder&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;ffmpeg&amp;lt;/tt&amp;gt;, as usual, with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
mencoder mf://@storyboard.txt -mf w=3200:h=2400:fps=6:type=png -ovc xvid -xvidencopts bitrate=200 -o output.avi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An example of this thing is the movie that I&#039;m attaching here [[sample movie]]&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=Making_a_simulation_movie_with_a_running_plot&amp;diff=1018</id>
		<title>Making a simulation movie with a running plot</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=Making_a_simulation_movie_with_a_running_plot&amp;diff=1018"/>
		<updated>2016-11-07T20:42:16Z</updated>

		<summary type="html">&lt;p&gt;Randisi: Fixed the povray command&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
oxDNA simulations can be very informative to look at if presented in the form of a movie. Here we&#039;ll see how to make one with &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt;, a lightweight visualisation tool that can draw oxDNA configurations natively. It&#039;s so lightweight that can quickly render configurations with thousands of nucleotides, unlike other visualisation tools we&#039;ve tried in the past. &lt;br /&gt;
&lt;br /&gt;
== Making a movie ==&lt;br /&gt;
&lt;br /&gt;
The only pre-requisite for this tutorial is cogli1, a very simple visualization program that can be downloaded [https://sourceforge.net/projects/cogli1/ here]. Note that some of the options used in the tutorial require the bleeding-edge version, which can be checked out with the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn checkout svn://svn.code.sf.net/p/cogli1/code/ cogli1-code&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make a movie, we are going to load a trajectory in &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt;, choose a view, and then export each frame in the simulation as a trajectory file. Then we&#039;ll render them in &amp;lt;tt&amp;gt;povray&amp;lt;/tt&amp;gt; and convert them in a movie with &amp;lt;tt&amp;gt;mencoder&amp;lt;/tt&amp;gt;. Make sure these programs are installed before running this tutorial.&lt;br /&gt;
&lt;br /&gt;
# Open the trajectory with &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt;:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::cogli1 --always-centre -I -v -m -t prova.top trajectory.dat&amp;lt;/pre&amp;gt;The only necessary option is &amp;lt;tt&amp;gt;-t&amp;lt;/tt&amp;gt; (though you will want to use &amp;lt;tt&amp;gt;-m&amp;lt;/tt&amp;gt; if you&#039;re using the DNA2 interaction), which specifies the topology file. The others are nice for this particular system and for many others, but you might or might not want to use them for the system you&#039;re working on. Their use is as follows:&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;-I&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*: rotate the system to attempt fix its orientation in space. Simulated objects often float freely in solution and can rotate very sharply from a snapshot to the other, so that a movie would be confusing. This tries to copmensate for that. This does fail from time to time, so you might want to double check that everything works fine before rendering the final, hi-quality version of your images.&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;-v&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*: Start the simulation with a centered configuration.&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;--always-centre&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*: Move the system around to keep its center of mass to the centre of the simulation box throughout all the frames&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;-m&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*:Show oxDNA2 nucleotides, which present major-minor groove asimmetry (just like real DNA), unlike oxDNA1.&lt;br /&gt;
#:Several other options can be used. You can see the documentation for &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt; by launching it without any other arguments.&lt;br /&gt;
# Find a view that you like by moving the configuration around, zooming in, zooming out, etc. See the &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt; documentation for details on how to do this. Verify that the view is good for every frame in your trajectory by skimming through it, holding the + button. When you are satisfied that you&#039;ve found a good view, just press &lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::u&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: to save the simulation snapshot to a &amp;lt;tt&amp;gt;.cpy&amp;lt;/tt&amp;gt; file. An example of a good view for this system is saved in &amp;lt;tt&amp;gt; sample_view.cpy &amp;lt;/tt&amp;gt;.&lt;br /&gt;
# Now let&#039;s export each trajectory frames to &amp;lt;tt&amp;gt;.pov&amp;lt;/tt&amp;gt;.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::cogli1 -o -l view.cpy -t prova.top trajectory.dat&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: where &amp;lt;tt&amp;gt; view.cpy&amp;lt;/tt&amp;gt; is the name of your view. Note the -o option, which tells cogli1 to generate pov files without showing any GUI window. This will produce as many &amp;lt;tt&amp;gt;.pov&amp;lt;/tt&amp;gt; files as there are simulation snapshots, and each of them will generate a movie frame. You can edit any &amp;lt;tt&amp;gt;.pov&amp;lt;/tt&amp;gt; file if you so wish, replace it with one taken from another view, or with something copletely different if you feel like playing Tyler Durden :)&lt;br /&gt;
# Rendering the images in povray can take a long, time, so first we&#039;re going to do that with a low resolution to quickly create a preview. Use the command:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#:: for d in $(ls -v1 *.pov); do povray -D +H600 +W860 $d; done&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: in order to generate the png images at a low resolution, with 600 pixels of height and 860 of width (i.e. with a format of 16:10). Further decrease the resolution if you want it to run even faster, or change the aspect ration as you please.&lt;br /&gt;
# Encode the povray images in a &amp;lt;tt&amp;gt;.avi&amp;lt;/tt&amp;gt; movie with the commands&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
#::mencoder mf://@storyboard.txt -mf w=860:h=600:fps=6:type=png -ovc xvid -xvidencopts bitrate=200 -o preview.avi&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:Notice that the width and height of the movie should be the same as the one used in the povray command above.&lt;br /&gt;
#:;w and h&lt;br /&gt;
#::respectively the width and hegiht of the movie (in pixels, here 3200 and 2400). This should be the same as the output_*.png files if you don&#039;t want the screen to view to be distorted.&lt;br /&gt;
#:;fps&lt;br /&gt;
#::the number of frames per second (here 6).&lt;br /&gt;
#:;png&lt;br /&gt;
#::the type of image (here png)&lt;br /&gt;
#:;ovc&lt;br /&gt;
#::the codec used (here  &amp;lt;tt&amp;gt;xvid&amp;lt;/tt&amp;gt;)&lt;br /&gt;
#:;xvidencopts bitrate&lt;br /&gt;
#:: the bitrate, which is an option of the xvid codec (here set to 200)&lt;br /&gt;
#:;o&lt;br /&gt;
#::the name of the movie file (here &amp;lt;tt&amp;gt;output.avi&amp;lt;/tt&amp;gt;).&lt;br /&gt;
# Visualise the movie with the editor of choice and verify that everything is fine. Go back to the previous points if you see that something isn&#039;t quite right.&lt;br /&gt;
# If you&#039;re happy with the view of the movie, you might want to actually use a better resolution. Notice that povray might take a few hours or days to render the scenes depending on your GPU. Notice that if you are going to make a video with a running plot in the top/bottom part of the screen and the simulation movie in the other (i.e. using the &amp;lt;tt&amp;gt;append&amp;lt;/tt&amp;gt; below) you&#039;ll need to accomodate the resolution for that, so that if e.g. you want to keep the aspect ratio of the video at 16:10 and your plot takes e.g. 20% of the screen you&#039;ll want to use a resolution of 1920x1000, so that the plot can be created with a resolution of 1920x200 and the composite frames have a resolution of 1920x1200.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::for d in $(ls -v1 *.pov); do povray -D +A +H1200 +W1920 $d; done&lt;br /&gt;
#::ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
#::mencoder mf://@storyboard.txt -mf w=1920:h=1200:fps=6:type=png -ovc xvid -xvidencopts bitrate=600 -o output.avi&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Your video is ready! Enjoy :-D See below how to add a running plot superimposed to the video or above it.&lt;br /&gt;
&lt;br /&gt;
== Adding a running plot ==&lt;br /&gt;
Sometimes a system undergoes a structural change that can be seen in the variation of some physical quantity. It&#039;s then nice to show the plot updating as the system&#039;s configuration evolves. To do that: , but &lt;br /&gt;
# create the &amp;lt;tt&amp;gt;.png&amp;lt;/tt&amp;gt; frames as we do in the section above (again, you probably want to do this in 2 steps if your system is demanding to render on your machine).&lt;br /&gt;
# Create the plots of the quantity you want to show. Here we&#039;ll use gnuplot. This can be done with e.g. the following &amp;lt;tt&amp;gt;gnuplot&amp;lt;/tt&amp;gt; commands, which should work in &amp;lt;tt&amp;gt;gnuplot&amp;lt;/tt&amp;gt; &amp;gt;=4.6. If you&#039;re stuck with an old version of gnuplot that doesn&#039;t support for loops, you can use another program to generate a text file that writes the instructions to be performed at every iteration of the loop, and then run the resulting script in gnuplot. In this example we&#039;ll create plots for the energy of the system, which is not a terribly informative quantity for this system and so I might change this example to something else in the future.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::set terminal png linewidth 4 font &#039;arial,28pt&#039; size 3200,600&lt;br /&gt;
#::set xrange [25e3:25e3*40]&lt;br /&gt;
#::set yrange [-1.42; -1.24]&lt;br /&gt;
#::set xlabel &#039;time [SU]&#039;&lt;br /&gt;
#::set ylabel &#039;Energy/# particles [SU]&#039;&lt;br /&gt;
#::set grid&lt;br /&gt;
#::unset key&lt;br /&gt;
#::do for [i = 0:39]{ set out &#039;plot_&#039;.i.&#039;.png&#039;;  plot &#039;energy.dat&#039; every 1000::1000::1000*(i+1) w lp }&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
notice that several things should be changed here according to your needs, including: &lt;br /&gt;
#*the terminal type (to change the font, resolution, linewidth, etc). The resolution should be compatible with the one of the simulation snapshots (see last point above).&lt;br /&gt;
#*the xrange, to make sure that it fits all the points, just barely).&lt;br /&gt;
#*the yrange, to make sure that everything fits as needed).&lt;br /&gt;
#*the plot command, to change the appearence of the plot, the line-type, how many frames do we have, whether to print the observable only when we have a frame or for all the frames up until a point, (type &amp;lt;tt&amp;gt; help every&amp;lt;/tt&amp;gt; in gnuplot to learn more about that) etc.&lt;br /&gt;
#*possibly adding some modifiers before plotting, including title, etc.&lt;br /&gt;
#*any other edit you might wish to make&lt;br /&gt;
#After both points above are finished, you can compose the images by either pasting the plots on the simulation snapshots, or appending the images together. This can easily be done with `convert` on linux and cygwin, with either of the following 2 lines: &lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::TO SUPERIMPOSE THE PLOT TO THE SIMULATION SNAPSHOT``&lt;br /&gt;
#::for i in {0..39}; do convert trajectory.dat_${i}_time_*.png plot_${i}.png -composite output_${i}.png; done&lt;br /&gt;
#::OR TO APPEND IT ABOVE IT&lt;br /&gt;
#::for i in {0..39}; do convert trajectory.dat_${i}_time_*.png plot_${i}.png -append output_${i}.png; done&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:swap the order of the plots and the simulations snapshots above to have the plot display below the simulation system instead.&lt;br /&gt;
# Convert the png files into a movie, with &amp;lt;tt&amp;gt;mencoder&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;ffmpeg&amp;lt;/tt&amp;gt;, as usual, with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
mencoder mf://@storyboard.txt -mf w=3200:h=2400:fps=6:type=png -ovc xvid -xvidencopts bitrate=200 -o output.avi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An example of this thing is the movie that I&#039;m attaching here [[sample movie]]&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=Making_a_simulation_movie_with_a_running_plot&amp;diff=1016</id>
		<title>Making a simulation movie with a running plot</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=Making_a_simulation_movie_with_a_running_plot&amp;diff=1016"/>
		<updated>2016-11-04T15:24:47Z</updated>

		<summary type="html">&lt;p&gt;Randisi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
oxDNA simulations can be very informative to look at if presented in the form of a movie. Here we&#039;ll see how to make one with &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt;, a lightweight visualisation tool that can draw oxDNA configurations natively. It&#039;s so lightweight that can quickly render configurations with thousands of nucleotides, unlike other visualisation tools we&#039;ve tried in the past. &lt;br /&gt;
&lt;br /&gt;
== Making a movie ==&lt;br /&gt;
&lt;br /&gt;
To make a movie, where&#039;s going to load a trajectory in &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt;, choose a view, and then export each frame in the simulation as a trajectory file. Then we&#039;ll render them in &amp;lt;tt&amp;gt;povray&amp;lt;/tt&amp;gt; and convert them in a movie with &amp;lt;tt&amp;gt;mencoder&amp;lt;/tt&amp;gt;. Make sure these programs are installed before running this tutorial.&lt;br /&gt;
&lt;br /&gt;
# Open the trajectory with &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt;:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::cogli1 --always-centre -I -v -m -t prova.top trajectory.dat&amp;lt;/pre&amp;gt;The only necessary option is &amp;lt;tt&amp;gt;-t&amp;lt;/tt&amp;gt; (though you will want to use &amp;lt;tt&amp;gt;-m&amp;lt;/tt&amp;gt; if you&#039;re using the DNA2 interaction), which specifies the topology file. The others are nice for this particular system and for many others, but you might or might not want to use them for the system you&#039;re working on. Their use is as follows:&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;-I&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*: rotate the system to attempt fix its orientation in space. Simulated objects often float freely in solution and can rotate very sharply from a snapshot to the other, so that a movie would be confusing. This tries to copmensate for that. This does fail from time to time, so you might want to double check that everything works fine before rendering the final, hi-quality version of your images.&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;-v&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*: Start the simulation with a centered configuration.&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;--always-centre&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*: Move the system around to keep its center of mass to the centre of the simulation box throughout all the frames&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;-m&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*:Show oxDNA2 nucleotides, which present major-minor groove asimmetry (just like real DNA), unlike oxDNA1.&lt;br /&gt;
#:Several other options can be used. You can see the documentation for &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt; by launching it without any other arguments.&lt;br /&gt;
# Find a view that you like by moving the configuration around, zooming in, zooming out, etc. See the &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt; documentation for details on how to do this. Verify that the view is good for every frame in your trajectory by skimming through it, holding the + button. When you are satisfied that you&#039;ve found a good view, just press &lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::u&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: to save the simulation snapshot to a &amp;lt;tt&amp;gt;.cpy&amp;lt;/tt&amp;gt; file. An example of a good view for this system is saved in &amp;lt;tt&amp;gt; sample_view.cpy &amp;lt;/tt&amp;gt;.&lt;br /&gt;
# Now let&#039;s export each trajectory frames to &amp;lt;tt&amp;gt;.pov&amp;lt;/tt&amp;gt;.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::cogli1 -l view.cpy -t prova.top trajectory.dat&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: where &amp;lt;tt&amp;gt; view.cpy&amp;lt;/tt&amp;gt; is the name of your view. This will produce as many &amp;lt;tt&amp;gt;.pov&amp;lt;/tt&amp;gt; files as there are simulation snapshots, and each of them will generate a movie frame. You can edit any &amp;lt;tt&amp;gt;.pov&amp;lt;/tt&amp;gt; file if you so wish, replace it with one taken from another view, or with something copletely different if you feel like playing Tyler Durden :)&lt;br /&gt;
# Rendering the images in povray can take a long, time, so first we&#039;re going to do that with a low resolution to quickly create a preview. Use the command:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#:: povray -D +H600 +W860 *.pov&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: in order to generate the png images at a low resolution, with 600 pixels of height and 860 of width (i.e. with a format of 16:10). Further decrease the resolution if you want it to run even faster, or change the aspect ration as you please.&lt;br /&gt;
# Encode the povray images in a &amp;lt;tt&amp;gt;.avi&amp;lt;/tt&amp;gt; movie with the commands&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
#::mencoder mf://@storyboard.txt -mf w=860:h=600:fps=6:type=png -ovc xvid -xvidencopts bitrate=200 -o preview.avi&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:Notice that the width and height of the movie should be the same as the one used in the povray command above.&lt;br /&gt;
#:;w and h&lt;br /&gt;
#::respectively the width and hegiht of the movie (in pixels, here 3200 and 2400). This should be the same as the output_*.png files if you don&#039;t want the screen to view to be distorted.&lt;br /&gt;
#:;fps&lt;br /&gt;
#::the number of frames per second (here 6).&lt;br /&gt;
#:;png&lt;br /&gt;
#::the type of image (here png)&lt;br /&gt;
#:;ovc&lt;br /&gt;
#::the codec used (here  &amp;lt;tt&amp;gt;xvid&amp;lt;/tt&amp;gt;)&lt;br /&gt;
#:;xvidencopts bitrate&lt;br /&gt;
#:: the bitrate, which is an option of the xvid codec (here set to 200)&lt;br /&gt;
#:;o&lt;br /&gt;
#::the name of the movie file (here &amp;lt;tt&amp;gt;output.avi&amp;lt;/tt&amp;gt;).&lt;br /&gt;
# Visualise the movie with the editor of choice and verify that everything is fine. Go back to the previous points if you see that something isn&#039;t quite right.&lt;br /&gt;
# If you&#039;re happy with the view of the movie, you might want to actually use a better resolution. Notice that povray might take a few hours or days to render the scenes depending on your GPU. Notice that if you are going to make a video with a running plot in the top/bottom part of the screen and the simulation movie in the other (i.e. using the &amp;lt;tt&amp;gt;append&amp;lt;/tt&amp;gt; below) you&#039;ll need to accomodate the resolution for that, so that if e.g. you want to keep the aspect ratio of the video at 16:10 and your plot takes e.g. 20% of the screen you&#039;ll want to use a resolution of 1920x1000, so that the plot can be created with a resolution of 1920x200 and the composite frames have a resolution of 1920x1200.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::povray -D +A +H1200 +W1920 *.pov&lt;br /&gt;
#::ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
#::mencoder mf://@storyboard.txt -mf w=1920:h=1200:fps=6:type=png -ovc xvid -xvidencopts bitrate=600 -o output.avi&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Your video is ready! Enjoy :-D See below how to add a running plot superimposed to the video or above it.&lt;br /&gt;
&lt;br /&gt;
== Adding a running plot ==&lt;br /&gt;
Sometimes a system undergoes a structural change that can be seen in the variation of some physical quantity. It&#039;s then nice to show the plot updating as the system&#039;s configuration evolves. To do that: , but &lt;br /&gt;
# create the &amp;lt;tt&amp;gt;.png&amp;lt;/tt&amp;gt; frames as we do in the section above (again, you probably want to do this in 2 steps if your system is demanding to render on your machine).&lt;br /&gt;
# Create the plots of the quantity you want to show. Here we&#039;ll use gnuplot. This can be done with e.g. the following &amp;lt;tt&amp;gt;gnuplot&amp;lt;/tt&amp;gt; commands, which should work in &amp;lt;tt&amp;gt;gnuplot&amp;lt;/tt&amp;gt; &amp;gt;=4.6. If you&#039;re stuck with an old version of gnuplot that doesn&#039;t support for loops, you can use another program to generate a text file that writes the instructions to be performed at every iteration of the loop, and then run the resulting script in gnuplot. In this example we&#039;ll create plots for the energy of the system, which is not a terribly informative quantity for this system and so I might change this example to something else in the future.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::set terminal png linewidth 4 font &#039;arial,28pt&#039; size 3200,600&lt;br /&gt;
#::set xrange [25e3:25e3*40]&lt;br /&gt;
#::set yrange [-1.42; -1.24]&lt;br /&gt;
#::set xlabel &#039;time [SU]&#039;&lt;br /&gt;
#::set ylabel &#039;Energy/# particles [SU]&#039;&lt;br /&gt;
#::set grid&lt;br /&gt;
#::unset key&lt;br /&gt;
#::do for [i = 0:39]{ set out &#039;plot_&#039;.i.&#039;.png&#039;;  plot &#039;energy.dat&#039; every 1000::1000::1000*(i+1) w lp }&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
notice that several things should be changed here according to your needs, including: &lt;br /&gt;
#*the terminal type (to change the font, resolution, linewidth, etc). The resolution should be compatible with the one of the simulation snapshots (see last point above).&lt;br /&gt;
#*the xrange, to make sure that it fits all the points, just barely).&lt;br /&gt;
#*the yrange, to make sure that everything fits as needed).&lt;br /&gt;
#*the plot command, to change the appearence of the plot, the line-type, how many frames do we have, whether to print the observable only when we have a frame or for all the frames up until a point, (type &amp;lt;tt&amp;gt; help every&amp;lt;/tt&amp;gt; in gnuplot to learn more about that) etc.&lt;br /&gt;
#*possibly adding some modifiers before plotting, including title, etc.&lt;br /&gt;
#*any other edit you might wish to make&lt;br /&gt;
#After both points above are finished, you can compose the images by either pasting the plots on the simulation snapshots, or appending the images together. This can easily be done with `convert` on linux and cygwin, with either of the following 2 lines: &lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::TO SUPERIMPOSE THE PLOT TO THE SIMULATION SNAPSHOT``&lt;br /&gt;
#::for i in {0..39}; do convert trajectory.dat_${i}_time_*.png plot_${i}.png -composite output_${i}.png; done&lt;br /&gt;
#::OR TO APPEND IT ABOVE IT&lt;br /&gt;
#::for i in {0..39}; do convert trajectory.dat_${i}_time_*.png plot_${i}.png -append output_${i}.png; done&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:swap the order of the plots and the simulations snapshots above to have the plot display below the simulation system instead.&lt;br /&gt;
# Convert the png files into a movie, with &amp;lt;tt&amp;gt;mencoder&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;ffmpeg&amp;lt;/tt&amp;gt;, as usual, with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
mencoder mf://@storyboard.txt -mf w=3200:h=2400:fps=6:type=png -ovc xvid -xvidencopts bitrate=200 -o output.avi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An example of this thing is the movie that I&#039;m attaching here [[sample movie]]&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=Making_a_simulation_movie_with_a_running_plot&amp;diff=1015</id>
		<title>Making a simulation movie with a running plot</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=Making_a_simulation_movie_with_a_running_plot&amp;diff=1015"/>
		<updated>2016-11-04T15:24:29Z</updated>

		<summary type="html">&lt;p&gt;Randisi: Final edits for now. Time to disclose the existence of this page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Page currently under construction&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
oxDNA simulations can be very informative to look at if presented in the form of a movie. Here we&#039;ll see how to make one with &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt;, a lightweight visualisation tool that can draw oxDNA configurations natively. It&#039;s so lightweight that can quickly render configurations with thousands of nucleotides, unlike other visualisation tools we&#039;ve tried in the past. &lt;br /&gt;
&lt;br /&gt;
== Making a movie ==&lt;br /&gt;
&lt;br /&gt;
To make a movie, where&#039;s going to load a trajectory in &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt;, choose a view, and then export each frame in the simulation as a trajectory file. Then we&#039;ll render them in &amp;lt;tt&amp;gt;povray&amp;lt;/tt&amp;gt; and convert them in a movie with &amp;lt;tt&amp;gt;mencoder&amp;lt;/tt&amp;gt;. Make sure these programs are installed before running this tutorial.&lt;br /&gt;
&lt;br /&gt;
# Open the trajectory with &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt;:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::cogli1 --always-centre -I -v -m -t prova.top trajectory.dat&amp;lt;/pre&amp;gt;The only necessary option is &amp;lt;tt&amp;gt;-t&amp;lt;/tt&amp;gt; (though you will want to use &amp;lt;tt&amp;gt;-m&amp;lt;/tt&amp;gt; if you&#039;re using the DNA2 interaction), which specifies the topology file. The others are nice for this particular system and for many others, but you might or might not want to use them for the system you&#039;re working on. Their use is as follows:&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;-I&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*: rotate the system to attempt fix its orientation in space. Simulated objects often float freely in solution and can rotate very sharply from a snapshot to the other, so that a movie would be confusing. This tries to copmensate for that. This does fail from time to time, so you might want to double check that everything works fine before rendering the final, hi-quality version of your images.&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;-v&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*: Start the simulation with a centered configuration.&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;--always-centre&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*: Move the system around to keep its center of mass to the centre of the simulation box throughout all the frames&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;-m&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*:Show oxDNA2 nucleotides, which present major-minor groove asimmetry (just like real DNA), unlike oxDNA1.&lt;br /&gt;
#:Several other options can be used. You can see the documentation for &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt; by launching it without any other arguments.&lt;br /&gt;
# Find a view that you like by moving the configuration around, zooming in, zooming out, etc. See the &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt; documentation for details on how to do this. Verify that the view is good for every frame in your trajectory by skimming through it, holding the + button. When you are satisfied that you&#039;ve found a good view, just press &lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::u&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: to save the simulation snapshot to a &amp;lt;tt&amp;gt;.cpy&amp;lt;/tt&amp;gt; file. An example of a good view for this system is saved in &amp;lt;tt&amp;gt; sample_view.cpy &amp;lt;/tt&amp;gt;.&lt;br /&gt;
# Now let&#039;s export each trajectory frames to &amp;lt;tt&amp;gt;.pov&amp;lt;/tt&amp;gt;.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::cogli1 -l view.cpy -t prova.top trajectory.dat&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: where &amp;lt;tt&amp;gt; view.cpy&amp;lt;/tt&amp;gt; is the name of your view. This will produce as many &amp;lt;tt&amp;gt;.pov&amp;lt;/tt&amp;gt; files as there are simulation snapshots, and each of them will generate a movie frame. You can edit any &amp;lt;tt&amp;gt;.pov&amp;lt;/tt&amp;gt; file if you so wish, replace it with one taken from another view, or with something copletely different if you feel like playing Tyler Durden :)&lt;br /&gt;
# Rendering the images in povray can take a long, time, so first we&#039;re going to do that with a low resolution to quickly create a preview. Use the command:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#:: povray -D +H600 +W860 *.pov&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: in order to generate the png images at a low resolution, with 600 pixels of height and 860 of width (i.e. with a format of 16:10). Further decrease the resolution if you want it to run even faster, or change the aspect ration as you please.&lt;br /&gt;
# Encode the povray images in a &amp;lt;tt&amp;gt;.avi&amp;lt;/tt&amp;gt; movie with the commands&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
#::mencoder mf://@storyboard.txt -mf w=860:h=600:fps=6:type=png -ovc xvid -xvidencopts bitrate=200 -o preview.avi&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:Notice that the width and height of the movie should be the same as the one used in the povray command above.&lt;br /&gt;
#:;w and h&lt;br /&gt;
#::respectively the width and hegiht of the movie (in pixels, here 3200 and 2400). This should be the same as the output_*.png files if you don&#039;t want the screen to view to be distorted.&lt;br /&gt;
#:;fps&lt;br /&gt;
#::the number of frames per second (here 6).&lt;br /&gt;
#:;png&lt;br /&gt;
#::the type of image (here png)&lt;br /&gt;
#:;ovc&lt;br /&gt;
#::the codec used (here  &amp;lt;tt&amp;gt;xvid&amp;lt;/tt&amp;gt;)&lt;br /&gt;
#:;xvidencopts bitrate&lt;br /&gt;
#:: the bitrate, which is an option of the xvid codec (here set to 200)&lt;br /&gt;
#:;o&lt;br /&gt;
#::the name of the movie file (here &amp;lt;tt&amp;gt;output.avi&amp;lt;/tt&amp;gt;).&lt;br /&gt;
# Visualise the movie with the editor of choice and verify that everything is fine. Go back to the previous points if you see that something isn&#039;t quite right.&lt;br /&gt;
# If you&#039;re happy with the view of the movie, you might want to actually use a better resolution. Notice that povray might take a few hours or days to render the scenes depending on your GPU. Notice that if you are going to make a video with a running plot in the top/bottom part of the screen and the simulation movie in the other (i.e. using the &amp;lt;tt&amp;gt;append&amp;lt;/tt&amp;gt; below) you&#039;ll need to accomodate the resolution for that, so that if e.g. you want to keep the aspect ratio of the video at 16:10 and your plot takes e.g. 20% of the screen you&#039;ll want to use a resolution of 1920x1000, so that the plot can be created with a resolution of 1920x200 and the composite frames have a resolution of 1920x1200.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::povray -D +A +H1200 +W1920 *.pov&lt;br /&gt;
#::ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
#::mencoder mf://@storyboard.txt -mf w=1920:h=1200:fps=6:type=png -ovc xvid -xvidencopts bitrate=600 -o output.avi&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Your video is ready! Enjoy :-D See below how to add a running plot superimposed to the video or above it.&lt;br /&gt;
&lt;br /&gt;
== Adding a running plot ==&lt;br /&gt;
Sometimes a system undergoes a structural change that can be seen in the variation of some physical quantity. It&#039;s then nice to show the plot updating as the system&#039;s configuration evolves. To do that: , but &lt;br /&gt;
# create the &amp;lt;tt&amp;gt;.png&amp;lt;/tt&amp;gt; frames as we do in the section above (again, you probably want to do this in 2 steps if your system is demanding to render on your machine).&lt;br /&gt;
# Create the plots of the quantity you want to show. Here we&#039;ll use gnuplot. This can be done with e.g. the following &amp;lt;tt&amp;gt;gnuplot&amp;lt;/tt&amp;gt; commands, which should work in &amp;lt;tt&amp;gt;gnuplot&amp;lt;/tt&amp;gt; &amp;gt;=4.6. If you&#039;re stuck with an old version of gnuplot that doesn&#039;t support for loops, you can use another program to generate a text file that writes the instructions to be performed at every iteration of the loop, and then run the resulting script in gnuplot. In this example we&#039;ll create plots for the energy of the system, which is not a terribly informative quantity for this system and so I might change this example to something else in the future.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::set terminal png linewidth 4 font &#039;arial,28pt&#039; size 3200,600&lt;br /&gt;
#::set xrange [25e3:25e3*40]&lt;br /&gt;
#::set yrange [-1.42; -1.24]&lt;br /&gt;
#::set xlabel &#039;time [SU]&#039;&lt;br /&gt;
#::set ylabel &#039;Energy/# particles [SU]&#039;&lt;br /&gt;
#::set grid&lt;br /&gt;
#::unset key&lt;br /&gt;
#::do for [i = 0:39]{ set out &#039;plot_&#039;.i.&#039;.png&#039;;  plot &#039;energy.dat&#039; every 1000::1000::1000*(i+1) w lp }&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
notice that several things should be changed here according to your needs, including: &lt;br /&gt;
#*the terminal type (to change the font, resolution, linewidth, etc). The resolution should be compatible with the one of the simulation snapshots (see last point above).&lt;br /&gt;
#*the xrange, to make sure that it fits all the points, just barely).&lt;br /&gt;
#*the yrange, to make sure that everything fits as needed).&lt;br /&gt;
#*the plot command, to change the appearence of the plot, the line-type, how many frames do we have, whether to print the observable only when we have a frame or for all the frames up until a point, (type &amp;lt;tt&amp;gt; help every&amp;lt;/tt&amp;gt; in gnuplot to learn more about that) etc.&lt;br /&gt;
#*possibly adding some modifiers before plotting, including title, etc.&lt;br /&gt;
#*any other edit you might wish to make&lt;br /&gt;
#After both points above are finished, you can compose the images by either pasting the plots on the simulation snapshots, or appending the images together. This can easily be done with `convert` on linux and cygwin, with either of the following 2 lines: &lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::TO SUPERIMPOSE THE PLOT TO THE SIMULATION SNAPSHOT``&lt;br /&gt;
#::for i in {0..39}; do convert trajectory.dat_${i}_time_*.png plot_${i}.png -composite output_${i}.png; done&lt;br /&gt;
#::OR TO APPEND IT ABOVE IT&lt;br /&gt;
#::for i in {0..39}; do convert trajectory.dat_${i}_time_*.png plot_${i}.png -append output_${i}.png; done&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:swap the order of the plots and the simulations snapshots above to have the plot display below the simulation system instead.&lt;br /&gt;
# Convert the png files into a movie, with &amp;lt;tt&amp;gt;mencoder&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;ffmpeg&amp;lt;/tt&amp;gt;, as usual, with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
mencoder mf://@storyboard.txt -mf w=3200:h=2400:fps=6:type=png -ovc xvid -xvidencopts bitrate=200 -o output.avi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An example of this thing is the movie that I&#039;m attaching here [[sample movie]]&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=Making_a_simulation_movie_with_a_running_plot&amp;diff=1014</id>
		<title>Making a simulation movie with a running plot</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=Making_a_simulation_movie_with_a_running_plot&amp;diff=1014"/>
		<updated>2016-11-04T15:09:21Z</updated>

		<summary type="html">&lt;p&gt;Randisi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Page currently under construction&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
oxDNA simulations can be very informative to look at if presented in the form of a movie. Here we&#039;ll see how to make one with &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt;, a lightweight visualisation tool that can draw oxDNA configurations natively. It&#039;s so lightweight that can quickly render configurations with thousands of nucleotides, unlike other visualisation tools we&#039;ve tried in the past. &lt;br /&gt;
&lt;br /&gt;
== Making a movie ==&lt;br /&gt;
&lt;br /&gt;
To make a movie, where&#039;s going to load a trajectory in &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt;, choose a view, and then export each frame in the simulation as a trajectory file. Then we&#039;ll render them in &amp;lt;tt&amp;gt;povray&amp;lt;/tt&amp;gt; and convert them in a movie with &amp;lt;tt&amp;gt;mencoder&amp;lt;/tt&amp;gt;. Make sure these programs are installed before running this tutorial.&lt;br /&gt;
&lt;br /&gt;
# Open the trajectory with &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt;:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::cogli1 --always-centre -I -v -m -t prova.top trajectory.dat&amp;lt;/pre&amp;gt;The only necessary option is &amp;lt;tt&amp;gt;-t&amp;lt;/tt&amp;gt; (though you will want to use &amp;lt;tt&amp;gt;-m&amp;lt;/tt&amp;gt; if you&#039;re using the DNA2 interaction), which specifies the topology file. The others are nice for this particular system and for many others, but you might or might not want to use them for the system you&#039;re working on. Their use is as follows:&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;-I&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*: rotate the system to attempt fix its orientation in space. Simulated objects often float freely in solution and can rotate very sharply from a snapshot to the other, so that a movie would be confusing. This tries to copmensate for that. This does fail from time to time, so you might want to double check that everything works fine before rendering the final, hi-quality version of your images.&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;-v&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*: Start the simulation with a centered configuration.&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;--always-centre&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*: Move the system around to keep its center of mass to the centre of the simulation box throughout all the frames&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;-m&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*:Show oxDNA2 nucleotides, which present major-minor groove asimmetry (just like real DNA), unlike oxDNA1.&lt;br /&gt;
#:Several other options can be used. You can see the documentation for &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt; by launching it without any other arguments.&lt;br /&gt;
# Find a view that you like by moving the configuration around, zooming in, zooming out, etc. See the &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt; documentation for details on how to do this. Verify that the view is good for every frame in your trajectory by skimming through it, holding the + button. When you are satisfied that you&#039;ve found a good view, just press &lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::u&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: to save the simulation snapshot to a &amp;lt;tt&amp;gt;.cpy&amp;lt;/tt&amp;gt; file. An example of a good view for this system is saved in &amp;lt;tt&amp;gt; sample_view.cpy &amp;lt;/tt&amp;gt;.&lt;br /&gt;
# Now let&#039;s export each trajectory frames to &amp;lt;tt&amp;gt;.pov&amp;lt;/tt&amp;gt;.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::cogli1 -l view.cpy -t prova.top trajectory.dat&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: where &amp;lt;tt&amp;gt; view.cpy&amp;lt;/tt&amp;gt; is the name of your view. This will produce as many &amp;lt;tt&amp;gt;.pov&amp;lt;/tt&amp;gt; files as there are simulation snapshots, and each of them will generate a movie frame. You can edit any &amp;lt;tt&amp;gt;.pov&amp;lt;/tt&amp;gt; file if you so wish, replace it with one taken from another view, or with something copletely different if you feel like playing Tyler Durden :)&lt;br /&gt;
# Rendering the images in povray can take a long, time, so first we&#039;re going to do that with a low resolution to quickly create a preview. Use the command:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#:: povray -D +H600 +W860 *.pov&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: in order to generate the png images at a low resolution, with 600 pixels of height and 860 of width (i.e. with a format of 16:10). Further decrease the resolution if you want it to run even faster, or change the aspect ration as you please.&lt;br /&gt;
# Encode the povray images in a &amp;lt;tt&amp;gt;.avi&amp;lt;/tt&amp;gt; movie with the commands&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
#::mencoder mf://@storyboard.txt -mf w=860:h=600:fps=6:type=png -ovc xvid -xvidencopts bitrate=200 -o preview.avi&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:Notice that the width and height of the movie should be the same as the one used in the povray command above.&lt;br /&gt;
# Visualise the movie with the editor of choice and verify that everything is fine. Go back to the previous points if you see that something isn&#039;t quite right.&lt;br /&gt;
# If you&#039;re happy with the view of the movie, you might want to actually use a better resolution. Notice that povray might take a few hours or days to render the scenes depending on your GPU. Notice that if you are going to make a video with a running plot in the top/bottom part of the screen and the simulation movie in the other (i.e. using the &amp;lt;tt&amp;gt;append&amp;lt;/tt&amp;gt; below) you&#039;ll need to accomodate the resolution for that, so that if e.g. you want to keep the aspect ratio of the video at 16:10 and your plot takes e.g. 20% of the screen you&#039;ll want to use a resolution of 1920x1000, so that the plot can be created with a resolution of 1920x200 and the composite frames have a resolution of 1920x1200.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#:: povray -D +A +H1200 +W1920 *.pov&amp;lt;pre&amp;gt;&lt;br /&gt;
#::ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
#::mencoder mf://@storyboard.txt -mf w=1920:h=1200:fps=6:type=png -ovc xvid -xvidencopts bitrate=600 -o output.avi&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Your video is ready! Enjoy :-D See below how to add a running plot superimposed to the video or above it.&lt;br /&gt;
&lt;br /&gt;
== Adding a running plot ==&lt;br /&gt;
Sometimes a system undergoes a structural change that can be seen in the variation of some physical quantity. It&#039;s then nice to show the plot updating as the system&#039;s configuration evolves. To do that, we still need to create the &amp;lt;tt&amp;gt;.png&amp;lt;/tt&amp;gt; frames as we do in the section above, but &lt;br /&gt;
# &lt;br /&gt;
# Create the simulation snapshots with &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;povray&amp;lt;/tt&amp;gt;. This might take a few minutes or a few days depending on the length and resolution of your movie, so you want to start doing this before anything else. Also before producing the final high-quality simulation snapshots you might want to produce a low-quality-quickly-generated preview, by lowering the resolution.&lt;br /&gt;
# Create the plots of the quantity with gnuplot. This can be done with e.g. the following &amp;lt;tt&amp;gt;gnuplot&amp;lt;/tt&amp;gt; commands ,which should work in &amp;lt;tt&amp;gt;gnuplot&amp;lt;/tt&amp;gt; &amp;gt;=4.6. If you&#039;re stuck with an old version of gnuplot that doesn&#039;t support for loops, you can use another program to generate a text file that writes the instructions to be performed at every iteration of the loop, and then run the resulting script in gnuplot.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::set term png linewidth 4 font &#039;arial,28pt&#039; size 3200,600&lt;br /&gt;
#::set xrange [25e3:25e3*40]&lt;br /&gt;
#::set yrange [-1.42; -1.24]&lt;br /&gt;
#::do for [i = 0:39]{ set out &#039;plot_&#039;.i.&#039;.png&#039;;  plot &#039;energy.dat&#039; every 1000::1000::1000*(i+1) w lp }&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
notice that several things should be changed here according to your needs, including: &lt;br /&gt;
#*the term type (to change the font, resolution, linewidth, etc). The resolution should be compatible with the one of the simulation snapshots&lt;br /&gt;
#* the xrange (to make sure that it fits all the points, just barely)&lt;br /&gt;
#* the yrange (to make sure that everything fits as needed)&lt;br /&gt;
#* the plot command (to change the appearence of the plot, the line-type, how many frames do we have, whether to print the observable only when we have a frame or for all the frames up until a point, etc.).&lt;br /&gt;
#* possibly adding some modifiers before plotting, including title, xlabel, ylabel, etc, a grid, etc.&lt;br /&gt;
#* any other edit you might wish to make&lt;br /&gt;
# After both points above are finished, you can compose the images by either pasting the plots on the simulation snapshots, or appending the images together. This can easily be done with `convert` on linux and cygwin, with either of the following 2 lines: &lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::TO SUPERIMPOSE THE PLOT TO THE SIMULATION SNAPSHOT``&lt;br /&gt;
#::for i in {0..39}; do convert trajectory.dat_${i}_time_*.png plot_${i}.png -composite output_${i}.png; done&lt;br /&gt;
#::OR TO APPEND IT ABOVE IT&lt;br /&gt;
#::for i in {0..39}; do convert trajectory.dat_${i}_time_*.png plot_${i}.png -append output_${i}.png; done&amp;lt;/pre&amp;gt;&lt;br /&gt;
swap the order of the plots and the simulations snapshots above to have the plot display below the simulation system instead.&lt;br /&gt;
# Convert the png files into a movie, with &amp;lt;tt&amp;gt;mencoder&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;ffmpeg&amp;lt;/tt&amp;gt;, as usual, with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
mencoder mf://@storyboard.txt -mf w=3200:h=2400:fps=6:type=png -ovc xvid -xvidencopts bitrate=200 -o output.avi` where the keys mean:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
#*;w and h&lt;br /&gt;
#*:respectively the width and hegiht of the movie (in pixels, here 3200 and 2400). This should be the same as the output_*.png files if you don&#039;t want the screen to view to be distorted.&lt;br /&gt;
#*;fps&lt;br /&gt;
#*:the number of frames per second (here 6).&lt;br /&gt;
#*;png&lt;br /&gt;
#*:the type of image (here png)&lt;br /&gt;
#*;ovc&lt;br /&gt;
#*:the codec used (here  &amp;lt;tt&amp;gt;xvid&amp;lt;/tt&amp;gt;)&lt;br /&gt;
#*;xvidencopts bitrate&lt;br /&gt;
#*: the bitrate, which is an option of the xvid codec (here set to 200)&lt;br /&gt;
#*;o&lt;br /&gt;
#*:the name of the movie file (here &amp;lt;tt&amp;gt;output.avi&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
An example of this thing is the movie that I&#039;m attaching here [[sample movie]]&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=Making_a_simulation_movie_with_a_running_plot&amp;diff=1013</id>
		<title>Making a simulation movie with a running plot</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=Making_a_simulation_movie_with_a_running_plot&amp;diff=1013"/>
		<updated>2016-11-04T14:56:33Z</updated>

		<summary type="html">&lt;p&gt;Randisi: Making the article more clear. Still a work in progress, but hopefully less so :)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Page currently under construction&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
oxDNA simulations can be very informative to look at if presented in the form of a movie. Here we&#039;ll see how to make one with &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt;, a lightweight visualisation tool that can draw oxDNA configurations natively. It&#039;s so lightweight that can quickly render configurations with thousands of nucleotides, unlike other visualisation tools we&#039;ve tried in the past. &lt;br /&gt;
&lt;br /&gt;
== Making a movie ==&lt;br /&gt;
&lt;br /&gt;
To make a movie, where&#039;s going to load a trajectory in &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt;, choose a view, and then export each frame in the simulation as a trajectory file. Then we&#039;ll render them in &amp;lt;tt&amp;gt;povray&amp;lt;/tt&amp;gt; and convert them in a movie with &amp;lt;tt&amp;gt;mencoder&amp;lt;/tt&amp;gt;. Make sure these programs are installed before running this tutorial.&lt;br /&gt;
&lt;br /&gt;
# Open the trajectory with &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt;:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::cogli1 --always-centre -I -v -m -t prova.top trajectory.dat&amp;lt;/pre&amp;gt;The only necessary option is &amp;lt;tt&amp;gt;-t&amp;lt;/tt&amp;gt; (though you will want to use &amp;lt;tt&amp;gt;-m&amp;lt;/tt&amp;gt; if you&#039;re using the DNA2 interaction), which specifies the topology file. The others are nice for this particular system and for many others, but you might or might not want to use them for the system you&#039;re working on. Their use is as follows:&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;-I&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*: rotate the system to attempt fix its orientation in space. Simulated objects often float freely in solution and can rotate very sharply from a snapshot to the other, so that a movie would be confusing. This tries to copmensate for that. This does fail from time to time, so you might want to double check that everything works fine before rendering the final, hi-quality version of your images.&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;-v&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*: Start the simulation with a centered configuration.&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;--always-centre&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*: Move the system around to keep its center of mass to the centre of the simulation box throughout all the frames&lt;br /&gt;
#*;&amp;lt;tt&amp;gt;-m&amp;lt;/tt&amp;gt;&lt;br /&gt;
#*:Show oxDNA2 nucleotides, which present major-minor groove asimmetry (just like real DNA), unlike oxDNA1.&lt;br /&gt;
#*:Several other options can be used. You can see the documentation for &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt; by launching it without any other arguments.&lt;br /&gt;
# Find a view that you like by moving the configuration around, zooming in, zooming out, etc. See the &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt; documentation for details on how to do this. Verify that the view is good for every frame in your trajectory by skimming through it, holding the + button. When you are satisfied that you&#039;ve found a good view, just press &lt;br /&gt;
#*:&amp;lt;pre&amp;gt;&lt;br /&gt;
#*::u&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: to save the simulation snapshot to a &amp;lt;tt&amp;gt;.cpy&amp;lt;/tt&amp;gt; file. An example of a good view for this system is saved in &amp;lt;tt&amp;gt; sample_view.cpy &amp;lt;/tt&amp;gt;.&lt;br /&gt;
#* Now let&#039;s export each trajectory frames to &amp;lt;tt&amp;gt;.pov&amp;lt;/tt&amp;gt;.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::cogli1 -l view.cpy -t prova.top trajectory.dat&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: where &amp;lt;tt&amp;gt; view.cpy&amp;lt;/tt&amp;gt; is the name of your view. This will produce as many &amp;lt;tt&amp;gt;.pov&amp;lt;/tt&amp;gt; files as there are simulation snapshots, and each of them will generate a movie frame. You can edit any &amp;lt;tt&amp;gt;.pov&amp;lt;/tt&amp;gt; file if you so wish, replace it with one taken from another view, or with something copletely different if you feel like playing Tyler Durden :)&lt;br /&gt;
#* Rendering the images in povray can take a long, time, so first we&#039;re going to do that with a low resolution to quickly create a preview. Use the command:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#:: povray -D +H600 +W860 *.pov&amp;lt;/prev&amp;gt;&lt;br /&gt;
#: in order to generate the png images at a low resolution, with 600 pixels of height and 860 of width (i.e. with a format of 16:10). Further decrease the resolution if you want it to run even faster, or change the aspect ration as you please.&lt;br /&gt;
# Encode the povray images in a &amp;lt;tt&amp;gt;.avi&amp;lt;/tt&amp;gt; movie with the commands&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
#::mencoder mf://@storyboard.txt -mf w=860:h=600:fps=6:type=png -ovc xvid -xvidencopts bitrate=200 -o preview.avi&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:Notice that the width and height of the movie should be the same as the one used in the povray command above.&lt;br /&gt;
#* Visualise the movie with the editor of choice and verify that everything is fine. Go back to the previous points if you see that something isn&#039;t quite right.&lt;br /&gt;
# If you&#039;re happy with the view of the movie, you might want to actually use a better resolution. Notice that povray might take a few hours or days to render the scenes depending on your GPU. &lt;br /&gt;
#:Notice that if you are going to make a video with a running plot in the top/bottom part of the screen and the simulation movie in the other (i.e. using the &amp;lt;tt&amp;gt;append&amp;lt;/tt&amp;gt; below) you&#039;ll need to accomodate the resolution for that, so that if e.g. you want to keep the aspect ratio of the video at 16:10 and your plot takes e.g. 20% of the screen you&#039;ll want to use a resolution of 1920x1000, so that the plot can be created with a resolution of 1920x200 and the composite frames have a resolution of 1920x1200.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#:: povray -D +A +H1200 +W1920 *.pov&amp;lt;/prev&amp;gt;&lt;br /&gt;
#:and then make the video with&lt;br /&gt;
#:&amp;lt;pre&amp;gt;ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
#::mencoder mf://@storyboard.txt -mf w=1920:h=1200:fps=6:type=png -ovc xvid -xvidencopts bitrate=600 -o output.avi&amp;lt;/pre&amp;gt;&lt;br /&gt;
# You&#039;re video is ready! Enjoy :-D See below how to add a running plot superimposed to the video or above it.&lt;br /&gt;
&lt;br /&gt;
== Adding a running plot ==&lt;br /&gt;
Sometimes a system undergoes a structural change that can be seen in the variation of some physical quantity. It&#039;s then nice to show the plot updating as the system&#039;s configuration evolves. To do that, we still need to create the &amp;lt;tt&amp;gt;.png&amp;lt;/tt&amp;gt; frames as we do in the section above, but &lt;br /&gt;
# &lt;br /&gt;
# Create the simulation snapshots with &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;povray&amp;lt;/tt&amp;gt;. This might take a few minutes or a few days depending on the length and resolution of your movie, so you want to start doing this before anything else. Also before producing the final high-quality simulation snapshots you might want to produce a low-quality-quickly-generated preview, by lowering the resolution.&lt;br /&gt;
# Create the plots of the quantity with gnuplot. This can be done with e.g. the following &amp;lt;tt&amp;gt;gnuplot&amp;lt;/tt&amp;gt; commands ,which should work in &amp;lt;tt&amp;gt;gnuplot&amp;lt;/tt&amp;gt; &amp;gt;=4.6. If you&#039;re stuck with an old version of gnuplot that doesn&#039;t support for loops, you can use another program to generate a text file that writes the instructions to be performed at every iteration of the loop, and then run the resulting script in gnuplot.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&lt;br /&gt;
#::set term png linewidth 4 font &#039;arial,28pt&#039; size 3200,600&lt;br /&gt;
#::set xrange [25e3:25e3*40]&lt;br /&gt;
#::set yrange [-1.42; -1.24]&lt;br /&gt;
#::do for [i = 0:39]{ set out &#039;plot_&#039;.i.&#039;.png&#039;;  plot &#039;energy.dat&#039; every 1000::1000::1000*(i+1) w lp }&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
notice that several things should be changed here according to your needs, including: &lt;br /&gt;
#*the term type (to change the font, resolution, linewidth, etc). The resolution should be compatible with the one of the simulation snapshots&lt;br /&gt;
#* the xrange (to make sure that it fits all the points, just barely)&lt;br /&gt;
#* the yrange (to make sure that everything fits as needed)&lt;br /&gt;
#* the plot command (to change the appearence of the plot, the line-type, how many frames do we have, whether to print the observable only when we have a frame or for all the frames up until a point, etc.).&lt;br /&gt;
#* possibly adding some modifiers before plotting, including title, xlabel, ylabel, etc, a grid, etc.&lt;br /&gt;
#* any other edit you might wish to make&lt;br /&gt;
# After both points above are finished, you can compose the images by either pasting the plots on the simulation snapshots, or appending the images together. This can easily be done with `convert` on linux and cygwin, with either of the following 2 lines: TO SUPERIMPOSE THE PLOT TO THE SIMULATION SNAPSHOT``&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for i in {0..39}; do convert trajectory.dat_${i}_time_*.png plot_${i}.png -composite output_${i}.png; done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
OR TO APPEND IT ABOVE IT&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for i in {0..39}; do convert trajectory.dat_${i}_time_*.png plot_${i}.png -append output_${i}.png; done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
swap the order of the plots and the simulations snapshots above to have the plot display below the simulation system instead.&lt;br /&gt;
# Convert the png files into a movie, with &amp;lt;tt&amp;gt;mencoder&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;ffmpeg&amp;lt;/tt&amp;gt;, as usual, with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
mencoder mf://@storyboard.txt -mf w=3200:h=2400:fps=6:type=png -ovc xvid -xvidencopts bitrate=200 -o output.avi` where the keys mean:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
#*;w and h&lt;br /&gt;
#*:respectively the width and hegiht of the movie (in pixels, here 3200 and 2400). This should be the same as the output_*.png files if you don&#039;t want the screen to view to be distorted.&lt;br /&gt;
#*;fps&lt;br /&gt;
#*:the number of frames per second (here 6).&lt;br /&gt;
#*;png&lt;br /&gt;
#*:the type of image (here png)&lt;br /&gt;
#*;ovc&lt;br /&gt;
#*:the codec used (here  &amp;lt;tt&amp;gt;xvid&amp;lt;/tt&amp;gt;)&lt;br /&gt;
#*;xvidencopts bitrate&lt;br /&gt;
#*: the bitrate, which is an option of the xvid codec (here set to 200)&lt;br /&gt;
#*;o&lt;br /&gt;
#*:the name of the movie file (here &amp;lt;tt&amp;gt;output.avi&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
An example of this thing is the movie that I&#039;m attaching here [[sample movie]]&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=Making_a_simulation_plot_with_a_running_plot&amp;diff=1012</id>
		<title>Making a simulation plot with a running plot</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=Making_a_simulation_plot_with_a_running_plot&amp;diff=1012"/>
		<updated>2016-11-04T11:53:03Z</updated>

		<summary type="html">&lt;p&gt;Randisi: Randisi moved page Making a simulation plot with a running plot to Making a simulation movie with a running plot&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Making a simulation movie with a running plot]]&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=Making_a_simulation_movie_with_a_running_plot&amp;diff=1011</id>
		<title>Making a simulation movie with a running plot</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=Making_a_simulation_movie_with_a_running_plot&amp;diff=1011"/>
		<updated>2016-11-04T11:53:03Z</updated>

		<summary type="html">&lt;p&gt;Randisi: Randisi moved page Making a simulation plot with a running plot to Making a simulation movie with a running plot&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Page currently under construction&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It&#039;s a cool visualisation tool to see a movie of some structure in cogli1 together with some quantity of interest relevant to the structure itself. &lt;br /&gt;
&lt;br /&gt;
In order to do that, the pipeline is:&lt;br /&gt;
&lt;br /&gt;
# Create the simulation snapshots with &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;povray&amp;lt;/tt&amp;gt;. This might take a few minutes or a few days depending on the length and resolution of your movie, so you want to start doing this before anything else. Also before producing the final high-quality simulation snapshots you might want to produce a low-quality-quickly-generated preview, by lowering the resolution.&lt;br /&gt;
# Create the plots of the quantity with gnuplot. This can be done with e.g. the following &amp;lt;tt&amp;gt;gnuplot&amp;lt;/tt&amp;gt; commands ,which should work in &amp;lt;tt&amp;gt;gnuplot&amp;lt;/tt&amp;gt; &amp;gt;=4.6. If you&#039;re stuck with an old version of gnuplot that doesn&#039;t support for loops, you can use another program to generate a text file that writes the instructions to be performed at every iteration of the loop, and then run the resulting script in gnuplot.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set term png linewidth 4 font &#039;arial,28pt&#039; size 3200,600&lt;br /&gt;
set xrange [25e3:25e3*40]&lt;br /&gt;
set yrange [-1.42; -1.24]&lt;br /&gt;
do for [i = 0:39]{ set out &#039;plot_&#039;.i.&#039;.png&#039;;  plot &#039;energy.dat&#039; every 1000::1000::1000*(i+1) w lp }&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
notice that several things should be changed here according to your needs, including: &lt;br /&gt;
#*the term type (to change the font, resolution, linewidth, etc). The resolution should be compatible with the one of the simulation snapshots&lt;br /&gt;
#* the xrange (to make sure that it fits all the points, just barely)&lt;br /&gt;
#* the yrange (to make sure that everything fits as needed)&lt;br /&gt;
#* the plot command (to change the appearence of the plot, the line-type, how many frames do we have, whether to print the observable only when we have a frame or for all the frames up until a point, etc.).&lt;br /&gt;
#* possibly adding some modifiers before plotting, including title, xlabel, ylabel, etc, a grid, etc.&lt;br /&gt;
#* any other edit you might wish to make&lt;br /&gt;
# After both points above are finished, you can compose the images by either pasting the plots on the simulation snapshots, or appending the images together. This can easily be done with `convert` on linux and cygwin, with either of the following 2 lines: TO SUPERIMPOSE THE PLOT TO THE SIMULATION SNAPSHOT``&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for i in {0..39}; do convert trajectory.dat_${i}_time_*.png plot_${i}.png -composite output_${i}.png; done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
OR TO APPEND IT ABOVE IT&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for i in {0..39}; do convert trajectory.dat_${i}_time_*.png plot_${i}.png -append output_${i}.png; done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
swap the order of the plots and the simulations snapshots above to have the plot display below the simulation system instead.&lt;br /&gt;
# Convert the png files into a movie, with &amp;lt;tt&amp;gt;mencoder&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;ffmpeg&amp;lt;/tt&amp;gt;, as usual, with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
mencoder mf://@storyboard.txt -mf w=3200:h=2400:fps=6:type=png -ovc xvid -xvidencopts bitrate=200 -o output.avi` where the keys mean:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
#*;w and h&lt;br /&gt;
#*:respectively the width and hegiht of the movie (in pixels, here 3200 and 2400). This should be the same as the output_*.png files if you don&#039;t want the screen to view to be distorted.&lt;br /&gt;
#*;fps&lt;br /&gt;
#*:the number of frames per second (here 6).&lt;br /&gt;
#*;png&lt;br /&gt;
#*:the type of image (here png)&lt;br /&gt;
#*;ovc&lt;br /&gt;
#*:the codec used (here  &amp;lt;tt&amp;gt;xvid&amp;lt;/tt&amp;gt;)&lt;br /&gt;
#*;xvidencopts bitrate&lt;br /&gt;
#*: the bitrate, which is an option of the xvid codec (here set to 200)&lt;br /&gt;
#*;o&lt;br /&gt;
#*:the name of the movie file (here &amp;lt;tt&amp;gt;output.avi&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
An example of this thing is the movie that I&#039;m attaching here [[sample movie]]&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=Making_a_simulation_movie_with_a_running_plot&amp;diff=1010</id>
		<title>Making a simulation movie with a running plot</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=Making_a_simulation_movie_with_a_running_plot&amp;diff=1010"/>
		<updated>2016-11-03T18:22:50Z</updated>

		<summary type="html">&lt;p&gt;Randisi: Created the page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Page currently under construction&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It&#039;s a cool visualisation tool to see a movie of some structure in cogli1 together with some quantity of interest relevant to the structure itself. &lt;br /&gt;
&lt;br /&gt;
In order to do that, the pipeline is:&lt;br /&gt;
&lt;br /&gt;
# Create the simulation snapshots with &amp;lt;tt&amp;gt;cogli1&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;povray&amp;lt;/tt&amp;gt;. This might take a few minutes or a few days depending on the length and resolution of your movie, so you want to start doing this before anything else. Also before producing the final high-quality simulation snapshots you might want to produce a low-quality-quickly-generated preview, by lowering the resolution.&lt;br /&gt;
# Create the plots of the quantity with gnuplot. This can be done with e.g. the following &amp;lt;tt&amp;gt;gnuplot&amp;lt;/tt&amp;gt; commands ,which should work in &amp;lt;tt&amp;gt;gnuplot&amp;lt;/tt&amp;gt; &amp;gt;=4.6. If you&#039;re stuck with an old version of gnuplot that doesn&#039;t support for loops, you can use another program to generate a text file that writes the instructions to be performed at every iteration of the loop, and then run the resulting script in gnuplot.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set term png linewidth 4 font &#039;arial,28pt&#039; size 3200,600&lt;br /&gt;
set xrange [25e3:25e3*40]&lt;br /&gt;
set yrange [-1.42; -1.24]&lt;br /&gt;
do for [i = 0:39]{ set out &#039;plot_&#039;.i.&#039;.png&#039;;  plot &#039;energy.dat&#039; every 1000::1000::1000*(i+1) w lp }&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
notice that several things should be changed here according to your needs, including: &lt;br /&gt;
#*the term type (to change the font, resolution, linewidth, etc). The resolution should be compatible with the one of the simulation snapshots&lt;br /&gt;
#* the xrange (to make sure that it fits all the points, just barely)&lt;br /&gt;
#* the yrange (to make sure that everything fits as needed)&lt;br /&gt;
#* the plot command (to change the appearence of the plot, the line-type, how many frames do we have, whether to print the observable only when we have a frame or for all the frames up until a point, etc.).&lt;br /&gt;
#* possibly adding some modifiers before plotting, including title, xlabel, ylabel, etc, a grid, etc.&lt;br /&gt;
#* any other edit you might wish to make&lt;br /&gt;
# After both points above are finished, you can compose the images by either pasting the plots on the simulation snapshots, or appending the images together. This can easily be done with `convert` on linux and cygwin, with either of the following 2 lines: TO SUPERIMPOSE THE PLOT TO THE SIMULATION SNAPSHOT``&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for i in {0..39}; do convert trajectory.dat_${i}_time_*.png plot_${i}.png -composite output_${i}.png; done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
OR TO APPEND IT ABOVE IT&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for i in {0..39}; do convert trajectory.dat_${i}_time_*.png plot_${i}.png -append output_${i}.png; done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
swap the order of the plots and the simulations snapshots above to have the plot display below the simulation system instead.&lt;br /&gt;
# Convert the png files into a movie, with &amp;lt;tt&amp;gt;mencoder&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;ffmpeg&amp;lt;/tt&amp;gt;, as usual, with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ls -1v output_*.png &amp;gt; storyboard.txt&lt;br /&gt;
mencoder mf://@storyboard.txt -mf w=3200:h=2400:fps=6:type=png -ovc xvid -xvidencopts bitrate=200 -o output.avi` where the keys mean:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
#*;w and h&lt;br /&gt;
#*:respectively the width and hegiht of the movie (in pixels, here 3200 and 2400). This should be the same as the output_*.png files if you don&#039;t want the screen to view to be distorted.&lt;br /&gt;
#*;fps&lt;br /&gt;
#*:the number of frames per second (here 6).&lt;br /&gt;
#*;png&lt;br /&gt;
#*:the type of image (here png)&lt;br /&gt;
#*;ovc&lt;br /&gt;
#*:the codec used (here  &amp;lt;tt&amp;gt;xvid&amp;lt;/tt&amp;gt;)&lt;br /&gt;
#*;xvidencopts bitrate&lt;br /&gt;
#*: the bitrate, which is an option of the xvid codec (here set to 200)&lt;br /&gt;
#*;o&lt;br /&gt;
#*:the name of the movie file (here &amp;lt;tt&amp;gt;output.avi&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
An example of this thing is the movie that I&#039;m attaching here [[sample movie]]&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=Pseudoknot&amp;diff=1009</id>
		<title>Pseudoknot</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=Pseudoknot&amp;diff=1009"/>
		<updated>2016-09-14T20:34:39Z</updated>

		<summary type="html">&lt;p&gt;Randisi: Randisi moved page Pseudoknot to Pseudoknot formation: Title was too uninformative: now it&amp;#039;s clear that the important bit is how to FORM a pseudoknot.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Pseudoknot formation]]&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=Pseudoknot_formation&amp;diff=1008</id>
		<title>Pseudoknot formation</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=Pseudoknot_formation&amp;diff=1008"/>
		<updated>2016-09-14T20:34:39Z</updated>

		<summary type="html">&lt;p&gt;Randisi: Randisi moved page Pseudoknot to Pseudoknot formation: Title was too uninformative: now it&amp;#039;s clear that the important bit is how to FORM a pseudoknot.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Examples]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
One of the features of the model implemented in oxDNA is that it has a&lt;br /&gt;
three-dimensional structure, so that it automatically incorporates&lt;br /&gt;
topological effects (see [[Publications|Ref 3]]). In this example we will see how&lt;br /&gt;
to initialise a single strand in with a sequence designed to form a&lt;br /&gt;
pseudoknot in its final configuration.&lt;br /&gt;
&lt;br /&gt;
The simplest option is to just generate a single strand with the right&lt;br /&gt;
sequence, let it run at low temperature and wait for it to form the&lt;br /&gt;
pseudoknot.  Unfortunately, this can be very slow, as the formation of the&lt;br /&gt;
pseudoknot requires two rare events (the closure of two hairpins). One&lt;br /&gt;
should keep in mind that lowering the temperature to drive the formation of&lt;br /&gt;
the pseuoknot can backfire, since the life of metastable states becomes&lt;br /&gt;
longer and longer.  Nevertheless, this is a perfectly acceptable solution.&lt;br /&gt;
&lt;br /&gt;
A second option is to design a specific sequence, where we use &amp;quot;arbitrary&amp;quot;&lt;br /&gt;
bases that only bind to one specific other base. This allows one to eliminate&lt;br /&gt;
metastable states in the pseudoknot formation, so that one can safely lower&lt;br /&gt;
the temperature at will (keeping in mind that the model is physically&lt;br /&gt;
meaningful only at temperatures where water is liquid).&lt;br /&gt;
&lt;br /&gt;
A third option is to drive the formation of the pseudoknot with artificial&lt;br /&gt;
forces, as done in the [[Hairpin_formation|hairpin formation]] example. This is probably the&lt;br /&gt;
most time-effective solution but requires a bit more work.&lt;br /&gt;
&lt;br /&gt;
We study the following sequence that is expected to form, at low enough temperature,&lt;br /&gt;
pesudoknot with two 6-base pair stems and two 8-base loops:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;GTGCCGAAAAAAAACGCGAGACGGCACAAAAAAAACTCGCG&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files needed to run this example are in the&lt;br /&gt;
&amp;lt;tt&amp;gt;${oxDNA}/EXAMPLES/PSEUDOKNOT&amp;lt;/tt&amp;gt; directory and its subdirectories.&lt;br /&gt;
&lt;br /&gt;
==Option 1: spontaneous formation==&lt;br /&gt;
You can run this example directly in the &amp;lt;tt&amp;gt;OPT1/&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
First, we use the configuration generator to generate an input&lt;br /&gt;
configuration for a single strand. The box size does not matter as long as&lt;br /&gt;
it is big enough to contain the structure, so 30 s.u. will do. The file&lt;br /&gt;
&amp;lt;tt&amp;gt;pkseq.txt&amp;lt;/tt&amp;gt; contains the above sequence. So, run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;../../../UTILS/generate-sa.py 30. pkseq.txt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which generates &amp;lt;tt&amp;gt;generated.dat&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;generated.top&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Now, we choose to run a Brownian dynamics simulation since it is much more&lt;br /&gt;
efficient than Monte Carlo (in our implementation) in exploring phase&lt;br /&gt;
space. We use the standard &amp;quot;aggressive&amp;quot; values for the thermostat (see&lt;br /&gt;
[Thermostat]). We use the average model in this example.  We set a fairly&lt;br /&gt;
low temperature, let&#039;s say 20 Celsius, significantly below the melting&lt;br /&gt;
temperature of the two hairpins in the average-base representation.  A long&lt;br /&gt;
simulation might be needed, so we start with 10^9 total steps.&lt;br /&gt;
&lt;br /&gt;
We can thus run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;../../../Release/oxDNA inputMD1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and wait (possibly a long time) until the pseudoknot forms. It is not&lt;br /&gt;
guaranteed that the structure will for within the quite long simulation. To&lt;br /&gt;
detect its formation, we can run the &amp;lt;tt&amp;gt;structure analyser&amp;lt;/tt&amp;gt; to detect&lt;br /&gt;
the formation of the correct bonds. Also, in the 5th column in the energy&lt;br /&gt;
file (extensive base-pairing contribution to the total energy) you expect a&lt;br /&gt;
number close to -8 for the formed structure (-0.7 times 12 base pairs). A&lt;br /&gt;
single hairpin will have around half of that.&lt;br /&gt;
&lt;br /&gt;
==Option 2: specific sequence==&lt;br /&gt;
You can run this example directly in the &amp;lt;tt&amp;gt;OPT2/&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
In this case, we have to repeat the all the steps above except that we need&lt;br /&gt;
to manually tweak the topology file to have specific binding of the bases.&lt;br /&gt;
&lt;br /&gt;
So, again generate the initial configuration with &amp;lt;tt&amp;gt;generate-sa.py&amp;lt;/tt&amp;gt;&lt;br /&gt;
and copy the topology file to a new one. The example directory already&lt;br /&gt;
contains a working specific topology file for the impatient.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cp generated.dat specific.dat&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As discussed in the description of the topology file, specific bases can be set up with&lt;br /&gt;
two-digit numbers in the second column of the topology file, and&lt;br /&gt;
complementarity is implemented if the sum is equal to 3 (negative numbers&lt;br /&gt;
can be used). So if we want&lt;br /&gt;
base number 0 and 26 to be bound, we can set their &amp;quot;type&amp;quot; (second column)&lt;br /&gt;
to be 100 and -97, respectively. Pay close attention when modifying by hand&lt;br /&gt;
the topology file, since it is very easy to make mistakes (base types don&#039;t add&lt;br /&gt;
up to 3, using the wrong number, etc.). It makes sense to automatise this&lt;br /&gt;
task.&lt;br /&gt;
&lt;br /&gt;
In this case, we want bases 0-5 to be bound to bases 26-21 and bases 14-19&lt;br /&gt;
to be bound to bases 41-36. Modify the topology file so that complementary&lt;br /&gt;
pairs have types corresponding to numbers with magnitude grater than 10 and&lt;br /&gt;
that add up to 3. The poly-A sections in the loop can be left as&lt;br /&gt;
&amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt;&#039;s in the topology file.&lt;br /&gt;
&lt;br /&gt;
If you look into the file &amp;lt;tt&amp;gt;inputMD2&amp;lt;/tt&amp;gt;, you will see that it is the&lt;br /&gt;
same as &amp;lt;tt&amp;gt;inputMD1&amp;lt;/tt&amp;gt; except that it uses &amp;lt;tt&amp;gt;specific.top&amp;lt;/tt&amp;gt; as the&lt;br /&gt;
topology file. If you decide to use the ready specific topology file, just&lt;br /&gt;
copy it to &amp;lt;tt&amp;gt;specific.top&amp;lt;/tt&amp;gt;. The temperature has also been lowered to&lt;br /&gt;
0C, since we expect no unwanted metastable states.&lt;br /&gt;
&lt;br /&gt;
You can now run the code and see what happens. It should make base-pairs&lt;br /&gt;
more rarely, but it should make only correct ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;../../../Release/oxDNA inputMD2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Option 3: forced formation==&lt;br /&gt;
Why wait if we just want to form a structure and are not interested in how&lt;br /&gt;
it forms? The mutual_trap force is implemented exactly to form initial&lt;br /&gt;
configurations, although one should bear in mind that while using external forces such as the mutual_trap force, the simulation path itself will be unphysical. But getting an initial&lt;br /&gt;
configuration is sometimes half of the job.&lt;br /&gt;
&lt;br /&gt;
In this case we can use either of the topology files described above. We&lt;br /&gt;
choose to use Monte Carlo, though, so that we don&#039;t have to worry about&lt;br /&gt;
tweaking the magnitude of the traps and the thermostat parameters not to&lt;br /&gt;
make the system explode.&lt;br /&gt;
&lt;br /&gt;
First of all, we have to generate a file where we specify the external&lt;br /&gt;
forces. We set up 4 traps, a mutual trap between particles 0 and 26 and a&lt;br /&gt;
mutual trap between particles 14 and 39. These should be enough to drive&lt;br /&gt;
the formation of the two stems in a relatively short time.&lt;br /&gt;
&lt;br /&gt;
So, for each of the pairs, we set up a trap like this in &amp;lt;tt&amp;gt;external.conf&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  type = mutual_trap&lt;br /&gt;
  particle = 0&lt;br /&gt;
  ref_particle = 26&lt;br /&gt;
  stiff = 1.&lt;br /&gt;
  r0 = 1.5&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
  type = mutual_trap&lt;br /&gt;
  particle = 26&lt;br /&gt;
  ref_particle = 0&lt;br /&gt;
  stiff = 1.&lt;br /&gt;
  r0 = 1.5&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Repeat the same block with the indexes 0 and 26 changed to 14 and 39. &lt;br /&gt;
&lt;br /&gt;
The file &amp;lt;tt&amp;gt;inputMC&amp;lt;/tt&amp;gt; is a Monte Carlo input file with everything set&lt;br /&gt;
up to use the &amp;lt;tt&amp;gt;external.conf&amp;lt;/tt&amp;gt; file you just created.&lt;br /&gt;
&lt;br /&gt;
Running the program&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;../../../Release/oxDNA inputMC&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should produce a pseudoknot within an hour, maybe faster. In this case&lt;br /&gt;
we don&#039;t need the temperature to drive the formation of the motif, so we&lt;br /&gt;
can use room temperature.&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=Main_Page&amp;diff=1007</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=Main_Page&amp;diff=1007"/>
		<updated>2016-09-14T18:40:27Z</updated>

		<summary type="html">&lt;p&gt;Randisi: added me as per sourceforge page. People might want to update their affiliation though.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== oxDNA == &lt;br /&gt;
&lt;br /&gt;
oxDNA is a simulation code originally developed to implement the coarse-grained DNA model introduced by T. E. Ouldridge, J. P. K. Doye and A. A. Louis. It has been since reworked and it is now an extensible simulation+analysis framework. It natively supports DNA (oxDNA model), RNA (oxRNA model), Lennard-Jones and patchy particle simulations on both CPUs and NVIDIA GPUs.&lt;br /&gt;
&lt;br /&gt;
The code implements Monte Carlo and Molecular Dynamics and can be used as a basis to numerically study DNA, RNA, Lennard-Jones and patchy particle systems. The developers are F. Romano, P. Šulc, B. Snodin, F. Randisi and T. E. Ouldridge in the [http://physchem.ox.ac.uk/~doye/jon/ Doye] and [http://www-thphys.physics.ox.ac.uk/people/ArdLouis/ Louis] groups at the University of Oxford and L. Rovigatti, formerly in the [http://pacci.phys.uniroma1.it/?q=node/40 Sciortino] group in Rome and now in the [http://comp-phys.univie.ac.at/homepages/homepage-likos/likos-group/ Likos] group in Vienna. Additionally, Molecular Dynamics simulations modeling DNA-linked nanoparticles have been implemented by J. Hendricks, T. Fochtman, and B. Walcutt in the [http://self-assembly.net/ Patitz] group at the University of Arkansas.&lt;br /&gt;
&lt;br /&gt;
The oxDNA and oxRNA models are intended to provide a physical representation of the thermodynamic and mechanical properties of single- and double-stranded DNA and RNA, as well as the transition between the two. At the same time, the representation of DNA and RNA is sufficiently simple to allow access to assembly processes which occur on long timescales, beyond the reach of atomistic simulations. Basic examples include duplex formation from single strands, and the folding of a self-complementary single strand into a hairpin. These are the underlying processes of the fast-growing field of  [http://en.wikipedia.org/wiki/DNA_nanotechnology DNA nanotechnology] and RNA nanotechnology, as well as many biophysical uses of DNA/RNA, allowing the model to be used to understand these fascinating systems.&lt;br /&gt;
&lt;br /&gt;
* [[Download and Installation]]&lt;br /&gt;
&lt;br /&gt;
* [[Features]]&lt;br /&gt;
&lt;br /&gt;
* [[DNA model introduction]]&lt;br /&gt;
&lt;br /&gt;
* [[RNA model introduction]]&lt;br /&gt;
&lt;br /&gt;
* [[Documentation]]&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Examples|Examples]]&lt;br /&gt;
&lt;br /&gt;
* [[Screenshots|Screenshots and movies]]&lt;br /&gt;
&lt;br /&gt;
* [[Gallery of studied systems]]&lt;br /&gt;
&lt;br /&gt;
* [[Publications]]&lt;br /&gt;
&lt;br /&gt;
* [[Gallery of Journal Covers]]&lt;br /&gt;
&lt;br /&gt;
* [[License and Copyright]]&lt;br /&gt;
&lt;br /&gt;
* [[Previous version]]&lt;br /&gt;
&lt;br /&gt;
* [[Contact information]]&lt;br /&gt;
&lt;br /&gt;
== News ==&lt;br /&gt;
* Code implementing [[DNA_model_introduction#oxDNA2|oxDNA2]], a new version of the oxDNA model, is now included in the latest release. See the recent arXiv publication [http://arxiv.org/abs/1504.00821] for more information about the new model.&lt;br /&gt;
* Follow the latest updates about oxDNA on our twitter account: [https://twitter.com/ox_dna ox_dna]&lt;br /&gt;
* You can post questions about the installation and usage of our code to the newly created [http://sourceforge.net/p/oxdna/discussion/ Discussion forum] for oxDNA at sourceforge.net&lt;br /&gt;
&lt;br /&gt;
== Acknowledgments ==&lt;br /&gt;
&lt;br /&gt;
We thank our co-workers C. Matek, R. Harrison and W. Smith for having contributed bits of code and/or material for the examples and our webmasters Russell Jones and Greg Agacinski for maintaining the website.&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=Documentation&amp;diff=1006</id>
		<title>Documentation</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=Documentation&amp;diff=1006"/>
		<updated>2016-07-08T14:59:11Z</updated>

		<summary type="html">&lt;p&gt;Randisi: Added documentation of a few options that were documented in the README, but undocumented here on the wiki&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Compile options==&lt;br /&gt;
&lt;br /&gt;
Compiling oxDNA requires that you have a working &amp;lt;tt&amp;gt;cmake&amp;lt;/tt&amp;gt; software and C++ compiler on your machine. The instructions are provided in the [[Download and Installation]] section.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;oxDNA input_file&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The input file contains all the relevant information for the program to run, such as what initial configuration to use, the topology of the system, how often to print the energies to a file, etc. Please make sure you read the [[Thermostat|thermostat]] page if you use molecular dynamics.&lt;br /&gt;
&lt;br /&gt;
==Input file==&lt;br /&gt;
&lt;br /&gt;
As always in UNIX environments, everything is case sensitive.&lt;br /&gt;
&lt;br /&gt;
*Options are in the form key = value&lt;br /&gt;
*There can be arbitrary spaces before and after both key and value&lt;br /&gt;
*Line with a leading # will be treated as comments&lt;br /&gt;
*The | (pipe) sign is the separator between the different values that can be used to specify a value for the key.&lt;br /&gt;
*Keys between [ and ] are optional, the value after the equal sign is the default value&lt;br /&gt;
&lt;br /&gt;
Here we provide a list of the most commonly used input options. The complete and most up-to-date list of possible options can be found [[Input_options|here]] or in the &amp;lt;tt&amp;gt;README&amp;lt;/tt&amp;gt; file in the main directory of the simulation code.&lt;br /&gt;
&lt;br /&gt;
The input options of the previous oxDNA version can be found [[Input_options_of_the_previous_version|here]].&lt;br /&gt;
&lt;br /&gt;
===Generic options===&lt;br /&gt;
The options listed here define the generic behavior of the entire program.&lt;br /&gt;
;[interaction_type = DNA]: DNA|DNA2|RNA|patchy|LJ&lt;br /&gt;
: (selects the model for the simulation. DNA ([[DNA_model_introduction|oxDNA model]]) is the default option. DNA2 ([[DNA_model_introduction#oxDNA2|oxDNA2 model]]), RNA ([[RNA_model_introduction|oxRNA model]]), LJ (Lennard-Jones) and patchy particles are also implemented&lt;br /&gt;
;[sim_type=MD]: MD|MC|VMMC&lt;br /&gt;
:MD = Molecular Dynamics, MC = Monte Carlo, VMMC = Virtual Move Monte Carlo&lt;br /&gt;
;backend: CPU | CUDA &lt;br /&gt;
: (only sim_type=MD is supported if you choose CUDA backend)&lt;br /&gt;
;backend_precision: float|double|mixed&lt;br /&gt;
: (mixed option is available only for CUDA backend. It is recommended choice for optimal performance on CUDA machines, double is recommended for CPU simulations)&lt;br /&gt;
;[debug=0]: 0|1&lt;br /&gt;
: 1 if you want verbose logs, 0 otherwise.&lt;br /&gt;
&lt;br /&gt;
===Simulation options===&lt;br /&gt;
	The options listed here specify the behaviour of the simulation.&lt;br /&gt;
&lt;br /&gt;
;steps: number of steps to be performed.&lt;br /&gt;
		&lt;br /&gt;
;[restart_step_counter=0]: 0|1&lt;br /&gt;
:0 means that the step counter will start from the value read in the configuration file; if 1, the step counter will be reset to 0. The total duration of the simulation is unchanged.&lt;br /&gt;
			&lt;br /&gt;
;[seed=time(NULL)]: seed for the random number generator. On Unix systems, it will use by default a number from /dev/urandom + time(NULL)&lt;br /&gt;
		&lt;br /&gt;
;T: temperature of the simulation. It can be expressed in simulation units or kelvin (append a k or K after the value) or celsius (append a c or C after the value).&lt;br /&gt;
:Examples:&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! Value&lt;br /&gt;
! Simulation Units&lt;br /&gt;
|-&lt;br /&gt;
| 0.1&lt;br /&gt;
| 0.1&lt;br /&gt;
|-&lt;br /&gt;
| 300 K&lt;br /&gt;
| 0.1&lt;br /&gt;
|-&lt;br /&gt;
| 300k&lt;br /&gt;
| 0.1&lt;br /&gt;
|-&lt;br /&gt;
| 26.85c&lt;br /&gt;
| 0.1&lt;br /&gt;
|-&lt;br /&gt;
| 26.85 C &lt;br /&gt;
| 0.1&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
;[fix_diffusion=1]: 0|1&lt;br /&gt;
:If true, particles that leave the simulation box are brought back in via periodic boundary conditions. Defaults to true.		&lt;br /&gt;
;verlet_skin: if a particle moves more than verlet_skin then the lists will be updated. Its name is somewhat misleading: the actual verlet skin is 2*verlet_skin.&lt;br /&gt;
&lt;br /&gt;
;[back_in_box=0]: 0|1&lt;br /&gt;
whether particles should be brought back into the box when a configuration is printed or not, defaults to false&lt;br /&gt;
	&lt;br /&gt;
;salt_concentration: used if interaction_type = DNA2. It specifies the salt concentration in M.&lt;br /&gt;
&lt;br /&gt;
;[use_average_seq=1]: 0|1&lt;br /&gt;
: specifies whether to use the default hard-coded average parameters for base-pairing and stacking interaction strengths or not. If sequence dependence is to be used, set this to 0 and specify seq_dep_file.&lt;br /&gt;
	&lt;br /&gt;
;[seq_dep_file]: specifies the file from which the sequence dependent parameters should be read. Mandatory if use_average_seq=no, ignored otherwise. A sample file is provided (sequence_dependent_parameters.txt).&lt;br /&gt;
&lt;br /&gt;
;[external_forces=0]: 0|1&lt;br /&gt;
: specifies whether there are external forces acting on the nucleotides or not. If it is set to 1, then a file which specifies the external forces&#039; configuration has to be provided (see external_forces_file).&lt;br /&gt;
&lt;br /&gt;
;[external_forces_file]: specifies the file containing all the external forces&#039; configurations. Currently there are six supported force types (see EXAMPLES/TRAPS for some examples):&lt;br /&gt;
:*string&lt;br /&gt;
:*twist&lt;br /&gt;
:*trap&lt;br /&gt;
:*repulsion_plane&lt;br /&gt;
:*repulsion_plane_moving&lt;br /&gt;
:*mutual_trap&lt;br /&gt;
	&lt;br /&gt;
====Molecular dynamics simulations options====&lt;br /&gt;
&lt;br /&gt;
;dt: time step of the integration.&lt;br /&gt;
&lt;br /&gt;
;thermostat: no|refresh|brownian &lt;br /&gt;
:no means no thermostat will be used. refresh will refresh all the particle&#039;s velocities from a maxwellian every newtonian_steps steps. john is an Anderson-like thermostat (see pt). Make sure you read [[Thermostat|thermostat]].&lt;br /&gt;
&lt;br /&gt;
;newtonian_steps: required if thermostat != no&lt;br /&gt;
:number of steps after which a procedure of thermalization will be performed.&lt;br /&gt;
			&lt;br /&gt;
;pt: used if thermostat == john. It&#039;s the probability that a particle&#039;s velocity will be refreshed during a thermalization procedure.&lt;br /&gt;
		&lt;br /&gt;
;diff_coeff: required if pt is not specified&lt;br /&gt;
:used internally to automatically compute the pt that would be needed if we wanted such a self diffusion coefficient. Not used if pt is set.&lt;br /&gt;
&lt;br /&gt;
====Monte Carlo simulations options====&lt;br /&gt;
	&lt;br /&gt;
;[check_energy_every=10]: this number times print_energy_every gives the number of steps after which the energy will be computed from scratch and checked against the actual value computed adding energy differences.&lt;br /&gt;
		&lt;br /&gt;
;[check_energy_threshold=1e-4]:	if abs((old_energy - new_energy)/old_energy) &amp;gt; check_energy_threshold then the program will die and warn the user.&lt;br /&gt;
	&lt;br /&gt;
;ensemble: NVT&lt;br /&gt;
:ensemble of the simulation. More ensembles could be added in future versions.&lt;br /&gt;
	&lt;br /&gt;
;delta_translation: maximum displacement (per dimension) for translational moves in simulation units.&lt;br /&gt;
	&lt;br /&gt;
;delta_translation: maximum displacement for rotational moves in simulation units.&lt;br /&gt;
&lt;br /&gt;
===Input/output===&lt;br /&gt;
The options listed here are used to manage the I/O (read and write configurations, energies and so on)&lt;br /&gt;
	&lt;br /&gt;
;conf_file: initial configuration file. &lt;br /&gt;
		&lt;br /&gt;
;topology: file containing the system&#039;s topology.&lt;br /&gt;
		&lt;br /&gt;
;trajectory_file: the main output of the program. All the configurations will be appended to this file as they are printed.&lt;br /&gt;
		&lt;br /&gt;
;[confs_to_skip=0]: valid only if conf_file is a trajectory. Skip the first confs_to_skip configurations and then load in memory the (confs_to_skip+1)th.&lt;br /&gt;
		&lt;br /&gt;
;[lastconf_file=last_conf.dat]: this is the file where the last configuration is saved (when the program finishes or is killed). Set to last_conf.dat by default&lt;br /&gt;
&lt;br /&gt;
;[lastconf_file_bin]: path to the file where the last configuration will be printed in binary format, if not specified no binary configurations will be printed.&lt;br /&gt;
&lt;br /&gt;
;[binary_initial_conf=0]: 0|1&lt;br /&gt;
whether the initial configuration is a binary configuration or not&lt;br /&gt;
&lt;br /&gt;
;[refresh_vel=0]: 0|1&lt;br /&gt;
:if 1 the initial velocities will be refreshed from a maxwellian.&lt;br /&gt;
	&lt;br /&gt;
;energy_file: energy output file.&lt;br /&gt;
		&lt;br /&gt;
;[print_energy_every=1000]: this will make the program print the energies every print_energy_every steps.&lt;br /&gt;
		&lt;br /&gt;
;[no_stdout_energy=0]: 0|1&lt;br /&gt;
:if 1 the energy will be printed just to the energy_file.&lt;br /&gt;
		&lt;br /&gt;
;[time_scale=linear]: linear|log_lin&lt;br /&gt;
:using linear configurations will be saved every print_conf_interval.&lt;br /&gt;
:using log_lin configurations will be saved logarithmically for print_conf_ppc times. After that the logarithmic sequence will restart.&lt;br /&gt;
&lt;br /&gt;
; [print_conf_ppc times]:&lt;br /&gt;
mandatory only if time_scale == log_line. This is the number of printed configurations in a single logarithmic cycle.&lt;br /&gt;
	&lt;br /&gt;
;print_conf_interval: linear interval if time_scale == linear. First step of the logarithmic scale if time_scale == log_lin.&lt;br /&gt;
		&lt;br /&gt;
;[print_reduced_conf_every=0]: every print_reduced_conf_every steps the program will print out the reduced configurations (i.e. confs containing only the centers of mass of strands).&lt;br /&gt;
&lt;br /&gt;
;reduced_conf_output_dir: used if print_reduced_conf_every &amp;gt; 0&lt;br /&gt;
:output directory for reduced_conf files.&lt;br /&gt;
		&lt;br /&gt;
;[log_file=stderr]: file where generic and debug informations will be logged. If not specified then stderr will be used.&lt;br /&gt;
&lt;br /&gt;
;[print_timings = 0]: 0|1&lt;br /&gt;
whether oxDNA should print out to a file performance timings at the end of the simulation or not.&lt;br /&gt;
&lt;br /&gt;
;[timings_filename]: path to the file where timings will be printed&lt;br /&gt;
&lt;br /&gt;
;[output_prefix]: the name of all output files will be preceded by this prefix, defaults to an empty string&lt;br /&gt;
&lt;br /&gt;
;[print_input = 0]: 0|1&lt;br /&gt;
make oxDNA write the input key=value pairs used by the simulation in a file named input.pid, with pid being the oxDNA pid.&lt;br /&gt;
&lt;br /&gt;
;[equilibration_steps]: number of equilibration steps. During equilibration, oxDNA does not generate any output. Defaults to 0&lt;br /&gt;
==Output files==&lt;br /&gt;
*The log file contains all the relevant information about the simulation (specified options, activated external forces, warnings about misconfigurations, critical errors, etc.). If the log file is omitted, all this information will be displayed on the standard output.&lt;br /&gt;
&lt;br /&gt;
*The energy file layout for MD simulations is&lt;br /&gt;
&lt;br /&gt;
:{|&lt;br /&gt;
| [time (steps * dt)]&lt;br /&gt;
| [potential energy]&lt;br /&gt;
| [kinetic energy]&lt;br /&gt;
| [total energy]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
:while for MC simulations is&lt;br /&gt;
&lt;br /&gt;
:{|&lt;br /&gt;
| [time (steps)]&lt;br /&gt;
| [potential energy]&lt;br /&gt;
| [acceptance ratio for translational moves]&lt;br /&gt;
| [acceptance ratio for rotational moves]&lt;br /&gt;
| [acceptance ratio for volume moves]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
:VMMC output also produces the following extra columns if umbrella sampling is enabled&lt;br /&gt;
:{|&lt;br /&gt;
|[order parameter coordinate 1]&lt;br /&gt;
|[order parameter coordinate 1]&lt;br /&gt;
|...&lt;br /&gt;
|[order parameter coordinate n]&lt;br /&gt;
|[current weight]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
:N.B. potential, kinetic and total energies are divided by the total number of particles.&lt;br /&gt;
&lt;br /&gt;
*Configurations are saved in the trajectory file.&lt;br /&gt;
&lt;br /&gt;
==Configuration and topology files==&lt;br /&gt;
The current state of a system, as specified by oxDNA, is described by two files: a configuration file and a topology file. The configuration file contains all the general information (timestep, energy and box size) and the orientations and positions of each nucleotide. The topology file, on the other hand, keeps track of the backbone-backbone bonds between nucleotides in the same strand. Working configuration and topology files can be found in the &amp;lt;tt&amp;gt;[[Examples|EXAMPLES]]&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
===Configuration file===&lt;br /&gt;
The first three rows of a configuration file contain the timestep &amp;lt;tt&amp;gt;T&amp;lt;/tt&amp;gt; at which the configuration has been printed, the length of the box sides &amp;lt;tt&amp;gt;Lx&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;Ly&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Lz&amp;lt;/tt&amp;gt; and the total, potential and kinetic energies, &amp;lt;tt&amp;gt;Etot&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;U&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;K&amp;lt;/tt&amp;gt;, respectively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
t = T&lt;br /&gt;
b = Lz Ly Lz&lt;br /&gt;
E = Etot U K&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after this header, each row contains position of the centre of mass, orientation, velocity and angular velocity of a single nucleotide in the following order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\overbrace{r_x r_y r_z}^{\rm Position} \overbrace{b_x b_y b_z}^{\rm Backbone-base versor} \overbrace{n_x n_y n_z}^{\rm Normal versor} \overbrace{v_x v_y v_z}^{\rm Velocity} \overbrace{L_x L_y L_z}^{\rm Angular velocity}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Topology file===&lt;br /&gt;
The topology file stores the intra-strand, fixed bonding topology (i.e. which nucleotides share backbone links). The first row contains the total number of nucleotides &amp;lt;tt&amp;gt;N&amp;lt;/tt&amp;gt; and the number of strands &amp;lt;tt&amp;gt;Ns&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
N Ns&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this header, the &amp;lt;tt&amp;gt;i&amp;lt;/tt&amp;gt;-th row specifies strand, base and 3&#039; and 5&#039; neighbors of the &amp;lt;tt&amp;gt;i&amp;lt;/tt&amp;gt;-th nucleotide in this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S B 3&#039; 5&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where S is the index of the strand (starting from 1) which the nucleotide belongs to, B is the base and 3&#039; and 5&#039; specify the index of the nucleotides with which the &amp;lt;tt&amp;gt;i&amp;lt;/tt&amp;gt;-th nucleotide is bonded in the 3&#039; and 5&#039; direction, respectively. A &amp;lt;tt&amp;gt;-1&amp;lt;/tt&amp;gt; signals that the nucleotide terminates the strand in either 3&#039; or 5&#039; direction. The topology file of a strand of sequence &amp;lt;tt&amp;gt;GCGTTG&amp;lt;/tt&amp;gt; would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
6 1&lt;br /&gt;
1 G -1 1&lt;br /&gt;
1 C 0 2&lt;br /&gt;
1 G 1 3&lt;br /&gt;
1 T 2 4&lt;br /&gt;
1 T 3 5&lt;br /&gt;
1 G 4 -1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Specifying the topology in this way can simplify the process of simulating, for example, circular DNA.&lt;br /&gt;
&lt;br /&gt;
===Generation of initial configurations===&lt;br /&gt;
In order to generate initial configuration and topology files, we provide the &amp;lt;tt&amp;gt;${oxDNA}/UTILS/generate-sa.py&amp;lt;/tt&amp;gt; script. The usage of the script is&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;generate-sa.py &amp;lt;box side&amp;gt; &amp;lt;file with sequence&amp;gt;&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
where &amp;lt;tt&amp;gt;&amp;lt;box side&amp;gt;&amp;lt;/tt&amp;gt; specifies the length of the box side in simulation units and &amp;lt;tt&amp;gt;&amp;lt;file with sequence&amp;gt;&amp;lt;/tt&amp;gt; contains the sequence of the strands to be generated, one row per strand. If double strands are needed, each sequence must be preceded by &amp;lt;tt&amp;gt;DOUBLE&amp;lt;/tt&amp;gt;. For example, a file containing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DOUBLE AGGGCT&lt;br /&gt;
CCTGTA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would generate a double strand with a sequence &amp;lt;tt&amp;gt;AGGGCT&amp;lt;/tt&amp;gt; and a single strand with a sequence &amp;lt;tt&amp;gt;CCTGTA&amp;lt;/tt&amp;gt;. The sequences are given in 3&#039;-5&#039; order.&lt;br /&gt;
&lt;br /&gt;
Positions and orientations of the strands are all chosen at random in such a way that the resulting initial configuration does not contain significant excluded volume interactions between nucleotides belonging to different strands. Generated single- and double-strands have helical conformations (i.e. they are in the minimum of the intra-strand interaction energy).&lt;br /&gt;
&lt;br /&gt;
The output configuration and topology are stored in &amp;lt;tt&amp;gt;generated.dat&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;generated.top&amp;lt;/tt&amp;gt;, respectively. &lt;br /&gt;
Since this script will initialize nucleotides&#039; velocities and angular velocities to 0, when performing a molecular (or Brownian) dynamics simulation remember to put &amp;lt;tt&amp;gt;refresh_vel = 1&amp;lt;/tt&amp;gt; in the [[Documentation#Input_file|input]] file.&lt;br /&gt;
&lt;br /&gt;
==Analysis of configurations==&lt;br /&gt;
The configurations produced by oxDNA can be analysed with the &amp;lt;tt&amp;gt;output_bonds&amp;lt;/tt&amp;gt; program in &amp;lt;tt&amp;gt;${oxDNA}/UTILS/process_data/&amp;lt;/tt&amp;gt; directory. This program takes as command line arguments the input file (to recover the temperature and topology file), a configuration/trajectory file and an optional number. Since &amp;lt;tt&amp;gt;output_bonds&amp;lt;/tt&amp;gt; reads analyses a single configuration, the optional number selects the configuration which it needs to analyse in the trajectory. Analysing a whole trajectory can be done by looping over a counter.&lt;br /&gt;
&lt;br /&gt;
Please note that &amp;lt;tt&amp;gt;output_bonds&amp;lt;/tt&amp;gt; is not compiled automatically. If you never compiled it, do so as described in the [[Download_and_Installation#Installation|installation instructions]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;output_bonds&amp;lt;/tt&amp;gt; can be used as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
${oxDNA}/UTILS/process_data/output_bonds &amp;lt;input_file&amp;gt; &amp;lt;trajectory_file&amp;gt; [counter]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The program outputs some debugging information to the standard error and information regarding the interaction energies to the standard output. The contributions arising from each of the terms in the potential (see the appendix of [[Publications|Ref. 2]]) are reported for each pair of nucleotides that have non-zero total interactions.&lt;br /&gt;
&lt;br /&gt;
This output can be easily parsed to analyse the configurations.&lt;br /&gt;
&lt;br /&gt;
For each pair of nucleotides that do interact in the configuration, the program prints out a line containing:&lt;br /&gt;
* The id of the two particles (starting from 0)&lt;br /&gt;
* The total interaction energy&lt;br /&gt;
* The hydrogen bonding (base pairing) energy&lt;br /&gt;
* The stacking energy&lt;br /&gt;
* The cross stacking energy&lt;br /&gt;
* The excluded volume energy&lt;br /&gt;
* The FENE interaction energy&lt;br /&gt;
* A letter indicating a status code. This will be &amp;lt;tt&amp;gt;N&amp;lt;/tt&amp;gt; for pairs that interact through bonded interactions (i.e. they are neighbors along a strand) and it will be &amp;lt;tt&amp;gt;H&amp;lt;/tt&amp;gt; when a base pair is present. Our definition of base pair is when two nucleotides have a hydrogen bonding energy less than -0.1 in simulation units (see [[Publications|Ref. 2]]).&lt;br /&gt;
&lt;br /&gt;
===Geometry of the Model===&lt;br /&gt;
In the configuration/trajectory files only the positions and orientations of the nucleotides are stored. If one wants to recover the positions of the individual interaction sites in the model, some maths need to be done.&lt;br /&gt;
&lt;br /&gt;
The position of the base, stacking and backbone sites can be recovered as follows:&lt;br /&gt;
&lt;br /&gt;
base site:     (center) + 0.40 * (axis vector)&lt;br /&gt;
&lt;br /&gt;
stacking site: (center) + 0.34 * (axis vector)&lt;br /&gt;
&lt;br /&gt;
backbone site: (center) - 0.40 * (axis_vector)&lt;br /&gt;
&lt;br /&gt;
The picture in the [[Model_introduction|introduction]] might help understanding where the sites are.&lt;br /&gt;
&lt;br /&gt;
==External Forces==&lt;br /&gt;
The code implements several types of external forces that can be imposed on the system that can be used either to simulate tension exerted on DNA or simply to accelerate the formation of secondary or tertiary structure. External forces can be tricky to treat, especially in a dynamics simulation, since they are an external source of work. Care should be taken in adjusting the time step, thermostat parameters and such.&lt;br /&gt;
&lt;br /&gt;
To enable external forces, one needs to specify &amp;lt;tt&amp;gt;external_forces = 1&amp;lt;/tt&amp;gt; in the input file and also supply an external force file to read from with the key &amp;lt;tt&amp;gt;external_forces_file = &amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The syntax of the external forces file is quite simple. Examples of such files can be found in the [[Hairpin_formation|hairpin formation]] and [[Pseudoknot|Pseudoknot formation]] examples. Each force is specified within a block contained in curly brackets. Empty lines and lines beginning with an hash symbol (&amp;lt;tt&amp;gt;#&amp;lt;/tt&amp;gt;) are ignored. Different forces require different keys to be present. If the file has the wrong syntax, oxDNA should spit out a sensible error message while parsing the file.&lt;br /&gt;
&lt;br /&gt;
The different types of forces implemented at the moment are:&lt;br /&gt;
* harmonic trap&lt;br /&gt;
* string &lt;br /&gt;
* repulsion plane&lt;br /&gt;
* mutual trap&lt;br /&gt;
&lt;br /&gt;
All forces act on the centre of the particle.&lt;br /&gt;
&lt;br /&gt;
Forces of different kinds can be combined in the same simulation. There is a maximum number of 10 external forces per particle for memory reasons. This can be manually overridden recompiling the code with a different value of the macro &amp;lt;tt&amp;gt;MAX_EXT_FORCES&amp;lt;/tt&amp;gt; (currently 10) in &amp;lt;tt&amp;gt;defs.h&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===String===&lt;br /&gt;
A string is implemented as a force that does not depend on the particle position. Its value can be constant or can change linearly with time. It is useful as it does not fluctuate with time.&lt;br /&gt;
&lt;br /&gt;
A force of this kind is specified with &amp;lt;tt&amp;gt;type = string&amp;lt;/tt&amp;gt;. The relevant keys are:&lt;br /&gt;
* &#039;&#039;&#039;particle&#039;&#039;&#039; (int) the particle on which to exert the force&lt;br /&gt;
* &#039;&#039;&#039;F0&#039;&#039;&#039; (float) the value of the force at time = 0 in simulation units (please note that the value of the time may or may not be reset when starting a simulation, depending on the input file)&lt;br /&gt;
* &#039;&#039;&#039;rate&#039;&#039;&#039; (float) growing rate of the force (simulation units/time steps). Typical values are very small (&amp;lt; 10^(-5))&lt;br /&gt;
* &#039;&#039;&#039;dir&#039;&#039;&#039; (3 floats separated by commas) direction of the force (automatically normalised by the code)&lt;br /&gt;
&lt;br /&gt;
The following bit of code will create an external force on the first nucleotide in the system starting at 1 simulation units (48.6 pN) and growing linearly with time at the rate of 48.6pN every million time steps. The force will pull the nucleotide along the &amp;lt;tt&amp;gt;z&amp;lt;/tt&amp;gt; direction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
type = string&lt;br /&gt;
particle = 0&lt;br /&gt;
F0 = 1.&lt;br /&gt;
rate = 1e-6&lt;br /&gt;
dir = 0., 0., 1.&lt;br /&gt;
} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Harmonic trap===&lt;br /&gt;
This type of force implements an harmonic trap, of arbitrary stiffness, that can move linearly with time. It can be useful to fix the position of the nucleotides to simulate attachment to something or to implement (quasi) constant extension simulations.&lt;br /&gt;
&lt;br /&gt;
A force of this kind is specified with &amp;lt;tt&amp;gt;type = trap&amp;lt;/tt&amp;gt;. The relevant keys are:&lt;br /&gt;
* &#039;&#039;&#039;particle&#039;&#039;&#039; (int) the particle on which to exert the force&lt;br /&gt;
* &#039;&#039;&#039;pos0&#039;&#039;&#039; (3 floats separated by commas) rest position of the trap&lt;br /&gt;
* &#039;&#039;&#039;stiff&#039;&#039;&#039; (float) stiffness of the trap (the force is stiff * dx)&lt;br /&gt;
* &#039;&#039;&#039;rate&#039;&#039;&#039; (float) speed of the trap (length simulation units/time steps)&lt;br /&gt;
* &#039;&#039;&#039;dir&#039;&#039;&#039; (3 floats separated by commas) direction of movement of the trap&lt;br /&gt;
&lt;br /&gt;
Here is an example input for a harmonic trap acting on the third nucleotide constraining it to stay close to the origin. In this example the trap does not move (&amp;lt;tt&amp;gt;rate=0&amp;lt;/tt&amp;gt;), but one could have it move at a constant speed along the direction specified by &amp;lt;tt&amp;gt;dir&amp;lt;/tt&amp;gt;, in this case the &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt; direction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
type = trap&lt;br /&gt;
particle = 2&lt;br /&gt;
pos0 = 0., 0., 0.&lt;br /&gt;
stiff = 1.0&lt;br /&gt;
rate = 0.&lt;br /&gt;
dir = 1.,0.,0.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that the trap does not comply with periodic boundary conditions. This is most likely what you want.&lt;br /&gt;
&lt;br /&gt;
===Rotating harmonic trap===&lt;br /&gt;
Same as the harmonic trap, with the exception that the trap position rotates in space with constant angular velocity. Several of these can be used e.g. to twist DNA.&lt;br /&gt;
&lt;br /&gt;
A force of this kind is specified with &amp;lt;tt&amp;gt;type = twist&amp;lt;/tt&amp;gt;. The relevant keys are:&lt;br /&gt;
* &#039;&#039;&#039;particle&#039;&#039;&#039; (int) the particle on which to exert the force&lt;br /&gt;
* &#039;&#039;&#039;pos0&#039;&#039;&#039; (3 floats separated by commas) position of the trap when the rotation angle equals 0&lt;br /&gt;
* &#039;&#039;&#039;stiff&#039;&#039;&#039; (float) stiffness of the trap (the force is stiff * dx)&lt;br /&gt;
* &#039;&#039;&#039;rate&#039;&#039;&#039; (float) angular velocity of the trap (length simulation units/time steps)&lt;br /&gt;
* &#039;&#039;&#039;base&#039;&#039;&#039; (float) initial phase of the trap &lt;br /&gt;
* &#039;&#039;&#039;axis&#039;&#039;&#039; (3 floats separated by commas) rotation axis of the trap&lt;br /&gt;
* &#039;&#039;&#039;mask&#039;&#039;&#039; (3 floats separated by commas) masking vector of the trap - the force vector will be element-wise multiplied by the masking vector. &lt;br /&gt;
&lt;br /&gt;
The following is an example input for a rotating trap acting on the first nucleotide forcing it to stay close to a point that starts at &amp;lt;tt&amp;gt;pos0&amp;lt;/tt&amp;gt; and then rotates around an axis containing the &amp;lt;tt&amp;gt;center&amp;lt;/tt&amp;gt; point and parallel to the z axis. In this case we want to neglect the force component along the z-axis, so we set &amp;lt;tt&amp;gt; mask &amp;lt;/tt&amp;gt; accordingly.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
type = twist&lt;br /&gt;
particle = 0&lt;br /&gt;
stiff = 1.00&lt;br /&gt;
rate = 1e-5&lt;br /&gt;
base = 0.&lt;br /&gt;
pos0 = 15, 0.674909093169, 18.6187733563&lt;br /&gt;
center = 13., 0.674909093169, 18.6187733563&lt;br /&gt;
axis = 0, 0, 1&lt;br /&gt;
mask = 1, 1, 0&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Repulsion plane===&lt;br /&gt;
This kind of external force implements a repulsion plane that constrains a particle (or the whole system) to stay on one side of it. It is implemented as a harmonic repulsion, but the stiffness can be made arbitrarily high to mimic a hard repulsion.&lt;br /&gt;
&lt;br /&gt;
A force of this kind is specified with &amp;lt;tt&amp;gt;type = repulsion_plane&amp;lt;/tt&amp;gt;. The relevant keys are:&lt;br /&gt;
* &#039;&#039;&#039;particle&#039;&#039;&#039; (int) the particle on which to exert the force. If set to the special value -1, the force will be exerted on all particles.&lt;br /&gt;
* &#039;&#039;&#039;stiff&#039;&#039;&#039; (float) stiffness of the trap (the force is stiff * D, where D is distance from the plane. The force is exerted only if the nucleotide is below the plane)&lt;br /&gt;
* &#039;&#039;&#039;dir&#039;&#039;&#039; (3 floats separated by commas) a direction normal to the plane&lt;br /&gt;
* &#039;&#039;&#039;position&#039;&#039;&#039; (1 float number) specifies the position of the plane&lt;br /&gt;
&lt;br /&gt;
If direction is &amp;lt;tt&amp;gt; direction =  u,v,w &amp;lt;/tt&amp;gt; , then the plane contains all the points (x,y,z) that satisfy the equation: u*x + v*y + w*z + position = 0.&lt;br /&gt;
Only nucleotides  with coordinates (x,y,z) that satisfy u*x + v*y + w*z + position &amp;lt; 0 will feel the force.&lt;br /&gt;
The force exerted on a nucleotide is equal to stiff * D, where D is the distance of the nucleotide from the plane, where &amp;lt;math&amp;gt; D = | ux + vy + wz + \mbox{position}| / \sqrt{u^2 + v^2 + w^2 }.&amp;lt;/math&amp;gt;&lt;br /&gt;
For nucleotides for which u*x + v*y + w*z + position &amp;gt;= 0, no force will be exerted.&lt;br /&gt;
&lt;br /&gt;
Here is an example. This plane acts on the whole system and will not exert any force on nucleotides with a positive &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt; coordinate. A force proportional to 48.6 pN * (&amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt; coordinate) will be exerted on all particles . &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
type = repulsion_plane&lt;br /&gt;
#whole system&lt;br /&gt;
particle = -1&lt;br /&gt;
stiff = 1. #48.6 pN /(simulation length unit)  &lt;br /&gt;
dir = 1, 0, 0&lt;br /&gt;
position = 0&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If in the above example you would specify position = 3, then the force would be exerted on all nucleotides with coordinate x &amp;gt; -3.&lt;br /&gt;
&lt;br /&gt;
===Mutual trap===&lt;br /&gt;
This force is useful to form initial configurations. It is a harmonic force that at every moment pulls a particle towards a reference particle. It is possible to specify the separation at which the force will be 0.&lt;br /&gt;
&lt;br /&gt;
A force of this kind is specified with &amp;lt;tt&amp;gt;type = mutual_trap&amp;lt;/tt&amp;gt;. The relevant keys are:&lt;br /&gt;
* &#039;&#039;&#039;particle&#039;&#039;&#039; (int) the particle on which to exert the force.&lt;br /&gt;
* &#039;&#039;&#039;ref_particle&#039;&#039;&#039; (int) particle to pull towards. Please note that this particle will not feel any force (the name mutual trap is thus misleading).&lt;br /&gt;
* &#039;&#039;&#039;stiff&#039;&#039;&#039; (float) stiffness of the trap&lt;br /&gt;
* &#039;&#039;&#039;r0&#039;&#039;&#039; (float) equilibrium distance of the trap.&lt;br /&gt;
&lt;br /&gt;
Here is an example, extracted from the [[Pseudoknot|pseudoknot formation example]]. This will pull particle 14 towards particle 39, favouring an equilibrium distance of 1.4 (which corresponds roughly to the minimum of the hydrogen bonding potential, not a coincidence). The same force with opposite sign is exerted on particle 39 through a separate force. It is not necessary to have both particles feel the force, but it usually works much better.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
type = mutual_trap&lt;br /&gt;
particle = 14&lt;br /&gt;
ref_particle = 39&lt;br /&gt;
stiff = 1.&lt;br /&gt;
r0 = 1.2&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
type = mutual_trap&lt;br /&gt;
particle = 39&lt;br /&gt;
ref_particle = 14&lt;br /&gt;
stiff = 1.&lt;br /&gt;
r0 = 1.2&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Visualisation of structures==&lt;br /&gt;
oxDNA produces a trajectory file where all the relevant information is&lt;br /&gt;
stored. A converter is provided (&amp;lt;tt&amp;gt;traj2vis.py&amp;lt;/tt&amp;gt;) in the&lt;br /&gt;
&amp;lt;tt&amp;gt;UTILS&amp;lt;/tt&amp;gt; directory that is able to produce files in the &amp;lt;tt&amp;gt;xyz&amp;lt;/tt&amp;gt;&lt;br /&gt;
and &amp;lt;tt&amp;gt;pdb&amp;lt;/tt&amp;gt; formats. The same program can be used on a configuration&lt;br /&gt;
file and it will produce a snapshot.&lt;br /&gt;
&lt;br /&gt;
Since the model is coarse-grained, we have to &amp;quot;trick&amp;quot; the visualisers into&lt;br /&gt;
thinking that the interaction sites in the model are actually atoms.&lt;br /&gt;
Advanced nucleic acids representations such as ribbons will not work on the&lt;br /&gt;
outputs.&lt;br /&gt;
&lt;br /&gt;
All the images in the [[Screenshots]] page were produced with the pdb representation using UCSF chimera (see later on).&lt;br /&gt;
&lt;br /&gt;
===xyz format===&lt;br /&gt;
&lt;br /&gt;
just run &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$oxDNA/UTILS/traj2vis.py xyz &amp;lt;trajectory&amp;gt; &amp;lt;topology&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(where &amp;lt;tt&amp;gt;$oxDNA&amp;lt;/tt&amp;gt; is the oxDNA source directory) to get the xyz representation in a file called the same as the trajectory&lt;br /&gt;
file with &amp;lt;tt&amp;gt;.xyz&amp;lt;/tt&amp;gt; appended. Please note that boundary conditions are&lt;br /&gt;
implemented strand-wise, so strands that are bound might appear at two&lt;br /&gt;
different sizes of the box. Also, the center of mass of the system (where&lt;br /&gt;
each strand is weighted the same regardless of the length) is set to 0 at&lt;br /&gt;
each frame. Carbons represent the backbone sites and oxygens the base sites.&lt;br /&gt;
&lt;br /&gt;
The resulting file can be read with a variety of programs. Here we will&lt;br /&gt;
explain how to visualise it sensibly in [http://www.ks.uiuc.edu/Research/vmd/ VMD].&lt;br /&gt;
&lt;br /&gt;
* Run VMD and load the xyz file.&lt;br /&gt;
* In the graphics menu, go to Representations.&lt;br /&gt;
* In the Selected Atoms line, input &amp;lt;tt&amp;gt;name C&amp;lt;/tt&amp;gt;. Also select Drawing method CPK, sphere scale 0.8 and Bond Radius 0.&lt;br /&gt;
* In the Selected Atoms line, input &amp;lt;tt&amp;gt;name O&amp;lt;/tt&amp;gt;. Also select Drawing method CPK, sphere scale 0.6 and Bond Radius 0.&lt;br /&gt;
&lt;br /&gt;
This should produce a ball representation of our model DNA. Bonds&lt;br /&gt;
automatically produced by VMD are NOT meaningful in our context.&lt;br /&gt;
&lt;br /&gt;
===pdb format===&lt;br /&gt;
Run &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$oxDNA/UTILS/traj2chimera.py &amp;lt;trajectory&amp;gt; &amp;lt;topology&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to produce a trajectory/configuration in the pdb format. A further file&lt;br /&gt;
called &amp;lt;tt&amp;gt;chimera.com&amp;lt;/tt&amp;gt; will be produced (more on this later). All&lt;br /&gt;
comments above about periodic boundaries and centre of mass apply here as&lt;br /&gt;
well.&lt;br /&gt;
&lt;br /&gt;
The pdb file can be visualised in VMD just like the xyz format, but a nicer&lt;br /&gt;
output can be produced with [http://www.cgl.ucsf.edu/chimera/ UCSF Chimera] (although only for snapshots at&lt;br /&gt;
the moment) as follows:&lt;br /&gt;
&lt;br /&gt;
Run chimera and load the pdb file. An ugly output will be displayed.&lt;br /&gt;
&lt;br /&gt;
Bring up the command line under the &amp;lt;tt&amp;gt;Tools → General Controls&amp;lt;/tt&amp;gt; menu.&lt;br /&gt;
Input &amp;lt;tt&amp;gt;read chimera.com&amp;lt;/tt&amp;gt; in the command line and press enter. You&lt;br /&gt;
should get a nicer visualisation with different bases in different colors,&lt;br /&gt;
all the covalent bonds in the right place, etc.&lt;br /&gt;
&lt;br /&gt;
On large configurations, the production of ellipsoids will be extremely&lt;br /&gt;
slow. You can remove it by removing the line&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;aniso scale 0.75 smoothing 4&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
from the commands file. Loading the resulting file should be much faster.&lt;br /&gt;
&lt;br /&gt;
UCSF chimera can in turn export the scene in a variety of formats.&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=Documentation&amp;diff=1005</id>
		<title>Documentation</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=Documentation&amp;diff=1005"/>
		<updated>2016-06-08T14:32:01Z</updated>

		<summary type="html">&lt;p&gt;Randisi: edited the Rotating Harmonic Trap observable, as per Qingman&amp;#039;s suggestion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Compile options==&lt;br /&gt;
&lt;br /&gt;
Compiling oxDNA requires that you have a working &amp;lt;tt&amp;gt;cmake&amp;lt;/tt&amp;gt; software and C++ compiler on your machine. The instructions are provided in the [[Download and Installation]] section.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;oxDNA input_file&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The input file contains all the relevant information for the program to run, such as what initial configuration to use, the topology of the system, how often to print the energies to a file, etc. Please make sure you read the [[Thermostat|thermostat]] page if you use molecular dynamics.&lt;br /&gt;
&lt;br /&gt;
==Input file==&lt;br /&gt;
&lt;br /&gt;
As always in UNIX environments, everything is case sensitive.&lt;br /&gt;
&lt;br /&gt;
*Options are in the form key = value&lt;br /&gt;
*There can be arbitrary spaces before and after both key and value&lt;br /&gt;
*Line with a leading # will be treated as comments&lt;br /&gt;
*The | (pipe) sign is the separator between the different values that can be used to specify a value for the key.&lt;br /&gt;
*Keys between [ and ] are optional, the value after the equal sign is the default value&lt;br /&gt;
&lt;br /&gt;
Here we provide a list of the most commonly used input options. The complete and most up-to-date list of possible options can be found [[Input_options|here]] or in the &amp;lt;tt&amp;gt;README&amp;lt;/tt&amp;gt; file in the main directory of the simulation code.&lt;br /&gt;
&lt;br /&gt;
The input options of the previous oxDNA version can be found [[Input_options_of_the_previous_version|here]].&lt;br /&gt;
&lt;br /&gt;
===Generic options===&lt;br /&gt;
The options listed here define the generic behavior of the entire program.&lt;br /&gt;
;[interaction_type = DNA]: DNA|DNA2|RNA|patchy|LJ&lt;br /&gt;
: (selects the model for the simulation. DNA ([[DNA_model_introduction|oxDNA model]]) is the default option. DNA2 ([[DNA_model_introduction#oxDNA2|oxDNA2 model]]), RNA ([[RNA_model_introduction|oxRNA model]]), LJ (Lennard-Jones) and patchy particles are also implemented&lt;br /&gt;
;[sim_type=MD]: MD|MC|VMMC&lt;br /&gt;
:MD = Molecular Dynamics, MC = Monte Carlo, VMMC = Virtual Move Monte Carlo&lt;br /&gt;
;backend: CPU | CUDA &lt;br /&gt;
: (only sim_type=MD is supported if you choose CUDA backend)&lt;br /&gt;
;backend_precision: float|double|mixed&lt;br /&gt;
: (mixed option is available only for CUDA backend. It is recommended choice for optimal performance on CUDA machines, double is recommended for CPU simulations)&lt;br /&gt;
;[debug=0]: 0|1&lt;br /&gt;
: 1 if you want verbose logs, 0 otherwise.&lt;br /&gt;
&lt;br /&gt;
===Simulation options===&lt;br /&gt;
	The options listed here specify the behaviour of the simulation.&lt;br /&gt;
&lt;br /&gt;
;steps: number of steps to be performed.&lt;br /&gt;
		&lt;br /&gt;
;[restart_step_counter=0]: 0|1&lt;br /&gt;
:0 means that the step counter will start from the value read in the configuration file; if 1, the step counter will be reset to 0. The total duration of the simulation is unchanged.&lt;br /&gt;
			&lt;br /&gt;
;[seed=time(NULL)]: seed for the random number generator. On Unix systems, it will use by default a number from /dev/urandom + time(NULL)&lt;br /&gt;
		&lt;br /&gt;
;T: temperature of the simulation. It can be expressed in simulation units or kelvin (append a k or K after the value) or celsius (append a c or C after the value).&lt;br /&gt;
:Examples:&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! Value&lt;br /&gt;
! Simulation Units&lt;br /&gt;
|-&lt;br /&gt;
| 0.1&lt;br /&gt;
| 0.1&lt;br /&gt;
|-&lt;br /&gt;
| 300 K&lt;br /&gt;
| 0.1&lt;br /&gt;
|-&lt;br /&gt;
| 300k&lt;br /&gt;
| 0.1&lt;br /&gt;
|-&lt;br /&gt;
| 26.85c&lt;br /&gt;
| 0.1&lt;br /&gt;
|-&lt;br /&gt;
| 26.85 C &lt;br /&gt;
| 0.1&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
		&lt;br /&gt;
;verlet_skin: if a particle moves more than verlet_skin then the lists will be updated. Its name is somewhat misleading: the actual verlet skin is 2*verlet_skin.&lt;br /&gt;
	&lt;br /&gt;
;salt_concentration: used if interaction_type = DNA2. It specifies the salt concentration in M.&lt;br /&gt;
&lt;br /&gt;
;[use_average_seq=1]: 0|1&lt;br /&gt;
: specifies whether to use the default hard-coded average parameters for base-pairing and stacking interaction strengths or not. If sequence dependence is to be used, set this to 0 and specify seq_dep_file.&lt;br /&gt;
	&lt;br /&gt;
;[seq_dep_file]: specifies the file from which the sequence dependent parameters should be read. Mandatory if use_average_seq=no, ignored otherwise. A sample file is provided (sequence_dependent_parameters.txt).&lt;br /&gt;
&lt;br /&gt;
;[external_forces=0]: 0|1&lt;br /&gt;
: specifies whether there are external forces acting on the nucleotides or not. If it is set to 1, then a file which specifies the external forces&#039; configuration has to be provided (see external_forces_file).&lt;br /&gt;
&lt;br /&gt;
;[external_forces_file]: specifies the file containing all the external forces&#039; configurations. Currently there are six supported force types (see EXAMPLES/TRAPS for some examples):&lt;br /&gt;
:*string&lt;br /&gt;
:*twist&lt;br /&gt;
:*trap&lt;br /&gt;
:*repulsion_plane&lt;br /&gt;
:*repulsion_plane_moving&lt;br /&gt;
:*mutual_trap&lt;br /&gt;
	&lt;br /&gt;
====Molecular dynamics simulations options====&lt;br /&gt;
&lt;br /&gt;
;dt: time step of the integration.&lt;br /&gt;
&lt;br /&gt;
;thermostat: no|refresh|brownian &lt;br /&gt;
:no means no thermostat will be used. refresh will refresh all the particle&#039;s velocities from a maxwellian every newtonian_steps steps. john is an Anderson-like thermostat (see pt). Make sure you read [[Thermostat|thermostat]].&lt;br /&gt;
&lt;br /&gt;
;newtonian_steps: required if thermostat != no&lt;br /&gt;
:number of steps after which a procedure of thermalization will be performed.&lt;br /&gt;
			&lt;br /&gt;
;pt: used if thermostat == john. It&#039;s the probability that a particle&#039;s velocity will be refreshed during a thermalization procedure.&lt;br /&gt;
		&lt;br /&gt;
;diff_coeff: required if pt is not specified&lt;br /&gt;
:used internally to automatically compute the pt that would be needed if we wanted such a self diffusion coefficient. Not used if pt is set.&lt;br /&gt;
&lt;br /&gt;
====Monte Carlo simulations options====&lt;br /&gt;
	&lt;br /&gt;
;[check_energy_every=10]: this number times print_energy_every gives the number of steps after which the energy will be computed from scratch and checked against the actual value computed adding energy differences.&lt;br /&gt;
		&lt;br /&gt;
;[check_energy_threshold=1e-4]:	if abs((old_energy - new_energy)/old_energy) &amp;gt; check_energy_threshold then the program will die and warn the user.&lt;br /&gt;
	&lt;br /&gt;
;ensemble: NVT&lt;br /&gt;
:ensemble of the simulation. More ensembles could be added in future versions.&lt;br /&gt;
	&lt;br /&gt;
;delta_translation: maximum displacement (per dimension) for translational moves in simulation units.&lt;br /&gt;
	&lt;br /&gt;
;delta_translation: maximum displacement for rotational moves in simulation units.&lt;br /&gt;
&lt;br /&gt;
===Input/output===&lt;br /&gt;
The options listed here are used to manage the I/O (read and write configurations, energies and so on)&lt;br /&gt;
	&lt;br /&gt;
;conf_file: initial configuration file. &lt;br /&gt;
		&lt;br /&gt;
;topology: file containing the system&#039;s topology.&lt;br /&gt;
		&lt;br /&gt;
;trajectory_file: the main output of the program. All the configurations will be appended to this file as they are printed.&lt;br /&gt;
		&lt;br /&gt;
;[confs_to_skip=0]: valid only if conf_file is a trajectory. Skip the first confs_to_skip configurations and then load in memory the (confs_to_skip+1)th.&lt;br /&gt;
		&lt;br /&gt;
;[lastconf_file=last_conf.dat]: this is the file where the last configuration is saved (when the program finishes or is killed). Set to last_conf.dat by default&lt;br /&gt;
&lt;br /&gt;
;[refresh_vel=0]: 0|1&lt;br /&gt;
:if 1 the initial velocities will be refreshed from a maxwellian.&lt;br /&gt;
	&lt;br /&gt;
;energy_file: energy output file.&lt;br /&gt;
		&lt;br /&gt;
;[print_energy_every=1000]: this will make the program print the energies every print_energy_every steps.&lt;br /&gt;
		&lt;br /&gt;
;[no_stdout_energy=0]: 0|1&lt;br /&gt;
:if 1 the energy will be printed just to the energy_file.&lt;br /&gt;
		&lt;br /&gt;
;[time_scale=linear]: linear|log_lin&lt;br /&gt;
:using linear configurations will be saved every print_conf_interval.&lt;br /&gt;
:using log_lin configurations will be saved logarithmically for print_conf_ppc times. After that the logarithmic sequence will restart.&lt;br /&gt;
	&lt;br /&gt;
;print_conf_interval: linear interval if time_scale == linear. First step of the logarithmic scale if time_scale == log_lin.&lt;br /&gt;
		&lt;br /&gt;
;[print_reduced_conf_every=0]: every print_reduced_conf_every steps the program will print out the reduced configurations (i.e. confs containing only the centers of mass of strands).&lt;br /&gt;
&lt;br /&gt;
;reduced_conf_output_dir: used if print_reduced_conf_every &amp;gt; 0&lt;br /&gt;
:output directory for reduced_conf files.&lt;br /&gt;
		&lt;br /&gt;
;[log_file=stderr]: file where generic and debug informations will be logged. If not specified then stderr will be used.&lt;br /&gt;
&lt;br /&gt;
==Output files==&lt;br /&gt;
*The log file contains all the relevant information about the simulation (specified options, activated external forces, warnings about misconfigurations, critical errors, etc.). If the log file is omitted, all this information will be displayed on the standard output.&lt;br /&gt;
&lt;br /&gt;
*The energy file layout for MD simulations is&lt;br /&gt;
&lt;br /&gt;
:{|&lt;br /&gt;
| [time (steps * dt)]&lt;br /&gt;
| [potential energy]&lt;br /&gt;
| [kinetic energy]&lt;br /&gt;
| [total energy]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
:while for MC simulations is&lt;br /&gt;
&lt;br /&gt;
:{|&lt;br /&gt;
| [time (steps)]&lt;br /&gt;
| [potential energy]&lt;br /&gt;
| [acceptance ratio for translational moves]&lt;br /&gt;
| [acceptance ratio for rotational moves]&lt;br /&gt;
| [acceptance ratio for volume moves]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
:VMMC output also produces the following extra columns if umbrella sampling is enabled&lt;br /&gt;
:{|&lt;br /&gt;
|[order parameter coordinate 1]&lt;br /&gt;
|[order parameter coordinate 1]&lt;br /&gt;
|...&lt;br /&gt;
|[order parameter coordinate n]&lt;br /&gt;
|[current weight]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
:N.B. potential, kinetic and total energies are divided by the total number of particles.&lt;br /&gt;
&lt;br /&gt;
*Configurations are saved in the trajectory file.&lt;br /&gt;
&lt;br /&gt;
==Configuration and topology files==&lt;br /&gt;
The current state of a system, as specified by oxDNA, is described by two files: a configuration file and a topology file. The configuration file contains all the general information (timestep, energy and box size) and the orientations and positions of each nucleotide. The topology file, on the other hand, keeps track of the backbone-backbone bonds between nucleotides in the same strand. Working configuration and topology files can be found in the &amp;lt;tt&amp;gt;[[Examples|EXAMPLES]]&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
===Configuration file===&lt;br /&gt;
The first three rows of a configuration file contain the timestep &amp;lt;tt&amp;gt;T&amp;lt;/tt&amp;gt; at which the configuration has been printed, the length of the box sides &amp;lt;tt&amp;gt;Lx&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;Ly&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Lz&amp;lt;/tt&amp;gt; and the total, potential and kinetic energies, &amp;lt;tt&amp;gt;Etot&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;U&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;K&amp;lt;/tt&amp;gt;, respectively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
t = T&lt;br /&gt;
b = Lz Ly Lz&lt;br /&gt;
E = Etot U K&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after this header, each row contains position of the centre of mass, orientation, velocity and angular velocity of a single nucleotide in the following order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\overbrace{r_x r_y r_z}^{\rm Position} \overbrace{b_x b_y b_z}^{\rm Backbone-base versor} \overbrace{n_x n_y n_z}^{\rm Normal versor} \overbrace{v_x v_y v_z}^{\rm Velocity} \overbrace{L_x L_y L_z}^{\rm Angular velocity}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Topology file===&lt;br /&gt;
The topology file stores the intra-strand, fixed bonding topology (i.e. which nucleotides share backbone links). The first row contains the total number of nucleotides &amp;lt;tt&amp;gt;N&amp;lt;/tt&amp;gt; and the number of strands &amp;lt;tt&amp;gt;Ns&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
N Ns&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this header, the &amp;lt;tt&amp;gt;i&amp;lt;/tt&amp;gt;-th row specifies strand, base and 3&#039; and 5&#039; neighbors of the &amp;lt;tt&amp;gt;i&amp;lt;/tt&amp;gt;-th nucleotide in this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S B 3&#039; 5&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where S is the index of the strand (starting from 1) which the nucleotide belongs to, B is the base and 3&#039; and 5&#039; specify the index of the nucleotides with which the &amp;lt;tt&amp;gt;i&amp;lt;/tt&amp;gt;-th nucleotide is bonded in the 3&#039; and 5&#039; direction, respectively. A &amp;lt;tt&amp;gt;-1&amp;lt;/tt&amp;gt; signals that the nucleotide terminates the strand in either 3&#039; or 5&#039; direction. The topology file of a strand of sequence &amp;lt;tt&amp;gt;GCGTTG&amp;lt;/tt&amp;gt; would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
6 1&lt;br /&gt;
1 G -1 1&lt;br /&gt;
1 C 0 2&lt;br /&gt;
1 G 1 3&lt;br /&gt;
1 T 2 4&lt;br /&gt;
1 T 3 5&lt;br /&gt;
1 G 4 -1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Specifying the topology in this way can simplify the process of simulating, for example, circular DNA.&lt;br /&gt;
&lt;br /&gt;
===Generation of initial configurations===&lt;br /&gt;
In order to generate initial configuration and topology files, we provide the &amp;lt;tt&amp;gt;${oxDNA}/UTILS/generate-sa.py&amp;lt;/tt&amp;gt; script. The usage of the script is&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;generate-sa.py &amp;lt;box side&amp;gt; &amp;lt;file with sequence&amp;gt;&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
where &amp;lt;tt&amp;gt;&amp;lt;box side&amp;gt;&amp;lt;/tt&amp;gt; specifies the length of the box side in simulation units and &amp;lt;tt&amp;gt;&amp;lt;file with sequence&amp;gt;&amp;lt;/tt&amp;gt; contains the sequence of the strands to be generated, one row per strand. If double strands are needed, each sequence must be preceded by &amp;lt;tt&amp;gt;DOUBLE&amp;lt;/tt&amp;gt;. For example, a file containing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DOUBLE AGGGCT&lt;br /&gt;
CCTGTA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would generate a double strand with a sequence &amp;lt;tt&amp;gt;AGGGCT&amp;lt;/tt&amp;gt; and a single strand with a sequence &amp;lt;tt&amp;gt;CCTGTA&amp;lt;/tt&amp;gt;. The sequences are given in 3&#039;-5&#039; order.&lt;br /&gt;
&lt;br /&gt;
Positions and orientations of the strands are all chosen at random in such a way that the resulting initial configuration does not contain significant excluded volume interactions between nucleotides belonging to different strands. Generated single- and double-strands have helical conformations (i.e. they are in the minimum of the intra-strand interaction energy).&lt;br /&gt;
&lt;br /&gt;
The output configuration and topology are stored in &amp;lt;tt&amp;gt;generated.dat&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;generated.top&amp;lt;/tt&amp;gt;, respectively. &lt;br /&gt;
Since this script will initialize nucleotides&#039; velocities and angular velocities to 0, when performing a molecular (or Brownian) dynamics simulation remember to put &amp;lt;tt&amp;gt;refresh_vel = 1&amp;lt;/tt&amp;gt; in the [[Documentation#Input_file|input]] file.&lt;br /&gt;
&lt;br /&gt;
==Analysis of configurations==&lt;br /&gt;
The configurations produced by oxDNA can be analysed with the &amp;lt;tt&amp;gt;output_bonds&amp;lt;/tt&amp;gt; program in &amp;lt;tt&amp;gt;${oxDNA}/UTILS/process_data/&amp;lt;/tt&amp;gt; directory. This program takes as command line arguments the input file (to recover the temperature and topology file), a configuration/trajectory file and an optional number. Since &amp;lt;tt&amp;gt;output_bonds&amp;lt;/tt&amp;gt; reads analyses a single configuration, the optional number selects the configuration which it needs to analyse in the trajectory. Analysing a whole trajectory can be done by looping over a counter.&lt;br /&gt;
&lt;br /&gt;
Please note that &amp;lt;tt&amp;gt;output_bonds&amp;lt;/tt&amp;gt; is not compiled automatically. If you never compiled it, do so as described in the [[Download_and_Installation#Installation|installation instructions]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;output_bonds&amp;lt;/tt&amp;gt; can be used as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
${oxDNA}/UTILS/process_data/output_bonds &amp;lt;input_file&amp;gt; &amp;lt;trajectory_file&amp;gt; [counter]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The program outputs some debugging information to the standard error and information regarding the interaction energies to the standard output. The contributions arising from each of the terms in the potential (see the appendix of [[Publications|Ref. 2]]) are reported for each pair of nucleotides that have non-zero total interactions.&lt;br /&gt;
&lt;br /&gt;
This output can be easily parsed to analyse the configurations.&lt;br /&gt;
&lt;br /&gt;
For each pair of nucleotides that do interact in the configuration, the program prints out a line containing:&lt;br /&gt;
* The id of the two particles (starting from 0)&lt;br /&gt;
* The total interaction energy&lt;br /&gt;
* The hydrogen bonding (base pairing) energy&lt;br /&gt;
* The stacking energy&lt;br /&gt;
* The cross stacking energy&lt;br /&gt;
* The excluded volume energy&lt;br /&gt;
* The FENE interaction energy&lt;br /&gt;
* A letter indicating a status code. This will be &amp;lt;tt&amp;gt;N&amp;lt;/tt&amp;gt; for pairs that interact through bonded interactions (i.e. they are neighbors along a strand) and it will be &amp;lt;tt&amp;gt;H&amp;lt;/tt&amp;gt; when a base pair is present. Our definition of base pair is when two nucleotides have a hydrogen bonding energy less than -0.1 in simulation units (see [[Publications|Ref. 2]]).&lt;br /&gt;
&lt;br /&gt;
===Geometry of the Model===&lt;br /&gt;
In the configuration/trajectory files only the positions and orientations of the nucleotides are stored. If one wants to recover the positions of the individual interaction sites in the model, some maths need to be done.&lt;br /&gt;
&lt;br /&gt;
The position of the base, stacking and backbone sites can be recovered as follows:&lt;br /&gt;
&lt;br /&gt;
base site:     (center) + 0.40 * (axis vector)&lt;br /&gt;
&lt;br /&gt;
stacking site: (center) + 0.34 * (axis vector)&lt;br /&gt;
&lt;br /&gt;
backbone site: (center) - 0.40 * (axis_vector)&lt;br /&gt;
&lt;br /&gt;
The picture in the [[Model_introduction|introduction]] might help understanding where the sites are.&lt;br /&gt;
&lt;br /&gt;
==External Forces==&lt;br /&gt;
The code implements several types of external forces that can be imposed on the system that can be used either to simulate tension exerted on DNA or simply to accelerate the formation of secondary or tertiary structure. External forces can be tricky to treat, especially in a dynamics simulation, since they are an external source of work. Care should be taken in adjusting the time step, thermostat parameters and such.&lt;br /&gt;
&lt;br /&gt;
To enable external forces, one needs to specify &amp;lt;tt&amp;gt;external_forces = 1&amp;lt;/tt&amp;gt; in the input file and also supply an external force file to read from with the key &amp;lt;tt&amp;gt;external_forces_file = &amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The syntax of the external forces file is quite simple. Examples of such files can be found in the [[Hairpin_formation|hairpin formation]] and [[Pseudoknot|Pseudoknot formation]] examples. Each force is specified within a block contained in curly brackets. Empty lines and lines beginning with an hash symbol (&amp;lt;tt&amp;gt;#&amp;lt;/tt&amp;gt;) are ignored. Different forces require different keys to be present. If the file has the wrong syntax, oxDNA should spit out a sensible error message while parsing the file.&lt;br /&gt;
&lt;br /&gt;
The different types of forces implemented at the moment are:&lt;br /&gt;
* harmonic trap&lt;br /&gt;
* string &lt;br /&gt;
* repulsion plane&lt;br /&gt;
* mutual trap&lt;br /&gt;
&lt;br /&gt;
All forces act on the centre of the particle.&lt;br /&gt;
&lt;br /&gt;
Forces of different kinds can be combined in the same simulation. There is a maximum number of 10 external forces per particle for memory reasons. This can be manually overridden recompiling the code with a different value of the macro &amp;lt;tt&amp;gt;MAX_EXT_FORCES&amp;lt;/tt&amp;gt; (currently 10) in &amp;lt;tt&amp;gt;defs.h&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===String===&lt;br /&gt;
A string is implemented as a force that does not depend on the particle position. Its value can be constant or can change linearly with time. It is useful as it does not fluctuate with time.&lt;br /&gt;
&lt;br /&gt;
A force of this kind is specified with &amp;lt;tt&amp;gt;type = string&amp;lt;/tt&amp;gt;. The relevant keys are:&lt;br /&gt;
* &#039;&#039;&#039;particle&#039;&#039;&#039; (int) the particle on which to exert the force&lt;br /&gt;
* &#039;&#039;&#039;F0&#039;&#039;&#039; (float) the value of the force at time = 0 in simulation units (please note that the value of the time may or may not be reset when starting a simulation, depending on the input file)&lt;br /&gt;
* &#039;&#039;&#039;rate&#039;&#039;&#039; (float) growing rate of the force (simulation units/time steps). Typical values are very small (&amp;lt; 10^(-5))&lt;br /&gt;
* &#039;&#039;&#039;dir&#039;&#039;&#039; (3 floats separated by commas) direction of the force (automatically normalised by the code)&lt;br /&gt;
&lt;br /&gt;
The following bit of code will create an external force on the first nucleotide in the system starting at 1 simulation units (48.6 pN) and growing linearly with time at the rate of 48.6pN every million time steps. The force will pull the nucleotide along the &amp;lt;tt&amp;gt;z&amp;lt;/tt&amp;gt; direction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
type = string&lt;br /&gt;
particle = 0&lt;br /&gt;
F0 = 1.&lt;br /&gt;
rate = 1e-6&lt;br /&gt;
dir = 0., 0., 1.&lt;br /&gt;
} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Harmonic trap===&lt;br /&gt;
This type of force implements an harmonic trap, of arbitrary stiffness, that can move linearly with time. It can be useful to fix the position of the nucleotides to simulate attachment to something or to implement (quasi) constant extension simulations.&lt;br /&gt;
&lt;br /&gt;
A force of this kind is specified with &amp;lt;tt&amp;gt;type = trap&amp;lt;/tt&amp;gt;. The relevant keys are:&lt;br /&gt;
* &#039;&#039;&#039;particle&#039;&#039;&#039; (int) the particle on which to exert the force&lt;br /&gt;
* &#039;&#039;&#039;pos0&#039;&#039;&#039; (3 floats separated by commas) rest position of the trap&lt;br /&gt;
* &#039;&#039;&#039;stiff&#039;&#039;&#039; (float) stiffness of the trap (the force is stiff * dx)&lt;br /&gt;
* &#039;&#039;&#039;rate&#039;&#039;&#039; (float) speed of the trap (length simulation units/time steps)&lt;br /&gt;
* &#039;&#039;&#039;dir&#039;&#039;&#039; (3 floats separated by commas) direction of movement of the trap&lt;br /&gt;
&lt;br /&gt;
Here is an example input for a harmonic trap acting on the third nucleotide constraining it to stay close to the origin. In this example the trap does not move (&amp;lt;tt&amp;gt;rate=0&amp;lt;/tt&amp;gt;), but one could have it move at a constant speed along the direction specified by &amp;lt;tt&amp;gt;dir&amp;lt;/tt&amp;gt;, in this case the &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt; direction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
type = trap&lt;br /&gt;
particle = 2&lt;br /&gt;
pos0 = 0., 0., 0.&lt;br /&gt;
stiff = 1.0&lt;br /&gt;
rate = 0.&lt;br /&gt;
dir = 1.,0.,0.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that the trap does not comply with periodic boundary conditions. This is most likely what you want.&lt;br /&gt;
&lt;br /&gt;
===Rotating harmonic trap===&lt;br /&gt;
Same as the harmonic trap, with the exception that the trap position rotates in space with constant angular velocity. Several of these can be used e.g. to twist DNA.&lt;br /&gt;
&lt;br /&gt;
A force of this kind is specified with &amp;lt;tt&amp;gt;type = twist&amp;lt;/tt&amp;gt;. The relevant keys are:&lt;br /&gt;
* &#039;&#039;&#039;particle&#039;&#039;&#039; (int) the particle on which to exert the force&lt;br /&gt;
* &#039;&#039;&#039;pos0&#039;&#039;&#039; (3 floats separated by commas) position of the trap when the rotation angle equals 0&lt;br /&gt;
* &#039;&#039;&#039;stiff&#039;&#039;&#039; (float) stiffness of the trap (the force is stiff * dx)&lt;br /&gt;
* &#039;&#039;&#039;rate&#039;&#039;&#039; (float) angular velocity of the trap (length simulation units/time steps)&lt;br /&gt;
* &#039;&#039;&#039;base&#039;&#039;&#039; (float) initial phase of the trap &lt;br /&gt;
* &#039;&#039;&#039;axis&#039;&#039;&#039; (3 floats separated by commas) rotation axis of the trap&lt;br /&gt;
* &#039;&#039;&#039;mask&#039;&#039;&#039; (3 floats separated by commas) masking vector of the trap - the force vector will be element-wise multiplied by the masking vector. &lt;br /&gt;
&lt;br /&gt;
The following is an example input for a rotating trap acting on the first nucleotide forcing it to stay close to a point that starts at &amp;lt;tt&amp;gt;pos0&amp;lt;/tt&amp;gt; and then rotates around an axis containing the &amp;lt;tt&amp;gt;center&amp;lt;/tt&amp;gt; point and parallel to the z axis. In this case we want to neglect the force component along the z-axis, so we set &amp;lt;tt&amp;gt; mask &amp;lt;/tt&amp;gt; accordingly.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
type = twist&lt;br /&gt;
particle = 0&lt;br /&gt;
stiff = 1.00&lt;br /&gt;
rate = 1e-5&lt;br /&gt;
base = 0.&lt;br /&gt;
pos0 = 15, 0.674909093169, 18.6187733563&lt;br /&gt;
center = 13., 0.674909093169, 18.6187733563&lt;br /&gt;
axis = 0, 0, 1&lt;br /&gt;
mask = 1, 1, 0&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Repulsion plane===&lt;br /&gt;
This kind of external force implements a repulsion plane that constrains a particle (or the whole system) to stay on one side of it. It is implemented as a harmonic repulsion, but the stiffness can be made arbitrarily high to mimic a hard repulsion.&lt;br /&gt;
&lt;br /&gt;
A force of this kind is specified with &amp;lt;tt&amp;gt;type = repulsion_plane&amp;lt;/tt&amp;gt;. The relevant keys are:&lt;br /&gt;
* &#039;&#039;&#039;particle&#039;&#039;&#039; (int) the particle on which to exert the force. If set to the special value -1, the force will be exerted on all particles.&lt;br /&gt;
* &#039;&#039;&#039;stiff&#039;&#039;&#039; (float) stiffness of the trap (the force is stiff * D, where D is distance from the plane. The force is exerted only if the nucleotide is below the plane)&lt;br /&gt;
* &#039;&#039;&#039;dir&#039;&#039;&#039; (3 floats separated by commas) a direction normal to the plane&lt;br /&gt;
* &#039;&#039;&#039;position&#039;&#039;&#039; (1 float number) specifies the position of the plane&lt;br /&gt;
&lt;br /&gt;
If direction is &amp;lt;tt&amp;gt; direction =  u,v,w &amp;lt;/tt&amp;gt; , then the plane contains all the points (x,y,z) that satisfy the equation: u*x + v*y + w*z + position = 0.&lt;br /&gt;
Only nucleotides  with coordinates (x,y,z) that satisfy u*x + v*y + w*z + position &amp;lt; 0 will feel the force.&lt;br /&gt;
The force exerted on a nucleotide is equal to stiff * D, where D is the distance of the nucleotide from the plane, where &amp;lt;math&amp;gt; D = | ux + vy + wz + \mbox{position}| / \sqrt{u^2 + v^2 + w^2 }.&amp;lt;/math&amp;gt;&lt;br /&gt;
For nucleotides for which u*x + v*y + w*z + position &amp;gt;= 0, no force will be exerted.&lt;br /&gt;
&lt;br /&gt;
Here is an example. This plane acts on the whole system and will not exert any force on nucleotides with a positive &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt; coordinate. A force proportional to 48.6 pN * (&amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt; coordinate) will be exerted on all particles . &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
type = repulsion_plane&lt;br /&gt;
#whole system&lt;br /&gt;
particle = -1&lt;br /&gt;
stiff = 1. #48.6 pN /(simulation length unit)  &lt;br /&gt;
dir = 1, 0, 0&lt;br /&gt;
position = 0&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If in the above example you would specify position = 3, then the force would be exerted on all nucleotides with coordinate x &amp;gt; -3.&lt;br /&gt;
&lt;br /&gt;
===Mutual trap===&lt;br /&gt;
This force is useful to form initial configurations. It is a harmonic force that at every moment pulls a particle towards a reference particle. It is possible to specify the separation at which the force will be 0.&lt;br /&gt;
&lt;br /&gt;
A force of this kind is specified with &amp;lt;tt&amp;gt;type = mutual_trap&amp;lt;/tt&amp;gt;. The relevant keys are:&lt;br /&gt;
* &#039;&#039;&#039;particle&#039;&#039;&#039; (int) the particle on which to exert the force.&lt;br /&gt;
* &#039;&#039;&#039;ref_particle&#039;&#039;&#039; (int) particle to pull towards. Please note that this particle will not feel any force (the name mutual trap is thus misleading).&lt;br /&gt;
* &#039;&#039;&#039;stiff&#039;&#039;&#039; (float) stiffness of the trap&lt;br /&gt;
* &#039;&#039;&#039;r0&#039;&#039;&#039; (float) equilibrium distance of the trap.&lt;br /&gt;
&lt;br /&gt;
Here is an example, extracted from the [[Pseudoknot|pseudoknot formation example]]. This will pull particle 14 towards particle 39, favouring an equilibrium distance of 1.4 (which corresponds roughly to the minimum of the hydrogen bonding potential, not a coincidence). The same force with opposite sign is exerted on particle 39 through a separate force. It is not necessary to have both particles feel the force, but it usually works much better.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
type = mutual_trap&lt;br /&gt;
particle = 14&lt;br /&gt;
ref_particle = 39&lt;br /&gt;
stiff = 1.&lt;br /&gt;
r0 = 1.2&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
type = mutual_trap&lt;br /&gt;
particle = 39&lt;br /&gt;
ref_particle = 14&lt;br /&gt;
stiff = 1.&lt;br /&gt;
r0 = 1.2&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Visualisation of structures==&lt;br /&gt;
oxDNA produces a trajectory file where all the relevant information is&lt;br /&gt;
stored. A converter is provided (&amp;lt;tt&amp;gt;traj2vis.py&amp;lt;/tt&amp;gt;) in the&lt;br /&gt;
&amp;lt;tt&amp;gt;UTILS&amp;lt;/tt&amp;gt; directory that is able to produce files in the &amp;lt;tt&amp;gt;xyz&amp;lt;/tt&amp;gt;&lt;br /&gt;
and &amp;lt;tt&amp;gt;pdb&amp;lt;/tt&amp;gt; formats. The same program can be used on a configuration&lt;br /&gt;
file and it will produce a snapshot.&lt;br /&gt;
&lt;br /&gt;
Since the model is coarse-grained, we have to &amp;quot;trick&amp;quot; the visualisers into&lt;br /&gt;
thinking that the interaction sites in the model are actually atoms.&lt;br /&gt;
Advanced nucleic acids representations such as ribbons will not work on the&lt;br /&gt;
outputs.&lt;br /&gt;
&lt;br /&gt;
All the images in the [[Screenshots]] page were produced with the pdb representation using UCSF chimera (see later on).&lt;br /&gt;
&lt;br /&gt;
===xyz format===&lt;br /&gt;
&lt;br /&gt;
just run &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$oxDNA/UTILS/traj2vis.py xyz &amp;lt;trajectory&amp;gt; &amp;lt;topology&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(where &amp;lt;tt&amp;gt;$oxDNA&amp;lt;/tt&amp;gt; is the oxDNA source directory) to get the xyz representation in a file called the same as the trajectory&lt;br /&gt;
file with &amp;lt;tt&amp;gt;.xyz&amp;lt;/tt&amp;gt; appended. Please note that boundary conditions are&lt;br /&gt;
implemented strand-wise, so strands that are bound might appear at two&lt;br /&gt;
different sizes of the box. Also, the center of mass of the system (where&lt;br /&gt;
each strand is weighted the same regardless of the length) is set to 0 at&lt;br /&gt;
each frame. Carbons represent the backbone sites and oxygens the base sites.&lt;br /&gt;
&lt;br /&gt;
The resulting file can be read with a variety of programs. Here we will&lt;br /&gt;
explain how to visualise it sensibly in [http://www.ks.uiuc.edu/Research/vmd/ VMD].&lt;br /&gt;
&lt;br /&gt;
* Run VMD and load the xyz file.&lt;br /&gt;
* In the graphics menu, go to Representations.&lt;br /&gt;
* In the Selected Atoms line, input &amp;lt;tt&amp;gt;name C&amp;lt;/tt&amp;gt;. Also select Drawing method CPK, sphere scale 0.8 and Bond Radius 0.&lt;br /&gt;
* In the Selected Atoms line, input &amp;lt;tt&amp;gt;name O&amp;lt;/tt&amp;gt;. Also select Drawing method CPK, sphere scale 0.6 and Bond Radius 0.&lt;br /&gt;
&lt;br /&gt;
This should produce a ball representation of our model DNA. Bonds&lt;br /&gt;
automatically produced by VMD are NOT meaningful in our context.&lt;br /&gt;
&lt;br /&gt;
===pdb format===&lt;br /&gt;
Run &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$oxDNA/UTILS/traj2chimera.py &amp;lt;trajectory&amp;gt; &amp;lt;topology&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to produce a trajectory/configuration in the pdb format. A further file&lt;br /&gt;
called &amp;lt;tt&amp;gt;chimera.com&amp;lt;/tt&amp;gt; will be produced (more on this later). All&lt;br /&gt;
comments above about periodic boundaries and centre of mass apply here as&lt;br /&gt;
well.&lt;br /&gt;
&lt;br /&gt;
The pdb file can be visualised in VMD just like the xyz format, but a nicer&lt;br /&gt;
output can be produced with [http://www.cgl.ucsf.edu/chimera/ UCSF Chimera] (although only for snapshots at&lt;br /&gt;
the moment) as follows:&lt;br /&gt;
&lt;br /&gt;
Run chimera and load the pdb file. An ugly output will be displayed.&lt;br /&gt;
&lt;br /&gt;
Bring up the command line under the &amp;lt;tt&amp;gt;Tools → General Controls&amp;lt;/tt&amp;gt; menu.&lt;br /&gt;
Input &amp;lt;tt&amp;gt;read chimera.com&amp;lt;/tt&amp;gt; in the command line and press enter. You&lt;br /&gt;
should get a nicer visualisation with different bases in different colors,&lt;br /&gt;
all the covalent bonds in the right place, etc.&lt;br /&gt;
&lt;br /&gt;
On large configurations, the production of ellipsoids will be extremely&lt;br /&gt;
slow. You can remove it by removing the line&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;aniso scale 0.75 smoothing 4&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
from the commands file. Loading the resulting file should be much faster.&lt;br /&gt;
&lt;br /&gt;
UCSF chimera can in turn export the scene in a variety of formats.&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=Documentation&amp;diff=1003</id>
		<title>Documentation</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=Documentation&amp;diff=1003"/>
		<updated>2016-05-21T14:05:38Z</updated>

		<summary type="html">&lt;p&gt;Randisi: Added description of rotating harmonic trap (twist force)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Compile options==&lt;br /&gt;
&lt;br /&gt;
Compiling oxDNA requires that you have a working &amp;lt;tt&amp;gt;cmake&amp;lt;/tt&amp;gt; software and C++ compiler on your machine. The instructions are provided in the [[Download and Installation]] section.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;oxDNA input_file&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The input file contains all the relevant information for the program to run, such as what initial configuration to use, the topology of the system, how often to print the energies to a file, etc. Please make sure you read the [[Thermostat|thermostat]] page if you use molecular dynamics.&lt;br /&gt;
&lt;br /&gt;
==Input file==&lt;br /&gt;
&lt;br /&gt;
As always in UNIX environments, everything is case sensitive.&lt;br /&gt;
&lt;br /&gt;
*Options are in the form key = value&lt;br /&gt;
*There can be arbitrary spaces before and after both key and value&lt;br /&gt;
*Line with a leading # will be treated as comments&lt;br /&gt;
*The | (pipe) sign is the separator between the different values that can be used to specify a value for the key.&lt;br /&gt;
*Keys between [ and ] are optional, the value after the equal sign is the default value&lt;br /&gt;
&lt;br /&gt;
Here we provide a list of the most commonly used input options. The complete and most up-to-date list of possible options can be found [[Input_options|here]] or in the &amp;lt;tt&amp;gt;README&amp;lt;/tt&amp;gt; file in the main directory of the simulation code.&lt;br /&gt;
&lt;br /&gt;
The input options of the previous oxDNA version can be found [[Input_options_of_the_previous_version|here]].&lt;br /&gt;
&lt;br /&gt;
===Generic options===&lt;br /&gt;
The options listed here define the generic behavior of the entire program.&lt;br /&gt;
;[interaction_type = DNA]: DNA|DNA2|RNA|patchy|LJ&lt;br /&gt;
: (selects the model for the simulation. DNA ([[DNA_model_introduction|oxDNA model]]) is the default option. DNA2 ([[DNA_model_introduction#oxDNA2|oxDNA2 model]]), RNA ([[RNA_model_introduction|oxRNA model]]), LJ (Lennard-Jones) and patchy particles are also implemented&lt;br /&gt;
;[sim_type=MD]: MD|MC|VMMC&lt;br /&gt;
:MD = Molecular Dynamics, MC = Monte Carlo, VMMC = Virtual Move Monte Carlo&lt;br /&gt;
;backend: CPU | CUDA &lt;br /&gt;
: (only sim_type=MD is supported if you choose CUDA backend)&lt;br /&gt;
;backend_precision: float|double|mixed&lt;br /&gt;
: (mixed option is available only for CUDA backend. It is recommended choice for optimal performance on CUDA machines, double is recommended for CPU simulations)&lt;br /&gt;
;[debug=0]: 0|1&lt;br /&gt;
: 1 if you want verbose logs, 0 otherwise.&lt;br /&gt;
&lt;br /&gt;
===Simulation options===&lt;br /&gt;
	The options listed here specify the behaviour of the simulation.&lt;br /&gt;
&lt;br /&gt;
;steps: number of steps to be performed.&lt;br /&gt;
		&lt;br /&gt;
;[restart_step_counter=0]: 0|1&lt;br /&gt;
:0 means that the step counter will start from the value read in the configuration file; if 1, the step counter will be reset to 0. The total duration of the simulation is unchanged.&lt;br /&gt;
			&lt;br /&gt;
;[seed=time(NULL)]: seed for the random number generator. On Unix systems, it will use by default a number from /dev/urandom + time(NULL)&lt;br /&gt;
		&lt;br /&gt;
;T: temperature of the simulation. It can be expressed in simulation units or kelvin (append a k or K after the value) or celsius (append a c or C after the value).&lt;br /&gt;
:Examples:&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! Value&lt;br /&gt;
! Simulation Units&lt;br /&gt;
|-&lt;br /&gt;
| 0.1&lt;br /&gt;
| 0.1&lt;br /&gt;
|-&lt;br /&gt;
| 300 K&lt;br /&gt;
| 0.1&lt;br /&gt;
|-&lt;br /&gt;
| 300k&lt;br /&gt;
| 0.1&lt;br /&gt;
|-&lt;br /&gt;
| 26.85c&lt;br /&gt;
| 0.1&lt;br /&gt;
|-&lt;br /&gt;
| 26.85 C &lt;br /&gt;
| 0.1&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
		&lt;br /&gt;
;verlet_skin: if a particle moves more than verlet_skin then the lists will be updated. Its name is somewhat misleading: the actual verlet skin is 2*verlet_skin.&lt;br /&gt;
	&lt;br /&gt;
;salt_concentration: used if interaction_type = DNA2. It specifies the salt concentration in M.&lt;br /&gt;
&lt;br /&gt;
;[use_average_seq=1]: 0|1&lt;br /&gt;
: specifies whether to use the default hard-coded average parameters for base-pairing and stacking interaction strengths or not. If sequence dependence is to be used, set this to 0 and specify seq_dep_file.&lt;br /&gt;
	&lt;br /&gt;
;[seq_dep_file]: specifies the file from which the sequence dependent parameters should be read. Mandatory if use_average_seq=no, ignored otherwise. A sample file is provided (sequence_dependent_parameters.txt).&lt;br /&gt;
&lt;br /&gt;
;[external_forces=0]: 0|1&lt;br /&gt;
: specifies whether there are external forces acting on the nucleotides or not. If it is set to 1, then a file which specifies the external forces&#039; configuration has to be provided (see external_forces_file).&lt;br /&gt;
&lt;br /&gt;
;[external_forces_file]: specifies the file containing all the external forces&#039; configurations. Currently there are six supported force types (see EXAMPLES/TRAPS for some examples):&lt;br /&gt;
:*string&lt;br /&gt;
:*twist&lt;br /&gt;
:*trap&lt;br /&gt;
:*repulsion_plane&lt;br /&gt;
:*repulsion_plane_moving&lt;br /&gt;
:*mutual_trap&lt;br /&gt;
	&lt;br /&gt;
====Molecular dynamics simulations options====&lt;br /&gt;
&lt;br /&gt;
;dt: time step of the integration.&lt;br /&gt;
&lt;br /&gt;
;thermostat: no|refresh|brownian &lt;br /&gt;
:no means no thermostat will be used. refresh will refresh all the particle&#039;s velocities from a maxwellian every newtonian_steps steps. john is an Anderson-like thermostat (see pt). Make sure you read [[Thermostat|thermostat]].&lt;br /&gt;
&lt;br /&gt;
;newtonian_steps: required if thermostat != no&lt;br /&gt;
:number of steps after which a procedure of thermalization will be performed.&lt;br /&gt;
			&lt;br /&gt;
;pt: used if thermostat == john. It&#039;s the probability that a particle&#039;s velocity will be refreshed during a thermalization procedure.&lt;br /&gt;
		&lt;br /&gt;
;diff_coeff: required if pt is not specified&lt;br /&gt;
:used internally to automatically compute the pt that would be needed if we wanted such a self diffusion coefficient. Not used if pt is set.&lt;br /&gt;
&lt;br /&gt;
====Monte Carlo simulations options====&lt;br /&gt;
	&lt;br /&gt;
;[check_energy_every=10]: this number times print_energy_every gives the number of steps after which the energy will be computed from scratch and checked against the actual value computed adding energy differences.&lt;br /&gt;
		&lt;br /&gt;
;[check_energy_threshold=1e-4]:	if abs((old_energy - new_energy)/old_energy) &amp;gt; check_energy_threshold then the program will die and warn the user.&lt;br /&gt;
	&lt;br /&gt;
;ensemble: NVT&lt;br /&gt;
:ensemble of the simulation. More ensembles could be added in future versions.&lt;br /&gt;
	&lt;br /&gt;
;delta_translation: maximum displacement (per dimension) for translational moves in simulation units.&lt;br /&gt;
	&lt;br /&gt;
;delta_translation: maximum displacement for rotational moves in simulation units.&lt;br /&gt;
&lt;br /&gt;
===Input/output===&lt;br /&gt;
The options listed here are used to manage the I/O (read and write configurations, energies and so on)&lt;br /&gt;
	&lt;br /&gt;
;conf_file: initial configuration file. &lt;br /&gt;
		&lt;br /&gt;
;topology: file containing the system&#039;s topology.&lt;br /&gt;
		&lt;br /&gt;
;trajectory_file: the main output of the program. All the configurations will be appended to this file as they are printed.&lt;br /&gt;
		&lt;br /&gt;
;[confs_to_skip=0]: valid only if conf_file is a trajectory. Skip the first confs_to_skip configurations and then load in memory the (confs_to_skip+1)th.&lt;br /&gt;
		&lt;br /&gt;
;[lastconf_file=last_conf.dat]: this is the file where the last configuration is saved (when the program finishes or is killed). Set to last_conf.dat by default&lt;br /&gt;
&lt;br /&gt;
;[refresh_vel=0]: 0|1&lt;br /&gt;
:if 1 the initial velocities will be refreshed from a maxwellian.&lt;br /&gt;
	&lt;br /&gt;
;energy_file: energy output file.&lt;br /&gt;
		&lt;br /&gt;
;[print_energy_every=1000]: this will make the program print the energies every print_energy_every steps.&lt;br /&gt;
		&lt;br /&gt;
;[no_stdout_energy=0]: 0|1&lt;br /&gt;
:if 1 the energy will be printed just to the energy_file.&lt;br /&gt;
		&lt;br /&gt;
;[time_scale=linear]: linear|log_lin&lt;br /&gt;
:using linear configurations will be saved every print_conf_interval.&lt;br /&gt;
:using log_lin configurations will be saved logarithmically for print_conf_ppc times. After that the logarithmic sequence will restart.&lt;br /&gt;
	&lt;br /&gt;
;print_conf_interval: linear interval if time_scale == linear. First step of the logarithmic scale if time_scale == log_lin.&lt;br /&gt;
		&lt;br /&gt;
;[print_reduced_conf_every=0]: every print_reduced_conf_every steps the program will print out the reduced configurations (i.e. confs containing only the centers of mass of strands).&lt;br /&gt;
&lt;br /&gt;
;reduced_conf_output_dir: used if print_reduced_conf_every &amp;gt; 0&lt;br /&gt;
:output directory for reduced_conf files.&lt;br /&gt;
		&lt;br /&gt;
;[log_file=stderr]: file where generic and debug informations will be logged. If not specified then stderr will be used.&lt;br /&gt;
&lt;br /&gt;
==Output files==&lt;br /&gt;
*The log file contains all the relevant information about the simulation (specified options, activated external forces, warnings about misconfigurations, critical errors, etc.). If the log file is omitted, all this information will be displayed on the standard output.&lt;br /&gt;
&lt;br /&gt;
*The energy file layout for MD simulations is&lt;br /&gt;
&lt;br /&gt;
:{|&lt;br /&gt;
| [time (steps * dt)]&lt;br /&gt;
| [potential energy]&lt;br /&gt;
| [kinetic energy]&lt;br /&gt;
| [total energy]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
:while for MC simulations is&lt;br /&gt;
&lt;br /&gt;
:{|&lt;br /&gt;
| [time (steps)]&lt;br /&gt;
| [potential energy]&lt;br /&gt;
| [acceptance ratio for translational moves]&lt;br /&gt;
| [acceptance ratio for rotational moves]&lt;br /&gt;
| [acceptance ratio for volume moves]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
:VMMC output also produces the following extra columns if umbrella sampling is enabled&lt;br /&gt;
:{|&lt;br /&gt;
|[order parameter coordinate 1]&lt;br /&gt;
|[order parameter coordinate 1]&lt;br /&gt;
|...&lt;br /&gt;
|[order parameter coordinate n]&lt;br /&gt;
|[current weight]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
:N.B. potential, kinetic and total energies are divided by the total number of particles.&lt;br /&gt;
&lt;br /&gt;
*Configurations are saved in the trajectory file.&lt;br /&gt;
&lt;br /&gt;
==Configuration and topology files==&lt;br /&gt;
The current state of a system, as specified by oxDNA, is described by two files: a configuration file and a topology file. The configuration file contains all the general information (timestep, energy and box size) and the orientations and positions of each nucleotide. The topology file, on the other hand, keeps track of the backbone-backbone bonds between nucleotides in the same strand. Working configuration and topology files can be found in the &amp;lt;tt&amp;gt;[[Examples|EXAMPLES]]&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
===Configuration file===&lt;br /&gt;
The first three rows of a configuration file contain the timestep &amp;lt;tt&amp;gt;T&amp;lt;/tt&amp;gt; at which the configuration has been printed, the length of the box sides &amp;lt;tt&amp;gt;Lx&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;Ly&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Lz&amp;lt;/tt&amp;gt; and the total, potential and kinetic energies, &amp;lt;tt&amp;gt;Etot&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;U&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;K&amp;lt;/tt&amp;gt;, respectively:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
t = T&lt;br /&gt;
b = Lz Ly Lz&lt;br /&gt;
E = Etot U K&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after this header, each row contains position of the centre of mass, orientation, velocity and angular velocity of a single nucleotide in the following order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\overbrace{r_x r_y r_z}^{\rm Position} \overbrace{b_x b_y b_z}^{\rm Backbone-base versor} \overbrace{n_x n_y n_z}^{\rm Normal versor} \overbrace{v_x v_y v_z}^{\rm Velocity} \overbrace{L_x L_y L_z}^{\rm Angular velocity}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Topology file===&lt;br /&gt;
The topology file stores the intra-strand, fixed bonding topology (i.e. which nucleotides share backbone links). The first row contains the total number of nucleotides &amp;lt;tt&amp;gt;N&amp;lt;/tt&amp;gt; and the number of strands &amp;lt;tt&amp;gt;Ns&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
N Ns&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this header, the &amp;lt;tt&amp;gt;i&amp;lt;/tt&amp;gt;-th row specifies strand, base and 3&#039; and 5&#039; neighbors of the &amp;lt;tt&amp;gt;i&amp;lt;/tt&amp;gt;-th nucleotide in this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S B 3&#039; 5&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where S is the index of the strand (starting from 1) which the nucleotide belongs to, B is the base and 3&#039; and 5&#039; specify the index of the nucleotides with which the &amp;lt;tt&amp;gt;i&amp;lt;/tt&amp;gt;-th nucleotide is bonded in the 3&#039; and 5&#039; direction, respectively. A &amp;lt;tt&amp;gt;-1&amp;lt;/tt&amp;gt; signals that the nucleotide terminates the strand in either 3&#039; or 5&#039; direction. The topology file of a strand of sequence &amp;lt;tt&amp;gt;GCGTTG&amp;lt;/tt&amp;gt; would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
6 1&lt;br /&gt;
1 G -1 1&lt;br /&gt;
1 C 0 2&lt;br /&gt;
1 G 1 3&lt;br /&gt;
1 T 2 4&lt;br /&gt;
1 T 3 5&lt;br /&gt;
1 G 4 -1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Specifying the topology in this way can simplify the process of simulating, for example, circular DNA.&lt;br /&gt;
&lt;br /&gt;
===Generation of initial configurations===&lt;br /&gt;
In order to generate initial configuration and topology files, we provide the &amp;lt;tt&amp;gt;${oxDNA}/UTILS/generate-sa.py&amp;lt;/tt&amp;gt; script. The usage of the script is&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;generate-sa.py &amp;lt;box side&amp;gt; &amp;lt;file with sequence&amp;gt;&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
where &amp;lt;tt&amp;gt;&amp;lt;box side&amp;gt;&amp;lt;/tt&amp;gt; specifies the length of the box side in simulation units and &amp;lt;tt&amp;gt;&amp;lt;file with sequence&amp;gt;&amp;lt;/tt&amp;gt; contains the sequence of the strands to be generated, one row per strand. If double strands are needed, each sequence must be preceded by &amp;lt;tt&amp;gt;DOUBLE&amp;lt;/tt&amp;gt;. For example, a file containing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DOUBLE AGGGCT&lt;br /&gt;
CCTGTA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would generate a double strand with a sequence &amp;lt;tt&amp;gt;AGGGCT&amp;lt;/tt&amp;gt; and a single strand with a sequence &amp;lt;tt&amp;gt;CCTGTA&amp;lt;/tt&amp;gt;. The sequences are given in 3&#039;-5&#039; order.&lt;br /&gt;
&lt;br /&gt;
Positions and orientations of the strands are all chosen at random in such a way that the resulting initial configuration does not contain significant excluded volume interactions between nucleotides belonging to different strands. Generated single- and double-strands have helical conformations (i.e. they are in the minimum of the intra-strand interaction energy).&lt;br /&gt;
&lt;br /&gt;
The output configuration and topology are stored in &amp;lt;tt&amp;gt;generated.dat&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;generated.top&amp;lt;/tt&amp;gt;, respectively. &lt;br /&gt;
Since this script will initialize nucleotides&#039; velocities and angular velocities to 0, when performing a molecular (or Brownian) dynamics simulation remember to put &amp;lt;tt&amp;gt;refresh_vel = 1&amp;lt;/tt&amp;gt; in the [[Documentation#Input_file|input]] file.&lt;br /&gt;
&lt;br /&gt;
==Analysis of configurations==&lt;br /&gt;
The configurations produced by oxDNA can be analysed with the &amp;lt;tt&amp;gt;output_bonds&amp;lt;/tt&amp;gt; program in &amp;lt;tt&amp;gt;${oxDNA}/UTILS/process_data/&amp;lt;/tt&amp;gt; directory. This program takes as command line arguments the input file (to recover the temperature and topology file), a configuration/trajectory file and an optional number. Since &amp;lt;tt&amp;gt;output_bonds&amp;lt;/tt&amp;gt; reads analyses a single configuration, the optional number selects the configuration which it needs to analyse in the trajectory. Analysing a whole trajectory can be done by looping over a counter.&lt;br /&gt;
&lt;br /&gt;
Please note that &amp;lt;tt&amp;gt;output_bonds&amp;lt;/tt&amp;gt; is not compiled automatically. If you never compiled it, do so as described in the [[Download_and_Installation#Installation|installation instructions]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;output_bonds&amp;lt;/tt&amp;gt; can be used as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
${oxDNA}/UTILS/process_data/output_bonds &amp;lt;input_file&amp;gt; &amp;lt;trajectory_file&amp;gt; [counter]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The program outputs some debugging information to the standard error and information regarding the interaction energies to the standard output. The contributions arising from each of the terms in the potential (see the appendix of [[Publications|Ref. 2]]) are reported for each pair of nucleotides that have non-zero total interactions.&lt;br /&gt;
&lt;br /&gt;
This output can be easily parsed to analyse the configurations.&lt;br /&gt;
&lt;br /&gt;
For each pair of nucleotides that do interact in the configuration, the program prints out a line containing:&lt;br /&gt;
* The id of the two particles (starting from 0)&lt;br /&gt;
* The total interaction energy&lt;br /&gt;
* The hydrogen bonding (base pairing) energy&lt;br /&gt;
* The stacking energy&lt;br /&gt;
* The cross stacking energy&lt;br /&gt;
* The excluded volume energy&lt;br /&gt;
* The FENE interaction energy&lt;br /&gt;
* A letter indicating a status code. This will be &amp;lt;tt&amp;gt;N&amp;lt;/tt&amp;gt; for pairs that interact through bonded interactions (i.e. they are neighbors along a strand) and it will be &amp;lt;tt&amp;gt;H&amp;lt;/tt&amp;gt; when a base pair is present. Our definition of base pair is when two nucleotides have a hydrogen bonding energy less than -0.1 in simulation units (see [[Publications|Ref. 2]]).&lt;br /&gt;
&lt;br /&gt;
===Geometry of the Model===&lt;br /&gt;
In the configuration/trajectory files only the positions and orientations of the nucleotides are stored. If one wants to recover the positions of the individual interaction sites in the model, some maths need to be done.&lt;br /&gt;
&lt;br /&gt;
The position of the base, stacking and backbone sites can be recovered as follows:&lt;br /&gt;
&lt;br /&gt;
base site:     (center) + 0.40 * (axis vector)&lt;br /&gt;
&lt;br /&gt;
stacking site: (center) + 0.34 * (axis vector)&lt;br /&gt;
&lt;br /&gt;
backbone site: (center) - 0.40 * (axis_vector)&lt;br /&gt;
&lt;br /&gt;
The picture in the [[Model_introduction|introduction]] might help understanding where the sites are.&lt;br /&gt;
&lt;br /&gt;
==External Forces==&lt;br /&gt;
The code implements several types of external forces that can be imposed on the system that can be used either to simulate tension exerted on DNA or simply to accelerate the formation of secondary or tertiary structure. External forces can be tricky to treat, especially in a dynamics simulation, since they are an external source of work. Care should be taken in adjusting the time step, thermostat parameters and such.&lt;br /&gt;
&lt;br /&gt;
To enable external forces, one needs to specify &amp;lt;tt&amp;gt;external_forces = 1&amp;lt;/tt&amp;gt; in the input file and also supply an external force file to read from with the key &amp;lt;tt&amp;gt;external_forces_file = &amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The syntax of the external forces file is quite simple. Examples of such files can be found in the [[Hairpin_formation|hairpin formation]] and [[Pseudoknot|Pseudoknot formation]] examples. Each force is specified within a block contained in curly brackets. Empty lines and lines beginning with an hash symbol (&amp;lt;tt&amp;gt;#&amp;lt;/tt&amp;gt;) are ignored. Different forces require different keys to be present. If the file has the wrong syntax, oxDNA should spit out a sensible error message while parsing the file.&lt;br /&gt;
&lt;br /&gt;
The different types of forces implemented at the moment are:&lt;br /&gt;
* harmonic trap&lt;br /&gt;
* string &lt;br /&gt;
* repulsion plane&lt;br /&gt;
* mutual trap&lt;br /&gt;
&lt;br /&gt;
All forces act on the centre of the particle.&lt;br /&gt;
&lt;br /&gt;
Forces of different kinds can be combined in the same simulation. There is a maximum number of 10 external forces per particle for memory reasons. This can be manually overridden recompiling the code with a different value of the macro &amp;lt;tt&amp;gt;MAX_EXT_FORCES&amp;lt;/tt&amp;gt; (currently 10) in &amp;lt;tt&amp;gt;defs.h&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===String===&lt;br /&gt;
A string is implemented as a force that does not depend on the particle position. Its value can be constant or can change linearly with time. It is useful as it does not fluctuate with time.&lt;br /&gt;
&lt;br /&gt;
A force of this kind is specified with &amp;lt;tt&amp;gt;type = string&amp;lt;/tt&amp;gt;. The relevant keys are:&lt;br /&gt;
* &#039;&#039;&#039;particle&#039;&#039;&#039; (int) the particle on which to exert the force&lt;br /&gt;
* &#039;&#039;&#039;F0&#039;&#039;&#039; (float) the value of the force at time = 0 in simulation units (please note that the value of the time may or may not be reset when starting a simulation, depending on the input file)&lt;br /&gt;
* &#039;&#039;&#039;rate&#039;&#039;&#039; (float) growing rate of the force (simulation units/time steps). Typical values are very small (&amp;lt; 10^(-5))&lt;br /&gt;
* &#039;&#039;&#039;dir&#039;&#039;&#039; (3 floats separated by commas) direction of the force (automatically normalised by the code)&lt;br /&gt;
&lt;br /&gt;
The following bit of code will create an external force on the first nucleotide in the system starting at 1 simulation units (48.6 pN) and growing linearly with time at the rate of 48.6pN every million time steps. The force will pull the nucleotide along the &amp;lt;tt&amp;gt;z&amp;lt;/tt&amp;gt; direction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
type = string&lt;br /&gt;
particle = 0&lt;br /&gt;
F0 = 1.&lt;br /&gt;
rate = 1e-6&lt;br /&gt;
dir = 0., 0., 1.&lt;br /&gt;
} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Harmonic trap===&lt;br /&gt;
This type of force implements an harmonic trap, of arbitrary stiffness, that can move linearly with time. It can be useful to fix the position of the nucleotides to simulate attachment to something or to implement (quasi) constant extension simulations.&lt;br /&gt;
&lt;br /&gt;
A force of this kind is specified with &amp;lt;tt&amp;gt;type = trap&amp;lt;/tt&amp;gt;. The relevant keys are:&lt;br /&gt;
* &#039;&#039;&#039;particle&#039;&#039;&#039; (int) the particle on which to exert the force&lt;br /&gt;
* &#039;&#039;&#039;pos0&#039;&#039;&#039; (3 floats separated by commas) rest position of the trap&lt;br /&gt;
* &#039;&#039;&#039;stiff&#039;&#039;&#039; (float) stiffness of the trap (the force is stiff * dx)&lt;br /&gt;
* &#039;&#039;&#039;rate&#039;&#039;&#039; (float) speed of the trap (length simulation units/time steps)&lt;br /&gt;
* &#039;&#039;&#039;dir&#039;&#039;&#039; (3 floats separated by commas) direction of movement of the trap&lt;br /&gt;
&lt;br /&gt;
Here is an example input for a harmonic trap acting on the third nucleotide constraining it to stay close to the origin. In this example the trap does not move (&amp;lt;tt&amp;gt;rate=0&amp;lt;/tt&amp;gt;), but one could have it move at a constant speed along the direction specified by &amp;lt;tt&amp;gt;dir&amp;lt;/tt&amp;gt;, in this case the &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt; direction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
type = trap&lt;br /&gt;
particle = 2&lt;br /&gt;
pos0 = 0., 0., 0.&lt;br /&gt;
stiff = 1.0&lt;br /&gt;
rate = 0.&lt;br /&gt;
dir = 1.,0.,0.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that the trap does not comply with periodic boundary conditions. This is most likely what you want.&lt;br /&gt;
&lt;br /&gt;
===Rotating harmonic trap===&lt;br /&gt;
Same as the harmonic trap, with the exception that the trap position rotates in space with constant angular velocity. Several of these can be used e.g. to twist DNA.&lt;br /&gt;
&lt;br /&gt;
A force of this kind is specified with &amp;lt;tt&amp;gt;type = twist&amp;lt;/tt&amp;gt;. The relevant keys are:&lt;br /&gt;
* &#039;&#039;&#039;particle&#039;&#039;&#039; (int) the particle on which to exert the force&lt;br /&gt;
* &#039;&#039;&#039;pos0&#039;&#039;&#039; (3 floats separated by commas) position of the trap when the rotation angle equals 0&lt;br /&gt;
* &#039;&#039;&#039;stiff&#039;&#039;&#039; (float) stiffness of the trap (the force is stiff * dx)&lt;br /&gt;
* &#039;&#039;&#039;rate&#039;&#039;&#039; (float) angular velocity of the trap (length simulation units/time steps)&lt;br /&gt;
* &#039;&#039;&#039;base&#039;&#039;&#039; (float) initial phase of the trap &lt;br /&gt;
* &#039;&#039;&#039;axis&#039;&#039;&#039; (3 floats separated by commas) rotation axis of the trap&lt;br /&gt;
* &#039;&#039;&#039;mask&#039;&#039;&#039; (3 floats separated by commas) masking vector of the trap - the force vector will be element-wise multiplied by the masking vector. &lt;br /&gt;
&lt;br /&gt;
Here is an example input for a harmonic trap acting on the third nucleotide constraining it to stay close to the origin. In this example the trap does not move (&amp;lt;tt&amp;gt;rate=0&amp;lt;/tt&amp;gt;), but one could have it move at a constant speed along the direction specified by &amp;lt;tt&amp;gt;dir&amp;lt;/tt&amp;gt;, in this case the &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt; direction.&lt;br /&gt;
&lt;br /&gt;
The following is an example input for a rotating trap acting on the first nucleotide forcing it to stay close to a point that starts at &amp;lt;tt&amp;gt;pos0&amp;lt;/tt&amp;gt; and then rotates around an axis containing the &amp;lt;tt&amp;gt;center&amp;lt;/tt&amp;gt; point and parallel to the z axis. In this case we want to neglect the force component along the x-axis, so we set &amp;lt;tt&amp;gt; mask &amp;lt;/tt&amp;gt; accordingly.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
type = twist&lt;br /&gt;
particle = 0&lt;br /&gt;
stiff = 1.00&lt;br /&gt;
rate = 1e-5&lt;br /&gt;
base = 0.&lt;br /&gt;
pos0 = 15, 0.674909093169, 18.6187733563&lt;br /&gt;
center = 13., 0.674909093169, 18.6187733563&lt;br /&gt;
axis = 0, 0, 1&lt;br /&gt;
mask = 1, 0, 0&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Repulsion plane===&lt;br /&gt;
This kind of external force implements a repulsion plane that constrains a particle (or the whole system) to stay on one side of it. It is implemented as a harmonic repulsion, but the stiffness can be made arbitrarily high to mimic a hard repulsion.&lt;br /&gt;
&lt;br /&gt;
A force of this kind is specified with &amp;lt;tt&amp;gt;type = repulsion_plane&amp;lt;/tt&amp;gt;. The relevant keys are:&lt;br /&gt;
* &#039;&#039;&#039;particle&#039;&#039;&#039; (int) the particle on which to exert the force. If set to the special value -1, the force will be exerted on all particles.&lt;br /&gt;
* &#039;&#039;&#039;stiff&#039;&#039;&#039; (float) stiffness of the trap (the force is stiff * D, where D is distance from the plane. The force is exerted only if the nucleotide is below the plane)&lt;br /&gt;
* &#039;&#039;&#039;dir&#039;&#039;&#039; (3 floats separated by commas) a direction normal to the plane&lt;br /&gt;
* &#039;&#039;&#039;position&#039;&#039;&#039; (1 float number) specifies the position of the plane&lt;br /&gt;
&lt;br /&gt;
If direction is &amp;lt;tt&amp;gt; direction =  u,v,w &amp;lt;/tt&amp;gt; , then the plane contains all the points (x,y,z) that satisfy the equation: u*x + v*y + w*z + position = 0.&lt;br /&gt;
Only nucleotides  with coordinates (x,y,z) that satisfy u*x + v*y + w*z + position &amp;lt; 0 will feel the force.&lt;br /&gt;
The force exerted on a nucleotide is equal to stiff * D, where D is the distance of the nucleotide from the plane, where &amp;lt;math&amp;gt; D = | ux + vy + wz + \mbox{position}| / \sqrt{u^2 + v^2 + w^2 }.&amp;lt;/math&amp;gt;&lt;br /&gt;
For nucleotides for which u*x + v*y + w*z + position &amp;gt;= 0, no force will be exerted.&lt;br /&gt;
&lt;br /&gt;
Here is an example. This plane acts on the whole system and will not exert any force on nucleotides with a positive &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt; coordinate. A force proportional to 48.6 pN * (&amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt; coordinate) will be exerted on all particles . &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
type = repulsion_plane&lt;br /&gt;
#whole system&lt;br /&gt;
particle = -1&lt;br /&gt;
stiff = 1. #48.6 pN /(simulation length unit)  &lt;br /&gt;
dir = 1, 0, 0&lt;br /&gt;
position = 0&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If in the above example you would specify position = 3, then the force would be exerted on all nucleotides with coordinate x &amp;gt; -3.&lt;br /&gt;
&lt;br /&gt;
===Mutual trap===&lt;br /&gt;
This force is useful to form initial configurations. It is a harmonic force that at every moment pulls a particle towards a reference particle. It is possible to specify the separation at which the force will be 0.&lt;br /&gt;
&lt;br /&gt;
A force of this kind is specified with &amp;lt;tt&amp;gt;type = mutual_trap&amp;lt;/tt&amp;gt;. The relevant keys are:&lt;br /&gt;
* &#039;&#039;&#039;particle&#039;&#039;&#039; (int) the particle on which to exert the force.&lt;br /&gt;
* &#039;&#039;&#039;ref_particle&#039;&#039;&#039; (int) particle to pull towards. Please note that this particle will not feel any force (the name mutual trap is thus misleading).&lt;br /&gt;
* &#039;&#039;&#039;stiff&#039;&#039;&#039; (float) stiffness of the trap&lt;br /&gt;
* &#039;&#039;&#039;r0&#039;&#039;&#039; (float) equilibrium distance of the trap.&lt;br /&gt;
&lt;br /&gt;
Here is an example, extracted from the [[Pseudoknot|pseudoknot formation example]]. This will pull particle 14 towards particle 39, favouring an equilibrium distance of 1.4 (which corresponds roughly to the minimum of the hydrogen bonding potential, not a coincidence). The same force with opposite sign is exerted on particle 39 through a separate force. It is not necessary to have both particles feel the force, but it usually works much better.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
type = mutual_trap&lt;br /&gt;
particle = 14&lt;br /&gt;
ref_particle = 39&lt;br /&gt;
stiff = 1.&lt;br /&gt;
r0 = 1.2&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
type = mutual_trap&lt;br /&gt;
particle = 39&lt;br /&gt;
ref_particle = 14&lt;br /&gt;
stiff = 1.&lt;br /&gt;
r0 = 1.2&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Visualisation of structures==&lt;br /&gt;
oxDNA produces a trajectory file where all the relevant information is&lt;br /&gt;
stored. A converter is provided (&amp;lt;tt&amp;gt;traj2vis.py&amp;lt;/tt&amp;gt;) in the&lt;br /&gt;
&amp;lt;tt&amp;gt;UTILS&amp;lt;/tt&amp;gt; directory that is able to produce files in the &amp;lt;tt&amp;gt;xyz&amp;lt;/tt&amp;gt;&lt;br /&gt;
and &amp;lt;tt&amp;gt;pdb&amp;lt;/tt&amp;gt; formats. The same program can be used on a configuration&lt;br /&gt;
file and it will produce a snapshot.&lt;br /&gt;
&lt;br /&gt;
Since the model is coarse-grained, we have to &amp;quot;trick&amp;quot; the visualisers into&lt;br /&gt;
thinking that the interaction sites in the model are actually atoms.&lt;br /&gt;
Advanced nucleic acids representations such as ribbons will not work on the&lt;br /&gt;
outputs.&lt;br /&gt;
&lt;br /&gt;
All the images in the [[Screenshots]] page were produced with the pdb representation using UCSF chimera (see later on).&lt;br /&gt;
&lt;br /&gt;
===xyz format===&lt;br /&gt;
&lt;br /&gt;
just run &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$oxDNA/UTILS/traj2vis.py xyz &amp;lt;trajectory&amp;gt; &amp;lt;topology&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(where &amp;lt;tt&amp;gt;$oxDNA&amp;lt;/tt&amp;gt; is the oxDNA source directory) to get the xyz representation in a file called the same as the trajectory&lt;br /&gt;
file with &amp;lt;tt&amp;gt;.xyz&amp;lt;/tt&amp;gt; appended. Please note that boundary conditions are&lt;br /&gt;
implemented strand-wise, so strands that are bound might appear at two&lt;br /&gt;
different sizes of the box. Also, the center of mass of the system (where&lt;br /&gt;
each strand is weighted the same regardless of the length) is set to 0 at&lt;br /&gt;
each frame. Carbons represent the backbone sites and oxygens the base sites.&lt;br /&gt;
&lt;br /&gt;
The resulting file can be read with a variety of programs. Here we will&lt;br /&gt;
explain how to visualise it sensibly in [http://www.ks.uiuc.edu/Research/vmd/ VMD].&lt;br /&gt;
&lt;br /&gt;
* Run VMD and load the xyz file.&lt;br /&gt;
* In the graphics menu, go to Representations.&lt;br /&gt;
* In the Selected Atoms line, input &amp;lt;tt&amp;gt;name C&amp;lt;/tt&amp;gt;. Also select Drawing method CPK, sphere scale 0.8 and Bond Radius 0.&lt;br /&gt;
* In the Selected Atoms line, input &amp;lt;tt&amp;gt;name O&amp;lt;/tt&amp;gt;. Also select Drawing method CPK, sphere scale 0.6 and Bond Radius 0.&lt;br /&gt;
&lt;br /&gt;
This should produce a ball representation of our model DNA. Bonds&lt;br /&gt;
automatically produced by VMD are NOT meaningful in our context.&lt;br /&gt;
&lt;br /&gt;
===pdb format===&lt;br /&gt;
Run &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$oxDNA/UTILS/traj2chimera.py &amp;lt;trajectory&amp;gt; &amp;lt;topology&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to produce a trajectory/configuration in the pdb format. A further file&lt;br /&gt;
called &amp;lt;tt&amp;gt;chimera.com&amp;lt;/tt&amp;gt; will be produced (more on this later). All&lt;br /&gt;
comments above about periodic boundaries and centre of mass apply here as&lt;br /&gt;
well.&lt;br /&gt;
&lt;br /&gt;
The pdb file can be visualised in VMD just like the xyz format, but a nicer&lt;br /&gt;
output can be produced with [http://www.cgl.ucsf.edu/chimera/ UCSF Chimera] (although only for snapshots at&lt;br /&gt;
the moment) as follows:&lt;br /&gt;
&lt;br /&gt;
Run chimera and load the pdb file. An ugly output will be displayed.&lt;br /&gt;
&lt;br /&gt;
Bring up the command line under the &amp;lt;tt&amp;gt;Tools → General Controls&amp;lt;/tt&amp;gt; menu.&lt;br /&gt;
Input &amp;lt;tt&amp;gt;read chimera.com&amp;lt;/tt&amp;gt; in the command line and press enter. You&lt;br /&gt;
should get a nicer visualisation with different bases in different colors,&lt;br /&gt;
all the covalent bonds in the right place, etc.&lt;br /&gt;
&lt;br /&gt;
On large configurations, the production of ellipsoids will be extremely&lt;br /&gt;
slow. You can remove it by removing the line&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;aniso scale 0.75 smoothing 4&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
from the commands file. Loading the resulting file should be much faster.&lt;br /&gt;
&lt;br /&gt;
UCSF chimera can in turn export the scene in a variety of formats.&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=Gallery_of_studied_systems&amp;diff=1000</id>
		<title>Gallery of studied systems</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=Gallery_of_studied_systems&amp;diff=1000"/>
		<updated>2015-12-17T19:09:11Z</updated>

		<summary type="html">&lt;p&gt;Randisi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The systems studied with the oxDNA or oxRNA model with the links to the respective papers provided below:&lt;br /&gt;
&lt;br /&gt;
==DNA systems==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=250px heights=180px &amp;gt;&lt;br /&gt;
Image:tweezers.png|&#039;&#039;[http://prl.aps.org/abstract/PRL/v104/i17/e178101 DNA nanotweezers]&#039;&#039;&lt;br /&gt;
Image:burntbridges.png|&#039;&#039;[http://link.springer.com/article/10.1007%2Fs11047-013-9391-8 Burnt bridges motor]&#039;&#039; &lt;br /&gt;
Image:two_foot.png|&#039;&#039;[http://pubs.acs.org/doi/abs/10.1021/nn3058483 Two-footed DNA walker]&#039;&#039;&lt;br /&gt;
Image:ss_pull.png|&#039;&#039;[http://jcp.aip.org/resource/1/jcpsa6/v137/i13/p135101_s1 Single stranded pulling]&#039;&#039;&lt;br /&gt;
Image:kissing_hairpins.png|&#039;&#039;Kissing hairpins (studied with [http://jcp.aip.org/resource/1/jcpsa6/v136/i21/p215102_s1 the average model] and [http://jcp.aip.org/resource/1/jcpsa6/v137/i13/p135101_s1 the sequence-dependent model])&#039;&#039;&lt;br /&gt;
Image:longhpin.png|&#039;&#039;[http://jcp.aip.org/resource/1/jcpsa6/v137/i13/p135101_s1 Loop sequence effects on melting temperatures of hairpins]&#039;&#039;&lt;br /&gt;
Image:sstack.png|&#039;&#039;[http://jcp.aip.org/resource/1/jcpsa6/v137/i13/p135101_s1 Heterogeneous stacking transition in single strands]&#039;&#039;&lt;br /&gt;
Image:fray.png|&#039;&#039;[http://jcp.aip.org/resource/1/jcpsa6/v137/i13/p135101_s1 Duplex fraying]&#039;&#039;&lt;br /&gt;
Image:strand_displace.png|&#039;&#039;[http://nar.oxfordjournals.org/content/early/2013/09/07/nar.gkt801.full?sid=762d341b-b72f-4a09-9235-20ad3ef8aeed Biophysics of strand displacement]&#039;&#039;&lt;br /&gt;
Image:over_stretch.png|&#039;&#039;[http://jcp.aip.org/resource/1/jcpsa6/v138/i8/p085101_s1 Overstretching]&#039;&#039;&lt;br /&gt;
Image:cruci.png|&#039;&#039;[http://pubs.acs.org/doi/abs/10.1021/jp3080755 DNA Cruciforms]&#039;&#039;&lt;br /&gt;
Image:hybridization.png|&#039;&#039;[http://nar.oxfordjournals.org/content/early/2013/08/08/nar.gkt687 Hybridization kinetics]&#039;&#039;&lt;br /&gt;
Image:plecto.png|&#039;&#039;[http://arxiv.org/abs/1404.2869 Plectonemes]&#039;&#039;&lt;br /&gt;
Image:colorato.png|&#039;&#039;[http://pubs.acs.org/doi/abs/10.1021/nn501138w Gels made of tetravalent DNA nanostars]&#039;&#039;&lt;br /&gt;
Image:DNA_nematic.png|&#039;&#039;[http://pubs.rsc.org/en/content/articlehtml/2012/sm/c2sm25845e Nematic phases formed by short DNA duplexes]&#039;&#039;&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==RNA systems==&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=250px heights=180px &amp;gt;&lt;br /&gt;
Image:pseudo.png|&#039;&#039;[http://arxiv.org/abs/1403.4180 Pseudoknot folding thermodynamics]&#039;&#039;&lt;br /&gt;
Image:khp.png|&#039;&#039;[http://arxiv.org/abs/1403.4180 Kissing complex]&#039;&#039;&lt;br /&gt;
Image:nanoring.png|&#039;&#039;[http://arxiv.org/abs/1403.4180 Nanoring]&#039;&#039;&lt;br /&gt;
Image:unzip.png|&#039;&#039;[http://arxiv.org/abs/1403.4180 Hairpin unzipping]&#039;&#039;&lt;br /&gt;
Image:RNA_plectoneme.png|&#039;&#039;[http://scitation.aip.org/content/aip/journal/jcp/143/24/10.1063/1.4933066 Plectonemes]&#039;&#039;&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=File:RNA_plectoneme.png&amp;diff=999</id>
		<title>File:RNA plectoneme.png</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=File:RNA_plectoneme.png&amp;diff=999"/>
		<updated>2015-12-17T19:07:17Z</updated>

		<summary type="html">&lt;p&gt;Randisi: A plectoneme simulated in the paper &amp;quot;Coarse-grained modelling of supercoiled RNA&amp;quot; http://scitation.aip.org/content/aip/journal/jcp/143/24/10.1063/1.4933066&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A plectoneme simulated in the paper &amp;quot;Coarse-grained modelling of supercoiled RNA&amp;quot; http://scitation.aip.org/content/aip/journal/jcp/143/24/10.1063/1.4933066&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
	<entry>
		<id>https://dna.physics.ox.ac.uk/index.php?title=Gallery_of_studied_systems&amp;diff=998</id>
		<title>Gallery of studied systems</title>
		<link rel="alternate" type="text/html" href="https://dna.physics.ox.ac.uk/index.php?title=Gallery_of_studied_systems&amp;diff=998"/>
		<updated>2015-12-17T19:04:44Z</updated>

		<summary type="html">&lt;p&gt;Randisi: Added RNA plectoneme&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The systems studied with the oxDNA or oxRNA model with the links to the respective papers provided below:&lt;br /&gt;
&lt;br /&gt;
==DNA systems==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=250px heights=180px &amp;gt;&lt;br /&gt;
Image:tweezers.png|&#039;&#039;[http://prl.aps.org/abstract/PRL/v104/i17/e178101 DNA nanotweezers]&#039;&#039;&lt;br /&gt;
Image:burntbridges.png|&#039;&#039;[http://link.springer.com/article/10.1007%2Fs11047-013-9391-8 Burnt bridges motor]&#039;&#039; &lt;br /&gt;
Image:two_foot.png|&#039;&#039;[http://pubs.acs.org/doi/abs/10.1021/nn3058483 Two-footed DNA walker]&#039;&#039;&lt;br /&gt;
Image:ss_pull.png|&#039;&#039;[http://jcp.aip.org/resource/1/jcpsa6/v137/i13/p135101_s1 Single stranded pulling]&#039;&#039;&lt;br /&gt;
Image:kissing_hairpins.png|&#039;&#039;Kissing hairpins (studied with [http://jcp.aip.org/resource/1/jcpsa6/v136/i21/p215102_s1 the average model] and [http://jcp.aip.org/resource/1/jcpsa6/v137/i13/p135101_s1 the sequence-dependent model])&#039;&#039;&lt;br /&gt;
Image:longhpin.png|&#039;&#039;[http://jcp.aip.org/resource/1/jcpsa6/v137/i13/p135101_s1 Loop sequence effects on melting temperatures of hairpins]&#039;&#039;&lt;br /&gt;
Image:sstack.png|&#039;&#039;[http://jcp.aip.org/resource/1/jcpsa6/v137/i13/p135101_s1 Heterogeneous stacking transition in single strands]&#039;&#039;&lt;br /&gt;
Image:fray.png|&#039;&#039;[http://jcp.aip.org/resource/1/jcpsa6/v137/i13/p135101_s1 Duplex fraying]&#039;&#039;&lt;br /&gt;
Image:strand_displace.png|&#039;&#039;[http://nar.oxfordjournals.org/content/early/2013/09/07/nar.gkt801.full?sid=762d341b-b72f-4a09-9235-20ad3ef8aeed Biophysics of strand displacement]&#039;&#039;&lt;br /&gt;
Image:over_stretch.png|&#039;&#039;[http://jcp.aip.org/resource/1/jcpsa6/v138/i8/p085101_s1 Overstretching]&#039;&#039;&lt;br /&gt;
Image:cruci.png|&#039;&#039;[http://pubs.acs.org/doi/abs/10.1021/jp3080755 DNA Cruciforms]&#039;&#039;&lt;br /&gt;
Image:hybridization.png|&#039;&#039;[http://nar.oxfordjournals.org/content/early/2013/08/08/nar.gkt687 Hybridization kinetics]&#039;&#039;&lt;br /&gt;
Image:plecto.png|&#039;&#039;[http://arxiv.org/abs/1404.2869 Plectonemes]&#039;&#039;&lt;br /&gt;
Image:colorato.png|&#039;&#039;[http://pubs.acs.org/doi/abs/10.1021/nn501138w Gels made of tetravalent DNA nanostars]&#039;&#039;&lt;br /&gt;
Image:DNA_nematic.png|&#039;&#039;[http://pubs.rsc.org/en/content/articlehtml/2012/sm/c2sm25845e Nematic phases formed by short DNA duplexes]&#039;&#039;&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==RNA systems==&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=250px heights=180px &amp;gt;&lt;br /&gt;
Image:pseudo.png|&#039;&#039;[http://arxiv.org/abs/1403.4180 Pseudoknot folding thermodynamics]&#039;&#039;&lt;br /&gt;
Image:khp.png|&#039;&#039;[http://arxiv.org/abs/1403.4180 Kissing complex]&#039;&#039;&lt;br /&gt;
Image:nanoring.png|&#039;&#039;[http://arxiv.org/abs/1403.4180 Nanoring]&#039;&#039;&lt;br /&gt;
Image:unzip.png|&#039;&#039;[http://arxiv.org/abs/1403.4180 Hairpin unzipping]&#039;&#039;&lt;br /&gt;
Image:RNA_plectoneme.png|&#039;&#039;[http://scitation.aip.org/content/aip/journal/jcp/143/24/10.1063/1.4933066]&#039;&#039;&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Randisi</name></author>
	</entry>
</feed>