Output plugins are routines which can be activated in DynamO to collect measurements on the simulation while it is running. Although a lot of data can be measured from the configuration files, some properties (e.g., transport coefficients) must be measured using output plugins. There are a wide range of properties which can be measured by DynamO and these are listed below.

All data collected by active output plugins is written into a single XML file at the end of a simulation (output.xml.bz2 by default). Each output plugin has its own section in this file.

DynamO automatically loads the Misc output plugin as it samples a wide range of properties of the system which are computationally inexpensive to collect; however, all other output plugins must be enabled manually. How to enable a plugin is discussed in the following section:

Once you have chosen a plugin to load, you simply add it to the dynarun command line using the -L option. For example, to load the internal energy histogram plugin, you would run

dynarun config.xml -c 1000000 -L IntEnergyHist


And the output.xml.bz2 file generated by this dynarun command will now contain a histogram of the internal energy. Many of the output plugins can take options and can be set using a colon after the plugin name, like so:

dynarun config.xml -c 1000000 -L IntEnergyHist:BinWidth=0.1


If you need to specify multiple options, you must use a comma to delimit options. For example, the mean free time plugin has two options which can be set like so:

dynarun config.xml -c 1000000 -L MFT:BinWidth=0.5,Length=100


In the following sections, the options and output of each output plugin are listed along with details on the calculation of the properties.

# Standard Type Plugins

Standard plugins are plugins which collect data continuously throughout a simulation. Most properties measured, such as temperature and mean free times, are collected through these types of plugins.

## Misc

The Misc plugin is the default plugin and is full of a range of properties which are relatively cheap to collect. Each of these properties has a corresponding sub-tag in the output file. The output tags of the Misc plugin and how they are collected are discussed in the following subsections.

#### Options

There are no options for this plugin.

### Density

This tag contains the number of particles divided by the volume of the primary image.

#### Example output

<Misc>
<Density val="0.5"/>
</Misc>


#### Full Tag, Subtag, and Attribute List

• val (attribute): The number density of the system ($N/V$).

#### Restrictions

In non-periodic systems, this value may not have any significance as the primary image is not related to the dynamics of the system. Complex boundary effects, such as walls reducing the accessible volume of the system, are not included in this calculation.

### Packing Fraction

This tag contains the excluded volume of all particles divided by the volume of the primary image. The volume of each particle is calculated from the Interaction which is specified by the particle's self-interaction.

#### Example output

<Misc>
<PackingFraction val="0.261799387799154"/>
</Misc>


#### Full Tag, Subtag, and Attribute List

• val (attribute): The packing fraction of the system.

#### Restrictions

In non-periodic systems, this value may not have any significance as the primary image is not related to the dynamics of the system. Complex boundary effects, such as walls reducing the accessible volume of the system, are not included in this calculation.

### SpeciesCount

This tag contains the number of Species in the system.

#### Example output

<Misc>
<SpeciesCount val="1"/>
</Misc>


#### Full Tag, Subtag, and Attribute List

• val (attribute): The number of species in the system.

None.

### ParticleCount

This tag contains the number of Particles in the system.

#### Example output

<Misc>
<ParticleCount val="1372"/>
</Misc>


#### Full Tag, Subtag, and Attribute List

• val (attribute): The number of particles in the system.

None.

### SystemMomentum

This tag contains the current and average momentum of all of the particles in the system.

#### Example output

<Misc>
<SystemMomentum>
<Current x="-1.02140518265514e-13" y="3.42226247340705e-14" z="-9.39248678832882e-14"/>
<Average x="-1.02140518265516e-13" y="3.42226247340696e-14" z="-9.39248678832878e-14"/>
</SystemMomentum>
</Misc>


#### Full Tag, Subtag, and Attribute List

• Current (tag): The total momentum of the system at the moment the output is written out.
• x, y, z, (attributes): The components of the current momentum.
• Average (tag): The time-averaged total momentum of the system.
• x, y, z, (attributes): The components of the average momentum.

#### Restrictions

The averages in this tag are collected exactly (see the FAQ on exact averages in DynamO) and so this data is not valid when Lees-Edwards boundary conditions are applied (or currently in systems with gravity, see issue #22).

### Temperature

This tag contains the temperature of the particles in the system. This includes rotational degrees of freedom (if present). As with all temperature values in DynamO, the temperature reported is effectively the product, $k_B\,T$ (see the FAQ on units).

The temperature is calculated using the standard equipartition expression: $k_B\,T=\frac{2}{N\,f}\sum_i^N E_i^{kinetic}$ where $E_i^{kinetic}$ is the kinetic energy of particle $i$ (including rotational energy) and $f$ is the degrees of freedom of the particle. $f$ is automatically set to $f=3$ in systems without rotational degrees of freedom and to $f=5$ in systems with rotational degrees of freedom.

#### Example output

<Misc>
<Temperature Mean="1.00000000000002" MeanSqr="0.999999999999996" Current="1.00000000000001" Min="1.00000000000001" Max="1.00000000000001"/>
</Misc>


#### Full Tag, Subtag, and Attribute List

• Mean (attribute): The time-averaged temperature, $\left\langle k_B\,T\right\rangle$.
• MeanSqr (attribute): The time-averaged square of the temperature, $\left\langle k_B^2\,T^2\right\rangle$. This can be used to work out the standard deviation of the temperature using the following formula: $\sigma = \sqrt{\left\langle k_B^2\,T^2\right\rangle - \left\langle k_B\,T\right\rangle^2}$
• Current (attribute): The value of the temperature, $k_B\,T$, at the moment the output is written out.
• Min, Max (attributes): The minimum and maximum values of the temperature during the simulation.

#### Restrictions

The averages in this tag are collected exactly (see the FAQ on exact averages in DynamO) and so this data is not valid when Lees-Edwards boundary conditions are applied (or currently in systems with gravity, see issue #22).

### UConfigurational

This tag contains the interaction energy of the system. This is equal to the excess internal energy (also known as the configurational internal energy).

#### Example output

<Misc>
<UConfigurational Mean="-7047.30749520661" MeanSqr="49679058.1379387" Current="-7340" Min="-8232" Max="-6912"/>
</Misc>


#### Full Tag, Subtag, and Attribute List

• Mean (attribute): The time-averaged configurational internal energy, $\left\langle U_{conf.}\right\rangle$.
• MeanSqr (attribute): The time-averaged square of the configurational internal energy, $\left\langle U_{conf.}^2\right\rangle$. This can be used to work out the standard deviation of the configurational internal energy using the following formula: $\sigma = \sqrt{\left\langle U_{conf.}^2\right\rangle - \left\langle U_{conf.}\right\rangle^2}$
• Current (attribute): The value of the configurational internal energy, $U_{conf.}$, at the moment the output is written out.
• Min, Max (attributes): The minimum and maximum values of the configurational internal energy reached during the simulation.

#### Restrictions

The averages in this tag are collected exactly (see the FAQ on exact averages in DynamO) and so this data is not valid when Lees-Edwards boundary conditions are applied (or currently in systems with gravity, see issue #22).

### ResidualHeatCapacity

This tag is provided for convenience. It contains the excess heat capacity, calculated from the fluctuations of the configurational internal energy using the following expression: $\frac{C_v^{ex.}}{k_B}=\frac{\left\langle U_{conf.}^2\right\rangle - \left\langle U_{conf.}\right\rangle^2}{N^2\,k_B^2\,T^2}$ Where the $N^2$ term arises as the UConfigurational values are extensive. To calculate the full heat capacity of the system, the ideal gas contribution must be added: $\frac{C_v}{k_B}=\frac{C_v^{ex.}}{k_B} +N\frac{f}{2}$ where $f$ is the degrees of freedom of the particle.

#### Example output

<Misc>
<ResidualHeatCapacity Value="80608.2639343955"/>
</Misc>


#### Full Tag, Subtag, and Attribute List

• Value (attribute): The calculated excess heat capacity $(C_v^{ex.}/k_B)$.

#### Restrictions

This expression and the values reported are only valid in the canonical (NVT) ensemble. The restrictions on the UConfigurational plugin also apply.

### Pressure

This tag contains the full pressure tensor for the system, worked out using the virial expression: $\mathbf{P}=\mathbf{P}^{kinetic}+\mathbf{P}^{interaction}$ where the kinetic pressure is given by: $\mathbf{P}^{kinetic}=\frac{1}{V}\sum_i^N m_i\,\mathbf{v}_i\mathbf{v}_i$ where $m_i$ is the mass of particle $i$. Please note that $\mathbf{v}_i\mathbf{v}_i$ is a dyadic product which yields a matrix result. The contribution to the pressure due to interactions is given by: $\mathbf{P}^{interaction}=\frac{1}{V\,t_{sim}}\sum_{ij}^{event} \Delta \mathbf{p}_i\,\mathbf{r}_{ij}$ where $t_{sim}$ is the total simulation time, the summation is over each two-particle event (Interaction), $i$ and $j$ indicate the two particles involved in the event, $\Delta\mathbf{p}_i$ is the momentum impulse on particle $i$, and $\mathbf{r}_{ij}=\mathbf{r}_{i} - \mathbf{r}_{j}$ is the separation vector between the interacting particles. The hydrostatic pressure can be computed from the trace of the pressure tensor: $p=\mathrm{tr}(\mathbf{P})/3=\left(P_{xx}+P_{yy}+P_{zz}\right)/3$

#### Example output

<Misc>
<Pressure Avg="-1.92667849178502">
<Tensor>
-1.92776085293681 -0.027284740627551 -0.0330674943624325
-0.027284740627551 -1.91924243731331 -0.0444242381174982
-0.0330674943624326 -0.0444242381174982 -1.93303218510494
</Tensor>
<InteractionContribution>
-2.13900845558922 -0.0269634925340249 -0.032459636868961
-0.0269634925340249 -2.13348059155252 -0.0441115524879792
-0.032459636868961 -0.0441115524879792 -2.14406792617732
</InteractionContribution>
</Pressure>
</Misc>


#### Full Tag, Subtag, and Attribute List

• Avg (attribute): This attribute contains the hydrostatic pressure, $p$, computed from the trace of the pressure tensor.
• Tensor (tag): This tag contains the full pressure tensor, $\mathbf{P}$, with the components written out as follows: \begin{align} \begin{matrix} P_{xx} & P_{xy} & P_{xz}\\ P_{yx} & P_{yy} & P_{yz}\\ P_{zx} & P_{zy} & P_{zz} \end{matrix} \end{align}
• InteractionContribution (tag): This tag only contains the interaction contributions to the pressure tensor ($\mathbf{P}^{interaction}$), with the components written out as above.

#### Restrictions

The kinetic pressure averages are collected exactly (see the FAQ on exact averages in DynamO) and so only the InteractionContribution data is valid when Lees-Edwards boundary conditions are applied or in systems with gravity (see issue #22).

### Duration

This tag contains information on the duration of the simulation (from the perspective of the model, not the user). See the Timing tag for information on the calculation time of the simulation.

#### Example output

<Misc>
<Duration Events="1059702" OneParticleEvents="0" TwoParticleEvents="1059702" VirtualEvents="1" Time="59.348997249289"/>
</Misc>


#### Full Tag, Subtag, and Attribute List

• Events (attribute): The total number of events executed.
• OneParticleEvents (attribute): The total number of events involving a single particle. All Local and Globals only generate single-particle events. System events may produce a mixture of single and two particle events at once.
• TwoParticleEvents (attribute): The total number of events involving a pair of particles. All Interactions generate two-particle events. System events may produce a mixture of single and two particle events at once.
• VirtualEvents (attribute): Virtual events are used to recalculate the future event list for a particle, and can arise from any part of DynamO, from the Scheduler to Interactions/Globals/Locals/Systems.
• Time (attribute): The total time the simulation was executed for, in simulation units.

None.

### EventCounters

This tag contains more detailed information on the types of events which have occurred during the simulation.

#### Example output

<Misc>
<EventCounters>
<Entry Type="Interaction" Name="Bulk" Event="BOUNCE" Count="1636222"/>
<Entry Type="System" Name="Thermostat" Event="GAUSSIAN" Count="136876"/>
<Entry Type="Global" Name="PBCSentinel" Event="VIRTUAL" Count="14"/>
...
</EventCounters>
</Misc>


#### Full Tag, Subtag, and Attribute List

• Entry (tag): This tag contains attributes which describe the event type and the number of times it has occurred.
• Type (attribute): May be "Interaction", "Local", "Global", "System" depending on the source of the event.
• Name (attribute): The name of the Interaction/Local/Global/System which is the source of the event.
• Event (attribute): The event "type" within the event source. For example, the square-well Interaction has Bounce, Capture, Release and Core events depending on where the event occurred in the potential.
• Count (attribute): The number of times the event was observed in the simulation.

None.

### Timing

This tag contains information on the calculation time of the simulation. See the Duration tag for more information on the "simulated" timing.

#### Example output

<Misc>
<Timing Start="Mon Jan 14 20:26:37 2013 " End="Mon Jan 14 20:26:59 2013 " EventsPerSec="49262.070727909" SimTimePerSec="2.75894031681944"/>
</Misc>


#### Full Tag, Subtag, and Attribute List

• Start (attribute): The date and time that the simulation began to run (post-initialisation).
• End (attribute): The date and time that the simulation wrote-out this file (typically during at the end of the run).
• EventsPerSec (attribute): The events executed per second of calculation. Probably the best indicator of the calculation "speed".
• SimTimePerSec (attribute): The simulation time executed per second of calculation.

None.

### totMeanFreeTime

This tag is provided for convenience and contains the overall mean free time of a particle. This is calculated from the counts of the one-particle ($N_{1}^{events}$) and two-particle ($N_{2}^{events}$) event counts using the following formula: $t_{mft} = t_{sim}\,N/\left(2\,N_{2}^{events} + N_{1}^{events}\right)$

#### Example output

<Misc>
<totMeanFreeTime val="0.0384196803563759"/>
</Misc>


#### Full Tag, Subtag, and Attribute List

• val (attribute): The mean free time, $t_{mft}$.

#### Restrictions

Virtual events are not counted in this value, therfore it is not a direct measurement of the computational cost of simulating the system.

### NegativeTimeEvents

This tag contains the total number of events executed where the time was earlier than the current time (a negative time until the event occurred). This used to be a good indicator if the simulation was unstable due to accessing an invalid state; however, the introduction of the stable EDMD algorithm has made this tag largely obsolete.

#### Example output

<Misc>
<NegativeTimeEvents Count="0"/>
</Misc>


#### Full Tag, Subtag, and Attribute List

• Count (attribute): The number of events executed with a time in the past.

None.

### Memusage

This tag contains the best estimate DynamO can make of the memory used by DynamO at the last event executed in the simulation. Due to the way this information is obtained, it is the upper limit of the memory in use at that time, and the actual utilisation may be lower.

#### Example output

<Misc>
<Memusage MaxKiloBytes="6580"/>
</Misc>


#### Full Tag, Subtag, and Attribute List

• MaxKiloBytes (attribute): The memory used by the simulation at the time the output file was written out.

None.

### Definitions of the transport coefficients

DynamO contains Einstein correlators for a number of transport coefficients. The definitions used here are the "mainstream" coefficients, which is the most convenient definition for molecular dynamics. \begin{align} {\bf X}_q &= - \frac{1}{T}\nabla T & {\bf X}_a &= -T\,\nabla \left(\frac{\mu_a}{T}\right) \end{align} \begin{align} {\bf J}_a &= \sum_b L_{ab}\,{\bf X}_b + L_{au}\,{\bf X}_u\\ {\bf J}_q &= \sum_a L_{qa}\,{\bf X}_a + L_{qq}\,{\bf X}_q\\ \end{align}

The Onsager reciprocity relations are $L_{ab}=L_{ba}$ and $L_{ua}=L_{au}$. As diffusion cannot result in the bulk motion of the fluid, we have $\sum_a {\bf J}_a=0$. As a result, we must have $L_{aa}=\sum_{b\neq a}L_{ab}$.

The phenomenological coefficients $L_{ab}$, $L_{aq}$, and $L_{qq}$ are distinct to the coefficients which appear in the common expressions for the fluxes, i.e., Newton's/Fourier's/Fick's law; However, they are related. As an example, the derivation of the thermal conductivity for a binary mixture is outlined below. Fourier's law is as follows: $q = -\lambda \nabla T$ This definition is only applicable in the absence of diffusional forces ($J_a=0$). Assuming a binary system ($a\in1,2$) and using this condition to eliminate the diffusive forces (${\bf X}_a$), we can rearrange the heat flux to read. \begin{align} {\bf J_q} &= \left(L_{qq} -\frac{L_{1q}^2}{L_{12}}\right) {\bf X}_q\\ &= \frac{1}{T}\left(L_{qq} -\frac{L_{1q}^2}{L_{12}}\right) \nabla T \end{align} Comparing this to Fourier's law allows us to define $\lambda$, but only in the absence of diffusive forces for a binary mixture.

### ThermalConductivity

This tag contains the Einstein correlation function which can be used to obtain estimates for the mainstream definition of the thermal conductivity of a fluid, $\mathbf{L}_{qq}$. The correlator used here is: $\Delta t\,\mathbf{L}_{qq} (\Delta t) = \frac{1}{2\,V\,k_B\,T}\left\langle \left[\phi_{q}(t_0,\Delta t)\right]^2\right\rangle_{t_0}$ where $\Delta t$ is the correlation time, the angle brackets $\langle\rangle_{t_0}$ denote an averaging over the time origin, $t_0$, and $\phi_{q}(t_0,\Delta t)$ is the integral of the microscopic heat flux from $t_0$ to $t_0+\Delta t$. For discontinuous systems, this is most conveniently evaluated using the following expression: $\phi_{q}(t_0, \Delta t) = \left[\int_{t_0}^{t_0+\Delta t} \sum_i^N\mathbf{v}_i\,e_i\,{\rm d}t\right] + \left[\sum_{i,j}^{events\in[t_0,t_0+\Delta t]}\mathbf{r}_{ij}\,\Delta e_i\right]$ where $e_i$ is the internal energy of particle $i$ (interaction energies should be equally split between the interacting pair). The leftmost term in square brackets contains the free streaming contribution and the sum is over all particles. The rightmost term contains the contribution due to interactions, and the sum is over all two-particle events in the time $[t_0,t_0+\Delta t]$, each involving a particle $i$ and $j$.

You should note that $\mathbf{L}_{qq}$ is a vector quantity, and so three values of the thermal conductivity are measured. These correspond to the transport in the $x$, $y$, and $z$-directions. If your system is isotropic, you may just average the three values to improve your statistics.

#### Extrapolation to the infinite time limit

As with all of the Green-Kubo/Einstein relationships for the transport coefficients, the desired (hydrodynamic) values are the infinite time correlation values: $\mathbf{L}_{qq} = \lim_{\Delta t\to\infty} \mathbf{L}_{qq}(\Delta t)$ A convenient way to extrapolate to the long time value is to plot $\Delta t\,L_{qq,x}(\Delta t)$ versus $\Delta t$. The slope of this plot is then the transport coefficient, and a straight line can be regressed to the long time section of the plot to extrapolate the value.

#### General notes on evaluating correlation functions

The notes below attempt to explain that a lot of judgement is needed when evaluation correlation functions. There is only a "window" of correlation times which can be used to extract the transport coefficients.
Note 1: In periodic systems, correlation functions should be studied only up to one sound-wave traversal time of the periodic image, otherwise additional correlations will appear due to the "artificial" periodicity of the system.
Note 2: At increasingly long correlation times, the number of samples of the correlation function obtained from a single simulation will decrease. Therefore, long time values will have poor statistics (which should be avoided if possible).
Note 3: At short times, molecular processes such as bond vibrations or local density fluctuations will strongly influence the correlation function. For example, take a linear/chain polymer. At short times, energy might rapidly diffuse up and down the polymer. This will make it look like there's a high thermal conductivity at short times; however, the energy will not easily transfer away from the polymer as this requires the slower inter-polmer interactions to occur. The energy diffusing up and down the polymer has a high chance of returning to its starting point. This "return" of the energy will cause the thermal conductivity to decrease sharply at slightly longer times. You must therefore use a sufficiently long correlation time to allow these microscopic processes to average out so that you can capture the true long-time behaviour of the fluid.

#### Example output

<Misc>
<ThermalConductivity>
<Correlator>
0 0 0 0 0
1 59 3.65611579164476 3.95102401183708 3.10818958034339
2 58 6.66422300757686 10.2522327519284 5.65382677461933
...
</Correlator>
</ThermalConductivity>
</Misc>


#### Full Tag, Subtag, and Attribute List

• Correlator (tag): The correlation data, outputted in columns which are: $\Delta t \qquad Count \qquad \Delta t\,L_{qq,x}(\Delta t) \qquad \Delta t\,L_{qq,y}(\Delta t) \qquad \Delta t\,L_{qq,z}(\Delta t)$ where
$\Delta t$ is the correlation time.
$Count$ is the number of samples at that correlation time.
$\Delta t\,L_{qq,x}(\Delta t)$ is the time-dependent transport coefficient, measured in the $x$-direction.

#### Restrictions

This form is only valid in the micro-canonical ensemble (NVE). The current implementation is also only valid for systems without rotational degrees of freedom (such as the hard sphere, square-well, stepped-potential fluids), as it uses the approximation $e_i\approx m\,v^2_i/2+U_{i,config}$ (see issue #23 on the bug tracker).

### Viscosity

This tag contains the Einstein correlation function which can be used to obtain estimates for the shear and bulk viscosity of the fluid. Please see the section on ThermalConductivity for most of the notation used here. The correlator used here is: $\Delta t\,\mathbf{L}_{\eta\eta} (\Delta t) = \frac{1}{2\,V\,k_B\,T}\left(\left\langle \left[\phi_{\eta}(t_0,\Delta t)\right]^2\right\rangle_{t_0} - \left[\Delta t\,V\,\mathbf{P}\right]^2\right)$ where $\phi_{\eta}(t_0, \Delta t)$ is the integral of the microscopic stress flux. For discontinuous systems, this is most conveniently evaluated using the following expression: $\phi_{\eta}(t_0, \Delta t) = \left[\int_{t_0}^{t_0+\Delta t} \sum_i^Nm_i\,\mathbf{v}_i\,\mathbf{v}_i\,{\rm d}t\right] + \left[\sum_{i,j}^{events\in[t_0,t_0+\Delta t]}\mathbf{r}_{ij}\,m_i\,\Delta \mathbf{v}_i\right]$ The leftmost term in square brackets contains the free streaming contribution and the sum is over all particles. The rightmost term contains the contribution due to interactions, and the sum is over all two-particle events in the time $[t_0,t_0+\Delta t]$, each involving a particle $i$ and $j$.

You should note that $\mathbf{L}_{\eta\eta}$ is a matrix quantity, and so there are 9 measured values. For example, the $L_{\eta\eta,xy}$ element correspons to the transport of $x$-momentum in $y$-direction and vice-versa. In isotropic systems, there are only two important phenomological coefficients related to momentum diffusion: the shear viscosity, $\eta$, and the bulk viscosity, $\kappa$. These are related to $\mathbf{L}_{\eta\eta}$ by the following expressions:

$\eta = L_{\eta\eta,xy} = L_{\eta\eta,xz} = L_{\eta\eta,yx} = L_{\eta\eta,yz}= L_{\eta\eta,zx} = L_{\eta\eta,zy}$ $\frac{4}{3}\eta + \kappa = L_{\eta\eta,xx} = L_{\eta\eta,yy} = L_{\eta\eta,zz}$

In isotropic systems we can then average each of the above direction to get an

#### Example output

<Misc>
<Viscosity>
<Correlator>
0 0 0 0 0 0 0 0 0 0 0
1.20049009599756 116 8.37184016842046 1.62337026137236 2.1589088807082 1.62337026137236 8.42188561600556 1.5159625309261 2.1589088807082 1.5159625309261 7.01773169575511
2.40098019199512 115 20.6408557061605 3.07915750482858 5.12305796346685 3.07915750482858 20.121862094858 3.29182185206649 5.12305796346685 3.2918218520665 16.8444542050959
...
</Correlator>
</Viscosity>
</Misc>


#### Full Tag, Subtag, and Attribute List

• Correlator (tag): The correlation data, outputted in columns which are: $\Delta t \qquad Count \qquad \Delta t\,L_{\eta\eta,xx}(\Delta t) \qquad \Delta t\,L_{\eta\eta,xy}(\Delta t) \qquad \Delta t\,L_{\eta\eta,xz}(\Delta t) \qquad \Delta t\,L_{\eta\eta,yx}(\Delta t) \qquad \Delta t\,L_{\eta\eta,yy}(\Delta t) \qquad \Delta t\,L_{\eta\eta,yz}(\Delta t) \qquad \Delta t\,L_{\eta\eta,zx}(\Delta t) \qquad \Delta t\,L_{\eta\eta,zy}(\Delta t) \qquad \Delta t\,L_{\eta\eta,zz}(\Delta t)$ where
$\Delta t$ is the correlation time.
$Count$ is the number of samples at that correlation time.
$\Delta t\,L_{\eta\eta,xy}(\Delta t)$ is the $xy$-component of the time-dependent transport coefficient.

#### Restrictions

This correlator is valid in all molecular systems.

### MutualDiffusion

This tag contains the Einstein correlation function which can be used to obtain estimates for the mutual diffusion coefficients of the fluid. Please see the previous sections for most of the notation used here. The correlator used here is: $\Delta t\,\mathbf{L}_{ab} (\Delta t) = \frac{1}{2\,V\,k_B\,T}\left\langle \phi_{a}(t_0,\Delta t)\,\phi_{b}(t_0,\Delta t)\right\rangle_{t_0}$ where $\phi_{a}(t_0, \Delta t)$ is the integral of the microscopic flux of Species $a$. For discontinuous systems, this is most conveniently evaluated using the following expression: $\phi_{a}(t_0, \Delta t) = \int_{t_0}^{t_0+\Delta t} \left(\sum_{i\in a} m_i\,\mathbf{v}_i - c_a \sum_i^N m_i\,\mathbf{v}_i\right){\rm d}t$ The leftmost sum is only over the particles which belong to Species $a$ and the rightmost sum is over all particles. The variable $c_a$ is the mass fraction of the species given by $c_a = \left(\sum_{i\in a} m_i\right) / \left(\sum_i^N m_i\right)$

You should note that $\mathbf{L}_{ab}$ is a vector quantity, and so there are 3 measured values. These correspond to the transport in the $x$, $y$, and $z$-directions. If your system is isotropic, you may just average the three values to improve your statistics. For each pairing of Species in the system, there is a corresponding mutual diffusion coefficient to measure the diffusion of one Species through the other. You should note that $L_{ab}=L_{ba}$, so DynamO only collects one half of all of these pairings.

#### Restrictions

This correlator is valid in all molecular systems.

#### Example output

<Misc>
<MutualDiffusion>
<Correlator Species1="Bulk" Species2="Bulk">
0 0 0 0 0
1.20049009599756 116 4.34711745476417e-29 1.04569539768932e-28 1.01913292670329e-28
2.40098019199512 115 1.73926903951606e-28 4.20033393703228e-28 4.07395327680373e-28
...
</Correlator>
</MutualDiffusion>
</Misc>


#### Full Tag, Subtag, and Attribute List

• Species1 (attribute): The name of the first Species (species $a$ in $L_{ab}$).
• Species2 (attribute): The name of the second Species (species $b$ in $L_{ab}$).
• Correlator (tag): The correlation data, outputted in columns which are: $\Delta t \qquad Count \qquad \Delta t\,L_{ab,x}(\Delta t) \qquad \Delta t\,L_{ab,y}(\Delta t) \qquad \Delta t\,L_{ab,z}(\Delta t)$ where
$\Delta t$ is the correlation time.
$Count$ is the number of samples at that correlation time.
$\Delta t\,L_{ab,x}(\Delta t)$ is the $x$-component of the time-dependent transport coefficient.

#### Restrictions

This correlator is valid in all molecular systems.

### ThermalDiffusion

This tag contains the Einstein correlation function which can be used to obtain estimates for the thermal diffusion coefficients of the fluid. Please see the previous sections for most of the notation used here. The correlator used here is: $\Delta t\,\mathbf{L}_{aq} (\Delta t) = \frac{1}{2\,V\,k_B\,T}\left\langle \phi_{a}(t_0,\Delta t)\,\phi_{q}(t_0,\Delta t)\right\rangle_{t_0}$ where $\phi_{a}(t_0, \Delta t)$ is the integral of the microscopic flux of Species $a$ and $\phi_{q}(t_0, \Delta t)$ is the integral of the microscopic heat flux. These are evaluated using the expressions given in the previous sections on ThermalConductivity and MutualDiffusion.

You should note that $\mathbf{L}_{aq}$ is a vector quantity, and so there are 3 measured values. These correspond to the transport in the $x$, $y$, and $z$-directions. If your system is isotropic, you may just average the three values to improve your statistics. For each Species in the system, there is a corresponding thermal diffusion coefficient. You should note that $L_{aq}=L_{qa}$.

#### Example output

<Misc>
<ThermalDiffusion>
<Correlator Species="Bulk">
0 0 0 0 0
1.20049009599756 116 -3.8143162695225e-16 -1.34206107826795e-15 -1.47527366687156e-15
2.40098019199512 115 -1.24651298193849e-15 -5.21423877223736e-15 -5.52897720662611e-15
...
</Correlator>
</ThermalDiffusion>
</Misc>


#### Full Tag, Subtag, and Attribute List

• Species (attribute): The name of the Species (Species $a$ in $L_{aq}$).
• Correlator (tag): The correlation data, outputted in columns which are: $\Delta t \qquad Count \qquad \Delta t\,L_{aq,x}(\Delta t) \qquad \Delta t\,L_{aq,y}(\Delta t) \qquad \Delta t\,L_{aq,z}(\Delta t)$ where
$\Delta t$ is the correlation time.
$Count$ is the number of samples at that correlation time.
$\Delta t\,L_{aq,x}(\Delta t)$ is the $x$-component of the time-dependent transport coefficient.

#### Restrictions

All restrictions to the ThermalConductivity and MutualDiffusion correlators apply here.

## IntEnergyHist

The internal energy histogram plugin collects the exact histogram of the time the system spent in each accessible excess internal energy (see the UConfigurational plugin for more information on this value).

#### Example usage

-L IntEnergyHist:BinWidth=0.5


#### Options

There are no options for this plugin.

• BinWidth: The width of the energy histogram bins. The first bin is centred about zero and all other bins are spaced at integer BinWidth energy offsets. You can use a small bin width to ensure that all accessed energies are captured and this shouldn't result in a huge performance hit.

#### Example output

<EnergyHist BinWidth="1">
<HistogramWeighted TotalWeight="304.576171140717" Dimension="1" BinWidth="1" AverageVal="-7579.03906905185">
-8231 5.45152795515402e-05
-8230 4.7338829008711e-06
-8229 2.8123254892883e-06
-8228 2.01957587904452e-06
-8227 2.49918411825278e-08
...
</HistogramWeighted>
</EnergyHist>


#### Full Tag, Subtag, and Attribute List

• BinWidth (attribute): The width of the energy bins.
• HistogramWeighted (tag): Contains the time-weighted histogram data, outputted in columns which are: $U_{conf.} \qquad P(U_{conf.})$ where $P(U_{conf.})$ is the probability of observing the excess internal energy $U_{conf.}$.
• TotalWeight (attribute): This corresponds to the total time the histogram was collected for. This should also correspond to the Time attribute of the Duration tag in the Misc plugin.
• Dimension (attribute): The dimensionality of the histogram (this is a one-dimensional histogram).
• BinWidth (attribute): The width of the energy bins.
• AverageVal (attribute): The average excess internal energy of the system. This should also correspond to the Average attribute of the UConfigurational tag in the Misc plugin.

## MSD

The MSD plugin calculates the Mean Square Displacement (MSD) of different Species and Structures from their initial locations at the start of the simulation. This can be used to quickly estimate the diffusion coefficients of these objects. The MSDCorrelator plugin collects the evolution of the MSD over time if more detail is needed.

#### Example usage

-L MSD


#### Options

There are no options for this plugin.

#### Example output

<MSD>
<Species Name="Bulk" val="218.539491598976" diffusionCoeff="0.250540360762613"/>
</MSD>


#### Full Tag, Subtag, and Attribute List

• Species (tag): This tag contains the mean standard displacement of the species on average, along with a calculation of the diffusion coefficient from the MSD.
• Name (attribute): The name of the species that the MSD and diffusion coefficient are calculated for.
• val (attribute): The average value of the mean square displacement for each particle in the species. $\left\langle \left[{\bf r}(t)-{\bf r}(0)\right]^2\right\rangle$ where the angle brackets indicate an average over all particles in the species, ${\bf r}(t)$ is the location of the particle at the end of the simulation (at time $t$), and ${\bf r}(0)$ is the particle position at the start of the simulation.
• diffusionCoeff (attribute): The diffusion coefficient calculated by $D=\frac{\left\langle \left[{\bf r}(t)-{\bf r}(0)\right]^2\right\rangle}{6\,t}$ where $t$ is the duration of the simulation.
• Structure (tag): This tag is identical to the Species tag above but corresponds to the particles within a defined Structure in the simulation. For information on the contents of this tag please see the Species tag above.

## Trajectory

The Trajectory plugin records the full sequence of processed events to a log file (trajectory.out). This plugin is used to debug errors in the detection, scheduling, and execution of events.

#### Example usage

-L Trajectory


#### Options

There are no options for this plugin.

# Ticker Type Plugins

Ticker-type plugins only measure properties at specified intervals of simulation time. An example of such a property is the RadialDistribution plugin.

Each ticker type plugin will take a measurement at the very start of the simulation and then at an interval $\Delta t_{ticker}$. By default, $\Delta t_{ticker}$ is set to the mean free time of the last simulation that the configuration file was run in or a value of 1 if the configuration file has not been run before.

You can set the ticker time by hand (if you are using a ticker-type plugin) using the -t option of dynarun/dynavis:

dynarun -L RadialDistribution -t 0.131 -c 1000000 config.out.xml.bz2


And the Radial Distribution will be sampled every 0.131 units of simulation time until the simulation is stopped after $10^6$ events. Please note that all ticker-type plugins are collected at the same time.

Ticker-type plugins can be used to collect statistics on a configuration by simply running a simulation of zero time. E.g.

dynarun -L RadialDistribution -c 0 config.out.xml.bz2


This will initialise a simulation, run the collection of the output plugin once and halt immediately.

The RadialDistribution plugin calculates the radial distribution function for all pairings of Species in the system. During a simulation, a histogram of the distance between two species of particles is collected. At the end of the simulation, this is converted into the radial distribution using the following expression:

$g_{\alpha,\beta}(r)=\frac{V}{N_{ticks}\,N_\alpha\,\left(N_\beta-\delta_{\alpha,\beta}\right)\,V_{shell}(r)}\mathcal{H}_{\alpha,\beta}(r)$

where $\mathcal{H}_{\alpha,\beta}(r)$ is the histogram/count of particles of species $\beta$ at a distance of $r$ around particles of species $\alpha$, $V_{shell}(r)=\pi\left(4\,\Delta r\,r^2 + \Delta r^3 / 3\right)$ is the volume of the spherical shell of thickness $\Delta r$ centered about a distance of $r$, $\delta_{\alpha\beta}$ is the kronecker delta function, and $N_{ticks}$ is the number of samples/ticks used to collect the histogram.

#### Example usage

-L RadialDistribution:BinWidth=0.01,Length=5


#### Options

• BinWidth default [0.01]: The width of the histogram bins ($\Delta r$) used to collect the radial distribution function.
• Length default [Smallest dimension of the SimulationSize]: The maximum distance between particles which is included in the histogram. Please note, in periodic systems, values larger than the default value (smallest dimension of the system size) will have incorrect values as only the nearest periodic image is sampled.
• SampleEnergy default [disabled]: If this tag is specified, the radial distribution function will only be collected if the configurational energy is within a distance of SampleEnergyWidth, centered about SampleEnergy.
• SampleEnergyWidth default [1]: This option is only loaded or required if the SampleEnergy option has been specified.

#### Example output

<RadialDistribution SampleCount="29">
<Species Name1="Bulk" Name2="Bulk">
0.10000000000000001 0
0.20000000000000001 0
...
</Species>


#### Full Tag, Subtag, and Attribute List

• Species (tag): Each Species tag contains the radial distribution function between two different species. The collected data is presented in two columns: $r \qquad g_{\alpha,\beta}(r)$
• Name1 (attribute): This is the name of the species of the particle at the origin of the radial distribution function ($\alpha$).
• Name2 (attribute): This is the name of the species of the particles surrounding the particle at the origin ($\beta$).
• Origins (attribute): The number of origins that the function was averaged over.
• Samples (attribute): The total number of pair distances sampled to construct the graph.

#### Restrictions

At discontinuities in the potential, the $g(r)$ function is also discontinuous. If you want to correctly capture these discontinuities, you must calculate the values of $g(r)$ either side of the discontinuity using event rates.

## VACF

The VACF plugin calculates the Velocity AutoCorrelation Function (VACF) for all Species in the system. The velocity autocorrelation function is the following function

$\Psi_\alpha(\Delta t)=\left\langle\mathbf{v}(t)\cdot\mathbf{v}(t+\Delta t)\right\rangle_{t,\alpha}$

As this is implemented as a ticker property, we only evaluate the VACF at discrete points in time. The implementation is as follows:

\begin{align} \Psi_{\alpha}(i\Delta t)&=\left\langle\mathbf{v}(t)\cdot\mathbf{v}(t+i\Delta t)\right\rangle_{t,\alpha} \\ &=N_{ticks}^{-1}\sum_{j}^{N_{ticks}}N_\alpha^{-1}\sum_k^\alpha \mathbf{v}_k(t_j)\cdot\mathbf{v}_k(t_{j+i}) \end{align}

where $\Delta t$ is the tick interval/time, $N_{ticks}$ is the number of samples/ticks used to collect the correlator, $N_\alpha$ is the number of particles of species $\alpha$, $v_k(t_j)$ is the velocity of the $k^{th}$ particle of species $\alpha$ at the time of the $j^{th}$ tick/sample. The subscript $t,\alpha$ implies the average is over origin times $t$ and all particles of species $\alpha$. If a Topology is defined in the configuration file, the VACF of this will also be calculated and here $\alpha$ will correspond to the Topology, and $N_\alpha$ is the number of Structures in the Topology.

The VACF is usually of interest as its integral is directly related to the diffusion coefficient:

$d\,D_\alpha = \int_0^\infty \Psi_{\alpha}(t)\,{\rm d}t$

where $d=3$ is the dimensionality of the system and $D_\alpha$ is the diffusion coefficient of species $\alpha$.

#### Example usage

-L VACF:Length=100


#### Options

• Length default [50]: The length is the number of samples used in a single correlator, or the maximum value of $j$. The maximum time of the correlator is then $j_{max}\,\Delta t$, where $\Delta t$ is the tick interval.

#### Example output

<VACF>
<Particles>
<Species Name="Bulk">
0 0
0.13112226096298976 1.5495530734986163
0.26224452192597952 0.8305040521045054
...
</Species>
</Particles>
<Topology>
<Structure Name="Ring">
0 2.9826740342384427e-30
0.13112226096298976 2.9760224150436483e-30
...
</Structure>
</Topology>
</VACF>


#### Full Tag, Subtag, and Attribute List

• Particles (tag): This tag encloses all the single particle VACF functions for each Species.
• Species (tag): This tag contains the VACF data for a single species. The columns of data have the following format: $t \qquad \Psi_{\alpha}(t)$
• Name (attribute): The name of the Species $\alpha$.
• Topology (tag): This tag encloses all the multi-particle VACF functions calculated from Topology entries.
• Structure (tag): This tag contains the VACF data for a single Structure. The columns of data have the following format: $t \qquad \Psi_{\alpha}(t)$
• Name (attribute): The name of the Structure $\alpha$.

## MSDCorrelator

The MSDCorrelator plugin calculates the Mean Square Displacement (MSD) as a function of time for all Species in the system. The MSD Correlator is the following function

$\Psi(\Delta t) = \left\langle \left[{\bf r}(t+\Delta t)-{\bf r}(t)\right]^2\right\rangle_{t,\alpha}$

As this is implemented as a ticker property, we only evaluate the MSD at discrete points in time. The implementation is as follows:

\begin{align} \Psi_{\alpha}(i\Delta t)&=\left\langle \left[{\bf r}(t+i\Delta t)-{\bf r}(t)\right]^2\right\rangle_{t,\alpha} \\ &=N_{ticks}^{-1}\sum_{j}^{N_{ticks}}N_\alpha^{-1}\sum_k^\alpha \left[{\bf r}_k(t_j)-{\bf r}_k(t_{j+i})\right]^2 \end{align}

where $\Delta t$ is the tick interval/time, $N_{ticks}$ is the number of samples/ticks used to collect the correlator, $N_\alpha$ is the number of particles of species $\alpha$, ${\bf r}_k(t_j)$ is the position of the $k^{th}$ particle of species $\alpha$ at the time of the $j^{th}$ tick/sample. The subscript $t,\alpha$ implies the average is over origin times $t$ and all particles of species $\alpha$. If a Topology is defined in the configuration file, the MSD of this will also be calculated and here $\alpha$ will correspond to the Topology, and $N_\alpha$ is the number of Structures in the Topology.

The MSD is usually of interest as its gradient is directly related to the diffusion coefficient:

$D_\alpha=\lim_{\Delta t\to\infty}\frac{\left\langle \left[{\bf r}(t+\Delta t)-{\bf r}(t)\right]^2\right\rangle_{t,\alpha}}{2\,d\,t}$

where $d=3$ is the dimensionality of the system and $D_\alpha$ is the diffusion coefficient of species $\alpha$. The MSD plugin will calculate a prediction of the diffusion coefficient using the full time of the simulation.

#### Example usage

-L MSDCorrelator:Length=100


#### Options

• Length default [50]: The length is the number of samples used in a single correlator, or the maximum value of $j$. The maximum time of the correlator is then $j_{max}\,\Delta t$, where $\Delta t$ is the tick interval.

#### Example output

<MSDCorrelator>
<Particles>
<Species Name="Bulk">
0 0
0.13112226096298976 1.5495530734986163
0.26224452192597952 0.8305040521045054
...
</Species>
</Particles>
<Topology>
<Structure Name="Ring">
0 2.9826740342384427e-30
0.13112226096298976 2.9760224150436483e-30
...
</Structure>
</Topology>
</MSDCorrelator>


#### Full Tag, Subtag, and Attribute List

• Particles (tag): This tag encloses all the single particle MSD correlation functions for each Species.
• Species (tag): This tag contains the MSD correlator data for a single species. The columns of data have the following format: $t \qquad \Psi_{\alpha}(t)$
• Name (attribute): The name of the Species $\alpha$.
• Topology (tag): This tag encloses all the multi-particle MSD correlation functions calculated from Topology entries.
• Structure (tag): This tag contains the MSD correlator data for a single Structure. The columns of data have the following format: $t \qquad \Psi_{\alpha}(t)$
• Name (attribute): The name of the Structure $\alpha$.

The RadiusGyration plugin calculates and averages the radius of gyration for each Structure tag in the system. This is used as a measure of the size and shape of complex molecules such as polymers.

To calculate the radii of gyration, we attempt to account for periodic boundary conditions by walking along the chain using the previous particle's position as the origin of the coordinate system before applying boundary conditions. We first calculate the inertia tensor like so: $\mathbf{I} = \sum_i m_i\left[\left(\mathbf{r}_i\cdot\mathbf{r}_i\right)\mathbf{1} - \mathbf{r}_i\,\mathbf{r}_i\right]$ Then we scale out the mass and calculate the eigenvectors and values of the matrix $\mathbf{I} / \sum_i m_i$. The unit eigenvectors are the principle axes of the molecule and the eigenvalues are the radii of gyration.

This plugin also calculates the Nematic order parameter. For each molecule $i$, we assign the principle axis corresponding to the largest radius of gyration as the director $\mathbf{u}_i$. Then we construct the following tensor: $\mathbf{S} = \frac{1}{2\,N_{mono}}\sum_i \left(3\,\mathbf{u}_i\,\mathbf{u}_i - \mathbf{1}\right)$ We then calculate the eigenvectors and values of $\mathbf{S}$. If the system is aligned nematically, the eigenvectors indicate the alignment directions of the molecules. In particular, the largest eigenvector should correspond to the fluid director.

Assume we rotate the matrix $\mathbf{S}$ to a coordinate frame where $x$, $y$, and $z$ coincide with the eigenvectors (in increasing order). In perfectly aligned nematic, prolate fluids, we expect: $\tilde{\mathbf{S}} = \begin{bmatrix}-0.5 & 0 & 0\\0 & -0.5 & 0 \\ 0 & 0 & 1\end{bmatrix}$ In perfectly aligned oblate geometry we expect $\tilde{\mathbf{S}} = \begin{bmatrix}0.5 & 0 & 0\\0 & 0.5 & 0 \\ 0 & 0 & -1\end{bmatrix}$ If the molecules are not aligned/isotropic, we expect $\tilde{\mathbf{S}}=\mathbf{0}$.

#### Example usage

-L RadiusGyration:BinWidthGyration=0.01,BinWidthNematic=0.001


#### Options

• BinWidthGyration default [0.01]: This is the width of the histogram bins used while collecting statistics on the radii of gyration.
• BinWidthNematic default [0.001]: This is the width of the histogram bins used while collecting statistics on the nematic order parameter.

#### Example output

  <ChainGyration>
<Chain Name="HelixPolymer">
<Histogram SampleCount="1578" Dimension="1" BinWidth="0.01" AverageVal="0.42709125475285176">
0.029999999999999999 0.063371356147021538
0.070000000000000007 0.6337135614702154
...
</Histogram>
<Histogram SampleCount="1578" Dimension="1" BinWidth="0.01" AverageVal="1.6703738910012673">
0.28999999999999998 0.063371356147021538
0.32000000000000001 0.12674271229404308
...
</Histogram>
<Histogram SampleCount="1578" Dimension="1" BinWidth="0.01" AverageVal="9.7681432192648927">
2.1200000000000001 0.063371356147021538
2.2200000000000002 0.063371356147021538
...
</Histogram>
<NematicOrderParameter x="-0.5" y="-0.49999999999999994" z="0.99999999999999911">
<Histogram SampleCount="1578" Dimension="1" BinWidth="0.001" AverageVal="-0.5">
...
</Histogram>
<Histogram SampleCount="1578" Dimension="1" BinWidth="0.001" AverageVal="-0.5">
...
</Histogram>
<Histogram SampleCount="1578" Dimension="1" BinWidth="0.001" AverageVal="1">
...
</Histogram>
</NematicOrderParameter>
</Chain>
</ChainGyration>


#### Full Tag, Subtag, and Attribute List

• Chain (tag): The data is collected separately for each Chain type Structure in the configuration file.
• Name (attribute): The name of the Chain type Structure.
• GyrationRadii (tag): This tag contains histograms of the values of the three radii of gyration. The radii are sorted by increasing magnitude. Each histogram entry is the radii and and corresponding frequency.
• NematicOrderParameter (tag): This tag contains histograms of the values of the three radii of gyration. The radii are sorted by increasing magnitude.
• x, y, z (attributes): This is the current "director" for the fluid (at the time of the output).
• Histogram (tags): These are histograms of the eigenvalues of $\mathbf{S}$ which correspond to the diagonal terms of $\tilde{\mathbf{S}}$.