<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://chemwiki.ch.ic.ac.uk/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ai513</id>
	<title>ChemWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://chemwiki.ch.ic.ac.uk/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ai513"/>
	<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/wiki/Special:Contributions/Ai513"/>
	<updated>2026-05-17T12:05:21Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511543</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511543"/>
		<updated>2015-11-19T15:30:16Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Finding the Diffusion Coefficient by Integration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of timestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.00939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is due to the fact that the system is in the &#039;&#039;NVE microcanonical ensemble&#039;&#039; and under Newton&#039;s laws of conservation of energy. For the system to perform accurately, this law must be obeyed as strictly as possible.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F= 24 \frac{\epsilon}{\sigma}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The well depth (minimum potential energy) is as following:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r(eq) = 2^{\frac {1}{6}} \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int \phi (r) dr = 4( - \frac{1}{11r^{11}}+ \frac{1}{5r^{5}} ) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore,&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2\sigma}^\infin \phi (r) dr = -2.48\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2.5\sigma}^\infin \phi (r) dr = -8.18\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{3\sigma}^\infin \phi (r) dr = -3.29\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These values show that from larger multiples of σ, the integrand becomes very small. The dominant, attractive part or the Lennard-Jones potential here quickly decreases with increasing separation. This is the basis of the &#039;&#039;lj-cutoff command&#039;&#039; described below. Any interactions with a separation greater than this cut-off are ignored as they do not contribute a significant to the overall forces in the system. &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34\times 10^{22} molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6\times 10^{-20}  mol &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6\times 10^{-20} \times 18 = 3\times 10^{-19} mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes used in these simulations are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09\times 10^{-9}  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05\times 10^{-5}  Kjmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value in the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of one lattice point (N=1), a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of an FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the variable mass, which atom type, and its actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb, at a cut-off potential = 3.0σ.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1.&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable &#039;&#039;${timestep}&#039;&#039; so that the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8\times 10^{-4} s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.0025. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained and thte system energy does not change as a function of timestep. The largest timestep of 0.015 allows for slow fluctuations in energy to be seen, know as &#039;&#039;explosions&#039;&#039;, and propagates atoms very close together causing augmented atomic collisions which produce a spike in F and E values. The total energy continually increases and doesn&#039;t reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem, the instantaneous temperature T can be calculated.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken i.e. calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&lt;br /&gt;
&lt;br /&gt;
This means &#039;&#039;1000 measurements&#039;&#039; will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as any larger timestep results in energy fluctuations and a poor set of data. &lt;br /&gt;
&lt;br /&gt;
[[File:Density_0.2_Temp_2.0_input_script.log]]&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the {{fontcolor1|red|white|1st nearest neighbour}}, {{fontcolor1|yellow|black|the second}} {{fontcolor1|green|white|and third}} from the {{fontcolor1|blue|white|atom}} being observed.&lt;br /&gt;
[[File:Ffccube.pdf]] &lt;br /&gt;
&#039;&#039;Base cube found from [http://stackoverflow.com/questions/20600062/how-to-code-an-array-of-fcc-bcc-and-hcp-lattices-in-c]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the approximate trigonometric product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{ \sqrt 2}{2} \times 3.23 \times 2 = 4.6 &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
Or of the 3rd nearest neighbour: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = cos(\frac{45}{2}) \times sin(\frac{45}{2}) \times 2 \times 5.95 = 4.2&amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int sin(\omega t+\phi) \times[(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)+sin(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following is a graph of velocity autocorrelations for a solid, liquid and the theoretical value, worked out from the solution above. &lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what is seen is a function resembling damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away. The differences between the liquid and solid VACFs is due to the density of particles and particle motion. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is much more diffuse.&lt;br /&gt;
&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and the oscillatory cycle continues undisturbed to infinity.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.000334&lt;br /&gt;
| 0.000&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.247728&lt;br /&gt;
| 0.083&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.000137&lt;br /&gt;
| 0.000&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.270274&lt;br /&gt;
| 0.090&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggests that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid, and its less ordered structure. Moreover, the dissusion coefficient for the solid is, in both simulations 0. This is because the atoms are in a fixed structure with very little motion.&lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511539</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511539"/>
		<updated>2015-11-19T15:28:31Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Periodic Boundary Conditions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of timestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.00939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is due to the fact that the system is in the &#039;&#039;NVE microcanonical ensemble&#039;&#039; and under Newton&#039;s laws of conservation of energy. For the system to perform accurately, this law must be obeyed as strictly as possible.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F= 24 \frac{\epsilon}{\sigma}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The well depth (minimum potential energy) is as following:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r(eq) = 2^{\frac {1}{6}} \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int \phi (r) dr = 4( - \frac{1}{11r^{11}}+ \frac{1}{5r^{5}} ) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore,&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2\sigma}^\infin \phi (r) dr = -2.48\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2.5\sigma}^\infin \phi (r) dr = -8.18\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{3\sigma}^\infin \phi (r) dr = -3.29\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These values show that from larger multiples of σ, the integrand becomes very small. The dominant, attractive part or the Lennard-Jones potential here quickly decreases with increasing separation. This is the basis of the &#039;&#039;lj-cutoff command&#039;&#039; described below. Any interactions with a separation greater than this cut-off are ignored as they do not contribute a significant to the overall forces in the system. &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34\times 10^{22} molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6\times 10^{-20}  mol &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6\times 10^{-20} \times 18 = 3\times 10^{-19} mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes used in these simulations are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09\times 10^{-9}  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05\times 10^{-5}  Kjmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value in the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of one lattice point (N=1), a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of an FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the variable mass, which atom type, and its actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb, at a cut-off potential = 3.0σ.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1.&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable &#039;&#039;${timestep}&#039;&#039; so that the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8\times 10^{-4} s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.0025. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained and thte system energy does not change as a function of timestep. The largest timestep of 0.015 allows for slow fluctuations in energy to be seen, know as &#039;&#039;explosions&#039;&#039;, and propagates atoms very close together causing augmented atomic collisions which produce a spike in F and E values. The total energy continually increases and doesn&#039;t reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem, the instantaneous temperature T can be calculated.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken i.e. calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&lt;br /&gt;
&lt;br /&gt;
This means &#039;&#039;1000 measurements&#039;&#039; will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as any larger timestep results in energy fluctuations and a poor set of data. &lt;br /&gt;
&lt;br /&gt;
[[File:Density_0.2_Temp_2.0_input_script.log]]&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the {{fontcolor1|red|white|1st nearest neighbour}}, {{fontcolor1|yellow|black|the second}} {{fontcolor1|green|white|and third}} from the {{fontcolor1|blue|white|atom}} being observed.&lt;br /&gt;
[[File:Ffccube.pdf]] &lt;br /&gt;
&#039;&#039;Base cube found from [http://stackoverflow.com/questions/20600062/how-to-code-an-array-of-fcc-bcc-and-hcp-lattices-in-c]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the approximate trigonometric product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{ \sqrt 2}{2} \times 3.23 \times 2 = 4.6 &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
Or of the 3rd nearest neighbour: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = cos(\frac{45}{2}) \times sin(\frac{45}{2}) \times 2 \times 5.95 = 4.2&amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int sin(\omega t+\phi) \times[(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)+sin(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following is a graph of velocity autocorrelations for a solid, liquid and the theoretical value, worked out from the solution above. &lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what is seen is a function resembling damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away. The differences between the liquid and solid VACFs is due to the density of particles and particle motion. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is much more diffuse.&lt;br /&gt;
&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and the oscillatory cycle continues undisturbed to infinity.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.000334&lt;br /&gt;
| 0.000&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.247728&lt;br /&gt;
| 0.083&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.000137&lt;br /&gt;
| 0.000&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.270274&lt;br /&gt;
| 0.090&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. Moreover, the dissusion coefficient for the solid is, in both simulations 0. This is because the atoms are in a fixed structure with very little motion.&lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511535</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511535"/>
		<updated>2015-11-19T15:27:12Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Periodic Boundary Conditions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of timestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.00939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is due to the fact that the system is in the &#039;&#039;NVE microcanonical ensemble&#039;&#039; and under Newton&#039;s laws of conservation of energy. For the system to perform accurately, this law must be obeyed as strictly as possible.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F= 24 \frac{\epsilon}{\sigma}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The well depth (minimum potential energy) is as following:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r(eq) = 2^{\frac {1}{6}} \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int \phi (r) dr = 4( - \frac{1}{11r^{11}}+ \frac{1}{5r^{5}} ) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore,&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2\sigma}^\infin \phi (r) dr = -2.48\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2.5\sigma}^\infin \phi (r) dr = -8.18\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{3\sigma}^\infin \phi (r) dr = -3.29\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These values show that from larger multiples of σ, the integrand becomes very small. The dominant, attractive part or the Lennard-Jones potential here quickly decreases with increasing separation. This is the basis of the &#039;&#039;lj-cutoff command&#039;&#039; described below. Any interactions with a separation greater than this cut-off are ignored as they do not contribute a significant to the overall forces in the system. &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34\times 10^{22} molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6\times 10^{-20} molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6\times 10^{-20} \times 18 = 3\times 10^{-19} mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes used in these simulations are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09\times 10^{-9}  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05\times 10^{-5}  Kjmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value in the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of one lattice point (N=1), a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of an FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the variable mass, which atom type, and its actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb, at a cut-off potential = 3.0σ.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1.&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable &#039;&#039;${timestep}&#039;&#039; so that the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8\times 10^{-4} s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.0025. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained and thte system energy does not change as a function of timestep. The largest timestep of 0.015 allows for slow fluctuations in energy to be seen, know as &#039;&#039;explosions&#039;&#039;, and propagates atoms very close together causing augmented atomic collisions which produce a spike in F and E values. The total energy continually increases and doesn&#039;t reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem, the instantaneous temperature T can be calculated.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken i.e. calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&lt;br /&gt;
&lt;br /&gt;
This means &#039;&#039;1000 measurements&#039;&#039; will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as any larger timestep results in energy fluctuations and a poor set of data. &lt;br /&gt;
&lt;br /&gt;
[[File:Density_0.2_Temp_2.0_input_script.log]]&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the {{fontcolor1|red|white|1st nearest neighbour}}, {{fontcolor1|yellow|black|the second}} {{fontcolor1|green|white|and third}} from the {{fontcolor1|blue|white|atom}} being observed.&lt;br /&gt;
[[File:Ffccube.pdf]] &lt;br /&gt;
&#039;&#039;Base cube found from [http://stackoverflow.com/questions/20600062/how-to-code-an-array-of-fcc-bcc-and-hcp-lattices-in-c]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the approximate trigonometric product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{ \sqrt 2}{2} \times 3.23 \times 2 = 4.6 &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
Or of the 3rd nearest neighbour: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = cos(\frac{45}{2}) \times sin(\frac{45}{2}) \times 2 \times 5.95 = 4.2&amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int sin(\omega t+\phi) \times[(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)+sin(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following is a graph of velocity autocorrelations for a solid, liquid and the theoretical value, worked out from the solution above. &lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what is seen is a function resembling damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away. The differences between the liquid and solid VACFs is due to the density of particles and particle motion. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is much more diffuse.&lt;br /&gt;
&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and the oscillatory cycle continues undisturbed to infinity.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.000334&lt;br /&gt;
| 0.000&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.247728&lt;br /&gt;
| 0.083&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.000137&lt;br /&gt;
| 0.000&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.270274&lt;br /&gt;
| 0.090&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. Moreover, the dissusion coefficient for the solid is, in both simulations 0. This is because the atoms are in a fixed structure with very little motion.&lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511530</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511530"/>
		<updated>2015-11-19T15:26:01Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Reduced Units */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of timestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.00939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is due to the fact that the system is in the &#039;&#039;NVE microcanonical ensemble&#039;&#039; and under Newton&#039;s laws of conservation of energy. For the system to perform accurately, this law must be obeyed as strictly as possible.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F= 24 \frac{\epsilon}{\sigma}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The well depth (minimum potential energy) is as following:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r(eq) = 2^{\frac {1}{6}} \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int \phi (r) dr = 4( - \frac{1}{11r^{11}}+ \frac{1}{5r^{5}} ) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore,&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2\sigma}^\infin \phi (r) dr = -2.48\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2.5\sigma}^\infin \phi (r) dr = -8.18\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{3\sigma}^\infin \phi (r) dr = -3.29\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These values show that from larger multiples of σ, the integrand becomes very small. The dominant, attractive part or the Lennard-Jones potential here quickly decreases with increasing separation. This is the basis of the &#039;&#039;lj-cutoff command&#039;&#039; described below. Any interactions with a separation greater than this cut-off are ignored as they do not contribute a significant to the overall forces in the system. &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes used in these simulations are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09\times 10^{-9}  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05\times 10^{-5}  Kjmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value in the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of one lattice point (N=1), a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of an FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the variable mass, which atom type, and its actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb, at a cut-off potential = 3.0σ.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1.&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable &#039;&#039;${timestep}&#039;&#039; so that the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8\times 10^{-4} s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.0025. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained and thte system energy does not change as a function of timestep. The largest timestep of 0.015 allows for slow fluctuations in energy to be seen, know as &#039;&#039;explosions&#039;&#039;, and propagates atoms very close together causing augmented atomic collisions which produce a spike in F and E values. The total energy continually increases and doesn&#039;t reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem, the instantaneous temperature T can be calculated.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken i.e. calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&lt;br /&gt;
&lt;br /&gt;
This means &#039;&#039;1000 measurements&#039;&#039; will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as any larger timestep results in energy fluctuations and a poor set of data. &lt;br /&gt;
&lt;br /&gt;
[[File:Density_0.2_Temp_2.0_input_script.log]]&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the {{fontcolor1|red|white|1st nearest neighbour}}, {{fontcolor1|yellow|black|the second}} {{fontcolor1|green|white|and third}} from the {{fontcolor1|blue|white|atom}} being observed.&lt;br /&gt;
[[File:Ffccube.pdf]] &lt;br /&gt;
&#039;&#039;Base cube found from [http://stackoverflow.com/questions/20600062/how-to-code-an-array-of-fcc-bcc-and-hcp-lattices-in-c]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the approximate trigonometric product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{ \sqrt 2}{2} \times 3.23 \times 2 = 4.6 &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
Or of the 3rd nearest neighbour: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = cos(\frac{45}{2}) \times sin(\frac{45}{2}) \times 2 \times 5.95 = 4.2&amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int sin(\omega t+\phi) \times[(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)+sin(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following is a graph of velocity autocorrelations for a solid, liquid and the theoretical value, worked out from the solution above. &lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what is seen is a function resembling damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away. The differences between the liquid and solid VACFs is due to the density of particles and particle motion. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is much more diffuse.&lt;br /&gt;
&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and the oscillatory cycle continues undisturbed to infinity.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.000334&lt;br /&gt;
| 0.000&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.247728&lt;br /&gt;
| 0.083&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.000137&lt;br /&gt;
| 0.000&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.270274&lt;br /&gt;
| 0.090&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. Moreover, the dissusion coefficient for the solid is, in both simulations 0. This is because the atoms are in a fixed structure with very little motion.&lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511526</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511526"/>
		<updated>2015-11-19T15:24:36Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Checking Equilibration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of timestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.00939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is due to the fact that the system is in the &#039;&#039;NVE microcanonical ensemble&#039;&#039; and under Newton&#039;s laws of conservation of energy. For the system to perform accurately, this law must be obeyed as strictly as possible.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F= 24 \frac{\epsilon}{\sigma}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The well depth (minimum potential energy) is as following:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r(eq) = 2^{\frac {1}{6}} \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int \phi (r) dr = 4( - \frac{1}{11r^{11}}+ \frac{1}{5r^{5}} ) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore,&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2\sigma}^\infin \phi (r) dr = -2.48\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2.5\sigma}^\infin \phi (r) dr = -8.18\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{3\sigma}^\infin \phi (r) dr = -3.29\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These values show that from larger multiples of σ, the integrand becomes very small. The dominant, attractive part or the Lennard-Jones potential here quickly decreases with increasing separation. This is the basis of the &#039;&#039;lj-cutoff command&#039;&#039; described below. Any interactions with a separation greater than this cut-off are ignored as they do not contribute a significant to the overall forces in the system. &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes used in these simulations are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  Kjmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value in the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of one lattice point (N=1), a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of an FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the variable mass, which atom type, and its actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb, at a cut-off potential = 3.0σ.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1.&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable &#039;&#039;${timestep}&#039;&#039; so that the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8\times 10^{-4} s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.0025. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained and thte system energy does not change as a function of timestep. The largest timestep of 0.015 allows for slow fluctuations in energy to be seen, know as &#039;&#039;explosions&#039;&#039;, and propagates atoms very close together causing augmented atomic collisions which produce a spike in F and E values. The total energy continually increases and doesn&#039;t reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem, the instantaneous temperature T can be calculated.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken i.e. calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&lt;br /&gt;
&lt;br /&gt;
This means &#039;&#039;1000 measurements&#039;&#039; will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as any larger timestep results in energy fluctuations and a poor set of data. &lt;br /&gt;
&lt;br /&gt;
[[File:Density_0.2_Temp_2.0_input_script.log]]&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the {{fontcolor1|red|white|1st nearest neighbour}}, {{fontcolor1|yellow|black|the second}} {{fontcolor1|green|white|and third}} from the {{fontcolor1|blue|white|atom}} being observed.&lt;br /&gt;
[[File:Ffccube.pdf]] &lt;br /&gt;
&#039;&#039;Base cube found from [http://stackoverflow.com/questions/20600062/how-to-code-an-array-of-fcc-bcc-and-hcp-lattices-in-c]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the approximate trigonometric product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{ \sqrt 2}{2} \times 3.23 \times 2 = 4.6 &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
Or of the 3rd nearest neighbour: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = cos(\frac{45}{2}) \times sin(\frac{45}{2}) \times 2 \times 5.95 = 4.2&amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int sin(\omega t+\phi) \times[(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)+sin(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following is a graph of velocity autocorrelations for a solid, liquid and the theoretical value, worked out from the solution above. &lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what is seen is a function resembling damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away. The differences between the liquid and solid VACFs is due to the density of particles and particle motion. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is much more diffuse.&lt;br /&gt;
&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and the oscillatory cycle continues undisturbed to infinity.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.000334&lt;br /&gt;
| 0.000&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.247728&lt;br /&gt;
| 0.083&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.000137&lt;br /&gt;
| 0.000&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.270274&lt;br /&gt;
| 0.090&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. Moreover, the dissusion coefficient for the solid is, in both simulations 0. This is because the atoms are in a fixed structure with very little motion.&lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511523</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511523"/>
		<updated>2015-11-19T15:23:56Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Reduced Units */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of timestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.00939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is due to the fact that the system is in the &#039;&#039;NVE microcanonical ensemble&#039;&#039; and under Newton&#039;s laws of conservation of energy. For the system to perform accurately, this law must be obeyed as strictly as possible.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F= 24 \frac{\epsilon}{\sigma}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The well depth (minimum potential energy) is as following:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r(eq) = 2^{\frac {1}{6}} \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int \phi (r) dr = 4( - \frac{1}{11r^{11}}+ \frac{1}{5r^{5}} ) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore,&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2\sigma}^\infin \phi (r) dr = -2.48\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2.5\sigma}^\infin \phi (r) dr = -8.18\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{3\sigma}^\infin \phi (r) dr = -3.29\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These values show that from larger multiples of σ, the integrand becomes very small. The dominant, attractive part or the Lennard-Jones potential here quickly decreases with increasing separation. This is the basis of the &#039;&#039;lj-cutoff command&#039;&#039; described below. Any interactions with a separation greater than this cut-off are ignored as they do not contribute a significant to the overall forces in the system. &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes used in these simulations are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  Kjmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value in the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of one lattice point (N=1), a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of an FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the variable mass, which atom type, and its actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb, at a cut-off potential = 3.0σ.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1.&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable &#039;&#039;${timestep}&#039;&#039; so that the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E-4 s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.0025. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained and thte system energy does not change as a function of timestep. The largest timestep of 0.015 allows for slow fluctuations in energy to be seen, know as &#039;&#039;explosions&#039;&#039;, and propagates atoms very close together causing augmented atomic collisions which produce a spike in F and E values. The total energy continually increases and doesn&#039;t reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem, the instantaneous temperature T can be calculated.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken i.e. calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&lt;br /&gt;
&lt;br /&gt;
This means &#039;&#039;1000 measurements&#039;&#039; will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as any larger timestep results in energy fluctuations and a poor set of data. &lt;br /&gt;
&lt;br /&gt;
[[File:Density_0.2_Temp_2.0_input_script.log]]&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the {{fontcolor1|red|white|1st nearest neighbour}}, {{fontcolor1|yellow|black|the second}} {{fontcolor1|green|white|and third}} from the {{fontcolor1|blue|white|atom}} being observed.&lt;br /&gt;
[[File:Ffccube.pdf]] &lt;br /&gt;
&#039;&#039;Base cube found from [http://stackoverflow.com/questions/20600062/how-to-code-an-array-of-fcc-bcc-and-hcp-lattices-in-c]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the approximate trigonometric product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{ \sqrt 2}{2} \times 3.23 \times 2 = 4.6 &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
Or of the 3rd nearest neighbour: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = cos(\frac{45}{2}) \times sin(\frac{45}{2}) \times 2 \times 5.95 = 4.2&amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int sin(\omega t+\phi) \times[(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)+sin(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following is a graph of velocity autocorrelations for a solid, liquid and the theoretical value, worked out from the solution above. &lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what is seen is a function resembling damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away. The differences between the liquid and solid VACFs is due to the density of particles and particle motion. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is much more diffuse.&lt;br /&gt;
&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and the oscillatory cycle continues undisturbed to infinity.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.000334&lt;br /&gt;
| 0.000&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.247728&lt;br /&gt;
| 0.083&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.000137&lt;br /&gt;
| 0.000&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.270274&lt;br /&gt;
| 0.090&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. Moreover, the dissusion coefficient for the solid is, in both simulations 0. This is because the atoms are in a fixed structure with very little motion.&lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511521</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511521"/>
		<updated>2015-11-19T15:23:22Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Checking Equilibration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of timestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.00939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is due to the fact that the system is in the &#039;&#039;NVE microcanonical ensemble&#039;&#039; and under Newton&#039;s laws of conservation of energy. For the system to perform accurately, this law must be obeyed as strictly as possible.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F= 24 \frac{\epsilon}{\sigma}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The well depth (minimum potential energy) is as following:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r(eq) = 2^{\frac {1}{6}} \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int \phi (r) dr = 4( - \frac{1}{11r^{11}}+ \frac{1}{5r^{5}} ) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore,&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2\sigma}^\infin \phi (r) dr = -2.48\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2.5\sigma}^\infin \phi (r) dr = -8.18\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{3\sigma}^\infin \phi (r) dr = -3.29\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These values show that from larger multiples of σ, the integrand becomes very small. The dominant, attractive part or the Lennard-Jones potential here quickly decreases with increasing separation. This is the basis of the &#039;&#039;lj-cutoff command&#039;&#039; described below. Any interactions with a separation greater than this cut-off are ignored as they do not contribute a significant to the overall forces in the system. &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes used in these simulations are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  KjJmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value in the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of one lattice point (N=1), a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of an FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the variable mass, which atom type, and its actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb, at a cut-off potential = 3.0σ.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1.&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable &#039;&#039;${timestep}&#039;&#039; so that the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E-4 s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.0025. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained and thte system energy does not change as a function of timestep. The largest timestep of 0.015 allows for slow fluctuations in energy to be seen, know as &#039;&#039;explosions&#039;&#039;, and propagates atoms very close together causing augmented atomic collisions which produce a spike in F and E values. The total energy continually increases and doesn&#039;t reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem, the instantaneous temperature T can be calculated.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken i.e. calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&lt;br /&gt;
&lt;br /&gt;
This means &#039;&#039;1000 measurements&#039;&#039; will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as any larger timestep results in energy fluctuations and a poor set of data. &lt;br /&gt;
&lt;br /&gt;
[[File:Density_0.2_Temp_2.0_input_script.log]]&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the {{fontcolor1|red|white|1st nearest neighbour}}, {{fontcolor1|yellow|black|the second}} {{fontcolor1|green|white|and third}} from the {{fontcolor1|blue|white|atom}} being observed.&lt;br /&gt;
[[File:Ffccube.pdf]] &lt;br /&gt;
&#039;&#039;Base cube found from [http://stackoverflow.com/questions/20600062/how-to-code-an-array-of-fcc-bcc-and-hcp-lattices-in-c]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the approximate trigonometric product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{ \sqrt 2}{2} \times 3.23 \times 2 = 4.6 &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
Or of the 3rd nearest neighbour: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = cos(\frac{45}{2}) \times sin(\frac{45}{2}) \times 2 \times 5.95 = 4.2&amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int sin(\omega t+\phi) \times[(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)+sin(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following is a graph of velocity autocorrelations for a solid, liquid and the theoretical value, worked out from the solution above. &lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what is seen is a function resembling damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away. The differences between the liquid and solid VACFs is due to the density of particles and particle motion. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is much more diffuse.&lt;br /&gt;
&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and the oscillatory cycle continues undisturbed to infinity.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.000334&lt;br /&gt;
| 0.000&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.247728&lt;br /&gt;
| 0.083&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.000137&lt;br /&gt;
| 0.000&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.270274&lt;br /&gt;
| 0.090&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. Moreover, the dissusion coefficient for the solid is, in both simulations 0. This is because the atoms are in a fixed structure with very little motion.&lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511520</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511520"/>
		<updated>2015-11-19T15:22:25Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Mean Squared Displacement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of timestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.00939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is due to the fact that the system is in the &#039;&#039;NVE microcanonical ensemble&#039;&#039; and under Newton&#039;s laws of conservation of energy. For the system to perform accurately, this law must be obeyed as strictly as possible.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F= 24 \frac{\epsilon}{\sigma}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The well depth (minimum potential energy) is as following:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r(eq) = 2^{\frac {1}{6}} \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int \phi (r) dr = 4( - \frac{1}{11r^{11}}+ \frac{1}{5r^{5}} ) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore,&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2\sigma}^\infin \phi (r) dr = -2.48\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2.5\sigma}^\infin \phi (r) dr = -8.18\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{3\sigma}^\infin \phi (r) dr = -3.29\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These values show that from larger multiples of σ, the integrand becomes very small. The dominant, attractive part or the Lennard-Jones potential here quickly decreases with increasing separation. This is the basis of the &#039;&#039;lj-cutoff command&#039;&#039; described below. Any interactions with a separation greater than this cut-off are ignored as they do not contribute a significant to the overall forces in the system. &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes used in these simulations are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  KjJmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value in the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of one lattice point (N=1), a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of an FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the variable mass, which atom type, and its actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb, at a cut-off potential = 3.0σ.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1.&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable &#039;&#039;${timestep}&#039;&#039; so that the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E(^-4) s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.0025. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained and thte system energy does not change as a function of timestep. The largest timestep of 0.015 allows for slow fluctuations in energy to be seen, know as &#039;&#039;explosions&#039;&#039;, and propagates atoms very close together causing augmented atomic collisions which produce a spike in F and E values. The total energy continually increases and doesn&#039;t reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem, the instantaneous temperature T can be calculated.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken i.e. calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&lt;br /&gt;
&lt;br /&gt;
This means &#039;&#039;1000 measurements&#039;&#039; will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as any larger timestep results in energy fluctuations and a poor set of data. &lt;br /&gt;
&lt;br /&gt;
[[File:Density_0.2_Temp_2.0_input_script.log]]&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the {{fontcolor1|red|white|1st nearest neighbour}}, {{fontcolor1|yellow|black|the second}} {{fontcolor1|green|white|and third}} from the {{fontcolor1|blue|white|atom}} being observed.&lt;br /&gt;
[[File:Ffccube.pdf]] &lt;br /&gt;
&#039;&#039;Base cube found from [http://stackoverflow.com/questions/20600062/how-to-code-an-array-of-fcc-bcc-and-hcp-lattices-in-c]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the approximate trigonometric product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{ \sqrt 2}{2} \times 3.23 \times 2 = 4.6 &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
Or of the 3rd nearest neighbour: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = cos(\frac{45}{2}) \times sin(\frac{45}{2}) \times 2 \times 5.95 = 4.2&amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int sin(\omega t+\phi) \times[(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)+sin(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following is a graph of velocity autocorrelations for a solid, liquid and the theoretical value, worked out from the solution above. &lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what is seen is a function resembling damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away. The differences between the liquid and solid VACFs is due to the density of particles and particle motion. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is much more diffuse.&lt;br /&gt;
&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and the oscillatory cycle continues undisturbed to infinity.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.000334&lt;br /&gt;
| 0.000&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.247728&lt;br /&gt;
| 0.083&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.000137&lt;br /&gt;
| 0.000&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.270274&lt;br /&gt;
| 0.090&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. Moreover, the dissusion coefficient for the solid is, in both simulations 0. This is because the atoms are in a fixed structure with very little motion.&lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511515</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511515"/>
		<updated>2015-11-19T15:20:45Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Checking Equilibration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of timestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.00939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is due to the fact that the system is in the &#039;&#039;NVE microcanonical ensemble&#039;&#039; and under Newton&#039;s laws of conservation of energy. For the system to perform accurately, this law must be obeyed as strictly as possible.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F= 24 \frac{\epsilon}{\sigma}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The well depth (minimum potential energy) is as following:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r(eq) = 2^{\frac {1}{6}} \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int \phi (r) dr = 4( - \frac{1}{11r^{11}}+ \frac{1}{5r^{5}} ) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore,&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2\sigma}^\infin \phi (r) dr = -2.48\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2.5\sigma}^\infin \phi (r) dr = -8.18\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{3\sigma}^\infin \phi (r) dr = -3.29\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These values show that from larger multiples of σ, the integrand becomes very small. The dominant, attractive part or the Lennard-Jones potential here quickly decreases with increasing separation. This is the basis of the &#039;&#039;lj-cutoff command&#039;&#039; described below. Any interactions with a separation greater than this cut-off are ignored as they do not contribute a significant to the overall forces in the system. &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes used in these simulations are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  KjJmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value in the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of one lattice point (N=1), a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of an FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the variable mass, which atom type, and its actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb, at a cut-off potential = 3.0σ.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1.&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable &#039;&#039;${timestep}&#039;&#039; so that the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E(^-4) s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.0025. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained and thte system energy does not change as a function of timestep. The largest timestep of 0.015 allows for slow fluctuations in energy to be seen, know as &#039;&#039;explosions&#039;&#039;, and propagates atoms very close together causing augmented atomic collisions which produce a spike in F and E values. The total energy continually increases and doesn&#039;t reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem, the instantaneous temperature T can be calculated.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken i.e. calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&lt;br /&gt;
&lt;br /&gt;
This means &#039;&#039;1000 measurements&#039;&#039; will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as any larger timestep results in energy fluctuations and a poor set of data. &lt;br /&gt;
&lt;br /&gt;
[[File:Density_0.2_Temp_2.0_input_script.log]]&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the {{fontcolor1|red|white|1st nearest neighbour}}, {{fontcolor1|yellow|black|the second}} {{fontcolor1|green|white|and third}} from the {{fontcolor1|blue|white|atom}} being observed.&lt;br /&gt;
[[File:Ffccube.pdf]] &lt;br /&gt;
&#039;&#039;Base cube found from [http://stackoverflow.com/questions/20600062/how-to-code-an-array-of-fcc-bcc-and-hcp-lattices-in-c]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the approximate trigonometric product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{ \sqrt 2}{2} \times 3.23 \times 2 = 4.6 &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
Or of the 3rd nearest neighbour: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = cos(\frac{45}{2}) \times sin(\frac{45}{2}) \times 2 \times 5.95 = 4.2&amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5x10^{-4}&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int sin(\omega t+\phi) \times[(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)+sin(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following is a graph of velocity autocorrelations for a solid, liquid and the theoretical value, worked out from the solution above. &lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what is seen is a function resembling damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away. The differences between the liquid and solid VACFs is due to the density of particles and particle motion. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is much more diffuse.&lt;br /&gt;
&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and the oscillatory cycle continues undisturbed to infinity.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.000334&lt;br /&gt;
| 0.000&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.247728&lt;br /&gt;
| 0.083&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.000137&lt;br /&gt;
| 0.000&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.270274&lt;br /&gt;
| 0.090&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. Moreover, the dissusion coefficient for the solid is, in both simulations 0. This is because the atoms are in a fixed structure with very little motion.&lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511505</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511505"/>
		<updated>2015-11-19T15:17:01Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Velocity Autocorrelation Function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of timestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.00939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is due to the fact that the system is in the &#039;&#039;NVE microcanonical ensemble&#039;&#039; and under Newton&#039;s laws of conservation of energy. For the system to perform accurately, this law must be obeyed as strictly as possible.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F= 24 \frac{\epsilon}{\sigma}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The well depth (minimum potential energy) is as following:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r(eq) = 2^{\frac {1}{6}} \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int \phi (r) dr = 4( - \frac{1}{11r^{11}}+ \frac{1}{5r^{5}} ) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore,&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2\sigma}^\infin \phi (r) dr = -2.48\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2.5\sigma}^\infin \phi (r) dr = -8.18\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{3\sigma}^\infin \phi (r) dr = -3.29\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These values show that from larger multiples of σ, the integrand becomes very small. The dominant, attractive part or the Lennard-Jones potential here quickly decreases with increasing separation. This is the basis of the &#039;&#039;lj-cutoff command&#039;&#039; described below. Any interactions with a separation greater than this cut-off are ignored as they do not contribute a significant to the overall forces in the system. &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes used in these simulations are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  KjJmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value in the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of one lattice point (N=1), a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of an FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the variable mass, which atom type, and its actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb, at a cut-off potential = 3.0σ.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1.&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable &#039;&#039;${timestep}&#039;&#039; so that the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E(^-4) s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.0025. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained and thte system energy does not change as a function of timestep. The largest timestep of 0.015 allows for slow fluctuations in energy to be seen know as &#039;&#039;explosions&#039;&#039;. The timestep &#039;&#039;dT&#039;&#039; propagates atoms very close together causing atomic collisions which produce a spike in F and E values. The total energy continually increases and doesn&#039;t reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem, the instantaneous temperature T can be calculated.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken i.e. calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&lt;br /&gt;
&lt;br /&gt;
This means &#039;&#039;1000 measurements&#039;&#039; will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as any larger timestep results in energy fluctuations and a poor set of data. &lt;br /&gt;
&lt;br /&gt;
[[File:Density_0.2_Temp_2.0_input_script.log]]&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the {{fontcolor1|red|white|1st nearest neighbour}}, {{fontcolor1|yellow|black|the second}} {{fontcolor1|green|white|and third}} from the {{fontcolor1|blue|white|atom}} being observed.&lt;br /&gt;
[[File:Ffccube.pdf]] &lt;br /&gt;
&#039;&#039;Base cube found from [http://stackoverflow.com/questions/20600062/how-to-code-an-array-of-fcc-bcc-and-hcp-lattices-in-c]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the approximate trigonometric product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{ \sqrt 2}{2} \times 3.23 \times 2 = 4.6 &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
Or of the 3rd nearest neighbour: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = cos(\frac{45}{2}) \times sin(\frac{45}{2}) \times 2 \times 5.95 = 4.2&amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5x10^{-4}&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int sin(\omega t+\phi) \times[(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)+sin(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following is a graph of velocity autocorrelations for a solid, liquid and the theoretical value, worked out from the solution above. &lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what is seen is a function resembling damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away. The differences between the liquid and solid VACFs is due to the density of particles and particle motion. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is much more diffuse.&lt;br /&gt;
&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and the oscillatory cycle continues undisturbed to infinity.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.000334&lt;br /&gt;
| 0.000&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.247728&lt;br /&gt;
| 0.083&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.000137&lt;br /&gt;
| 0.000&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.270274&lt;br /&gt;
| 0.090&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. Moreover, the dissusion coefficient for the solid is, in both simulations 0. This is because the atoms are in a fixed structure with very little motion.&lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511500</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511500"/>
		<updated>2015-11-19T15:13:59Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Velocity Autocorrelation Function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of timestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.00939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is due to the fact that the system is in the &#039;&#039;NVE microcanonical ensemble&#039;&#039; and under Newton&#039;s laws of conservation of energy. For the system to perform accurately, this law must be obeyed as strictly as possible.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F= 24 \frac{\epsilon}{\sigma}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The well depth (minimum potential energy) is as following:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r(eq) = 2^{\frac {1}{6}} \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int \phi (r) dr = 4( - \frac{1}{11r^{11}}+ \frac{1}{5r^{5}} ) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore,&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2\sigma}^\infin \phi (r) dr = -2.48\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2.5\sigma}^\infin \phi (r) dr = -8.18\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{3\sigma}^\infin \phi (r) dr = -3.29\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These values show that from larger multiples of σ, the integrand becomes very small. The dominant, attractive part or the Lennard-Jones potential here quickly decreases with increasing separation. This is the basis of the &#039;&#039;lj-cutoff command&#039;&#039; described below. Any interactions with a separation greater than this cut-off are ignored as they do not contribute a significant to the overall forces in the system. &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes used in these simulations are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  KjJmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value in the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of one lattice point (N=1), a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of an FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the variable mass, which atom type, and its actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb, at a cut-off potential = 3.0σ.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1.&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable &#039;&#039;${timestep}&#039;&#039; so that the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E(^-4) s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.0025. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained and thte system energy does not change as a function of timestep. The largest timestep of 0.015 allows for slow fluctuations in energy to be seen know as &#039;&#039;explosions&#039;&#039;. The timestep &#039;&#039;dT&#039;&#039; propagates atoms very close together causing atomic collisions which produce a spike in F and E values. The total energy continually increases and doesn&#039;t reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem, the instantaneous temperature T can be calculated.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken i.e. calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&lt;br /&gt;
&lt;br /&gt;
This means &#039;&#039;1000 measurements&#039;&#039; will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as any larger timestep results in energy fluctuations and a poor set of data. &lt;br /&gt;
&lt;br /&gt;
[[File:Density_0.2_Temp_2.0_input_script.log]]&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the {{fontcolor1|red|white|1st nearest neighbour}}, {{fontcolor1|yellow|black|the second}} {{fontcolor1|green|white|and third}} from the {{fontcolor1|blue|white|atom}} being observed.&lt;br /&gt;
[[File:Ffccube.pdf]] &lt;br /&gt;
&#039;&#039;Base cube found from [http://stackoverflow.com/questions/20600062/how-to-code-an-array-of-fcc-bcc-and-hcp-lattices-in-c]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the approximate trigonometric product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{ \sqrt 2}{2} \times 3.23 \times 2 = 4.6 &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
Or of the 3rd nearest neighbour: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = cos(\frac{45}{2}) \times sin(\frac{45}{2}) \times 2 \times 5.95 = 4.2&amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5x10^{-4}&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int [sin(\omega t+\phi) \times(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)+sin(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following is a graph of velocity autocorrelations for a solid, liquid and the theoretical value, worked out from the solution above. &lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what is seen is a function resembling damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away. The differences between the liquid and solid VACFs is due to the density of particles and particle motion. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is much more diffuse.&lt;br /&gt;
&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and the oscillatory cycle continues undisturbed to infinity.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.000334&lt;br /&gt;
| 0.000&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.247728&lt;br /&gt;
| 0.083&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.000137&lt;br /&gt;
| 0.000&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.270274&lt;br /&gt;
| 0.090&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. Moreover, the dissusion coefficient for the solid is, in both simulations 0. This is because the atoms are in a fixed structure with very little motion.&lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511493</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511493"/>
		<updated>2015-11-19T15:10:27Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Finding the Diffusion Coefficient by Integration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of timestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.00939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is due to the fact that the system is in the &#039;&#039;NVE microcanonical ensemble&#039;&#039; and under Newton&#039;s laws of conservation of energy. For the system to perform accurately, this law must be obeyed as strictly as possible.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F= 24 \frac{\epsilon}{\sigma}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The well depth (minimum potential energy) is as following:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r(eq) = 2^{\frac {1}{6}} \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int \phi (r) dr = 4( - \frac{1}{11r^{11}}+ \frac{1}{5r^{5}} ) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore,&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2\sigma}^\infin \phi (r) dr = -2.48\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2.5\sigma}^\infin \phi (r) dr = -8.18\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{3\sigma}^\infin \phi (r) dr = -3.29\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These values show that from larger multiples of σ, the integrand becomes very small. The dominant, attractive part or the Lennard-Jones potential here quickly decreases with increasing separation. This is the basis of the &#039;&#039;lj-cutoff command&#039;&#039; described below. Any interactions with a separation greater than this cut-off are ignored as they do not contribute a significant to the overall forces in the system. &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes used in these simulations are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  KjJmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value in the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of one lattice point (N=1), a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of an FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the variable mass, which atom type, and its actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb, at a cut-off potential = 3.0σ.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1.&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable &#039;&#039;${timestep}&#039;&#039; so that the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E(^-4) s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.0025. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained and thte system energy does not change as a function of timestep. The largest timestep of 0.015 allows for slow fluctuations in energy to be seen know as &#039;&#039;explosions&#039;&#039;. The timestep &#039;&#039;dT&#039;&#039; propagates atoms very close together causing atomic collisions which produce a spike in F and E values. The total energy continually increases and doesn&#039;t reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem, the instantaneous temperature T can be calculated.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken i.e. calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&lt;br /&gt;
&lt;br /&gt;
This means &#039;&#039;1000 measurements&#039;&#039; will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as any larger timestep results in energy fluctuations and a poor set of data. &lt;br /&gt;
&lt;br /&gt;
[[File:Density_0.2_Temp_2.0_input_script.log]]&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the {{fontcolor1|red|white|1st nearest neighbour}}, {{fontcolor1|yellow|black|the second}} {{fontcolor1|green|white|and third}} from the {{fontcolor1|blue|white|atom}} being observed.&lt;br /&gt;
[[File:Ffccube.pdf]] &lt;br /&gt;
&#039;&#039;Base cube found from [http://stackoverflow.com/questions/20600062/how-to-code-an-array-of-fcc-bcc-and-hcp-lattices-in-c]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the approximate trigonometric product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{ \sqrt 2}{2} \times 3.23 \times 2 = 4.6 &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
Or of the 3rd nearest neighbour: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = cos(\frac{45}{2}) \times sin(\frac{45}{2}) \times 2 \times 5.95 = 4.2&amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5x10^{-4}&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int [sin(\omega t+\phi) \times(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = sin(\omega\tau)+cos(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following is a graph of velocity autocorrelations for a solid, liquid and the theoretical value, worked out from the solution above. &lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what is seen is a function resembling damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away. The differences between the liquid and solid VACFs is due to the density of particles and particle motion. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is much more diffuse.&lt;br /&gt;
&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and, up to 500 timesteps as seen here, you see one quarter of the oscillatory cycle. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.000334&lt;br /&gt;
| 0.000&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.247728&lt;br /&gt;
| 0.083&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.000137&lt;br /&gt;
| 0.000&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.270274&lt;br /&gt;
| 0.090&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. Moreover, the dissusion coefficient for the solid is, in both simulations 0. This is because the atoms are in a fixed structure with very little motion.&lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:11-_mill_atom_vacf_and_integ.pdf&amp;diff=511467</id>
		<title>File:11- mill atom vacf and integ.pdf</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:11-_mill_atom_vacf_and_integ.pdf&amp;diff=511467"/>
		<updated>2015-11-19T15:01:27Z</updated>

		<summary type="html">&lt;p&gt;Ai513: Ai513 uploaded a new version of File:11- mill atom vacf and integ.pdf&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:10-_vacf_and_integ_3_state.pdf&amp;diff=511465</id>
		<title>File:10- vacf and integ 3 state.pdf</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:10-_vacf_and_integ_3_state.pdf&amp;diff=511465"/>
		<updated>2015-11-19T14:59:41Z</updated>

		<summary type="html">&lt;p&gt;Ai513: Ai513 uploaded a new version of File:10- vacf and integ 3 state.pdf&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:10-_vacf_and_integ_3_state.pdf&amp;diff=511462</id>
		<title>File:10- vacf and integ 3 state.pdf</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:10-_vacf_and_integ_3_state.pdf&amp;diff=511462"/>
		<updated>2015-11-19T14:58:45Z</updated>

		<summary type="html">&lt;p&gt;Ai513: Ai513 uploaded a new version of File:10- vacf and integ 3 state.pdf&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:10-_vacf_and_integ_3_state.pdf&amp;diff=511457</id>
		<title>File:10- vacf and integ 3 state.pdf</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:10-_vacf_and_integ_3_state.pdf&amp;diff=511457"/>
		<updated>2015-11-19T14:57:19Z</updated>

		<summary type="html">&lt;p&gt;Ai513: Ai513 uploaded a new version of File:10- vacf and integ 3 state.pdf&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:9-_vacf_s_l_theory.pdf&amp;diff=511456</id>
		<title>File:9- vacf s l theory.pdf</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:9-_vacf_s_l_theory.pdf&amp;diff=511456"/>
		<updated>2015-11-19T14:56:51Z</updated>

		<summary type="html">&lt;p&gt;Ai513: Ai513 uploaded a new version of File:9- vacf s l theory.pdf&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:9-_vacf_s_l_theory.pdf&amp;diff=511455</id>
		<title>File:9- vacf s l theory.pdf</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:9-_vacf_s_l_theory.pdf&amp;diff=511455"/>
		<updated>2015-11-19T14:56:32Z</updated>

		<summary type="html">&lt;p&gt;Ai513: Ai513 uploaded a new version of File:9- vacf s l theory.pdf&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:9-_vacf_s_l_theory.pdf&amp;diff=511449</id>
		<title>File:9- vacf s l theory.pdf</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:9-_vacf_s_l_theory.pdf&amp;diff=511449"/>
		<updated>2015-11-19T14:55:24Z</updated>

		<summary type="html">&lt;p&gt;Ai513: Ai513 uploaded a new version of File:9- vacf s l theory.pdf&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511419</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511419"/>
		<updated>2015-11-19T14:36:29Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Velocity Autocorrelation Function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of timestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.00939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is due to the fact that the system is in the &#039;&#039;NVE microcanonical ensemble&#039;&#039; and under Newton&#039;s laws of conservation of energy. For the system to perform accurately, this law must be obeyed as strictly as possible.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F= 24 \frac{\epsilon}{\sigma}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The well depth (minimum potential energy) is as following:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r(eq) = 2^{\frac {1}{6}} \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int \phi (r) dr = 4( - \frac{1}{11r^{11}}+ \frac{1}{5r^{5}} ) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore,&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2\sigma}^\infin \phi (r) dr = -2.48\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2.5\sigma}^\infin \phi (r) dr = -8.18\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{3\sigma}^\infin \phi (r) dr = -3.29\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These values show that from larger multiples of σ, the integrand becomes very small. The dominant, attractive part or the Lennard-Jones potential here quickly decreases with increasing separation. This is the basis of the &#039;&#039;lj-cutoff command&#039;&#039; described below. Any interactions with a separation greater than this cut-off are ignored as they do not contribute a significant to the overall forces in the system. &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes used in these simulations are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  KjJmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value in the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of one lattice point (N=1), a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of an FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the variable mass, which atom type, and its actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb, at a cut-off potential = 3.0σ.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1.&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable &#039;&#039;${timestep}&#039;&#039; so that the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E(^-4) s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.0025. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained and thte system energy does not change as a function of timestep. The largest timestep of 0.015 allows for slow fluctuations in energy to be seen know as &#039;&#039;explosions&#039;&#039;. The timestep &#039;&#039;dT&#039;&#039; propagates atoms very close together causing atomic collisions which produce a spike in F and E values. The total energy continually increases and doesn&#039;t reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem, the instantaneous temperature T can be calculated.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken i.e. calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&lt;br /&gt;
&lt;br /&gt;
This means &#039;&#039;1000 measurements&#039;&#039; will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as any larger timestep results in energy fluctuations and a poor set of data. &lt;br /&gt;
&lt;br /&gt;
[[File:Density_0.2_Temp_2.0_input_script.log]]&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the {{fontcolor1|red|white|1st nearest neighbour}}, {{fontcolor1|yellow|black|the second}} {{fontcolor1|green|white|and third}} from the {{fontcolor1|blue|white|atom}} being observed.&lt;br /&gt;
[[File:Ffccube.pdf]] &lt;br /&gt;
&#039;&#039;Base cube found from [http://stackoverflow.com/questions/20600062/how-to-code-an-array-of-fcc-bcc-and-hcp-lattices-in-c]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the approximate trigonometric product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{ \sqrt 2}{2} \times 3.23 \times 2 = 4.6 &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
Or of the 3rd nearest neighbour: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = cos(\frac{45}{2}) \times sin(\frac{45}{2}) \times 2 \times 5.95 = 4.2&amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5x10^{-4}&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int [sin(\omega t+\phi) \times(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = sin(\omega\tau)+cos(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following is a graph of velocity autocorrelations for a solid, liquid and the theoretical value, worked out from the solution above. &lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what is seen is a function resembling damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away. The differences between the liquid and solid VACFs is due to the density of particles and particle motion. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is much more diffuse.&lt;br /&gt;
&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and, up to 500 timesteps as seen here, you see one quarter of the oscillatory cycle. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.318136&lt;br /&gt;
| 0.106&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.377725&lt;br /&gt;
| 0.126&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.353838&lt;br /&gt;
| 0.118&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.303173&lt;br /&gt;
| 0.101&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. &lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;br /&gt;
The data for the one million atom simulation does not correspond to theory, as the D value is higher for the solid than liquid. This suggests the liquid is more dense than the solid.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511395</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511395"/>
		<updated>2015-11-19T14:21:25Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Mean Squared Displacement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of timestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.00939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is due to the fact that the system is in the &#039;&#039;NVE microcanonical ensemble&#039;&#039; and under Newton&#039;s laws of conservation of energy. For the system to perform accurately, this law must be obeyed as strictly as possible.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F= 24 \frac{\epsilon}{\sigma}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The well depth (minimum potential energy) is as following:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r(eq) = 2^{\frac {1}{6}} \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int \phi (r) dr = 4( - \frac{1}{11r^{11}}+ \frac{1}{5r^{5}} ) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore,&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2\sigma}^\infin \phi (r) dr = -2.48\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2.5\sigma}^\infin \phi (r) dr = -8.18\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{3\sigma}^\infin \phi (r) dr = -3.29\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These values show that from larger multiples of σ, the integrand becomes very small. The dominant, attractive part or the Lennard-Jones potential here quickly decreases with increasing separation. This is the basis of the &#039;&#039;lj-cutoff command&#039;&#039; described below. Any interactions with a separation greater than this cut-off are ignored as they do not contribute a significant to the overall forces in the system. &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes used in these simulations are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  KjJmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value in the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of one lattice point (N=1), a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of an FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the variable mass, which atom type, and its actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb, at a cut-off potential = 3.0σ.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1.&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable &#039;&#039;${timestep}&#039;&#039; so that the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E(^-4) s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.0025. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained and thte system energy does not change as a function of timestep. The largest timestep of 0.015 allows for slow fluctuations in energy to be seen know as &#039;&#039;explosions&#039;&#039;. The timestep &#039;&#039;dT&#039;&#039; propagates atoms very close together causing atomic collisions which produce a spike in F and E values. The total energy continually increases and doesn&#039;t reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem, the instantaneous temperature T can be calculated.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken i.e. calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&lt;br /&gt;
&lt;br /&gt;
This means &#039;&#039;1000 measurements&#039;&#039; will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as any larger timestep results in energy fluctuations and a poor set of data. &lt;br /&gt;
&lt;br /&gt;
[[File:Density_0.2_Temp_2.0_input_script.log]]&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the {{fontcolor1|red|white|1st nearest neighbour}}, {{fontcolor1|yellow|black|the second}} {{fontcolor1|green|white|and third}} from the {{fontcolor1|blue|white|atom}} being observed.&lt;br /&gt;
[[File:Ffccube.pdf]] &lt;br /&gt;
&#039;&#039;Base cube found from [http://stackoverflow.com/questions/20600062/how-to-code-an-array-of-fcc-bcc-and-hcp-lattices-in-c]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the approximate trigonometric product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{ \sqrt 2}{2} \times 3.23 \times 2 = 4.6 &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
Or of the 3rd nearest neighbour: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = cos(\frac{45}{2}) \times sin(\frac{45}{2}) \times 2 \times 5.95 = 4.2&amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5x10^{-4}&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int [sin(\omega t+\phi) \times(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = sin(\omega\tau)+cos(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what we see is a function resembling a damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away.This doesn&#039;t really occur in a gas due to the sparsity of particles. The differences between the liquid and solid VACFs is due to the density of particles. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is mush more diffuse.&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and, up to 500 timesteps as seen here, you see one quarter of the oscillatory cycle. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.318136&lt;br /&gt;
| 0.106&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.377725&lt;br /&gt;
| 0.126&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.353838&lt;br /&gt;
| 0.118&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.303173&lt;br /&gt;
| 0.101&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. &lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;br /&gt;
The data for the one million atom simulation does not correspond to theory, as the D value is higher for the solid than liquid. This suggests the liquid is more dense than the solid.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511392</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511392"/>
		<updated>2015-11-19T14:16:41Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Simulation of a Simple Liquid */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of timestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.00939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is due to the fact that the system is in the &#039;&#039;NVE microcanonical ensemble&#039;&#039; and under Newton&#039;s laws of conservation of energy. For the system to perform accurately, this law must be obeyed as strictly as possible.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F= 24 \frac{\epsilon}{\sigma}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The well depth (minimum potential energy) is as following:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r(eq) = 2^{\frac {1}{6}} \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int \phi (r) dr = 4( - \frac{1}{11r^{11}}+ \frac{1}{5r^{5}} ) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore,&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2\sigma}^\infin \phi (r) dr = -2.48\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2.5\sigma}^\infin \phi (r) dr = -8.18\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{3\sigma}^\infin \phi (r) dr = -3.29\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These values show that from larger multiples of σ, the integrand becomes very small. The dominant, attractive part or the Lennard-Jones potential here quickly decreases with increasing separation. This is the basis of the &#039;&#039;lj-cutoff command&#039;&#039; described below. Any interactions with a separation greater than this cut-off are ignored as they do not contribute a significant to the overall forces in the system. &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes used in these simulations are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  KjJmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value in the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of one lattice point (N=1), a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of an FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the variable mass, which atom type, and its actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb, at a cut-off potential = 3.0σ.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1.&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable &#039;&#039;${timestep}&#039;&#039; so that the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E(^-4) s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.0025. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained and thte system energy does not change as a function of timestep. The largest timestep of 0.015 allows for slow fluctuations in energy to be seen know as &#039;&#039;explosions&#039;&#039;. The timestep &#039;&#039;dT&#039;&#039; propagates atoms very close together causing atomic collisions which produce a spike in F and E values. The total energy continually increases and doesn&#039;t reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem, the instantaneous temperature T can be calculated.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken i.e. calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&lt;br /&gt;
&lt;br /&gt;
This means &#039;&#039;1000 measurements&#039;&#039; will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as any larger timestep results in energy fluctuations and a poor set of data. &lt;br /&gt;
&lt;br /&gt;
[[File:Density_0.2_Temp_2.0_input_script.log]]&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the {{fontcolor1|red|white|1st nearest neighbour}}, {{fontcolor1|yellow|black|the second}} {{fontcolor1|green|white|and third}} from the {{fontcolor1|blue|white|atom}} being observed.&lt;br /&gt;
[[File:Ffccube.pdf]] &lt;br /&gt;
&#039;&#039;Base cube found from [http://stackoverflow.com/questions/20600062/how-to-code-an-array-of-fcc-bcc-and-hcp-lattices-in-c]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the approximate trigonometric product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{ \sqrt 2}{2} \times 3.23 \times 2 = 4.6 &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
Or of the 3rd nearest neighbour: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = cos(\frac{45}{2}) \times sin(\frac{45}{2}) \times 2 \times 5.95 = 4.2&amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5x10^{-4}&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int [sin(\omega t+\phi) \times(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = sin(\omega\tau)+cos(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what we see is a function resembling a damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away.This doesn&#039;t really occur in a gas due to the sparsity of particles. The differences between the liquid and solid VACFs is due to the density of particles. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is mush more diffuse.&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and, up to 500 timesteps as seen here, you see one quarter of the oscillatory cycle. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.318136&lt;br /&gt;
| 0.106&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.377725&lt;br /&gt;
| 0.126&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.353838&lt;br /&gt;
| 0.118&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.303173&lt;br /&gt;
| 0.101&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. &lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;br /&gt;
The data for the one million atom simulation does not correspond to theory, as the D value is higher for the solid than liquid. This suggests the liquid is more dense than the solid.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511268</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511268"/>
		<updated>2015-11-19T12:58:31Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Velocity Verlet Algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of tilmestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.00939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This iis due to the fact that the system is in th eNVE microcanonical ensemble and is obeying newton&#039;s laws of conservation of eneryg. For the system to perform accurately, this law must be obeyed as strictly as possible.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F= 24 \frac{\epsilon}{\sigma}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The potential energy is a minimum &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r(eq) = 2^{\frac {1}{6}} \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int \phi (r) dr = 4( - \frac{1}{11r^{11}}+ \frac{1}{5r^{5}} ) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore,&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2\sigma}^\infin \phi (r) dr = -2.48\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2.5\sigma}^\infin \phi (r) dr = -8.18\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{3\sigma}^\infin \phi (r) dr = -3.29\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These values show that from larger multiples of σ, the integrand becomes very small. The dominant, attractive part or the Lennard-Jones potential here quickly decreases with increasing separation. This is the basis of the &#039;&#039;lj-cutoff command&#039;&#039; described below. Any interactions with a separation greater than this cut-off are ignored as they do not contribute much to the overall forces in the system. &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes use in this simulation are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  KjJmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value of the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of 1L.P. (N=1) a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of a FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the mass, atom type, and actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb. Cut-off potential = 3.0σ &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1&lt;br /&gt;
&lt;br /&gt;
The velocity-verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable ${timestep} so the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E(^-4) s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.01. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained. The largest timestep 0.015 allows for slow fluctuations in energy to be seen, know as &#039;explosions&#039;, whereby the total energy just continually increases and doesn&#039;t reach equilibrium. The timestep &#039;&#039;dT&#039;&#039; propagates atoms very close causing atomic collisions which produce a spike in F and E values. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Having re-evaluated the data, the timestep best suited to the simulations was discovered to be 0.0025, as this value allowed energy to not change as a function of timestep, but is large enough to simulate a good amount of &#039;real time&#039;.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
the instantaneous temperature T can be calculated. This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This means 1000 measurements will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as a timestep of 0.01 is too high and energy fluctuations reults in a poor set of data. &lt;br /&gt;
&lt;br /&gt;
[[File:Density_0.2_Temp_2.0_input_script.log]]&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the {{fontcolor1|red|white|1st nearest neighbour}}, {{fontcolor1|yellow|black|the second}} {{fontcolor1|green|white|and third}} from the {{fontcolor1|blue|white|atom}} being observed.&lt;br /&gt;
[[File:Ffccube.pdf]] &lt;br /&gt;
&#039;&#039;Base cube found from [http://stackoverflow.com/questions/20600062/how-to-code-an-array-of-fcc-bcc-and-hcp-lattices-in-c]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the approximate trigonometric product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{ \sqrt 2}{2} \times 3.23 \times 2 = 4.6 &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
Or of the 3rd nearest neighbour: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = cos(\frac{45}{2}) \times sin(\frac{45}{2}) \times 2 \times 5.95 = 4.2&amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5x10^{-4}&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int [sin(\omega t+\phi) \times(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = sin(\omega\tau)+cos(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what we see is a function resembling a damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away.This doesn&#039;t really occur in a gas due to the sparsity of particles. The differences between the liquid and solid VACFs is due to the density of particles. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is mush more diffuse.&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and, up to 500 timesteps as seen here, you see one quarter of the oscillatory cycle. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.318136&lt;br /&gt;
| 0.106&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.377725&lt;br /&gt;
| 0.126&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.353838&lt;br /&gt;
| 0.118&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.303173&lt;br /&gt;
| 0.101&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. &lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;br /&gt;
The data for the one million atom simulation does not correspond to theory, as the D value is higher for the solid than liquid. This suggests the liquid is more dense than the solid.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511256</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=511256"/>
		<updated>2015-11-19T12:46:02Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Velocity Verlet Algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of tilmestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.00939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F= 24 \frac{\epsilon}{\sigma}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The potential energy is a minimum &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r(eq) = 2^{\frac {1}{6}} \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int \phi (r) dr = 4( - \frac{1}{11r^{11}}+ \frac{1}{5r^{5}} ) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore,&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2\sigma}^\infin \phi (r) dr = -2.48\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2.5\sigma}^\infin \phi (r) dr = -8.18\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{3\sigma}^\infin \phi (r) dr = -3.29\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These values show that from larger multiples of σ, the integrand becomes very small. The dominant, attractive part or the Lennard-Jones potential here quickly decreases with increasing separation. This is the basis of the &#039;&#039;lj-cutoff command&#039;&#039; described below. Any interactions with a separation greater than this cut-off are ignored as they do not contribute much to the overall forces in the system. &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes use in this simulation are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  KjJmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value of the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of 1L.P. (N=1) a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of a FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the mass, atom type, and actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb. Cut-off potential = 3.0σ &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1&lt;br /&gt;
&lt;br /&gt;
The velocity-verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable ${timestep} so the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E(^-4) s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.01. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained. The largest timestep 0.015 allows for slow fluctuations in energy to be seen, know as &#039;explosions&#039;, whereby the total energy just continually increases and doesn&#039;t reach equilibrium. The timestep &#039;&#039;dT&#039;&#039; propagates atoms very close causing atomic collisions which produce a spike in F and E values. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Having re-evaluated the data, the timestep best suited to the simulations was discovered to be 0.0025, as this value allowed energy to not change as a function of timestep, but is large enough to simulate a good amount of &#039;real time&#039;.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
the instantaneous temperature T can be calculated. This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This means 1000 measurements will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as a timestep of 0.01 is too high and energy fluctuations reults in a poor set of data. &lt;br /&gt;
&lt;br /&gt;
[[File:Density_0.2_Temp_2.0_input_script.log]]&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the {{fontcolor1|red|white|1st nearest neighbour}}, {{fontcolor1|yellow|black|the second}} {{fontcolor1|green|white|and third}} from the {{fontcolor1|blue|white|atom}} being observed.&lt;br /&gt;
[[File:Ffccube.pdf]] &lt;br /&gt;
&#039;&#039;Base cube found from [http://stackoverflow.com/questions/20600062/how-to-code-an-array-of-fcc-bcc-and-hcp-lattices-in-c]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the approximate trigonometric product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{ \sqrt 2}{2} \times 3.23 \times 2 = 4.6 &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
Or of the 3rd nearest neighbour: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = cos(\frac{45}{2}) \times sin(\frac{45}{2}) \times 2 \times 5.95 = 4.2&amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5x10^{-4}&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int [sin(\omega t+\phi) \times(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = sin(\omega\tau)+cos(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what we see is a function resembling a damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away.This doesn&#039;t really occur in a gas due to the sparsity of particles. The differences between the liquid and solid VACFs is due to the density of particles. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is mush more diffuse.&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and, up to 500 timesteps as seen here, you see one quarter of the oscillatory cycle. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.318136&lt;br /&gt;
| 0.106&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.377725&lt;br /&gt;
| 0.126&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.353838&lt;br /&gt;
| 0.118&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.303173&lt;br /&gt;
| 0.101&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. &lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;br /&gt;
The data for the one million atom simulation does not correspond to theory, as the D value is higher for the solid than liquid. This suggests the liquid is more dense than the solid.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510477</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510477"/>
		<updated>2015-11-18T13:35:08Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Atomic Forces */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of tilmestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.0939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F= 24 \frac{\epsilon}{\sigma}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The potential energy is a minimum &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r(eq) = 2^{\frac {1}{6}} \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int \phi (r) dr = 4( - \frac{1}{11r^{11}}+ \frac{1}{5r^{5}} ) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore,&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2\sigma}^\infin \phi (r) dr = -2.48\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2.5\sigma}^\infin \phi (r) dr = -8.18\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{3\sigma}^\infin \phi (r) dr = -3.29\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These values show that from larger multiples of σ, the integrand becomes very small. The dominant, attractive part or the Lennard-Jones potential here quickly decreases with increasing separation. This is the basis of the &#039;&#039;lj-cutoff command&#039;&#039; described below. Any interactions with a separation greater than this cut-off are ignored as they do not contribute much to the overall forces in the system. &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes use in this simulation are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  KjJmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value of the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of 1L.P. (N=1) a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of a FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the mass, atom type, and actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb. Cut-off potential = 3.0σ &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1&lt;br /&gt;
&lt;br /&gt;
The velocity-verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable ${timestep} so the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E(^-4) s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.01. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained. The largest timestep 0.015 allows for slow fluctuations in energy to be seen, know as &#039;explosions&#039;, whereby the total energy just continually increases and doesn&#039;t reach equilibrium. The timestep &#039;&#039;dT&#039;&#039; propagates atoms very close causing atomic collisions which produce a spike in F and E values. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Having re-evaluated the data, the timestep best suited to the simulations was discovered to be 0.0025, as this value allowed energy to not change as a function of timestep, but is large enough to simulate a good amount of &#039;real time&#039;.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
the instantaneous temperature T can be calculated. This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This means 1000 measurements will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as a timestep of 0.01 is too high and energy fluctuations reults in a poor set of data. &lt;br /&gt;
&lt;br /&gt;
[[File:Density_0.2_Temp_2.0_input_script.log]]&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the {{fontcolor1|red|white|1st nearest neighbour}}, {{fontcolor1|yellow|black|the second}} {{fontcolor1|green|white|and third}} from the {{fontcolor1|blue|white|atom}} being observed.&lt;br /&gt;
[[File:Ffccube.pdf]] &lt;br /&gt;
&#039;&#039;Base cube found from [http://stackoverflow.com/questions/20600062/how-to-code-an-array-of-fcc-bcc-and-hcp-lattices-in-c]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the approximate trigonometric product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{ \sqrt 2}{2} \times 3.23 \times 2 = 4.6 &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
Or of the 3rd nearest neighbour: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = cos(\frac{45}{2}) \times sin(\frac{45}{2}) \times 2 \times 5.95 = 4.2&amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5x10^{-4}&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int [sin(\omega t+\phi) \times(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = sin(\omega\tau)+cos(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what we see is a function resembling a damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away.This doesn&#039;t really occur in a gas due to the sparsity of particles. The differences between the liquid and solid VACFs is due to the density of particles. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is mush more diffuse.&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and, up to 500 timesteps as seen here, you see one quarter of the oscillatory cycle. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.318136&lt;br /&gt;
| 0.106&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.377725&lt;br /&gt;
| 0.126&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.353838&lt;br /&gt;
| 0.118&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.303173&lt;br /&gt;
| 0.101&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. &lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;br /&gt;
The data for the one million atom simulation does not correspond to theory, as the D value is higher for the solid than liquid. This suggests the liquid is more dense than the solid.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510475</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510475"/>
		<updated>2015-11-18T13:32:15Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Atomic Forces */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of tilmestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.0939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F= 24 \frac{\epsilon}{\sigma}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The potential energy is a minimum &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r(eq) = 2^{\frac {1}{6}} \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int \phi (r) dr = 4( - \frac{1}{11r^{11}}+ \frac{1}{5r^{5}} ) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore,&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2\sigma}^\infin \phi (r) dr = -2.48\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2.5\sigma}^\infin \phi (r) dr = -8.18\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{3\sigma}^\infin \phi (r) dr = -3.29\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These values show that at larger multiples of σ, the integrand becomes very small, and the dominant, attractive part or the Lennard-Jones potential here quickly decreases with increasing separation. This is the basis of the  &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes use in this simulation are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  KjJmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value of the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of 1L.P. (N=1) a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of a FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the mass, atom type, and actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb. Cut-off potential = 3.0σ &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1&lt;br /&gt;
&lt;br /&gt;
The velocity-verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable ${timestep} so the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E(^-4) s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.01. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained. The largest timestep 0.015 allows for slow fluctuations in energy to be seen, know as &#039;explosions&#039;, whereby the total energy just continually increases and doesn&#039;t reach equilibrium. The timestep &#039;&#039;dT&#039;&#039; propagates atoms very close causing atomic collisions which produce a spike in F and E values. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Having re-evaluated the data, the timestep best suited to the simulations was discovered to be 0.0025, as this value allowed energy to not change as a function of timestep, but is large enough to simulate a good amount of &#039;real time&#039;.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
the instantaneous temperature T can be calculated. This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This means 1000 measurements will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as a timestep of 0.01 is too high and energy fluctuations reults in a poor set of data. &lt;br /&gt;
&lt;br /&gt;
[[File:Density_0.2_Temp_2.0_input_script.log]]&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the {{fontcolor1|red|white|1st nearest neighbour}}, {{fontcolor1|yellow|black|the second}} {{fontcolor1|green|white|and third}} from the {{fontcolor1|blue|white|atom}} being observed.&lt;br /&gt;
[[File:Ffccube.pdf]] &lt;br /&gt;
&#039;&#039;Base cube found from [http://stackoverflow.com/questions/20600062/how-to-code-an-array-of-fcc-bcc-and-hcp-lattices-in-c]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the approximate trigonometric product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{ \sqrt 2}{2} \times 3.23 \times 2 = 4.6 &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
Or of the 3rd nearest neighbour: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = cos(\frac{45}{2}) \times sin(\frac{45}{2}) \times 2 \times 5.95 = 4.2&amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5x10^{-4}&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int [sin(\omega t+\phi) \times(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = sin(\omega\tau)+cos(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what we see is a function resembling a damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away.This doesn&#039;t really occur in a gas due to the sparsity of particles. The differences between the liquid and solid VACFs is due to the density of particles. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is mush more diffuse.&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and, up to 500 timesteps as seen here, you see one quarter of the oscillatory cycle. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.318136&lt;br /&gt;
| 0.106&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.377725&lt;br /&gt;
| 0.126&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.353838&lt;br /&gt;
| 0.118&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.303173&lt;br /&gt;
| 0.101&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. &lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;br /&gt;
The data for the one million atom simulation does not correspond to theory, as the D value is higher for the solid than liquid. This suggests the liquid is more dense than the solid.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510466</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510466"/>
		<updated>2015-11-18T13:26:44Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Atomic Forces */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of tilmestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.0939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F= 24 \frac{\epsilon}{\sigma}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The potential energy is a minimum &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r(eq) = 2^{\frac {1}{6}} \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int \phi (r) dr = 4( - \frac{1}{11r^{11}}+ \frac{1}{5r^{5}} ) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore,&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2\sigma}^\infin \phi (r) dr = -2.48\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{2.5\sigma}^\infin \phi (r) dr = -8.18\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \int_{3\sigma}^\infin \phi (r) dr = -3.29\times10^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes use in this simulation are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  KjJmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value of the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of 1L.P. (N=1) a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of a FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the mass, atom type, and actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb. Cut-off potential = 3.0σ &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1&lt;br /&gt;
&lt;br /&gt;
The velocity-verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable ${timestep} so the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E(^-4) s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.01. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained. The largest timestep 0.015 allows for slow fluctuations in energy to be seen, know as &#039;explosions&#039;, whereby the total energy just continually increases and doesn&#039;t reach equilibrium. The timestep &#039;&#039;dT&#039;&#039; propagates atoms very close causing atomic collisions which produce a spike in F and E values. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Having re-evaluated the data, the timestep best suited to the simulations was discovered to be 0.0025, as this value allowed energy to not change as a function of timestep, but is large enough to simulate a good amount of &#039;real time&#039;.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
the instantaneous temperature T can be calculated. This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This means 1000 measurements will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as a timestep of 0.01 is too high and energy fluctuations reults in a poor set of data. &lt;br /&gt;
&lt;br /&gt;
[[File:Density_0.2_Temp_2.0_input_script.log]]&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the {{fontcolor1|red|white|1st nearest neighbour}}, {{fontcolor1|yellow|black|the second}} {{fontcolor1|green|white|and third}} from the {{fontcolor1|blue|white|atom}} being observed.&lt;br /&gt;
[[File:Ffccube.pdf]] &lt;br /&gt;
&#039;&#039;Base cube found from [http://stackoverflow.com/questions/20600062/how-to-code-an-array-of-fcc-bcc-and-hcp-lattices-in-c]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the approximate trigonometric product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{ \sqrt 2}{2} \times 3.23 \times 2 = 4.6 &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
Or of the 3rd nearest neighbour: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = cos(\frac{45}{2}) \times sin(\frac{45}{2}) \times 2 \times 5.95 = 4.2&amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5x10^{-4}&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int [sin(\omega t+\phi) \times(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = sin(\omega\tau)+cos(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what we see is a function resembling a damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away.This doesn&#039;t really occur in a gas due to the sparsity of particles. The differences between the liquid and solid VACFs is due to the density of particles. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is mush more diffuse.&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and, up to 500 timesteps as seen here, you see one quarter of the oscillatory cycle. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.318136&lt;br /&gt;
| 0.106&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.377725&lt;br /&gt;
| 0.126&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.353838&lt;br /&gt;
| 0.118&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.303173&lt;br /&gt;
| 0.101&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. &lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;br /&gt;
The data for the one million atom simulation does not correspond to theory, as the D value is higher for the solid than liquid. This suggests the liquid is more dense than the solid.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510443</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510443"/>
		<updated>2015-11-18T12:59:39Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* The Radial Distribution Function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of tilmestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.0939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is 0N. &lt;br /&gt;
When the potential energy is a minimum: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -4\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r = 2^\frac {1}{6} \times \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
INSERT INTERGRALS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes use in this simulation are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  KjJmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value of the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of 1L.P. (N=1) a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of a FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the mass, atom type, and actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb. Cut-off potential = 3.0σ &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1&lt;br /&gt;
&lt;br /&gt;
The velocity-verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable ${timestep} so the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E(^-4) s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.01. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained. The largest timestep 0.015 allows for slow fluctuations in energy to be seen, know as &#039;explosions&#039;, whereby the total energy just continually increases and doesn&#039;t reach equilibrium. The timestep &#039;&#039;dT&#039;&#039; propagates atoms very close causing atomic collisions which produce a spike in F and E values. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Having re-evaluated the data, the timestep best suited to the simulations was discovered to be 0.0025, as this value allowed energy to not change as a function of timestep, but is large enough to simulate a good amount of &#039;real time&#039;.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
the instantaneous temperature T can be calculated. This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This means 1000 measurements will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as a timestep of 0.01 is too high and energy fluctuations reults in a poor set of data. &lt;br /&gt;
&lt;br /&gt;
[[File:Density_0.2_Temp_2.0_input_script.log]]&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the {{fontcolor1|red|white|1st nearest neighbour}}, {{fontcolor1|yellow|black|the second}} {{fontcolor1|green|white|and third}} from the {{fontcolor1|blue|white|atom}} being observed.&lt;br /&gt;
[[File:Ffccube.pdf]] &lt;br /&gt;
&#039;&#039;Base cube found from [http://stackoverflow.com/questions/20600062/how-to-code-an-array-of-fcc-bcc-and-hcp-lattices-in-c]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the approximate trigonometric product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{ \sqrt 2}{2} \times 3.23 \times 2 = 4.6 &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
Or of the 3rd nearest neighbour: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = cos(\frac{45}{2}) \times sin(\frac{45}{2}) \times 2 \times 5.95 = 4.2&amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5x10^{-4}&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int [sin(\omega t+\phi) \times(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = sin(\omega\tau)+cos(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what we see is a function resembling a damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away.This doesn&#039;t really occur in a gas due to the sparsity of particles. The differences between the liquid and solid VACFs is due to the density of particles. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is mush more diffuse.&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and, up to 500 timesteps as seen here, you see one quarter of the oscillatory cycle. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.318136&lt;br /&gt;
| 0.106&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.377725&lt;br /&gt;
| 0.126&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.353838&lt;br /&gt;
| 0.118&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.303173&lt;br /&gt;
| 0.101&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. &lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;br /&gt;
The data for the one million atom simulation does not correspond to theory, as the D value is higher for the solid than liquid. This suggests the liquid is more dense than the solid.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510440</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510440"/>
		<updated>2015-11-18T12:56:48Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* The Radial Distribution Function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of tilmestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.0939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is 0N. &lt;br /&gt;
When the potential energy is a minimum: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -4\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r = 2^\frac {1}{6} \times \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
INSERT INTERGRALS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes use in this simulation are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  KjJmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value of the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of 1L.P. (N=1) a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of a FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the mass, atom type, and actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb. Cut-off potential = 3.0σ &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1&lt;br /&gt;
&lt;br /&gt;
The velocity-verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable ${timestep} so the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E(^-4) s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.01. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained. The largest timestep 0.015 allows for slow fluctuations in energy to be seen, know as &#039;explosions&#039;, whereby the total energy just continually increases and doesn&#039;t reach equilibrium. The timestep &#039;&#039;dT&#039;&#039; propagates atoms very close causing atomic collisions which produce a spike in F and E values. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Having re-evaluated the data, the timestep best suited to the simulations was discovered to be 0.0025, as this value allowed energy to not change as a function of timestep, but is large enough to simulate a good amount of &#039;real time&#039;.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
the instantaneous temperature T can be calculated. This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This means 1000 measurements will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as a timestep of 0.01 is too high and energy fluctuations reults in a poor set of data. &lt;br /&gt;
&lt;br /&gt;
[[File:Density_0.2_Temp_2.0_input_script.log]]&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the {{fontcolor1|red|white|1st nearest neighbour}}, {{fontcolor1|yellow|black|the second}} {{fontcolor1|green|white|and third}} from the {{fontcolor1|blue|white|atom}} being observed.&lt;br /&gt;
[[File:Ffccube.pdf]] &lt;br /&gt;
&#039;&#039;Base cube found from [http://stackoverflow.com/questions/20600062/how-to-code-an-array-of-fcc-bcc-and-hcp-lattices-in-c]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the approximate trigonometric product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{ \sqrt 2}{2} \times 3.23 \times 2 = 4.6  &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
Or of the 3rd nearest neighbour: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = cos(\frac{45}{2}) \times sin(\frac{45}{2}) \times 2 \times 5.95 = 4.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5x10^{-4}&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int [sin(\omega t+\phi) \times(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = sin(\omega\tau)+cos(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what we see is a function resembling a damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away.This doesn&#039;t really occur in a gas due to the sparsity of particles. The differences between the liquid and solid VACFs is due to the density of particles. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is mush more diffuse.&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and, up to 500 timesteps as seen here, you see one quarter of the oscillatory cycle. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.318136&lt;br /&gt;
| 0.106&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.377725&lt;br /&gt;
| 0.126&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.353838&lt;br /&gt;
| 0.118&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.303173&lt;br /&gt;
| 0.101&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. &lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;br /&gt;
The data for the one million atom simulation does not correspond to theory, as the D value is higher for the solid than liquid. This suggests the liquid is more dense than the solid.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510438</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510438"/>
		<updated>2015-11-18T12:56:07Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* The Radial Distribution Function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of tilmestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.0939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is 0N. &lt;br /&gt;
When the potential energy is a minimum: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -4\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r = 2^\frac {1}{6} \times \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
INSERT INTERGRALS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes use in this simulation are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  KjJmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value of the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of 1L.P. (N=1) a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of a FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the mass, atom type, and actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb. Cut-off potential = 3.0σ &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1&lt;br /&gt;
&lt;br /&gt;
The velocity-verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable ${timestep} so the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E(^-4) s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.01. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained. The largest timestep 0.015 allows for slow fluctuations in energy to be seen, know as &#039;explosions&#039;, whereby the total energy just continually increases and doesn&#039;t reach equilibrium. The timestep &#039;&#039;dT&#039;&#039; propagates atoms very close causing atomic collisions which produce a spike in F and E values. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Having re-evaluated the data, the timestep best suited to the simulations was discovered to be 0.0025, as this value allowed energy to not change as a function of timestep, but is large enough to simulate a good amount of &#039;real time&#039;.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
the instantaneous temperature T can be calculated. This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This means 1000 measurements will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as a timestep of 0.01 is too high and energy fluctuations reults in a poor set of data. &lt;br /&gt;
&lt;br /&gt;
[[File:Density_0.2_Temp_2.0_input_script.log]]&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the {{fontcolor1|red|white|1st nearest neighbour}}, {{fontcolor1|yellow|white|the second}} {{fontcolor1|green|white|and third}} from the {{fontcolor1|blue|white|atom being observed.}}&lt;br /&gt;
[[File:Ffccube.pdf]] &lt;br /&gt;
&#039;&#039;Base cube found from [http://stackoverflow.com/questions/20600062/how-to-code-an-array-of-fcc-bcc-and-hcp-lattices-in-c]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the approximate trigonometric product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{ \sqrt 2}{2} \times 3.23 \times 2 = 4.6  &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
Or of the 3rd nearest neighbour: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = cos(\frac{45}{2}) \times sin(\frac{45}{2}) \times 2 \times 5.95 = 4.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5x10^{-4}&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int [sin(\omega t+\phi) \times(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = sin(\omega\tau)+cos(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what we see is a function resembling a damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away.This doesn&#039;t really occur in a gas due to the sparsity of particles. The differences between the liquid and solid VACFs is due to the density of particles. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is mush more diffuse.&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and, up to 500 timesteps as seen here, you see one quarter of the oscillatory cycle. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.318136&lt;br /&gt;
| 0.106&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.377725&lt;br /&gt;
| 0.126&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.353838&lt;br /&gt;
| 0.118&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.303173&lt;br /&gt;
| 0.101&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. &lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;br /&gt;
The data for the one million atom simulation does not correspond to theory, as the D value is higher for the solid than liquid. This suggests the liquid is more dense than the solid.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Ffccube.pdf&amp;diff=510435</id>
		<title>File:Ffccube.pdf</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Ffccube.pdf&amp;diff=510435"/>
		<updated>2015-11-18T12:50:47Z</updated>

		<summary type="html">&lt;p&gt;Ai513: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Fcc-nn.pdf&amp;diff=510420</id>
		<title>File:Fcc-nn.pdf</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Fcc-nn.pdf&amp;diff=510420"/>
		<updated>2015-11-18T12:25:52Z</updated>

		<summary type="html">&lt;p&gt;Ai513: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510419</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510419"/>
		<updated>2015-11-18T12:24:31Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Structural Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of tilmestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.0939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is 0N. &lt;br /&gt;
When the potential energy is a minimum: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -4\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r = 2^\frac {1}{6} \times \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
INSERT INTERGRALS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes use in this simulation are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  KjJmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value of the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of 1L.P. (N=1) a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of a FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the mass, atom type, and actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb. Cut-off potential = 3.0σ &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1&lt;br /&gt;
&lt;br /&gt;
The velocity-verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable ${timestep} so the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E(^-4) s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.01. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained. The largest timestep 0.015 allows for slow fluctuations in energy to be seen, know as &#039;explosions&#039;, whereby the total energy just continually increases and doesn&#039;t reach equilibrium. The timestep &#039;&#039;dT&#039;&#039; propagates atoms very close causing atomic collisions which produce a spike in F and E values. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Having re-evaluated the data, the timestep best suited to the simulations was discovered to be 0.0025, as this value allowed energy to not change as a function of timestep, but is large enough to simulate a good amount of &#039;real time&#039;.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
the instantaneous temperature T can be calculated. This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This means 1000 measurements will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as a timestep of 0.01 is too high and energy fluctuations reults in a poor set of data. &lt;br /&gt;
&lt;br /&gt;
[[File:Density_0.2_Temp_2.0_input_script.log]]&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the 1st nearest neighbour, then the 2nd and 3rd. &lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the approximate trigonometric product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{ \sqrt 2}{2} \times 3.23 \times 2 = 4.6  &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
Or of the 3rd nearest neighbour: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = cos(\frac{45}{2}) \times sin(\frac{45}{2}) \times 2 \times 5.95 = 4.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5x10^{-4}&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int [sin(\omega t+\phi) \times(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = sin(\omega\tau)+cos(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what we see is a function resembling a damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away.This doesn&#039;t really occur in a gas due to the sparsity of particles. The differences between the liquid and solid VACFs is due to the density of particles. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is mush more diffuse.&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and, up to 500 timesteps as seen here, you see one quarter of the oscillatory cycle. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.318136&lt;br /&gt;
| 0.106&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.377725&lt;br /&gt;
| 0.126&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.353838&lt;br /&gt;
| 0.118&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.303173&lt;br /&gt;
| 0.101&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. &lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;br /&gt;
The data for the one million atom simulation does not correspond to theory, as the D value is higher for the solid than liquid. This suggests the liquid is more dense than the solid.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510386</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510386"/>
		<updated>2015-11-18T11:45:10Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Changing the Script for Density-Temperature Phases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of tilmestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.0939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is 0N. &lt;br /&gt;
When the potential energy is a minimum: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -4\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r = 2^\frac {1}{6} \times \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
INSERT INTERGRALS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes use in this simulation are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  KjJmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value of the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of 1L.P. (N=1) a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of a FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the mass, atom type, and actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb. Cut-off potential = 3.0σ &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1&lt;br /&gt;
&lt;br /&gt;
The velocity-verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable ${timestep} so the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E(^-4) s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.01. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained. The largest timestep 0.015 allows for slow fluctuations in energy to be seen, know as &#039;explosions&#039;, whereby the total energy just continually increases and doesn&#039;t reach equilibrium. The timestep &#039;&#039;dT&#039;&#039; propagates atoms very close causing atomic collisions which produce a spike in F and E values. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Having re-evaluated the data, the timestep best suited to the simulations was discovered to be 0.0025, as this value allowed energy to not change as a function of timestep, but is large enough to simulate a good amount of &#039;real time&#039;.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
the instantaneous temperature T can be calculated. This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This means 1000 measurements will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as a timestep of 0.01 is too high and energy fluctuations reults in a poor set of data. &lt;br /&gt;
&lt;br /&gt;
[[File:Density_0.2_Temp_2.0_input_script.log]]&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the 1st nearest neighbour, then the 2nd and 3rd. &lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the trigonomic product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{2 \times 3.23}{ \sqrt 2} = 1.41 = 4.8  &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5x10^{-4}&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int [sin(\omega t+\phi) \times(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = sin(\omega\tau)+cos(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what we see is a function resembling a damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away.This doesn&#039;t really occur in a gas due to the sparsity of particles. The differences between the liquid and solid VACFs is due to the density of particles. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is mush more diffuse.&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and, up to 500 timesteps as seen here, you see one quarter of the oscillatory cycle. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.318136&lt;br /&gt;
| 0.106&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.377725&lt;br /&gt;
| 0.126&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.353838&lt;br /&gt;
| 0.118&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.303173&lt;br /&gt;
| 0.101&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. &lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;br /&gt;
The data for the one million atom simulation does not correspond to theory, as the D value is higher for the solid than liquid. This suggests the liquid is more dense than the solid.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Density_0.2_Temp_2.0_input_script.log&amp;diff=510385</id>
		<title>File:Density 0.2 Temp 2.0 input script.log</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Density_0.2_Temp_2.0_input_script.log&amp;diff=510385"/>
		<updated>2015-11-18T11:44:50Z</updated>

		<summary type="html">&lt;p&gt;Ai513: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Density_0.2_Temp_2.0_input_script.jpeg&amp;diff=510383</id>
		<title>File:Density 0.2 Temp 2.0 input script.jpeg</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Density_0.2_Temp_2.0_input_script.jpeg&amp;diff=510383"/>
		<updated>2015-11-18T11:43:48Z</updated>

		<summary type="html">&lt;p&gt;Ai513: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Density_0.2_Temp_2.0_input_script.pdf&amp;diff=510382</id>
		<title>File:Density 0.2 Temp 2.0 input script.pdf</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Density_0.2_Temp_2.0_input_script.pdf&amp;diff=510382"/>
		<updated>2015-11-18T11:41:27Z</updated>

		<summary type="html">&lt;p&gt;Ai513: Ai513 uploaded a new version of File:Density 0.2 Temp 2.0 input script.pdf&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Density_0.2_Temp_2.0_input_script.pdf&amp;diff=510381</id>
		<title>File:Density 0.2 Temp 2.0 input script.pdf</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Density_0.2_Temp_2.0_input_script.pdf&amp;diff=510381"/>
		<updated>2015-11-18T11:40:25Z</updated>

		<summary type="html">&lt;p&gt;Ai513: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510379</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510379"/>
		<updated>2015-11-18T11:38:21Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;All data is attached in pdf format and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of tilmestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.0939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is 0N. &lt;br /&gt;
When the potential energy is a minimum: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -4\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r = 2^\frac {1}{6} \times \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
INSERT INTERGRALS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes use in this simulation are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  KjJmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value of the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of 1L.P. (N=1) a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of a FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the mass, atom type, and actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb. Cut-off potential = 3.0σ &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1&lt;br /&gt;
&lt;br /&gt;
The velocity-verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable ${timestep} so the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E(^-4) s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.01. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained. The largest timestep 0.015 allows for slow fluctuations in energy to be seen, know as &#039;explosions&#039;, whereby the total energy just continually increases and doesn&#039;t reach equilibrium. The timestep &#039;&#039;dT&#039;&#039; propagates atoms very close causing atomic collisions which produce a spike in F and E values. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Having re-evaluated the data, the timestep best suited to the simulations was discovered to be 0.0025, as this value allowed energy to not change as a function of timestep, but is large enough to simulate a good amount of &#039;real time&#039;.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
the instantaneous temperature T can be calculated. This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This means 1000 measurements will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as a timestep of 0.01 is too high and energy fluctuations reults in a poor set of data. &lt;br /&gt;
INSERT NVT Cv SCRIPT&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the 1st nearest neighbour, then the 2nd and 3rd. &lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the trigonomic product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{2 \times 3.23}{ \sqrt 2} = 1.41 = 4.8  &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5x10^{-4}&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int [sin(\omega t+\phi) \times(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = sin(\omega\tau)+cos(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what we see is a function resembling a damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away.This doesn&#039;t really occur in a gas due to the sparsity of particles. The differences between the liquid and solid VACFs is due to the density of particles. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is mush more diffuse.&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and, up to 500 timesteps as seen here, you see one quarter of the oscillatory cycle. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.318136&lt;br /&gt;
| 0.106&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.377725&lt;br /&gt;
| 0.126&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.353838&lt;br /&gt;
| 0.118&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.303173&lt;br /&gt;
| 0.101&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. &lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;br /&gt;
The data for the one million atom simulation does not correspond to theory, as the D value is higher for the solid than liquid. This suggests the liquid is more dense than the solid.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510375</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510375"/>
		<updated>2015-11-18T11:35:24Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
&#039;&#039;all data is attached a pdf and is best viewed by clicking on it to open fully; some files have three pages. &#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of tilmestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.0939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is 0N. &lt;br /&gt;
When the potential energy is a minimum: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -4\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r = 2^\frac {1}{6} \times \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
INSERT INTERGRALS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes use in this simulation are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  KjJmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value of the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of 1L.P. (N=1) a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of a FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the mass, atom type, and actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb. Cut-off potential = 3.0σ &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1&lt;br /&gt;
&lt;br /&gt;
The velocity-verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable ${timestep} so the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E(^-4) s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.01. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained. The largest timestep 0.015 allows for slow fluctuations in energy to be seen, know as &#039;explosions&#039;, whereby the total energy just continually increases and doesn&#039;t reach equilibrium. The timestep &#039;&#039;dT&#039;&#039; propagates atoms very close causing atomic collisions which produce a spike in F and E values. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Having re-evaluated the data, the timestep best suited to the simulations was discovered to be 0.0025, as this value allowed energy to not change as a function of timestep, but is large enough to simulate a good amount of &#039;real time&#039;.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
the instantaneous temperature T can be calculated. This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This means 1000 measurements will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as a timestep of 0.01 is too high and energy fluctuations reults in a poor set of data. &lt;br /&gt;
INSERT NVT Cv SCRIPT&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the 1st nearest neighbour, then the 2nd and 3rd. &lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the trigonomic product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{2 \times 3.23}{ \sqrt 2} = 1.41 = 4.8  &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5x10^{-4}&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int [sin(\omega t+\phi) \times(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = sin(\omega\tau)+cos(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what we see is a function resembling a damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away.This doesn&#039;t really occur in a gas due to the sparsity of particles. The differences between the liquid and solid VACFs is due to the density of particles. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is mush more diffuse.&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and, up to 500 timesteps as seen here, you see one quarter of the oscillatory cycle. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.318136&lt;br /&gt;
| 0.106&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.377725&lt;br /&gt;
| 0.126&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.353838&lt;br /&gt;
| 0.118&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.303173&lt;br /&gt;
| 0.101&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. &lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;br /&gt;
The data for the one million atom simulation does not correspond to theory, as the D value is higher for the solid than liquid. This suggests the liquid is more dense than the solid.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510370</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510370"/>
		<updated>2015-11-18T11:26:44Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Finding the Diffusion Coefficient by Integration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of tilmestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.0939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is 0N. &lt;br /&gt;
When the potential energy is a minimum: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -4\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r = 2^\frac {1}{6} \times \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
INSERT INTERGRALS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes use in this simulation are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  KjJmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value of the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of 1L.P. (N=1) a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of a FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the mass, atom type, and actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb. Cut-off potential = 3.0σ &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1&lt;br /&gt;
&lt;br /&gt;
The velocity-verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable ${timestep} so the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E(^-4) s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.01. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained. The largest timestep 0.015 allows for slow fluctuations in energy to be seen, know as &#039;explosions&#039;, whereby the total energy just continually increases and doesn&#039;t reach equilibrium. The timestep &#039;&#039;dT&#039;&#039; propagates atoms very close causing atomic collisions which produce a spike in F and E values. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Having re-evaluated the data, the timestep best suited to the simulations was discovered to be 0.0025, as this value allowed energy to not change as a function of timestep, but is large enough to simulate a good amount of &#039;real time&#039;.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
the instantaneous temperature T can be calculated. This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This means 1000 measurements will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as a timestep of 0.01 is too high and energy fluctuations reults in a poor set of data. &lt;br /&gt;
INSERT NVT Cv SCRIPT&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the 1st nearest neighbour, then the 2nd and 3rd. &lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the trigonomic product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{2 \times 3.23}{ \sqrt 2} = 1.41 = 4.8  &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5x10^{-4}&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int [sin(\omega t+\phi) \times(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = sin(\omega\tau)+cos(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what we see is a function resembling a damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away.This doesn&#039;t really occur in a gas due to the sparsity of particles. The differences between the liquid and solid VACFs is due to the density of particles. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is mush more diffuse.&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and, up to 500 timesteps as seen here, you see one quarter of the oscillatory cycle. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:10-_vacf_and_integ_3_state.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.318136&lt;br /&gt;
| 0.106&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.377725&lt;br /&gt;
| 0.126&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:11-_mill_atom_vacf_and_integ.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.353838&lt;br /&gt;
| 0.118&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.303173&lt;br /&gt;
| 0.101&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. &lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;br /&gt;
The data for the one million atom simulation does not correspond to theory, as the D value is higher for the solid than liquid. This suggests the liquid is more dense than the solid.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:11-_mill_atom_vacf_and_integ.pdf&amp;diff=510369</id>
		<title>File:11- mill atom vacf and integ.pdf</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:11-_mill_atom_vacf_and_integ.pdf&amp;diff=510369"/>
		<updated>2015-11-18T11:25:49Z</updated>

		<summary type="html">&lt;p&gt;Ai513: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:10-_vacf_and_integ_3_state.pdf&amp;diff=510368</id>
		<title>File:10- vacf and integ 3 state.pdf</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:10-_vacf_and_integ_3_state.pdf&amp;diff=510368"/>
		<updated>2015-11-18T11:24:02Z</updated>

		<summary type="html">&lt;p&gt;Ai513: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510367</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510367"/>
		<updated>2015-11-18T11:23:42Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Velocity Autocorrelation Function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of tilmestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.0939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is 0N. &lt;br /&gt;
When the potential energy is a minimum: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -4\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r = 2^\frac {1}{6} \times \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
INSERT INTERGRALS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes use in this simulation are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  KjJmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value of the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of 1L.P. (N=1) a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of a FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the mass, atom type, and actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb. Cut-off potential = 3.0σ &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1&lt;br /&gt;
&lt;br /&gt;
The velocity-verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable ${timestep} so the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E(^-4) s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.01. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained. The largest timestep 0.015 allows for slow fluctuations in energy to be seen, know as &#039;explosions&#039;, whereby the total energy just continually increases and doesn&#039;t reach equilibrium. The timestep &#039;&#039;dT&#039;&#039; propagates atoms very close causing atomic collisions which produce a spike in F and E values. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Having re-evaluated the data, the timestep best suited to the simulations was discovered to be 0.0025, as this value allowed energy to not change as a function of timestep, but is large enough to simulate a good amount of &#039;real time&#039;.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
the instantaneous temperature T can be calculated. This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This means 1000 measurements will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as a timestep of 0.01 is too high and energy fluctuations reults in a poor set of data. &lt;br /&gt;
INSERT NVT Cv SCRIPT&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the 1st nearest neighbour, then the 2nd and 3rd. &lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the trigonomic product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{2 \times 3.23}{ \sqrt 2} = 1.41 = 4.8  &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5x10^{-4}&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int [sin(\omega t+\phi) \times(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = sin(\omega\tau)+cos(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:9-_vacf_s_l_theory.pdf]]&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what we see is a function resembling a damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away.This doesn&#039;t really occur in a gas due to the sparsity of particles. The differences between the liquid and solid VACFs is due to the density of particles. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is mush more diffuse.&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and, up to 500 timesteps as seen here, you see one quarter of the oscillatory cycle. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
INSERT PLOT OF RUNNING INTEGRALS LIQ SOL GAS&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.318136&lt;br /&gt;
| 0.106&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.377725&lt;br /&gt;
| 0.126&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
INSERT PLOT OF INTEG. million LIQ SOL GAS&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.353838&lt;br /&gt;
| 0.118&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.303173&lt;br /&gt;
| 0.101&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. &lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;br /&gt;
The data for the one million atom simulation does not correspond to theory, as the D value is higher for the solid than liquid. This suggests the liquid is more dense than the solid.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:9-_vacf_s_l_theory.pdf&amp;diff=510366</id>
		<title>File:9- vacf s l theory.pdf</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:9-_vacf_s_l_theory.pdf&amp;diff=510366"/>
		<updated>2015-11-18T11:23:34Z</updated>

		<summary type="html">&lt;p&gt;Ai513: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510364</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510364"/>
		<updated>2015-11-18T11:22:31Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Mean Squared Displacement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of tilmestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.0939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is 0N. &lt;br /&gt;
When the potential energy is a minimum: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -4\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r = 2^\frac {1}{6} \times \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
INSERT INTERGRALS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes use in this simulation are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  KjJmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value of the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of 1L.P. (N=1) a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of a FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the mass, atom type, and actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb. Cut-off potential = 3.0σ &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1&lt;br /&gt;
&lt;br /&gt;
The velocity-verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable ${timestep} so the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E(^-4) s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.01. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained. The largest timestep 0.015 allows for slow fluctuations in energy to be seen, know as &#039;explosions&#039;, whereby the total energy just continually increases and doesn&#039;t reach equilibrium. The timestep &#039;&#039;dT&#039;&#039; propagates atoms very close causing atomic collisions which produce a spike in F and E values. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Having re-evaluated the data, the timestep best suited to the simulations was discovered to be 0.0025, as this value allowed energy to not change as a function of timestep, but is large enough to simulate a good amount of &#039;real time&#039;.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
the instantaneous temperature T can be calculated. This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This means 1000 measurements will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as a timestep of 0.01 is too high and energy fluctuations reults in a poor set of data. &lt;br /&gt;
INSERT NVT Cv SCRIPT&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the 1st nearest neighbour, then the 2nd and 3rd. &lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the trigonomic product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{2 \times 3.23}{ \sqrt 2} = 1.41 = 4.8  &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
[[File:7-_3_state_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5x10^{-4}&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
[[File:8-_mill_atom_msd.pdf]]&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int [sin(\omega t+\phi) \times(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = sin(\omega\tau)+cos(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
INSERT VACF Ct GRAPH (LIQ SOL Ct)&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what we see is a function resembling a damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away.This doesn&#039;t really occur in a gas due to the sparsity of particles. The differences between the liquid and solid VACFs is due to the density of particles. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is mush more diffuse.&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and, up to 500 timesteps as seen here, you see one quarter of the oscillatory cycle. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
INSERT PLOT OF RUNNING INTEGRALS LIQ SOL GAS&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.318136&lt;br /&gt;
| 0.106&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.377725&lt;br /&gt;
| 0.126&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
INSERT PLOT OF INTEG. million LIQ SOL GAS&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.353838&lt;br /&gt;
| 0.118&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.303173&lt;br /&gt;
| 0.101&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. &lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;br /&gt;
The data for the one million atom simulation does not correspond to theory, as the D value is higher for the solid than liquid. This suggests the liquid is more dense than the solid.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:8-_mill_atom_msd.pdf&amp;diff=510363</id>
		<title>File:8- mill atom msd.pdf</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:8-_mill_atom_msd.pdf&amp;diff=510363"/>
		<updated>2015-11-18T11:21:59Z</updated>

		<summary type="html">&lt;p&gt;Ai513: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:7-_3_state_msd.pdf&amp;diff=510362</id>
		<title>File:7- 3 state msd.pdf</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:7-_3_state_msd.pdf&amp;diff=510362"/>
		<updated>2015-11-18T11:20:58Z</updated>

		<summary type="html">&lt;p&gt;Ai513: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510359</id>
		<title>Rep:Mod:ai513</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:ai513&amp;diff=510359"/>
		<updated>2015-11-18T11:19:29Z</updated>

		<summary type="html">&lt;p&gt;Ai513: /* Structural Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Simulation of a Simple Liquid&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Introduction&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
Using the velocity verlet algorithm to model the behaviour of  a classical harmonic oscillator, error was found between the solutions and the classical solutions. &lt;br /&gt;
The classical solution was found according to the equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;x = Acos(wt+\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a default timestep of 0.1, the function of error versus time was calculated as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Error=0.0003t-0.0003 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:[[File:Error_for_t=0.1]]&lt;br /&gt;
&lt;br /&gt;
For the ensemble system to work correctly the total energy must not change by more than one percent over the whole calculation, and the value of tilmestep which reproduced this value was&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=0.0939 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Atomic Forces====&lt;br /&gt;
&lt;br /&gt;
For a single Lennard-Jones interaction,  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(r) = 4\epsilon \frac {\sigma^(12)}{r^(12)} - \frac {\sigma^(6)}{r^(6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the potential energy to be zero, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r = \sigma; &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
which is equal to one half the internuclear distance. The force at this separation is 0N. &lt;br /&gt;
When the potential energy is a minimum: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq) = -4\epsilon&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r = 2^\frac {1}{6} \times \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover, when &amp;amp;sigma; = &amp;amp;epsilon; = 1.0:  &lt;br /&gt;
&lt;br /&gt;
INSERT INTERGRALS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
The number of molecules in 1mL of water: &amp;lt;math&amp;gt;1mL = 1g &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {1}{18} = 0.0555 mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; 0.0555 \times Na = 3.34E(22) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The volume of 10000 molecules of water:&lt;br /&gt;
&amp;lt;math&amp;gt;\frac {10000}{Na} = 1.6E(-20) molecules&amp;lt;/math&amp;gt; &lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt; 1.6E(-20) \times 18 = 3E(-19) mL&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a reasonable number of atoms to work with, and illustrates why the volumes use in this simulation are therefore unrealistic and very small. &lt;br /&gt;
&lt;br /&gt;
Considering a single atom in a cubic simulation box for one timestep, moving along the vector &amp;lt;math&amp;gt; (0.7, 0.6, 0.2) &amp;lt;/math&amp;gt;, the atom will end up at position &amp;lt;math&amp;gt; (0.2, 0.1, 0.7) &amp;lt;/math&amp;gt; once the boundary conditions have been applied. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
For Argon, &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma=0.34 nm&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac {\epsilon}{K} =120 &amp;lt;/math&amp;gt; K&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r^*=3.2 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; T^*=1.5 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r=1.09E(-9)  m&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(eq)=-3.05E(-5)  KjJmol^{-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; T=180 K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Equilibration&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Creating the Simulation Box====&lt;br /&gt;
&lt;br /&gt;
When atoms are given random starting positions, and happen to be generated close together, the forces felt will be large and disproportionate to the average value of the actual system. This causes a problem as it will give unrealistic and incorrect acceleration and velocity values too. &lt;br /&gt;
&lt;br /&gt;
In a simple cubic lattice of 1L.P. (N=1) a lattice spacing of 1.07722 units corresponds to a number density of 0.8&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V=(1.07722)^3 = 1.25&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {N}{V} = 0.7999 \asymp 0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the lattice point number density of a FCC lattice (N=4) is 1.2 &amp;lt;math&amp;gt;r^*=1.49&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a (10x10x10) simulation box of a FCC lattice 4000 atoms would be created.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Setting Atom Properties====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mass 1 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This command defines the mass, atom type, and actual mass.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_style lj/cut 3.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines pairwise interactions, at a cut-off Lennard-Jones potential with no Coulomb. Cut-off potential = 3.0σ &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pair_coeff * * 1.0 1.0&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This defines a pairwise force field, for multiple atom pairs, where N=1&lt;br /&gt;
&lt;br /&gt;
The velocity-verlet algorithm would be used to specify X and V here. &lt;br /&gt;
&lt;br /&gt;
Specifying the timestep is done as a variable ${timestep} so the value can be varied easily, and different time steps can be used to optimise the system. For any timestep value, the number of time units is constant. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Checking Equilibration====&lt;br /&gt;
[[File:2- E t P graphs.pdf]]&lt;br /&gt;
&lt;br /&gt;
The simulation reaches equilibrium &amp;lt;math&amp;gt;E(av)=-3.184J&amp;lt;/math&amp;gt; at 0.38 time units&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=0.38 \times 0.001 = 3.8E(^-4) s&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3-_E_vs_T.pdf]]&lt;br /&gt;
&lt;br /&gt;
From this data, the optimal timestep chosen for further calculations was 0.01. This is due to the fact that it is long enough that a sufficient amount of &#039;real&#039; time is passed during simulation, but small enough that accuracy is maintained. The largest timestep 0.015 allows for slow fluctuations in energy to be seen, know as &#039;explosions&#039;, whereby the total energy just continually increases and doesn&#039;t reach equilibrium. The timestep &#039;&#039;dT&#039;&#039; propagates atoms very close causing atomic collisions which produce a spike in F and E values. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Having re-evaluated the data, the timestep best suited to the simulations was discovered to be 0.0025, as this value allowed energy to not change as a function of timestep, but is large enough to simulate a good amount of &#039;real time&#039;.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Calculating Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Temperature &amp;amp; Pressure Control====&lt;br /&gt;
&lt;br /&gt;
The system is changed from the &#039;&#039;micro canonical NVE&#039;&#039; to the &#039;&#039;isobaric-isothermal NpT ensemble&#039;&#039; for this section. From the previous section, the timestep used is&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;t=0.0025&amp;lt;/math&amp;gt; and this simulation was run ten times at&lt;br /&gt;
 &lt;br /&gt;
: &amp;lt;math&amp;gt;T*=1.8, 2.1, 2.4, 2.7, 3.0&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P*=2.614, 3.614&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the equipartition theorem:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{3}{2}NKT&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum mv^2&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
the instantaneous temperature T can be calculated. This fluctuates through the simulation and the second equation must be changed to&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Ek= \frac{1}{2} \sum m(\gamma v)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give the target temperature, τ. The value of γ chosen so that T=τ is therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \gamma = \sqrt ( (\frac{1}{2}mv^2) \div (\frac{3}{2}NKT) )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Examining the Input Script====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fix aves all ave/time 100 1000 100000&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This refers to the frequency that the readings of average thermodynamic properties (stated after) are taken. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Calculate the average values every 100000 time steps, using the 1000 input values before this step from every 100th piece of data&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This means 1000 measurements will be sampled every 100000 time steps, over 1000 time units: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t^*=100000 \times 0.01=1000&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Plotting Equations of State====&lt;br /&gt;
&lt;br /&gt;
[[File:4-_density_graphs.pdf]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As pressure is increased in the simulation, the measured density increases.&lt;br /&gt;
&lt;br /&gt;
At higher temperatures, the density decreases since the particles have more energy and can be repelled further.The simulated densities are lower than the theoretical values, due to the repulsive forces within a real system, resulting in a lower density.  The discrepancy between theory and experiment decreases as temperature increases because the repulsive forces causing the differences are decreased relative to the now increased motion of the particles causing the density changes. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;PV=nRT&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \frac {N}{V^*} = \frac {P^*}{T^*}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrepancy between experimental and theoretical values increases as pressure is increased, because there are more atoms per unit volume and so the forces felt between atoms is larger as they are closer together.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Heat Capacities&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Changing the Script for Density-Temperature Phases====&lt;br /&gt;
&lt;br /&gt;
The timestep used here is 0.0025, as a timestep of 0.01 is too high and energy fluctuations reults in a poor set of data. &lt;br /&gt;
INSERT NVT Cv SCRIPT&lt;br /&gt;
&lt;br /&gt;
[[File:5-_Cv_vs_t.pdf]] &lt;br /&gt;
&lt;br /&gt;
As temperature is increased, the heat capacity decreases. At higher pressures, heat capacity is higher. These results are unexpected of normal systems, however the liquid here functions like a classical harmonic oscillator. At higher temperatures the energy levels compress so that the system requires less thermal energy to change the temperature by a specific amount, i.e. the heat capacity decreases. At higher pressures the energy levels are also compressed, affecting the system as before.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;The Radial Distribution Function&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Structural Properties====&lt;br /&gt;
&lt;br /&gt;
From the literature, [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 phase transitions of LJ system] the temperature and density of three states was found to be: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Solid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=1.4&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Liquid: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Gas: T=1.0 &amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt; d=0.05&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[File:6-_rdfs.pdf]]&lt;br /&gt;
&lt;br /&gt;
These graphs show the difference between the probability of finding a particle at distance (r) from another particle in a solid, liquid and gas. All simulations were run with a timestep of 0.002. &lt;br /&gt;
The graph of the solid is very noisy, where the regions of high and low probability show an ordered structure (fcc). The graph of the liquid is less erratic, and gas still further corresponding to the more continuous movement of particles in these states. This shows, as expected, that the particles become more and more diffuse as you move from solid to gas and the structure becomes more disordered and random.  The integral of the RDF shows the cumulative coordination of the atoms, as r is increased, and the plateaus correlate to the area of one whole peak on the RDF. &lt;br /&gt;
&lt;br /&gt;
In the solid state, the first three peaks correspond to the lattice sites of the 1st nearest neighbour, then the 2nd and 3rd. &lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Peak #&lt;br /&gt;
! r/σ&lt;br /&gt;
! r (Å)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0.95&lt;br /&gt;
| 3.23&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1.45&lt;br /&gt;
| 4.93&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 1.75&lt;br /&gt;
| 5.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The lattice spacing is therefore 4.93Å as it&#039;s the second nearest neighbour. Alternatively, as the trigonomic product of the 1st nearest neighbour:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;a = \frac{2 \times 3.23}{ \sqrt 2} = 1.41 = 4.8  &amp;lt;/math&amp;gt; Å&lt;br /&gt;
&lt;br /&gt;
The plateaus have values of 12 18 and 42, and therefore each peak has a coordination number of twelve, six and twenty-four respectively. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diffusion Coefficient and Dynamical Properties&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Mean Squared Displacement====&lt;br /&gt;
&lt;br /&gt;
The same values of temperature and density are used in these systems as before, to simulate a solid liquid and gas. &lt;br /&gt;
&lt;br /&gt;
INSERT MSD vs T GRAPHS 1.4 1.4 0.4 &lt;br /&gt;
&lt;br /&gt;
These graphs show how the mean squared displacement (the average measure of extent of random 3D motion within the system) varies with time, with a timestep of 0.002 and N=3375&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T = T^* \times 0.002&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient of these graphs is equal to 6D therefore:&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.0057&lt;br /&gt;
| 9.5x10^{-4}&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.4155&lt;br /&gt;
| 0.069&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 10.218&lt;br /&gt;
| 1.703&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
INSERT MSD vs T GRAPHS LIQ SOL GAS&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Gradient&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.003&lt;br /&gt;
| 5E-4&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.5132&lt;br /&gt;
| 0.086&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 12.54&lt;br /&gt;
| 2.090&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These graphs show that solids have on average, the lowest diffusion coefficients, D. This is as expected, as D represents average motion of atoms in the system, and solid structures have the least motion. The gaseous systems have the largest diffusion coefficients, suggesting their atoms move around the most over a certain time-frame. This is also as expected. &lt;br /&gt;
Finally, the plateau of the solid graphs is also in agreement with theory as the motion of particles should not change over time in a solid, as they do in a gas or liquid, and the motion of particles is constant and structured. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Velocity Autocorrelation Function====&lt;br /&gt;
&lt;br /&gt;
Evaluating the normalized VACF for a 1D harmonic oscillator: &lt;br /&gt;
: &amp;lt;math&amp;gt; Ct = \frac{\int V(t)V(\tau)dt}{\int V^2dt} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \int V = X(t) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, &amp;lt;math&amp;gt;x = Acos(\omega t+\phi)&amp;lt;/math&amp;gt; and so; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Differentiating the function for position and subbing into the equaiton for Ct;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{\int-\omega A(sin(\omega t+\phi)sin(\omega\tau+\phi))dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rearranging gives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = \frac{-\omega A \int [sin(\omega t+\phi) \times(sin(\omega t+\phi)cos(\omega\tau)+cos(\omega t+\phi)sin(\omega\tau))]dt}{\int\omega A^2sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After some cancelling&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = sin(\omega\tau)+cos(\omega\tau) \frac{ \int sin(\omega t+\phi)cos(\omega t+\phi)dt}{\int sin^2(\omega t+\phi)dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Using rules of odd and even functions where sin is odd, cos is even, and the product of the two is odd:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Ct = cos(\omega\tau)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
INSERT VACF Ct GRAPH (LIQ SOL Ct)&lt;br /&gt;
&lt;br /&gt;
The minima in the VACFs for the solid shows periods of rapid negative motion that are the molecule&#039;s oscillations; the atoms vibrate showing periods of negative velocity at the end of each oscillation. The oscillations aren&#039;t of equal magnitude however, but decay in time because there are still destructive forces acting on the atoms to disrupt the perfection of the oscillatory motion. So what we see is a function resembling a damped harmonic motion.&lt;br /&gt;
&lt;br /&gt;
The liquid behaves similarly to the solid, but now the atoms do not have fixed regular positions. Any oscillatory motion is destroyed by diffusion within the liquid. The VACF therefore shows one very damped oscillation and then decays to zero. This is expected, as it correlates to a collision between two atoms before they rebound from one another and diffuse away.This doesn&#039;t really occur in a gas due to the sparsity of particles. The differences between the liquid and solid VACFs is due to the density of particles. As established earlier, this liquid is less dense than the solid and so the liquid particles&#039; motion is mush more diffuse.&lt;br /&gt;
The theoretical harmonic oscillator VACF is different to the Lennard-Jones plots because in an actual system, the vibrational density of state does not go to infinity. In theory, the harmonic oscillator motion is smooth and uninterrupted by repulsive and attractive forces and, up to 500 timesteps as seen here, you see one quarter of the oscillatory cycle. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Finding the Diffusion Coefficient by Integration====&lt;br /&gt;
&lt;br /&gt;
Integrating the VACF graphs gives a value of &amp;lt;math&amp;gt;x = 3D&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
INSERT PLOT OF RUNNING INTEGRALS LIQ SOL GAS&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.318136&lt;br /&gt;
| 0.106&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.377725&lt;br /&gt;
| 0.126&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 8.01832&lt;br /&gt;
| 2.673&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This process was repeated for one million atoms, and the graphs are shown below: &lt;br /&gt;
&lt;br /&gt;
INSERT PLOT OF INTEG. million LIQ SOL GAS&lt;br /&gt;
&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! State&lt;br /&gt;
! Total Integral&lt;br /&gt;
! D&lt;br /&gt;
|-&lt;br /&gt;
| Solid&lt;br /&gt;
| 0.353838&lt;br /&gt;
| 0.118&lt;br /&gt;
|-&lt;br /&gt;
| Liquid&lt;br /&gt;
| 0.303173&lt;br /&gt;
| 0.101&lt;br /&gt;
|-&lt;br /&gt;
| Gas&lt;br /&gt;
| 9.805397&lt;br /&gt;
| 3.268&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data suggest that the vapour is more diffuse than the liquid, than the solid. This is as expected due to the lower density of vapour to liquid and solid. &lt;br /&gt;
The high performance computer is very accurate, and so the largest source of error in these estimates of D from the VACF is the low number of atoms used (a constraint from the volume) and also fitting the integrals using the trapezium rule, as this is not a completely accurate way of finding the area of a graph.&lt;br /&gt;
The data for the one million atom simulation does not correspond to theory, as the D value is higher for the solid than liquid. This suggests the liquid is more dense than the solid.&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:6-_rdfs.pdf&amp;diff=510358</id>
		<title>File:6- rdfs.pdf</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:6-_rdfs.pdf&amp;diff=510358"/>
		<updated>2015-11-18T11:19:04Z</updated>

		<summary type="html">&lt;p&gt;Ai513: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ai513</name></author>
	</entry>
</feed>