<?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=Org12</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=Org12"/>
	<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/wiki/Special:Contributions/Org12"/>
	<updated>2026-06-15T09:53:23Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Third_year_simulation_experiment/Structural_properties_and_the_radial_distribution_function&amp;diff=794640</id>
		<title>Third year simulation experiment/Structural properties and the radial distribution function</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Third_year_simulation_experiment/Structural_properties_and_the_radial_distribution_function&amp;diff=794640"/>
		<updated>2019-10-11T08:53:18Z</updated>

		<summary type="html">&lt;p&gt;Org12: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&amp;lt;big&amp;gt;&amp;lt;span style=&amp;quot;color:blue; &amp;quot;&amp;gt;This is the fifth section of the third year simulation experiment. You can return to the previous page, [[Third_year_simulation_experiment/Running_simulations_under_specific_conditions|Running simulations under specific conditions]], or jump ahead to the next section, [[Third year simulation experiment/Dynamical properties and the diffusion coefficient|Dynamical properties and the diffusion coefficient]].&amp;lt;/span&amp;gt;&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
We can characterise the structure of systems that we simulate using [http://en.wikipedia.org/wiki/Radial_distribution_function radial distribution functions], which we denote &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt;. Calculating the RDF for a simulation is very useful &amp;amp;mdash; it can tell us the distances from an atom at which we will find it&#039;s nearest neighbour, second nearest neighbour, and so on; it is also a quantity that can be accessed experimentally, and so provides a good check that the forcefield in our simulation is correctly reproducing the structural features.&lt;br /&gt;
&lt;br /&gt;
In this section, you are going to use VMD to calculate the radial distribution function for the solid, liquid, and vapour phases of the Lennard-Jones fluid.&lt;br /&gt;
&lt;br /&gt;
===Simulations in this section===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;RDF&#039;&#039;&#039; subfolder contains an example input script that you can use to record an atomic trajectory to generate RDFs for the solid, liquid, and vapour phase Lennard Jones systems. Make three copies of that script (one for each phase), and modify the density and temperature parameters to give the phase that you want (a phase diagram for the Lennard-Jones system can be found [http://journals.aps.org/pr/abstract/10.1103/PhysRev.184.151 here]). &amp;lt;big&amp;gt;&#039;&#039;&#039;Note: when simulating the solid, you will need to change the lattice type in the lattice command to fcc, rather than sc.&#039;&#039;&#039;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK 9: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;4\pi \int g(r) r^{2}\mathrm{d}r&amp;lt;/math&amp;gt;. &amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Briefly explain what a Radial Distribution Function is. What is the relationship between the coordination number and RDF? [2] ===&lt;br /&gt;
&lt;br /&gt;
=== Plot the RDFs for the three systems. [2] ===&lt;br /&gt;
&lt;br /&gt;
=== Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. [5] ===&lt;br /&gt;
&lt;br /&gt;
=== In the solid case, illustrate which lattice sites the first three peaks correspond to [2]. What is the lattice spacing [1]? What are the coordination number for each of the first three peaks [1]? ===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;&amp;lt;span style=&amp;quot;color:blue; &amp;quot;&amp;gt;This is the sixth section of the third year simulation experiment. You can return to the previous page, [[Third_year_simulation_experiment/Running simulations under specific conditions|Running simulations under specific conditions]], or jump ahead to the next section, [[Third year simulation experiment/Dynamical properties and the diffusion coefficient|Dynamical properties and the diffusion coefficient]].&amp;lt;/span&amp;gt;&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; in VMD===&lt;br /&gt;
&lt;br /&gt;
# Start VMD as before and load the trajectory that you want to analyse.&lt;br /&gt;
# Select &#039;&#039;&#039;Extensions&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Analysis&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Radial Pair Distribution Function g(r)&#039;&#039;&#039;&lt;br /&gt;
# Set &#039;&#039;&#039;Selection 1&#039;&#039;&#039; to &#039;&#039;&#039;all&#039;&#039;&#039; and &#039;&#039;&#039;Selection 2&#039;&#039;&#039; to &#039;&#039;&#039;all&#039;&#039;&#039;&lt;br /&gt;
# Change &#039;&#039;&#039;delta r&#039;&#039;&#039; to &#039;&#039;&#039;0.05&#039;&#039;&#039; &amp;amp;mdash; this is the distance between points in the generated RDF.&lt;br /&gt;
# Ensure that &#039;&#039;&#039;Use PBC&#039;&#039;&#039;, &#039;&#039;&#039;Display g(r)&#039;&#039;&#039;, &#039;&#039;&#039;Display Int(g(r))&#039;&#039;&#039;, and &#039;&#039;&#039;Save to File&#039;&#039;&#039; are checked&lt;br /&gt;
# Click &#039;&#039;&#039;Compute g(r)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
After a short pause while it performs the calculation, VMD will display both the RDF, and its running integral. You will then be prompted to save this data &amp;amp;mdash; choose a location for the file that you will be able to find easily later.&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Third_year_simulation_experiment/Running_simulations_under_specific_conditions&amp;diff=794639</id>
		<title>Third year simulation experiment/Running simulations under specific conditions</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Third_year_simulation_experiment/Running_simulations_under_specific_conditions&amp;diff=794639"/>
		<updated>2019-10-11T08:49:31Z</updated>

		<summary type="html">&lt;p&gt;Org12: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&amp;lt;big&amp;gt;&amp;lt;span style=&amp;quot;color:blue; &amp;quot;&amp;gt;This is the fourth section of the third year simulation experiment. You can return to the previous page, [[Third_year_simulation_experiment/Equilibration|Equilibration]], or jump ahead to the next section, [[Third_year_simulation_experiment/Structural_properties_and_the_radial_distribution_function| Structural Properties and the Radial Distribution Functions]].&amp;lt;/span&amp;gt;&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;THE FILES THAT YOU NEED FOR THIS SECTION ARE FOUND IN THE &amp;quot;NpT&amp;quot; SUBFOLDER.&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Changing Ensemble==&lt;br /&gt;
&lt;br /&gt;
So far, we have been able to do some simulations in which the number of particles and the volume of the simulation cell are held constant. The energy is also constant (within a certain degree of error, which is introduced by the approximations that we make to do the simulation). If the simulation is a working properly, then the pressure and temperature of the system should also reach a constant &#039;&#039;average&#039;&#039; value (although there will again be fluctuations). In the statistical thermodynamics lectures, you met the concept of ensembles, which are used in statistical mechanics to represent different sorts of experimental conditions. The simulations we have done so far are described by the &#039;&#039;microcanonical&#039;&#039;, or NVE ensemble (the letters represent those thermodynamic quantities which are constant).&lt;br /&gt;
&lt;br /&gt;
As chemists, we often want to understand what happens under particular experimental conditions &amp;amp;mdash; at 298K under 1 atmosphere of pressure, for example. These sorts of conditions are described by different ensembles in statistical mechanics, such as the NVT (&#039;&#039;canonical&#039;&#039;) or NpT (&#039;&#039;isobaric-isothermal&#039;&#039;) ensembles.&lt;br /&gt;
&lt;br /&gt;
In this section, we are going to modify our simulations from the previous section to run under NpT conditions, and sketch an equation of state for our model fluid at atmospheric pressure.&lt;br /&gt;
&lt;br /&gt;
==Temperature and Pressure Control==&lt;br /&gt;
&lt;br /&gt;
The file npt.in can be used to perform a constant temperature/pressure simulation of our model fluid. It starts by melting a simple cubic crystal, just as before, so much of this file will look familiar to you. You will notice a new section near the top, however, called &#039;&#039;&#039;### SPECIFY THE REQUIRED THERMODYNAMIC STATE ###&#039;&#039;&#039;. It contains three &#039;&#039;variables&#039;&#039; &amp;amp;mdash; these are used by the script later on to define the desired temperature, pressure, and timestep. The ellipses need to be replaced by the actual temperature, pressure and timestep that you want to use, so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
variable T equal 0.5&lt;br /&gt;
variable p equal 1.0&lt;br /&gt;
variable timestep equal 0.75&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would run a simulation at &amp;lt;math&amp;gt;T=0.5,\  p=1.0,\  \delta t=0.75&amp;lt;/math&amp;gt;. You should remember from the [[Third_year_simulation_experiment/Equilibration|Equilibration]] section that this is a poor choice of timestep!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK 8: Choose 5 temperatures (above the critical temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt;), and two pressures (you can get a good idea of what a reasonable pressure is in Lennard-Jones units by looking at the average pressure of your simulations from the last section). This gives ten phase points &amp;amp;mdash; five temperatures at each pressure. Create 10 copies of npt.in, and modify each to run a simulation at one of your chosen &amp;lt;math&amp;gt;\left(p, T\right)&amp;lt;/math&amp;gt; points. You should be able to use the results of the previous section to choose a timestep. Submit these ten jobs to the HPC portal. When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. &amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Plot the density as a function of temperature for both pressures that you simulated. Include a line corresponding to the predictions made by the ideal gas law. [3] ===&lt;br /&gt;
&lt;br /&gt;
=== How do your results compare to the ideal gas law? Do deviations increase/decrease with temperature and pressure? Explain. [7] ===&lt;br /&gt;
&lt;br /&gt;
=== Do you expect your simulation results to be in better or worse agreement with the Van der Waals equation of state? Why? [3] ===&lt;br /&gt;
&lt;br /&gt;
===Thermostats and Barostats - controlling the thermodynamic properties===&lt;br /&gt;
The statistical thermodynamics lectures will have introduced you to the &#039;&#039;equipartition theorem&#039;&#039;, which states that, on average, every degree of freedom in a system at equilibrium will have &amp;lt;math&amp;gt;\frac{1}{2}k_B T&amp;lt;/math&amp;gt; of energy. In our system with &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; atoms, each with 3 degrees of freedom, we can write&lt;br /&gt;
&amp;lt;math&amp;gt;E_K = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of every timestep, we use the left hand side of this equation to calculate the kinetic energy, then divide by &amp;lt;math&amp;gt;\frac{3}{2}Nk_B&amp;lt;/math&amp;gt; to get the &#039;&#039;instantaneous&#039;&#039; temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. In general, &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; will fluctuate, and will be different to our &#039;&#039;target&#039;&#039; temperature, &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt; (this is whatever value we specify in the input script). We can change the temperature by multiplying every velocity by a constant factor, &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* If &amp;lt;math&amp;gt; T &amp;gt; \mathfrak{T} &amp;lt;/math&amp;gt;, then the kinetic energy of the system is too high, and we need to reduce it. &amp;lt;math&amp;gt;\gamma &amp;lt; 1&amp;lt;/math&amp;gt;&lt;br /&gt;
* If &amp;lt;math&amp;gt; T &amp;lt; \mathfrak{T} &amp;lt;/math&amp;gt;, then the kinetic energy of the system is too low, and we need to increase it. &amp;lt;math&amp;gt;\gamma &amp;gt; 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to choose a scaling parameter &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By combining these equations, one can see that &amp;lt;math&amp;gt; \gamma = \sqrt{\frac{\mathfrak{T}}{T}} &amp;lt;/math&amp;gt; (satisfy yourself that this is true!). A target value of &amp;lt;math&amp;gt; \gamma &amp;lt;/math&amp;gt; of 1 is required and thus, dependent on whether it&#039;s larger or smaller than 1 the simulation can target the desired temperature.&lt;br /&gt;
&lt;br /&gt;
Controlling the pressure is a little more involved, but the principle is largely the same: at each timestep, the pressure of the system is calculated; if the pressure is too high, then the simulation box is made a little larger, while if the pressure is too low the box is made smaller. Simulations in which the pressure is controlled are thus in the NpT ensemble &amp;amp;mdash; the volume of the simulation box is not constant!&lt;br /&gt;
&lt;br /&gt;
===Examining the Input Script===&lt;br /&gt;
&lt;br /&gt;
Open one of your input scripts (it doesn&#039;t matter which), and look at the section &#039;&#039;&#039;### BRING SYSTEM TO REQUIRED STATE ###&#039;&#039;&#039;. The line &amp;lt;pre&amp;gt;fix npt all npt temp ${T} ${T} ${tdamp} iso ${p} ${p} ${pdamp}&amp;lt;/pre&amp;gt; is the one responsible for switching on the temperature and pressure control. LAMMPS actually allows us to heat or cool the system over the course of a simulation, if we want to &amp;amp;mdash; this is the reason that the temperature appears twice in this line. The first ${T} is the desired starting temperature, and the second is the desired temperature at the end of the simulation. We want a constant average temperature, so we specify the same value twice. The same goes for the pressure.&lt;br /&gt;
&lt;br /&gt;
Now look at the lines near the end of the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### MEASURE SYSTEM STATE ###&lt;br /&gt;
thermo_style custom step etotal temp press density&lt;br /&gt;
variable dens equal density&lt;br /&gt;
variable dens2 equal density*density&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
variable temp2 equal temp*temp&lt;br /&gt;
variable press equal press&lt;br /&gt;
variable press2 equal press*press&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command, &#039;&#039;thermo_style&#039;&#039;, controls which thermodynamic properties are recorded, as before. The next lines are used to measure &#039;&#039;average&#039;&#039; thermodynamic properties for the system. To draw our equations of state, we need to know the average temperature, pressure, and density, and the statistical errors in those quantities. The six variable lines link those quantities (and their squared values, needed for the errors), to variable names that we can use in the averaging command, which is the line starting &#039;&#039;fix aves...&#039;&#039;. This command takes a number of input values and averages them every so many timesteps. Exactly how often this happens depends in the values of the three numbers which follow &#039;&#039;ave/time&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;&amp;lt;span style=&amp;quot;color:blue; &amp;quot;&amp;gt;This is the fourth section of the third year simulation experiment. You can return to the previous page, [[Third_year_simulation_experiment/Equilibration|Equilibration]], or jump ahead to the next section, [[Third year simulation experiment/Structural properties and the radial distribution function|Structural properties and the radial distribution function]].&amp;lt;/span&amp;gt;&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Third_year_simulation_experiment/Equilibration&amp;diff=794638</id>
		<title>Third year simulation experiment/Equilibration</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Third_year_simulation_experiment/Equilibration&amp;diff=794638"/>
		<updated>2019-10-11T08:46:11Z</updated>

		<summary type="html">&lt;p&gt;Org12: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&amp;lt;big&amp;gt;&amp;lt;span style=&amp;quot;color:blue; &amp;quot;&amp;gt;This is the third section of the third year simulation experiment. You can return to the previous page, [[Third_year_simulation_experiment/Introduction_to_molecular_dynamics_simulation|Introduction to molecular dynamics simulation]], or jump ahead to the next section, [[Third year simulation experiment/Running simulations under specific conditions|Running simulations under specific conditions]].&amp;lt;/span&amp;gt;&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We will be using the LAMMPS program to carry out our molecular dynamics simulations.&lt;br /&gt;
&#039;&#039;&#039;In several places in this section, we will ask you to consult the LAMMPS manual to find out things about how the software works. You can find the manual [https://lammps.sandia.gov/doc/Manual.html here].&#039;&#039;&#039; We appreciate that the format of this document can make it a little hard to navigate, but it is the definitive resource on how different commands in LAMMPS work, and is therefore invaluable. The files you will need for this section can be found in the intro folder downloaded previously.&lt;br /&gt;
&lt;br /&gt;
===Creating the simulation box===&lt;br /&gt;
In the previous section, it was pointed out that before we can start a simulation, we need to know the initial states of all of the atoms in the system. Exactly what information we need about each atom depends on which method of numerical integration we need, but at the very least we need to specify the starting position of each atom. If we wanted to simulate a crystal, this information would be quite easy to come by &amp;amp;mdash; we could just look up the crystal structure, and use that to generate coordinates for however many unit cells we wanted. For this purpose, LAMMPS includes a command which generates crystal lattice structures.&lt;br /&gt;
&lt;br /&gt;
Generating coordinates for atoms in a liquid is more difficult. There is no long range order, so we can&#039;t use a single point of reference to work out the positions of every other atom like we can in a solid. We could generate a random position for each atom. This would certainly create a disordered structure, but causes larger problems when we try to run the simulation.&lt;br /&gt;
&lt;br /&gt;
Instead, we are going to place the atoms on the lattice points of a simple cubic lattice. This, of course, is not a situation in which the system is likely to be found physically. It turns out, though, that if we simulate for enough time we will find that the atoms rearrange themselves into more realistic configurations. We will discuss towards the end of this section exactly what is meant by &amp;quot;enough time&amp;quot;!&lt;br /&gt;
&lt;br /&gt;
Consider the line in the input file &amp;lt;pre&amp;gt;lattice sc 0.8&amp;lt;/pre&amp;gt; This command creates a grid of points forming a simple cubic lattice (one lattice point per unit cell). The parameter &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt; specifies the number density (number of lattice points per unit volume). In a corresponding output file, you will see the line &amp;lt;pre&amp;gt;Lattice spacing in x,y,z = 1.07722 1.07722 1.07722&amp;lt;/pre&amp;gt; This indicates that the distance between the points of this lattice is &amp;lt;math&amp;gt;1.07722&amp;lt;/math&amp;gt; (in reduced units, remember!).&lt;br /&gt;
&lt;br /&gt;
The next lines in the input file are&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
region box block 0 10 0 10 0 10&lt;br /&gt;
create_box 1 box&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The corresponding log file output is&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Created orthogonal box = (0 0 0) to (10.7722 10.7722 10.7722)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The region command simply defines a geometrical region in space, which we call &amp;quot;box&amp;quot;. In this case, &amp;quot;box&amp;quot; is a cube extending ten lattice spacings from the origin in all three dimensions. The subsequent create_box command tells LAMMPS to use the geometrical region called &amp;quot;box&amp;quot; as a template for the simulation box. The number 1 between &amp;quot;create_box&amp;quot; and &amp;quot;box&amp;quot; indicates that our simulation will contain only one type (species) of atom.&lt;br /&gt;
&lt;br /&gt;
So far we have defined a simulation box which is based around a virtual simple cubic lattice. Our box contains 1000 (10x10x10) unit cells of this lattice, and so contains 1000 lattice points. We now need to fill our simulation box with atoms. The input command is &amp;lt;pre&amp;gt;create_atoms 1 box&amp;lt;/pre&amp;gt; while the log file simply contains an acknowledgement of this &amp;lt;pre&amp;gt;Created 1000 atoms&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The create_atoms command has two arguments; the first tells LAMMPS that all of the atoms that we create will be of type 1. Every atom in the simulation has a type &amp;amp;mdash; because we will be simulating a pure fluid, containing only one chemical species, every atom will have the same type. The actual type that we assign to each atom is arbitrary &amp;amp;mdash; type 1 does not, for example, need to correspond to the element with atomic number 1 (hydrogen). If we wanted to simulate water, we might make the hydrogen atoms type 1 and the oxygen atoms type 2. We will specify the physical and chemical properties of each atom type later in the input script.&lt;br /&gt;
&lt;br /&gt;
The remaining data in the log file isn&#039;t very instructive as it stands &amp;amp;mdash; it simply contains a list of the thermodynamic properties of the simulation at certain intervals. In a few sections time, we will plot this data, but for now you can close the log file. Keep the input script open.&lt;br /&gt;
&lt;br /&gt;
===Setting the properties of the atoms===&lt;br /&gt;
&lt;br /&gt;
In addition to their positions, we also need the physical properties of the atoms to be able to perform the simulation. We set these properties on a &#039;per-type&#039; basis, so that every atom of the same type has the same mass and the same interactions.&lt;br /&gt;
&lt;br /&gt;
So far we have created 1000 atoms, and we know the starting (&amp;lt;math&amp;gt;t = 0&amp;lt;/math&amp;gt;) position for each of them. We have also set their masses, and told LAMMPS what sort of forces to calculate between them. The final thing we need to specify to completely specify the initial conditions is the velocity of each atom.&lt;br /&gt;
&lt;br /&gt;
Choosing initial velocities for the atoms is a little easier than choosing initial positions. From the statistical thermodynamics lectures, you should know that, at equilibrium, the velocities of atoms in any system must be distributed according to the [http://en.wikipedia.org/wiki/Maxwell%E2%80%93Boltzmann_distribution Maxwell-Boltzmann (MB) distribution]. If we know the masses of the atoms, and we know what temperature we want to simulate, then we can determine the relevant MB distribution function. LAMMPS is able to give every atom a random velocity whilst ensuring that overall the MB distribution is followed. This is the purpose of the line&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
velocity all create 1.5 12345 dist gaussian rot yes mom yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the manual page for this command [http://lammps.sandia.gov/doc/velocity.html here], but the key sections are:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;all&#039;&#039;&#039;: the &#039;&#039;group&#039;&#039; of atoms on which the command acts. &#039;&#039;&#039;all&#039;&#039;&#039; simply specifies that we want every atom to have a velocity assigned to it.&lt;br /&gt;
* &#039;&#039;&#039;1.5&#039;&#039;&#039;: the temperature, &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;, needed to calculate the MB distribution(in reduced units, as always)&lt;br /&gt;
&lt;br /&gt;
===Monitoring thermodynamic properties===&lt;br /&gt;
&lt;br /&gt;
We need to be sure that our simulation is correctly modelling whatever physical system we want to study. It is relatively easy to set up simulations, but how can we be sure that the &amp;quot;results&amp;quot; we get make sense? One of the best ways is to calculate from the simulation things that we can measure in experiment, and see if they agree. For example, we might want to simulate our system at a particular temperature and pressure, and measure the resulting density. If we repeat this over a range of temperatures at the same pressure, we will be able to plot an &#039;&#039;equation of state&#039;&#039;, which we could compare to experimental measurements.&lt;br /&gt;
&lt;br /&gt;
LAMMPS is able to calculate a great deal of thermodynamic information for us (you can see a full list of the properties it is able to calculate [http://lammps.sandia.gov/doc/thermo_style.html here]), but in these first simulations we are only interested in those properties specified in these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thermo_style custom time etotal temp press&lt;br /&gt;
thermo 10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first controls which properties will be printed out in the log file. In this case, we print how much time we have simulated so far (which is &#039;&#039;not&#039;&#039; the same as how long it has taken us to simulate it!), the total energy of the atoms, their temperature, and their pressure. The second line tells LAMMPS to print this information on every 10th timestep.&lt;br /&gt;
&lt;br /&gt;
===Running the simulation===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt; It is now time to run your first simulation, submit the input script with the data file in the intro folder of the files you have downloaded Try changing the timestep - what happens when you make the timestep larger?. &amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Visualising the trajectory===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;trajectory files&#039;&#039;&#039; contain the positions of all the atoms in the simulation, recorded at a set interval (for all of these simulations, this was every ten timesteps &amp;amp;mdash; this is controlled by the &#039;&#039;&#039;dump&#039;&#039;&#039; command in the input scripts). We use a programme called [http://www.ks.uiuc.edu/Research/vmd/ &#039;&#039;&#039;VMD&#039;&#039;&#039;] to view these trajectories, which you should find is already installed on both the desktop and laptop computers. You can run VMD from the start menu with &#039;&#039;&#039;Start&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;All Programs&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;University of Illinois&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;VMD&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
====Loading a Trajectory====&lt;br /&gt;
&lt;br /&gt;
We&#039;ll start by looking at the output of the 0.02 timestep simulation. In the &#039;&#039;&#039;VMD Main&#039;&#039;&#039; window, select the menu option &#039;&#039;&#039;File&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;New Molecule&#039;&#039;&#039;. Click the &#039;&#039;&#039;Browse&#039;&#039;&#039; button, then select the relevant trajectory file. In the &#039;&#039;&#039;Determine file type&#039;&#039;&#039; dropdown, select &#039;&#039;&#039;LAMMPS Trajectory&#039;&#039;&#039;. Then click &#039;&#039;&#039;Load&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You will see that the &#039;&#039;&#039;VMD 1.9.1 OpenGL Display&#039;&#039;&#039; window now shows a horrible mess. VMD&#039;s default behaviour is to draw lines between atoms which it thinks might be chemically bonded. Our system doesn&#039;t model chemical bonds, so we want to turn this off. In the &#039;&#039;&#039;VMD Main&#039;&#039;&#039; window, select the menu option &#039;&#039;&#039;Graphics&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Representations&#039;&#039;&#039;. This shows a list of &amp;quot;representations&amp;quot; of our atoms. You will see that at the moment, there is a single representation listed, and it is selected. It will have the &#039;&#039;Lines&#039;&#039; style, the &#039;&#039;Name&#039;&#039; colour, and the selection &#039;&#039;all&#039;&#039;. &amp;quot;Selection&amp;quot; simply tells VMD which atoms we want it to draw. We want to show every atom, so the current selection is fine. The &#039;&#039;name&#039;&#039; colouring method just makes VMD give atoms colours according to their specified type. The colour isn&#039;t important to us, so we can leave this be too. The &amp;quot;style&amp;quot; tells VMD what we want it to display for each atom. Change the &#039;&#039;&#039;Drawing Method&#039;&#039;&#039; from &#039;&#039;Lines&#039;&#039; to &#039;&#039;VDW&#039;&#039;. You will see that the mess of lines is replaced by a mess of low resolution, overlapping spheres. Change the &#039;&#039;&#039;Sphere Scale&#039;&#039;&#039; to 0.3, and the &#039;&#039;&#039;Sphere Resolution&#039;&#039;&#039; to 17. The result should look a little smoother. Close the &#039;&#039;&#039;Graphical Representations&#039;&#039;&#039; window. You will notice that in the bottom right of the &#039;&#039;&#039;VMD Main&#039;&#039;&#039; window, there is a small play button. Click this, and you will see the animated version of your simulation trajectory.&lt;br /&gt;
&lt;br /&gt;
By clicking and dragging with the mouse, you can rotate the simulation box (though this may be sluggish). At any time, you can reset the view by pressing the equals key.&lt;br /&gt;
&lt;br /&gt;
====Tracking a Single Particle====&lt;br /&gt;
To illustrate the periodic boundary conditions that we are using, we are going to draw almost all of the atoms as points, but we will pick a single atom at random to draw as a sphere. This will make it easy to see how a single atom moves through the box. Reset the display using the equals key, then use the &#039;&#039;&#039;VMD Main&#039;&#039;&#039; window controls to pause the trajectory and reset it to the first trajectory (play with the different buttons until you find the one that does this). You should see the perfect cubic lattice. Use the option &#039;&#039;&#039;Display&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Orthographic&#039;&#039;&#039; to change the drawing mode, then rotate the displayed crystal so that you are looking at one vertex (looking down the 111 direction, in crystallographic terms).&lt;br /&gt;
&lt;br /&gt;
Open the &#039;&#039;&#039;Graphical Representations&#039;&#039;&#039; window again. Change the representation style from &#039;&#039;&#039;VDW&#039;&#039;&#039; to points, then click the &#039;&#039;&#039;Create Rep&#039;&#039;&#039; button. This creates a second representation, allowing a subset of the atoms to be drawn in a different way. The &#039;&#039;&#039;Selected Atoms&#039;&#039;&#039; box allows us to choose which atoms this representation applies to. We just want to pick two of them at random &amp;amp;mdash; VMD assigns every atom an index, from 0 to N-1. In our case, there are 1000 atoms, so choose two numbers between 0 and 999. Changed the &#039;&#039;&#039;Selected Atoms&#039;&#039;&#039; field to &amp;lt;pre&amp;gt;index i or index j&amp;lt;/pre&amp;gt; where i and j are your chosen numbers, press return, then change the &#039;&#039;&#039;Drawing Method&#039;&#039;&#039; to &#039;&#039;&#039;VDW&#039;&#039;&#039;. You should now see only two atoms represented by spheres, with the rest shown as small points. In the &#039;&#039;&#039;VMD Main&#039;&#039;&#039; window, click play. Try rotating the box, and changing the playback speed.&lt;br /&gt;
&lt;br /&gt;
You will see that sometimes one of the spheres seems to change position across the box very rapidly &amp;amp;mdash; this occurs when it reaches one periodic boundary, and is reflected back across the other face. Try playing with some of the other representation types in VMD &amp;amp;mdash; it  is a very powerful package, which is often used to render images of simulated proteins, so many of its options aren&#039;t relevant to our simple system!&lt;br /&gt;
&lt;br /&gt;
===Checking equilibration===&lt;br /&gt;
&lt;br /&gt;
When we first set up a simulation, it is very important to make sure that our system reaches an equilibrium state. We characterise equilibrium by the average values of thermodynamic quantities becoming constant (due to the approximations that we have made, there will always be fluctuations, but the average values will become constant).&lt;br /&gt;
&lt;br /&gt;
In this section, we are going to plot the thermodynamic output of the simulation to see how long it takes to reach the equilibrium state (and indeed, whether this happens at all). Instructions are given below to import data from the LAMMPS log file into Microsoft Excel. Once you have the data in a spreadsheet, you can plot it. If you know how to use some of the other plotting software available on the chemistry computers (like Origin), you are welcome to use it.&lt;br /&gt;
&lt;br /&gt;
# Open a blank Excel workbook&lt;br /&gt;
# Copy the data in the textfile into the first cell&lt;br /&gt;
# With these data highlighted, click the Data tab and &amp;quot;Text to Columns&amp;quot;&lt;br /&gt;
# Click &amp;quot;Delimited&amp;quot;, continue and let it be space delimited&lt;br /&gt;
# Click finish&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK 7: &amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== What does it mean for a simulation to &amp;quot;reach equilibrium&amp;quot;? Why is this important in terms of sampling form an ensemble using molecular dynamics? [2] ===&lt;br /&gt;
&lt;br /&gt;
=== Plot the energy (potential, kinetic and total), temperature and pressure, against time for the 0,001 timestep experiment [2] ===&lt;br /&gt;
&lt;br /&gt;
=== Does the simulation reach equilibrium? How can you tell? [2] ===&lt;br /&gt;
&lt;br /&gt;
=== Make a single plot which shows the energy vs. time for the timesteps you have simulated [2]. ===&lt;br /&gt;
&lt;br /&gt;
=== Of the timesteps that you used, which timestep will you use for subsequent simulations and why? [6] ===&lt;br /&gt;
&#039;&#039;(Think about what is happening &amp;quot;physically&amp;quot; as you increase/decrease the timestep. Also, what features of each timeseries are indicative of the simulation&#039;s &amp;quot;health&amp;quot;?)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;&amp;lt;span style=&amp;quot;color:blue; &amp;quot;&amp;gt;This is the third section of the third year simulation experiment. You can return to the previous page, [[Third_year_simulation_experiment/Introduction_to_molecular_dynamics_simulation|Introduction to molecular dynamics simulation]], or jump ahead to the next section, [[Third year simulation experiment/Running simulations under specific conditions|Running simulations under specific conditions]].&amp;lt;/span&amp;gt;&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Third_year_simulation_experiment/Introduction_to_molecular_dynamics_simulation&amp;diff=794637</id>
		<title>Third year simulation experiment/Introduction to molecular dynamics simulation</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Third_year_simulation_experiment/Introduction_to_molecular_dynamics_simulation&amp;diff=794637"/>
		<updated>2019-10-11T08:39:46Z</updated>

		<summary type="html">&lt;p&gt;Org12: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&amp;lt;big&amp;gt;&amp;lt;span style=&amp;quot;color:blue; &amp;quot;&amp;gt;This is the second section of the third year simulation experiment. You can return to the previous section, [[Third year simulation experiment/Files to download|Downloading Files]], or jump ahead to the next section, [[Third year simulation experiment/Equilibration|Equilibration]].&amp;lt;/span&amp;gt;&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;This section contains background information about the theory of molecular dynamics simulations. It contains a number of relatively short exercises that you must complete as part of your lab write-up. These are labelled in bold and preceded by the word TASK in large print. It is recommended that you read the information on this page before carrying on with the rest of the experiment, but you are encouraged to save the TASKS for later; you can attempt them while you wait for long simulations to finish.&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In this section, we briefly discuss the theory behind molecular dynamics (MD) simulations. When we perform MD, we calculate how a particular set of atoms move over time. Using statistical physics, we can use the positions, velocities, and forces, of the atoms to calculate thermodynamic quantities like temperature and pressure.&lt;br /&gt;
&lt;br /&gt;
==Theory==&lt;br /&gt;
&lt;br /&gt;
===The Classical Particle Approximation===&lt;br /&gt;
&lt;br /&gt;
As you may remember from your quantum chemistry lectures, it is very straightforward to write down the Schroedinger equation that describes the behaviour of any particular chemical system. For anything more complicated than a hydrogen atom, however, it is impossible to solve exactly. Even approximate solutions can be extremely computationally demanding. To be able to simulate a real system, we have to make some approximations.&lt;br /&gt;
&lt;br /&gt;
It turns out that, to a very good approximation, we can assume that atoms behave as classical particles. Imagine a collection of &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; atoms. Each one of them will interact with all of the others, and so each atom will feel a force. Newton&#039;s second law tell us that that force causes the atom to accelerate.&lt;br /&gt;
&lt;br /&gt;
Throughout this section, we are going to use the following notation:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;math&amp;gt;\mathbf{F}_i&amp;lt;/math&amp;gt; is the force acting on atom i.&lt;br /&gt;
* &amp;lt;math&amp;gt;m_i&amp;lt;/math&amp;gt; is the mass of atom i.&lt;br /&gt;
* &amp;lt;math&amp;gt;\mathbf{a}_i&amp;lt;/math&amp;gt; is the acceleration of atom i, the rate of change of its velocity.&lt;br /&gt;
* &amp;lt;math&amp;gt;\mathbf{v}_i&amp;lt;/math&amp;gt; is the velocity of atom i.&lt;br /&gt;
* &amp;lt;math&amp;gt;\mathbf{x}_i&amp;lt;/math&amp;gt; is the position of atom i.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathbf{F}_i = m_i \mathbf{a}_i = m_i \frac{\mathrm{d}\mathbf{v}_i}{\mathrm{d}t} = m_i \frac{\mathrm{d}^2 \mathbf{x}_i}{\mathrm{d}t^2} \ \ (1)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a second order differential equation for the positions of the atoms &amp;amp;mdash; if we know how the force, &amp;lt;math&amp;gt;\mathbf{F}_i&amp;lt;/math&amp;gt;, behaves as a function of time, then we can determine the atomic positions and velocities at any time we like. Our system of &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; atoms has &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; of these equations, one for each atom. This is one of the reasons that computer simulations are needed &amp;amp;mdash; if we want to model the behaviour of a liquid, we can hardly solve the necessary number of equations by hand.&lt;br /&gt;
&lt;br /&gt;
===Numerical Integration===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Numerical integration is a rather complex topic. In particular, the notation used below can be quite intimidating. Remember that you are encouraged to ask for help from the demonstrator if you want to discuss any part of this experiment!&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are a number of numerical algorithms to perform a molecular dynamics simulation, two are presented here- The Classical Verlet algorithm and The Velocity-Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
====Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
To solve these equations numerically we have to &#039;&#039;discretise&#039;&#039; the problem: rather than treating the atomic positions, velocities, and forces as continuous functions of time, we break our simulation up into a sequence of &#039;&#039;&#039;timesteps&#039;&#039;&#039;, each of length &amp;lt;math&amp;gt;\delta t&amp;lt;/math&amp;gt;. This process is illustrated for a simple function in &#039;&#039;&#039;figure 1&#039;&#039;&#039;. The method that we are going to use to solve Newton&#039;s law for our atoms is usually called the Verlet algorithm (although it is an old method, and has been &#039;rediscovered&#039; many times!). To understand its origin, we will begin with a brief derivation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:ThirdYearSimulationExpt-Intro-Discretisation.png|300px|thumb|center|&#039;&#039;&#039;Figure 1&#039;&#039;&#039;: Discretisation of sin(x) between 0 and &amp;lt;math&amp;gt;2\pi&amp;lt;/math&amp;gt;]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We denote the position of an atom, &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;, at time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; by &amp;lt;math&amp;gt;\mathbf{x}_i \left(t\right)&amp;lt;/math&amp;gt;. Similarly, &amp;lt;math&amp;gt;\mathbf{v}_i \left(t\right)&amp;lt;/math&amp;gt; is the velocity of that atom at the same time. What we want to know is the position of the atoms at the next timestep, &amp;lt;math&amp;gt;t + \delta t&amp;lt;/math&amp;gt;. The basic Verlet algorithm is shown in &#039;&#039;&#039;figure 2&#039;&#039;&#039; - knowing a set of initial conditions the algorithm calculates forces and by Newton&#039;s second law, we can update the positions of a set of particles are a time &amp;lt;math&amp;gt;t + \delta t&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:ThirdYearSimulationExpt-Intro-Verlet-flowchart.svg|300px|thumb|center|&#039;&#039;&#039;Figure 2&#039;&#039;&#039;: Steps to implement the classic Verlet algorithm.]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt; TASK 1: By taking Taylor expansions of  &amp;lt;math&amp;gt;x(t + \delta t)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;x(t - \delta t)&amp;lt;/math&amp;gt;, write general expressions for them up to the fourth order &amp;lt;math&amp;gt;\mathcal{O}\left(\delta t^4\right)&amp;lt;/math&amp;gt; &amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt; Having written these expressions, derive the formula in figure 2 to update positions as used in the classical Verlet algorithm &amp;lt;math&amp;gt; x(t + \delta t) \approx 2x_{i}(t) - x_{i}(t-\delta t) + \frac{F_{i}(t)}{m} \delta t^{2}&amp;lt;/math&amp;gt; by using Newton&#039;s second law to replace &amp;lt;math&amp;gt;\frac{\mathrm{d}^2\mathbf{x}_i\left(t\right)}{\mathrm{d}t^2}&amp;lt;/math&amp;gt; [4 marks] &amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Using this last equation, we can use a sequence of steps like those shown in &#039;&#039;&#039;figure 2&#039;&#039;&#039; to get the positions. At no point are the velocities calculated in this method!&lt;br /&gt;
&lt;br /&gt;
====Velocity Verlet Algorithm====&lt;br /&gt;
&lt;br /&gt;
If we assume that the acceleration of an atom depends only on its position and not its velocity, then we are able to come up with a new algorithm that lets us calculate atomic velocities explicitly as shown in &#039;&#039;&#039;figure 3&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:ThirdYearSimulationExpt-Intro-VelocityVerlet-flowchart.svg|300px|thumb|center|&#039;&#039;&#039;Figure 3&#039;&#039;&#039;: Steps to implement the velocity Verlet algorithm.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We start by noting that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathbf{v}_i\left(t + \delta t\right) = \mathbf{v}_i\left(t\right) + \frac{\mathbf{a}_i\left(t\right) + \mathbf{a}_i\left(t + \delta t\right)}{2}\delta t \ \ (6)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can Taylor expand the velocity by half a step, instead of a full step.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathbf{v}_i\left(t + \frac{1}{2}\delta t\right) = \mathbf{v}_i\left(t\right) + \frac{1}{2} \mathbf{a}_i\left(t\right)\delta t \ \ (7)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We then substitute this into your expansion for &amp;lt;math&amp;gt; x_{i} (t + \delta t) &amp;lt;/math&amp;gt; to obtain an accuracy up to &amp;lt;math&amp;gt; \delta t ^{2} &amp;lt;/math&amp;gt;. Notice that terms up to &amp;lt;math&amp;gt; \delta t ^{2} &amp;lt;/math&amp;gt; in your expansion can be written:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt; \mathbf{x}_{i} (t + \delta t) = \mathbf{x}_{i} (t) + \mathbf{v}(t) \delta t + \frac{1}{2} \mathbf{a}(t) \delta t ^{2} &amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathbf{x}_i\left(t + \delta t\right) = \mathbf{x}_i\left(t\right) + \mathbf{v}_i\left(t + \frac{1}{2}\delta t\right)\delta t \ \ (8)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When we know the updated atomic positions, we can calculate new forces, &amp;lt;math&amp;gt;\mathbf{a}_i\left(t + \delta t\right)&amp;lt;/math&amp;gt;. Finally, we substitute equation (7) into equation (6) to get the new velocities &amp;lt;math&amp;gt;\mathbf{v}_i\left(t + \delta t\right)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathbf{v}_i\left(t + \delta t\right) = \mathbf{v}_i\left(t + \frac{1}{2}\delta t\right) + \frac{1}{2}\mathbf{a}_i\left(t + \delta t\right)\delta t \ \ (9)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that for both numerical integration algorithms, the first step is &amp;quot;specify initial conditions&amp;quot;. When using the Verlet algorithm, we need to know the starting positions of the atoms (&amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt;), and their positions one timestep in the past (&amp;lt;math&amp;gt;\mathbf{x}_i\left(-\delta t\right)&amp;lt;/math&amp;gt;). If the velocity-Verlet algorithm is used, then we have to know the  the starting positions of the atoms (&amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt;) and their velocities at the same time (&amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;). For this reason, we often start new simulations by using the output of older ones. If, however, you are performing your first simulations of a system (as we are now), then you must choose your initial conditions. The simulation software that we will use is able to do this for us, and this will be explained in the next section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt; TASK 2: What could be an advantage of the Velocity-Verlet algorithm over the classical Verlet algorithm? [2 marks]&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Atomic Forces===&lt;br /&gt;
&lt;br /&gt;
Since we can&#039;t reasonably solve the equations from quantum physics necessary to determine the forces acting on a given configuration of atoms, we have to make approximations. We know from classical physics that the force acting on an object is determined by the potential that it experiences:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathbf{F}_i = - \frac{\mathrm{d}U\left(\mathbf{r}^N\right)}{\mathrm{d}\mathbf{r}_i}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The shorthand notation &amp;lt;math&amp;gt;\mathbf{r}^N&amp;lt;/math&amp;gt; stands for the position vectors of &#039;&#039;&#039;every&#039;&#039;&#039; atom in system. In principle, the force that a single atom feels is determined by the position of every other atom in the simulation. All we then need to do is to find a function &amp;lt;math&amp;gt;U&amp;lt;/math&amp;gt; that captures all the key physics of the interatomic interactions in the system. For many simple liquids, it turns out that we can model the interactions between each pair of atoms extremely well using the Lennard-Jones potential. Overall, U takes the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;U\left(\mathbf{r}^N\right) = \sum_i^N \sum_{i \neq j}^{N} \left\{ 4\epsilon \left( \frac{\sigma^{12}}{r_{ij}^{12}} - \frac{\sigma^6}{r_{ij}^6} \right) \right\} \ \ (10)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== TASK 3: Consider the Lennard-Jones pair potential. What physical interaction(s) does it describe? What is the physical significance for the r^(-6) and r^(-12) terms? [3 marks] ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK 4: For a single Lennard-Jones interaction, &amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;, find the separation, &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt;, at which the potential energy is zero. What is the force at this separation? Find the equilibrium separation, &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, and work out the well depth (&amp;lt;math&amp;gt;\phi\left(r_{eq}\right)&amp;lt;/math&amp;gt;). Evaluate the integrals &amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\int_{2.5\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\int_{3\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;\sigma = \epsilon = 1.0&amp;lt;/math&amp;gt; [4 marks]&amp;lt;/big&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====Periodic Boundary Conditions====&lt;br /&gt;
&lt;br /&gt;
[[File:ThirdYearSimulationExpt-Intro-Box.png|200px|thumb|right|&#039;&#039;&#039;Figure 4&#039;&#039;&#039;: Diagram of a simulation box containing 2139 atoms. The blue lines indicate the boundaries of the box.]]&lt;br /&gt;
[[File:ThirdYearSimulationExpt-Intro-Periodic.svg|300px|thumb|left|&#039;&#039;&#039;Figure 5&#039;&#039;&#039;: Periodic boundary conditions in two dimensions.]]&lt;br /&gt;
&lt;br /&gt;
We cannot simulate realistic volumes of liquid. In fact, in our simulations, &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; will be between &amp;lt;math&amp;gt;1000&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt;. The following task should illustrate why this must be so.&lt;br /&gt;
&lt;br /&gt;
In order for our simulations to approximate a bulk liquid, we have to use a computational trick. The atoms in the simulation are enclosed in a simulation box, of fixed dimensions (&#039;&#039;&#039;figure 4&#039;&#039;&#039;). This box is very often a cuboid, but parallelepipeds can also be used (and this can be very useful when simulating crystal structures). We pretend that we have repeated our box infinitely in all directions, so that the atoms at the very edges are not exposed to a vacuum. This is illustrated in two dimensions in &#039;&#039;&#039;figure 5&#039;&#039;&#039;. The darker coloured atoms in the central box are the &amp;quot;real&amp;quot; atoms. The faded atoms in the outer four boxes are the replicas. When an atom crosses the boundary of the box, one of its replicas enters the box through the opposite face. In this way, the number of atoms inside the box is always constant.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK 5: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, &#039;&#039;after the periodic boundary conditions have been applied&#039;&#039;? [1 marks]&#039;&#039;&#039; &amp;lt;/big&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Truncation====&lt;br /&gt;
&lt;br /&gt;
Periodic boundary conditions introduce their own problems. When we defined our potential function (equation 10), we specified that it depended on all possible pairs of atoms. If we have an infinite number of replicas of our system, how can we avoid calculating an infinite number of pair interactions?&lt;br /&gt;
&lt;br /&gt;
Think about the three integrals you calculated for the Lennard-Jones potential task. They represent the area under the Lennard-Jones potential curve between some specified distance (&amp;lt;math&amp;gt;2\sigma&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt;), and infinite separation (where there is no interaction). You should find that this value becomes rather small as the near distance is increased! The attractive &amp;lt;math&amp;gt;\frac{1}{r^6}&amp;lt;/math&amp;gt; part of the potential dominates here, and this decays rapidly with &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;. We assume that this means that there is a distance beyond which the interaction is so small that we can safely ignore it. In fact, in most simulations this is chosen to be something close to &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt;. When the forces are calculated, we only calculate interactions between a pair of atoms if their separation is less than this cutoff.&lt;br /&gt;
&lt;br /&gt;
====Reduced Units====&lt;br /&gt;
&lt;br /&gt;
It is typical when using Lennard-Jones interactions to work in reduced units. By this, we mean that all quantities in our simulation are divided by scaling factors &amp;amp;mdash; for example, distances are divided by &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;. The result of this is that the values become more manageable: all values that we might work out are typically around 1, rather than &amp;lt;math&amp;gt;1\times 10^{-10}&amp;lt;/math&amp;gt; (in the case of distance), &amp;lt;math&amp;gt;300&amp;lt;/math&amp;gt; (in the case of temperature), or &amp;lt;math&amp;gt;1\times 10^{-19}&amp;lt;/math&amp;gt; (in the case of energy).&lt;br /&gt;
&lt;br /&gt;
We denote these reduced quantities by a star, and they take the following conversion factors:&lt;br /&gt;
&lt;br /&gt;
* distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
* energy &amp;lt;math&amp;gt;E^* = \frac{E}{\epsilon}&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK 6: The Lennard-Jones parameters for argon are &amp;lt;math&amp;gt;\sigma = 0.34\mathrm{nm}, \epsilon\ /\ k_B= 120 \mathrm{K}&amp;lt;/math&amp;gt;. If the LJ cutoff is &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;, what is it in real units? What is the well depth in &amp;lt;math&amp;gt;\mathrm{kJ\ mol}^{-1}&amp;lt;/math&amp;gt;? What is the reduced temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt; in real units? [1 marks]&amp;lt;/big&amp;gt; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;&amp;lt;span style=&amp;quot;color:blue; &amp;quot;&amp;gt;This is the second section of the third year simulation experiment. You can return to the previous section, [[Third year simulation experiment/Running your first simulation|Files to Download]], or jump ahead to the next section, [[Third year simulation experiment/Equilibration|Equilibration]].&amp;lt;/span&amp;gt;&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Third_year_simulation_experiment&amp;diff=794636</id>
		<title>Third year simulation experiment</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Third_year_simulation_experiment&amp;diff=794636"/>
		<updated>2019-10-11T08:34:26Z</updated>

		<summary type="html">&lt;p&gt;Org12: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&amp;lt;big&amp;gt;This is the optional experiment which may be chosen by any third year student. If you are looking for the compulsory simulation experiment for students studying chemistry with molecular physics, you will find it [[Third_year_CMP_compulsory_experiment|here]].&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Computer simulation is widely used to study a huge variety of chemical phenomena, from the behaviour of exotic materials under extreme conditions to protein folding and the properties of biological systems such as lipid membranes. In this experiment, we hope to give you a gentle introduction to one of the most powerful methods for the simulation of chemical systems, &#039;&#039;&#039;molecular dynamics simulation&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This course closely follows some of the ideas introduced in Professor Bresme&#039;s statistical thermodynamics lecture course. Do not worry if you are doing this experiment before the lectures begin, everything that you need to know to complete the experiment will be explained in these instructions. We will begin with a brief overview of the fundamental theory behind the method, before you start running your own simulations of a simple liquid using the college&#039;s [http://www.imperial.ac.uk/admin-services/ict/self-service/research-support/hpc/ high performance computing] facilities.&lt;br /&gt;
&lt;br /&gt;
At the end of this experiment, you will have performed your own simulations using state of the art software packages used by researchers all around the world, and used those simulations to calculate both structural and dynamic properties of a simple liquid. You will have seen how the concepts of statistical physics introduced by Professor Bresme are needed to calculate thermodynamic quantities such as temperature and pressure in computer simulations, and you will see how computers can be used to validate those concepts.&lt;br /&gt;
&lt;br /&gt;
All of the information that you need to complete the experiment is provided in these wiki pages. We have also tried to provide links to external resources and relevant textbooks where possible &amp;amp;mdash; unless explicitly stated, reading these resources &#039;&#039;&#039;is not required&#039;&#039;&#039;; they are provided only as further information for those interested in the subject.&lt;br /&gt;
&lt;br /&gt;
==Assessment==&lt;br /&gt;
&lt;br /&gt;
At the end of this experiment you must submit a report (pdf format via turnitin). The report should be structured:&lt;br /&gt;
&lt;br /&gt;
* Introduction Questions (20% of the total mark)&lt;br /&gt;
* Results and Discussion (60% of total mark)&lt;br /&gt;
* Conclusion Questions (20% of total mark)&lt;br /&gt;
* References&lt;br /&gt;
&lt;br /&gt;
Relevant supplementary material can be added at the end of the report so long as it supports your discussion. Please limit the introduction and conclusion sections (which are now just answers to questions) &amp;lt;u&amp;gt;to a maximum of ~1.5 pages at size 12 font Times New Roman, or equivalent&amp;lt;/u&amp;gt; (e.g. if you are using latex or simply prefer another font). It is certainly possible to answer the introduction and conclusion questions with under this length limit, and as with most scientific writing, shorter concise but well thought out answers are preferable. We have not imposed a hard word limit because, equally, you should spend the majority of this lab learning, not editing and rewriting answers to just satisfy the word limit. &lt;br /&gt;
&lt;br /&gt;
Please note that five &amp;quot;floating&amp;quot; marks have been reserved in the results and discussion section. These can be used to reward particularly insightful comments and/or explanations, on the basis of good/bad presentation, use of scientific language, or for other reasons. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;The final task of the lab (task 10 - MSD diffusion simulations) is NOT part of the lab this year.&amp;lt;/u&amp;gt; The section has been left on the wiki for any interested student to give it a go. However, it should NOT be submitted as part of your lab report, and will not be marked. &lt;br /&gt;
&lt;br /&gt;
==Getting Help==&lt;br /&gt;
&lt;br /&gt;
Please feel free to ask any demonstrators for help during the lab sessions - that is what we are here for. Questions can also be asked via email. &lt;br /&gt;
&lt;br /&gt;
The member of academic staff responsible for this exercise is Professor Fernando Bresme (f.bresme@imperial.ac.uk).&lt;br /&gt;
&lt;br /&gt;
==Structure of this Experiment==&lt;br /&gt;
&lt;br /&gt;
This experimental manual has been broken up into a number of subsections. To help you plan your time it is suggested you complete the following at these times:&lt;br /&gt;
&lt;br /&gt;
Monday (morning session): Theory - Introduction to molecular dynamics simulations&lt;br /&gt;
&lt;br /&gt;
Monday (afternoon session): Theory + Equilibration (submit your files for running)&lt;br /&gt;
&lt;br /&gt;
Tuesday (morning session): Equilibration (analyse your files)&lt;br /&gt;
&lt;br /&gt;
Tuesday (afternoon session): Running simulations under specific conditions (submit and read)&lt;br /&gt;
&lt;br /&gt;
Thursday (morning session): Checkpoint for progress. Submit your input files for the radial distribution function and analyse your equation of state from the previous section&lt;br /&gt;
&lt;br /&gt;
Thursday (afternoon session).&lt;br /&gt;
&lt;br /&gt;
Friday (morning session): Analyse MSD diffusion simulations&lt;br /&gt;
&lt;br /&gt;
Friday (afternoon session): Analyse MSD diffusion simulations. Report write-up.&lt;br /&gt;
&lt;br /&gt;
Direct links to each of them may be found below. You should attempt them in order, and you should complete all of them to finish the experiment.&lt;br /&gt;
# [[Third year simulation experiment/Files to download|Downloading the Files]]&lt;br /&gt;
# [[Third year simulation experiment/Introduction to molecular dynamics simulation|Introduction to molecular dynamics simulation]]&lt;br /&gt;
# [[Third_year_simulation_experiment/Equilibration|Equilibration]]&lt;br /&gt;
# [[Third_year_simulation_experiment/Running_simulations_under_specific_conditions|Running simulations under specific conditions]]&lt;br /&gt;
# [[Third year simulation experiment/Structural properties and the radial distribution function|Structural properties and the radial distribution function]]&lt;br /&gt;
# [[Third year simulation experiment/Dynamical properties and the diffusion coefficient|Dynamical properties and the diffusion coefficient]]&lt;br /&gt;
&lt;br /&gt;
== Introduction Questions ==&lt;br /&gt;
Please limit your answers to this section (which are now just answers to questions) &amp;lt;u&amp;gt;to a maximum of ~1.5 pages at size 12 font Times New Roman, or equivalent&amp;lt;/u&amp;gt; (e.g. if you are using latex or simply prefer another font).&lt;br /&gt;
# Give a brief account on what molecular dynamics is, and (broadly speaking) what it aims to achieve. [5]&lt;br /&gt;
# Give two examples of instances where molecular dynamics simulations have/can be used (in a helpful way) instead of or in synergy with experimental techniques. In each case explain why. [10] (&#039;&#039;Please consider only chemically relevant examples. E.g. To study geochemical processes which occur under extreme temperature/pressure conditions, and therefore cannot be studied experimentally.&#039;&#039;)&lt;br /&gt;
# Explain what is meant by a thermodynamic ensemble, and the term &amp;quot;conserved quantity&amp;quot;. [2]&lt;br /&gt;
# What is the Ergodic hypothesis? Explain its relevance to molecular dynamics simulations. [3]&lt;br /&gt;
&lt;br /&gt;
== Conclusion Questions ==&lt;br /&gt;
Please limit your answers to this section (which are now just answers to questions) &amp;lt;u&amp;gt;to a maximum of ~1.5 pages at size 12 font Times New Roman, or equivalent&amp;lt;/u&amp;gt; (e.g. if you are using latex or simply prefer another font).&lt;br /&gt;
# In this lab, you have used the Lennard-Jones potential exclusively. Give one example of a system that can be described well using only LJ potentials, and one that cannot. In each case explain why. [4]&lt;br /&gt;
# What cut-off have you been using in your simulations? What are the advantages and disadvantages for using a shorter/longer cut-off? [3]&lt;br /&gt;
# What are finite size effects? Do you think they are significant in the simulations you have performed? Why? [3]&lt;br /&gt;
# Algorithms such as SHAKE and RATTLE (holonomic constraints) allow MD simulations to be performed while fixing bond lengths. Why is this desirable? [3] &#039;&#039;(Hint: think about the timestep.)&#039;&#039;&lt;br /&gt;
# In the simulations you have performed ergodicity has not been an issue. Describe a system in which &amp;quot;brute force&amp;quot; MD struggles to achieve ergodic sampling. Describe one &amp;quot;enhanced sampling&amp;quot; technique that can be used to overcome this. [7]&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Third_year_simulation_experiment&amp;diff=794635</id>
		<title>Third year simulation experiment</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Third_year_simulation_experiment&amp;diff=794635"/>
		<updated>2019-10-11T08:27:56Z</updated>

		<summary type="html">&lt;p&gt;Org12: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&amp;lt;big&amp;gt;This is the optional experiment which may be chosen by any third year student. If you are looking for the compulsory simulation experiment for students studying chemistry with molecular physics, you will find it [[Third_year_CMP_compulsory_experiment|here]].&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Computer simulation is widely used to study a huge variety of chemical phenomena, from the behaviour of exotic materials under extreme conditions to protein folding and the properties of biological systems such as lipid membranes. In this experiment, we hope to give you a gentle introduction to one of the most powerful methods for the simulation of chemical systems, &#039;&#039;&#039;molecular dynamics simulation&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This course closely follows some of the ideas introduced in Professor Bresme&#039;s statistical thermodynamics lecture course. Do not worry if you are doing this experiment before the lectures begin, everything that you need to know to complete the experiment will be explained in these instructions. We will begin with a brief overview of the fundamental theory behind the method, before you start running your own simulations of a simple liquid using the college&#039;s [http://www.imperial.ac.uk/admin-services/ict/self-service/research-support/hpc/ high performance computing] facilities.&lt;br /&gt;
&lt;br /&gt;
At the end of this experiment, you will have performed your own simulations using state of the art software packages used by researchers all around the world, and used those simulations to calculate both structural and dynamic properties of a simple liquid. You will have seen how the concepts of statistical physics introduced by Professor Bresme are needed to calculate thermodynamic quantities such as temperature and pressure in computer simulations, and you will see how computers can be used to validate those concepts.&lt;br /&gt;
&lt;br /&gt;
All of the information that you need to complete the experiment is provided in these wiki pages. We have also tried to provide links to external resources and relevant textbooks where possible &amp;amp;mdash; unless explicitly stated, reading these resources &#039;&#039;&#039;is not required&#039;&#039;&#039;; they are provided only as further information for those interested in the subject.&lt;br /&gt;
&lt;br /&gt;
==Assessment==&lt;br /&gt;
&lt;br /&gt;
At the end of this experiment you must submit a report (pdf format via turnitin). The report should be structured:&lt;br /&gt;
&lt;br /&gt;
* Introduction Questions (20% of the total mark)&lt;br /&gt;
* Results and Discussion (60% of total mark)&lt;br /&gt;
* Conclusion Questions (20% of total mark)&lt;br /&gt;
* References&lt;br /&gt;
&lt;br /&gt;
Relevant supplementary material can be added at the end of the report so long as it supports your discussion. Please limit the introduction and conclusion sections (which are now just answers to questions) &amp;lt;u&amp;gt;to a maximum of ~1.5 pages at size 12 font Times New Roman, or equivalent&amp;lt;/u&amp;gt; (e.g. if you are using latex or simply prefer another font). It is certainly possible to answer the introduction and conclusion questions with under this length limit, and as with most scientific writing, shorter concise but well thought out answers are preferable. We have not imposed a hard word limit because, equally, you should spend the majority of this lab learning, not editing and rewriting answers to just satisfy the word limit. &lt;br /&gt;
&lt;br /&gt;
Please note that five &amp;quot;floating&amp;quot; marks have been reserved in the results and discussion section. These can be used to reward particularly insightful comments and/or explanations, on the basis of good/bad presentation, use of scientific language, or for other reasons. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;The final task of the lab (task 10 - MSD diffusion simulations) is NOT part of the lab this year.&amp;lt;/u&amp;gt; The section has been left on the wiki for any interested student to give it a go. However, it should NOT be submitted as part of your lab report, and will not be marked. &lt;br /&gt;
&lt;br /&gt;
==Getting Help==&lt;br /&gt;
&lt;br /&gt;
Please feel free to ask any demonstrators for help during the lab sessions - that is what we are here for. Questions can also be asked via email. &lt;br /&gt;
&lt;br /&gt;
The member of academic staff responsible for this exercise is Professor Fernando Bresme (f.bresme@imperial.ac.uk).&lt;br /&gt;
&lt;br /&gt;
==Structure of this Experiment==&lt;br /&gt;
&lt;br /&gt;
This experimental manual has been broken up into a number of subsections. To help you plan your time it is suggested you complete the following at these times:&lt;br /&gt;
&lt;br /&gt;
Monday (morning session): Theory - Introduction to molecular dynamics simulations&lt;br /&gt;
&lt;br /&gt;
Monday (afternoon session): Theory + Equilibration (submit your files for running)&lt;br /&gt;
&lt;br /&gt;
Tuesday (morning session): Equilibration (analyse your files)&lt;br /&gt;
&lt;br /&gt;
Tuesday (afternoon session): Running simulations under specific conditions (submit and read)&lt;br /&gt;
&lt;br /&gt;
Thursday (morning session): Checkpoint for progress. Submit your input files for the radial distribution function and analyse your equation of state from the previous section&lt;br /&gt;
&lt;br /&gt;
Thursday (afternoon session).&lt;br /&gt;
&lt;br /&gt;
Friday (morning session): Analyse MSD diffusion simulations&lt;br /&gt;
&lt;br /&gt;
Friday (afternoon session): Analyse MSD diffusion simulations. Report write-up.&lt;br /&gt;
&lt;br /&gt;
Direct links to each of them may be found below. You should attempt them in order, and you should complete all of them to finish the experiment.&lt;br /&gt;
# [[Third year simulation experiment/Files to download|Downloading the Files]]&lt;br /&gt;
# [[Third year simulation experiment/Introduction to molecular dynamics simulation|Introduction to molecular dynamics simulation]]&lt;br /&gt;
# [[Third_year_simulation_experiment/Equilibration|Equilibration]]&lt;br /&gt;
# [[Third_year_simulation_experiment/Running_simulations_under_specific_conditions|Running simulations under specific conditions]]&lt;br /&gt;
# [[Third year simulation experiment/Structural properties and the radial distribution function|Structural properties and the radial distribution function]]&lt;br /&gt;
# [[Third year simulation experiment/Dynamical properties and the diffusion coefficient|Dynamical properties and the diffusion coefficient]]&lt;br /&gt;
&lt;br /&gt;
== Introduction Questions ==&lt;br /&gt;
# Give a brief account on what molecular dynamics is, and (broadly speaking) what it aims to achieve. [5]&lt;br /&gt;
# Give two examples of instances where molecular dynamics simulations have/can be used (in a helpful way) instead of or in synergy with experimental techniques. In each case explain why. [10] (&#039;&#039;Please consider only chemically relevant examples. E.g. To study geochemical processes which occur under extreme temperature/pressure conditions, and therefore cannot be studied experimentally.&#039;&#039;)&lt;br /&gt;
# Explain what is meant by a thermodynamic ensemble, and the term &amp;quot;conserved quantity&amp;quot;. [2]&lt;br /&gt;
# What is the Ergodic hypothesis? Explain its relevance to molecular dynamics simulations. [3]&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Third_year_simulation_experiment&amp;diff=794634</id>
		<title>Third year simulation experiment</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Third_year_simulation_experiment&amp;diff=794634"/>
		<updated>2019-10-11T08:21:21Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Assessment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&amp;lt;big&amp;gt;This is the optional experiment which may be chosen by any third year student. If you are looking for the compulsory simulation experiment for students studying chemistry with molecular physics, you will find it [[Third_year_CMP_compulsory_experiment|here]].&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Computer simulation is widely used to study a huge variety of chemical phenomena, from the behaviour of exotic materials under extreme conditions to protein folding and the properties of biological systems such as lipid membranes. In this experiment, we hope to give you a gentle introduction to one of the most powerful methods for the simulation of chemical systems, &#039;&#039;&#039;molecular dynamics simulation&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This course closely follows some of the ideas introduced in Professor Bresme&#039;s statistical thermodynamics lecture course. Do not worry if you are doing this experiment before the lectures begin, everything that you need to know to complete the experiment will be explained in these instructions. We will begin with a brief overview of the fundamental theory behind the method, before you start running your own simulations of a simple liquid using the college&#039;s [http://www.imperial.ac.uk/admin-services/ict/self-service/research-support/hpc/ high performance computing] facilities.&lt;br /&gt;
&lt;br /&gt;
At the end of this experiment, you will have performed your own simulations using state of the art software packages used by researchers all around the world, and used those simulations to calculate both structural and dynamic properties of a simple liquid. You will have seen how the concepts of statistical physics introduced by Professor Bresme are needed to calculate thermodynamic quantities such as temperature and pressure in computer simulations, and you will see how computers can be used to validate those concepts.&lt;br /&gt;
&lt;br /&gt;
All of the information that you need to complete the experiment is provided in these wiki pages. We have also tried to provide links to external resources and relevant textbooks where possible &amp;amp;mdash; unless explicitly stated, reading these resources &#039;&#039;&#039;is not required&#039;&#039;&#039;; they are provided only as further information for those interested in the subject.&lt;br /&gt;
&lt;br /&gt;
==Assessment==&lt;br /&gt;
&lt;br /&gt;
At the end of this experiment you must submit a report (pdf format via turnitin). The report should be structured:&lt;br /&gt;
&lt;br /&gt;
* Introduction Questions (20% of the total mark)&lt;br /&gt;
* Results and Discussion (60% of total mark)&lt;br /&gt;
* Conclusion Questions (20% of total mark)&lt;br /&gt;
* References&lt;br /&gt;
&lt;br /&gt;
Relevant supplementary material can be added at the end of the report so long as it supports your discussion. Please limit the introduction and conclusion sections (which are now just answers to questions) &amp;lt;u&amp;gt;to a maximum of ~1.5 pages at size 12 font Times New Roman, or equivalent&amp;lt;/u&amp;gt; (e.g. if you are using latex or simply prefer another font). It is certainly possible to answer the introduction and conclusion questions with under this length limit, and as with most scientific writing, shorter concise but well thought out answers are preferable. We have not imposed a hard word limit because, equally, you should spend the majority of this lab learning, not editing and rewriting answers to just satisfy the word limit. &lt;br /&gt;
&lt;br /&gt;
Please note that five &amp;quot;floating&amp;quot; marks have been reserved in the results and discussion section. These can be used to reward particularly insightful comments and/or explanations, on the basis of good/bad presentation, use of scientific language, or for other reasons. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;The final task of the lab (task 10 - MSD diffusion simulations) is NOT part of the lab this year.&amp;lt;/u&amp;gt; The section has been left on the wiki for any interested student to give it a go. However, it should NOT be submitted as part of your lab report, and will not be marked. &lt;br /&gt;
&lt;br /&gt;
==Getting Help==&lt;br /&gt;
&lt;br /&gt;
Please feel free to ask any demonstrators for help during the lab sessions - that is what we are here for. Questions can also be asked via email. &lt;br /&gt;
&lt;br /&gt;
The member of academic staff responsible for this exercise is Professor Fernando Bresme (f.bresme@imperial.ac.uk).&lt;br /&gt;
&lt;br /&gt;
==Structure of this Experiment==&lt;br /&gt;
&lt;br /&gt;
This experimental manual has been broken up into a number of subsections. To help you plan your time it is suggested you complete the following at these times:&lt;br /&gt;
&lt;br /&gt;
Monday (morning session): Theory - Introduction to molecular dynamics simulations&lt;br /&gt;
&lt;br /&gt;
Monday (afternoon session): Theory + Equilibration (submit your files for running)&lt;br /&gt;
&lt;br /&gt;
Tuesday (morning session): Equilibration (analyse your files)&lt;br /&gt;
&lt;br /&gt;
Tuesday (afternoon session): Running simulations under specific conditions (submit and read)&lt;br /&gt;
&lt;br /&gt;
Thursday (morning session): Checkpoint for progress. Submit your input files for the radial distribution function and analyse your equation of state from the previous section&lt;br /&gt;
&lt;br /&gt;
Thursday (afternoon session).&lt;br /&gt;
&lt;br /&gt;
Friday (morning session): Analyse MSD diffusion simulations&lt;br /&gt;
&lt;br /&gt;
Friday (afternoon session): Analyse MSD diffusion simulations. Report write-up.&lt;br /&gt;
&lt;br /&gt;
Direct links to each of them may be found below. You should attempt them in order, and you should complete all of them to finish the experiment.&lt;br /&gt;
# [[Third year simulation experiment/Files to download|Downloading the Files]]&lt;br /&gt;
# [[Third year simulation experiment/Introduction to molecular dynamics simulation|Introduction to molecular dynamics simulation]]&lt;br /&gt;
# [[Third_year_simulation_experiment/Equilibration|Equilibration]]&lt;br /&gt;
# [[Third_year_simulation_experiment/Running_simulations_under_specific_conditions|Running simulations under specific conditions]]&lt;br /&gt;
# [[Third year simulation experiment/Structural properties and the radial distribution function|Structural properties and the radial distribution function]]&lt;br /&gt;
# [[Third year simulation experiment/Dynamical properties and the diffusion coefficient|Dynamical properties and the diffusion coefficient]]&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696397</id>
		<title>User:Jpw115</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696397"/>
		<updated>2018-04-23T16:21:12Z</updated>

		<summary type="html">&lt;p&gt;Org12: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=color:red&amp;gt; Overall feedback: The report was on the whole well written, and conveyed a good understanding of the topic at hand. A few minor points about style are given in the feedback. A better understanding of the scope of the LJ model could have been conveyed. Tasks were completed to a good level - only a few errors/exclusions.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Liquid Simulations - Jack Williams=&lt;br /&gt;
==Abstract==&lt;br /&gt;
Key thermodynamic properties of a system modelled on the Leonard-Jones potential were investigated using molecular dynamics simulation. Density and heat capacity were measured as functions of temperature to analyse how the system evolves with changing temperature, both were discovered to decrease with increasing temperature. Radial distribution functions were calculated to analyse the structure of the system in each of the 3 phases. It was discovered that solids, due to the crystalline fixed structure have high long range order, liquids have some order that decreases over time due to the ability of the particles to diffuse away, and gasses have negligible long range order due to the very low density of the gaseous system. The diffusion coefficient for each phase was measured using two methods, the mean squared displacement method (MSD) and the velocity autocorrelation method (VACF). Both produced the expected results of a high diffusion coefficient for a gas, fairly low for liquid and a diffusion coefficient close to zero for the solid phase. Both methods produced similar results, however due to the error in calculating the integral in the VACF method (trapezium rule), the values calculated using the MSD method are more accurate. These results compared well to simulations run on larger systems, which due to the larger amount of data contributing to the average, are more accurate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good abstract: tells the reader concisely what you did and your main results/conclusions. My only qualm is that saying you &amp;quot;discovered&amp;quot; long vs. short range order in the phases of matter seems like it is a novel result. Perhaps &amp;quot;verified&amp;quot; would have been better. This is a minor point though.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Knowledge and understanding of the thermodynamic properties of systems, for example the phase transitions, has a wide range of applications in a number of industries. One key industry in which this knowledge is vital for proper function, is in power generation, for example in fossil fuel power stations and nuclear power stations. Both types of station function via heating liquid water which then evaporates forming steam, which is used to turn a turbine connected to a generator which generates electrical energy. The steam then condenses back to liquid water to be re-used. &lt;br /&gt;
To maximise efficiency, certain factors, for example the dimensions of the system carrying the water, need to be controlled:&lt;br /&gt;
* Initially, to avoid the waste of thermal energy produced from the burning of fossil fuels (or generated from nuclear fission), knowledge of the heat capacity of water can be used to determine the optimal volume of water in which to heat based on the amount of energy generated from the burning of the fuel. &lt;br /&gt;
* The steam driving the turbine needs to be at a high pressure to ensure the turbine is being spun at a maximal rate. Knowledge of how the pressure of water varies with temperature as well as the volume of container is important in determining the required dimensions of the system containing the water, to ensure optimal steam pressure Furthermore, knowledge of how the phase transitions of water is vital in ensuring that the steam does not condense back to water before passing through the turbine.  &lt;br /&gt;
&lt;br /&gt;
Originally these properties would have been determined through experimentation, however today the use of molecular dynamics simulations allows their determination in a much more cheap and facile way. This investigation aims to demonstrate the versatility of molecular dynamics by simulating the thermodynamic properties of a few simple systems without setting foot in a laboratory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good motivation. The introduction (or theory section if there is a separate section for this) usually includes the background theory required for your reader to understand what you have done. This is included in your methodology section, which is usually instead a concise summary of your simulation details needed to reproduce your results. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Aims &amp;amp; Objectives==&lt;br /&gt;
To use computational modelling to determine key thermodynamic features of simple systems:&lt;br /&gt;
* Investigate the change in density of a system with varying temperature and pressure &lt;br /&gt;
* Investigate the change in constant volume heat capacity of a system with temperature&lt;br /&gt;
* Investigate the change in radial distribution function of a system in the solid, liquid and gas phases&lt;br /&gt;
* Determine the diffusion coefficient for a system in the solid, liquid and gas phases&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
This investigation uses the software LAMMPS (Large-scale Atomic/Molecular Massively Parallel Simulator), to run simulations on simple systems. &lt;br /&gt;
Trajectories of atoms were visualised using the software VMD (Visual Molecular Dynamics). &amp;lt;span style=color:red&amp;gt; A citation of LAMMPS would be good - it is a serious endeavour by many people and worthy of acknowledgement.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting up the system===&lt;br /&gt;
For the simulation of a simple liquid, initial coordinates for atoms cannot be randomly generated and therefore a crystal lattice (simple cubic) is generated which is then melted - the simulation is set to run and over time the atoms rearrange into a configuration of higher disorder more closely modelling a liquid. Atoms cannot be given random starting coordinates to model this liquid configuration as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
Other key specifications of the system are below:&lt;br /&gt;
* the mass of all atoms was set to 1.0&lt;br /&gt;
* the interaction between atoms in the system was modelled on a Leonard-Jones potential&lt;br /&gt;
* the cut-off distance was set to 3.0 in reduced units&lt;br /&gt;
* the pairwise force field coefficients were set to 1.0 for both the potential well depth and the zero-potential distance &lt;br /&gt;
* all atoms were assigned random velocities following the Maxwell-Boltzmann distribution&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; The last point is not necessary since you have done NPT/NVT calculations, the thermostat will equilibrate temperatures. It is also a very routine detail - assumed to be so.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating thermodynamic quantities===&lt;br /&gt;
The simulation measures thermodynamics properties of the system for example: total energy, temperature, pressure, mean squared displacement and the velocity auto-correlation function of the system, at certain time-steps for a certain number of runs. &lt;br /&gt;
&lt;br /&gt;
Before simulations were run to gather data, it was confirmed that the system reaches equilibrium. Graphs showing how total energy, temperature and pressure change with time for a time-step of 0.001 are displayed below. After approximately 0.3 seconds, the system reaches equilibrium and fluctuates around an equilibrium value for each of the properties. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Graphs/data proving the system is equilibrated is not usually shown in a scientific paper, unless there is cause - it is assumed this is done correctly. Simply &amp;quot;... were equilibrated for X time units at Y and Z&amp;quot; would be sufficient. These graphs/data would be more at home in the tasks section. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 1: Temperature as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 2: Pressure as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 3: Total energy as a function of time.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 time-steps were tested to determine the most adequate. Figure 4 to the right shows how the total energy changes over time for each of the 5 timesteps. It can be seen that a time-step of 0.0025 is the highest time-step that still gives an accurate equilibrium total energy, hence, this time-step was used in further simulations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|600px|thumb|right|Figure 4: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the equation of state of the model described above, by calculating the density of a NpT system at varying pressure and temperature. 2 pressures and 5 temperatures were chosen (p = 2.5, 2.75; T = 1.75, 2, 2, 2.25, 3, 5), and a simulation was run for each combination giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the change in constant volume heat capacity with temperature. 2 densities and 5 temperatures were chosen (&amp;lt;math&amp;gt;\rho&amp;lt;/math&amp;gt;= 0.2, 0.8; T = 2.0, 2.2, 2.4, 2.6, 2.8), giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to model the radial distribution function as a function of distance, using the software VMD. 3 simulations were run, each with a specified density and temperature correlating to a system in each of the 3 phases&amp;lt;ref name=&amp;quot;L-J Article&amp;quot; /&amp;gt;: solid, liquid and gas. &lt;br /&gt;
* Solid: Density = 1.25, Temperature = 1.0&lt;br /&gt;
* Liquid: Density = 0.8, Temperature = 1.2 &lt;br /&gt;
* Gas: Density = 0.025, Temperature = 1.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; You do not really need to specify VMD here - there are a host of programs that can calculate a RDF, and not so hard a program to write yourself. If you insist on specifying VMD, the full name and citation would be good.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mean squared displacement (MSD) and velocity autocorrelation function (VACF) were calculated using the same densities and temperatures specified above (same as RDF)  to model a system in each of the 3 phases. Both the MSD and VACF were used to calculate the diffusion coefficient (D) for each phase, using the following relationships.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{3}\int_0^\infty \mathrm{d}\tau \left\langle\mathbf{v}\left(0\right)\cdot\mathbf{v}\left(\tau\right)\right\rangle&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Results &amp;amp; Discussion==&lt;br /&gt;
===Equations of state===&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|center|Figure 5: Density as a function of temperature for a system at 2 different pressures, as well as the corresponding densities as predicted by the ideal gas law.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Scientific style: instead of e.g. &amp;quot;more closely models and ideal gas&amp;quot; perhaps something like &amp;quot;tends toward the ideal gas eq. of state in the high temperature limit. Also an explanation of why this is would be beneficial here - think about what happens in terms of phase space sampling at a given temperature. How could you connect that to the PES and PE/KE a given LJ particle has?  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Heat capacity at constant volume===&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|center|Figure 6: Constant volume heat capacity as a function of temperature for 2 different densities.]]&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
===Radial distribution function===&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|600px|thumb|center|Figure 7: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse with no order.&lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; A more quantitative discussion would be good.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Diffusion coefficient===&lt;br /&gt;
&amp;lt;b&amp;gt;MSD Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 8: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 9: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 10: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step for a system with 1,000,000 atoms are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 11: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 12: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 13: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 14: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure 10) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; A discussion of finite size effects - even if not a systematic investigation - would have been nice here. &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;VACF Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:FinaleJPW.png|350px|thumb|none|Figure 15: VACF as a function of time for the solid and liquid phases along with the 1D Harmonic oscillator.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|350px|thumb|none|Figure 16: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|350px|thumb|none|Figure 17: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The trapezium rule was used to calculate the integral of the VACF for each phase.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were then calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure 18.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 18: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 15), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms. &lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system. &lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Equation of state simulations, on a system of constant pressure determined that the density of a system at constant pressure decreased with increasing temperature. The simulated density is lower than that predicted by the ideal gas law as the system is not behaving ideally  (there are interactions between the particles), however this discrepancy decreases with increasing temperature.&lt;br /&gt;
&lt;br /&gt;
Heat capacity simulations showed the expected trend of heat capacity at constant volume decreasing with increasing temperature. Furthermore, heat capacity increases with increasing density as there are more particles and hence more energy states that need to be filled to increase the temperature, therefore requiring a larger amount of energy to do so.&lt;br /&gt;
&lt;br /&gt;
Radial distribution function simulations gave information about the coordination around particles in each phase. The solid has a regular ordered crystal structure and hence the radial distribution function displays many peaks. For liquids there is some short range order, shown by 4 peaks of decreasing intensity corresponding to 4 initial coordination shells around the liquid, however it decays quickly due to the ability of particles to diffuse away, resulting in very little long range order. For a gas, there is one initial coordination shell shown by the sharp initial peak, however it then decays to the bulk density value and remains constant due to the high diffusive nature of a gas, there is no long range order past this first coordination shell. &lt;br /&gt;
&lt;br /&gt;
Both methods of calculation of the diffusion coefficient give the expected results, with a gas having a large value, liquid a small value and the solid with a value close to 0. The values obtained from each method compare well to each other, as well as the values obtained from the 1,000,000 atom simulation. However, it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. Furthermore, the VACF method will have significant error due to the error in using the trapezium rule to calculate the integral of the VACF. &lt;br /&gt;
&lt;br /&gt;
In conclusion, molecular dynamics simulation has allowed fast and accurate &amp;lt;span style=color:red&amp;gt; how are you measuring accuracy. You would need to fit LJ parameters for a specific system, then compare to experiment or a higher accuracy simulation/theory. &amp;lt;/span&amp;gt; calculations of a range of key thermodynamic properties of a range of systems. It is clear that the use of these simulations is invaluable for the determination of these properties with applications in a range of industries, on key example being in the design of power stations. Furthermore, none of the simulations took longer than 5 minutes &amp;lt;span style=color:red&amp;gt; How long is a piece of string? Yes they are very cheap, but you cannot specify a time without giving the length of the simulations exactly, software package details (you did this), computer architecture etc. &amp;lt;/span&amp;gt; , illustrating another key benefit of using molecular dynamics simulations. In future calculations, calculations should be done on larger systems to acquire a more accurate average, as well as possibly introducing a second type of particle into the system to analyse how it effects the properties of the system.&amp;lt;span style=color:red&amp;gt; Nice that you&#039;ve attempted a small outlook. Perhaps think about the LJ model itself. Would you want to keep using larger and larger LJ systems. Would you want to use specific LJ parameters next time for a specific system? Or perhaps a different force field? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tasks==&lt;br /&gt;
The answers to all tasks are below, some have already been answered in the report above. &lt;br /&gt;
&lt;br /&gt;
===Introduction to molecular dynamics simulation===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by &amp;lt;math&amp;gt; x\left(t\right) = A\cos\left(\omega t + \phi\right)&amp;lt;/math&amp;gt; (the values of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:HO_1.png|350px|thumb|center|Figure 19: Analytical position as a function of time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO2.png|350px|thumb|center|Figure 20: Total energy as a function time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO3.png|350px|thumb|center|Figure 21: Error between the velocity-Verlet algorithm and analytical values as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHO4.png|500px|thumb|center|Figure 22: Error maximum as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; required time step for HO missing.   &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK:&amp;lt;/big&amp;gt; For a single Lennard-Jones interaction, &amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;, find the separation, &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt;, at which the potential energy is zero. What is the force at this separation? Find the equilibrium separation, &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, and work out the well depth (&amp;lt;math&amp;gt;\phi\left(r_{eq}\right)&amp;lt;/math&amp;gt;). Evaluate the integrals &amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\int_{2.5\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\int_{3\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;\sigma = \epsilon = 1.0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* The separation r&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; at which the potential energy is zero, is when &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The force at this separation is equal to &amp;lt;math&amp;gt;24\epsilon/\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The equilibrium separation &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;eq&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = 2&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;1/6&amp;lt;/sup&amp;gt;&amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The potential well depth is equal to &amp;lt;math&amp;gt;-\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
* Evaluation of integrals:&lt;br /&gt;
&lt;br /&gt;
[[File:Reallastboy.PNG|400px|none]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions. Estimate the volume of &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; water molecules under standard conditions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Assumptions:&lt;br /&gt;
* 1mL of water = 1g of water &lt;br /&gt;
&lt;br /&gt;
Number of water molecules in 1g:&lt;br /&gt;
* Moles in 1g = 1/18 &lt;br /&gt;
* Number of molecules = N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; x 1/18 = &amp;lt;b&amp;gt;3.35 x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Volume of 10000 water molecules:&lt;br /&gt;
* Moles = 10000/N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Mass = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt; x 18 = 2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;g&lt;br /&gt;
* Volume = &amp;lt;b&amp;gt;2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, &#039;&#039;after the periodic boundary conditions have been applied&#039;&#039;?&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
It ends up at the point with coordinates - &amp;lt;math&amp;gt;(0.2, 0.1, 0.7)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: The Lennard-Jones parameters for argon are &amp;lt;math&amp;gt;\sigma = 0.34\mathrm{nm}, \epsilon\ /\ k_B= 120 \mathrm{K}&amp;lt;/math&amp;gt;. If the LJ cutoff is &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;, what is it in real units? What is the well depth in &amp;lt;math&amp;gt;\mathrm{kJ\ mol}^{-1}&amp;lt;/math&amp;gt;? What is the reduced temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt; in real units?&lt;br /&gt;
&lt;br /&gt;
* LJ cutoff in real units &amp;lt;math&amp;gt;= 1.088 nm&amp;lt;/math&amp;gt;&lt;br /&gt;
* Well Depth &amp;lt;math&amp;gt;= 0.998 kJ mol&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Reduced Temperature &amp;lt;math&amp;gt; = 180K&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Equilibration===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Atoms cannot be given random starting coordinates as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &amp;lt;span style=color:red&amp;gt; Yes. but why is this a bad things in terms of the simulation? Under what simulation parameters would the system equilibrate correctly anyway? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For a face-centred cubic lattice with a lattice point density of 1.2, the side length of the cubic unit cell is 1.494.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A face-centred cubic lattice has 4 lattice points and hence four atoms, whereas a cubic lattice has 1 of each. Therefore, there would be 4000 atoms in a 10 x 10 x 10 box.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Line 1: Sets the mass of all atoms of type 1 to 1.0&lt;br /&gt;
* Line 2: States that the interaction between atoms is to be modelled on the Leonard-Jones potential with a cut off distance of 3.0&lt;br /&gt;
* Line 3: Sets the pairwise force field coefficients for all atoms, in this case, this is the well depth and the distance at 0 potential - both are set to 1.0&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet Algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The initial script sets the time-step as a variable which can be called later in the script, the second script does not do this. Therefore, if a simulation is to be run on a different time-step, the input file with the initial script only needs to change the time-step in one place (where the variable is defined). Whereas, in the second script, the time-step will have to be changed everywhere that it is used in the input file. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). Does the simulation reach equilibrium? How long does this take? When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results? Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 23: Temperature as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 24: Pressure as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 25: Total energy as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It takes approximately 0.3s for the system to reach equilibrium. &amp;lt;span style=color:red&amp;gt; seconds? I thought we were in LJ units.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|500px|thumb|none|Figure 26: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Of the 5 timesteps, 0.0025 is the largest to give acceptable results. A timestep of 0.015 is particularly bad as the system does not reach equilibrium at all. The other 4 time steps do all reach equilibrium however 0.001 and 0.0025 are the only two which reach an accurate equilibrium value for total energy.&lt;br /&gt;
&lt;br /&gt;
===Running simulations under specific conditions===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Choose 5 temperatures (above the critical temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt;), and two pressures (you can get a good idea of what a reasonable pressure is in Lennard-Jones units by looking at the average pressure of your simulations from the last section). This gives ten phase points &amp;amp;mdash; five temperatures at each pressure. Create 10 copies of npt.in, and modify each to run a simulation at one of your chosen &amp;lt;math&amp;gt;\left(p, T\right)&amp;lt;/math&amp;gt; points. You should be able to use the results of the previous section to choose a timestep. Submit these ten jobs to the HPC portal. While you wait for them to finish, you should read the next section.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Derivation_1_PictureJPW.PNG|400px|thumb|none|Figure 27: Derivation of velocity scaling factor &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. How often will values of the temperature, etc., be sampled for the average? How many measurements contribute to the average? Looking to the following line, how much time will you simulate?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The three numbers correspond Nevery, Nrepeat and Nfreq.&lt;br /&gt;
&lt;br /&gt;
* Nevery corresponds to how often input values are sampled for the average - for example, temperature will be sampled for the average every 100 timesteps.&lt;br /&gt;
* Nrepeat corresponds to the number of values used to calculate the average - in this case 1000 values (measurements) are used (contribute) to calculating the average.&lt;br /&gt;
* Nfreq corresponds to the timestep at which the average is calculated - the 100000th timestep.&lt;br /&gt;
&lt;br /&gt;
This therefore means that there are 100000 timesteps and with a timestep of 0.0025, the time simulated = 250 seconds. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.  Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|none|Figure 28: Density as a function of temperature for a system at 2 different pressures.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
===Calculating heat capacities using statistical physics===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|none|Figure 29: Constant volume heat capacity as a function of temperature.]]&lt;br /&gt;
&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
An example of the input script used can be found below:&lt;br /&gt;
&lt;br /&gt;
[[File:ExampleInputFileJPW.in]]&lt;br /&gt;
&lt;br /&gt;
===Structural properties and the radial distribution function===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. In the solid case, illustrate which lattice sites the first three peaks correspond to. What is the lattice spacing? What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|500px|thumb|none|Figure 30: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse and therefore the chance of finding another particle is equal to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; You did not answer the some of the question: In the solid case, illustrate which lattice sites the first three peaks correspond to. What is the lattice spacing? What is the coordination number for each of the first three peaks?&#039;&#039;&#039;. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic properties and the diffusion coefficient===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the D subfolder, there is a file &#039;&#039;liq.in&#039;&#039; that will run a simulation at specified density and temperature to calculate the mean squared displacement and velocity autocorrelation function of your system. Run one of these simulations for a vapour, liquid, and solid. You have also been given some simulated data from much larger systems (approximately one million atoms). You will need these files later.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 30: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 31: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 32: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 33: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 34: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 35: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 36: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure X) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent? Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? Attach a copy of your plot to your writeup.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The derivation for the normalised velocity autocorrelation function for a 1D harmonic oscillator is shown below, along with two trigonometric identities used in the derivation.&lt;br /&gt;
&lt;br /&gt;
[[File:Trigonometric_IdentitiesJPW.PNG|400px|thumb|none|Figure 37: Trigonometric identities used in derivation of VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
[[File:JPWD2.PNG|600px|thumb|none|Figure 38: Derivation of the VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
&lt;br /&gt;
A plot showing the VACF for the liquid and solid simulations, as well as for a 1D harmonic oscillator with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; is shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:FinaleJPW.png|600px|thumb|none|Figure 39: VACF as a function of timestep for the liquid and solid phases as well as for a 1D harmonic oscillator.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 39), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms.&lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the trapezium rule to approximate the integral under the velocity autocorrelation function for the solid, liquid, and gas, and use these values to estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. You should make a plot of the running integral in each case. Are they as you expect? Repeat this procedure for the VACF data that you were given from the one million atom simulations. What do you think is the largest source of error in your estimates of D from the VACF?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|400px|thumb|none|Figure 40: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|400px|thumb|none|Figure 41: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure X.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 42: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;L-J Article&amp;quot;&amp;gt;J.P.Hansen, L.Verlet, &amp;lt;i&amp;gt;Phys.Rev.&amp;lt;/i&amp;gt;, 1969, &amp;lt;b&amp;gt;184&amp;lt;/b&amp;gt;, 151&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696396</id>
		<title>User:Jpw115</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696396"/>
		<updated>2018-04-23T16:19:17Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Structural properties and the radial distribution function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=color:red&amp;gt; colour red &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Liquid Simulations - Jack Williams=&lt;br /&gt;
==Abstract==&lt;br /&gt;
Key thermodynamic properties of a system modelled on the Leonard-Jones potential were investigated using molecular dynamics simulation. Density and heat capacity were measured as functions of temperature to analyse how the system evolves with changing temperature, both were discovered to decrease with increasing temperature. Radial distribution functions were calculated to analyse the structure of the system in each of the 3 phases. It was discovered that solids, due to the crystalline fixed structure have high long range order, liquids have some order that decreases over time due to the ability of the particles to diffuse away, and gasses have negligible long range order due to the very low density of the gaseous system. The diffusion coefficient for each phase was measured using two methods, the mean squared displacement method (MSD) and the velocity autocorrelation method (VACF). Both produced the expected results of a high diffusion coefficient for a gas, fairly low for liquid and a diffusion coefficient close to zero for the solid phase. Both methods produced similar results, however due to the error in calculating the integral in the VACF method (trapezium rule), the values calculated using the MSD method are more accurate. These results compared well to simulations run on larger systems, which due to the larger amount of data contributing to the average, are more accurate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good abstract: tells the reader concisely what you did and your main results/conclusions. My only qualm is that saying you &amp;quot;discovered&amp;quot; long vs. short range order in the phases of matter seems like it is a novel result. Perhaps &amp;quot;verified&amp;quot; would have been better. This is a minor point though.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Knowledge and understanding of the thermodynamic properties of systems, for example the phase transitions, has a wide range of applications in a number of industries. One key industry in which this knowledge is vital for proper function, is in power generation, for example in fossil fuel power stations and nuclear power stations. Both types of station function via heating liquid water which then evaporates forming steam, which is used to turn a turbine connected to a generator which generates electrical energy. The steam then condenses back to liquid water to be re-used. &lt;br /&gt;
To maximise efficiency, certain factors, for example the dimensions of the system carrying the water, need to be controlled:&lt;br /&gt;
* Initially, to avoid the waste of thermal energy produced from the burning of fossil fuels (or generated from nuclear fission), knowledge of the heat capacity of water can be used to determine the optimal volume of water in which to heat based on the amount of energy generated from the burning of the fuel. &lt;br /&gt;
* The steam driving the turbine needs to be at a high pressure to ensure the turbine is being spun at a maximal rate. Knowledge of how the pressure of water varies with temperature as well as the volume of container is important in determining the required dimensions of the system containing the water, to ensure optimal steam pressure Furthermore, knowledge of how the phase transitions of water is vital in ensuring that the steam does not condense back to water before passing through the turbine.  &lt;br /&gt;
&lt;br /&gt;
Originally these properties would have been determined through experimentation, however today the use of molecular dynamics simulations allows their determination in a much more cheap and facile way. This investigation aims to demonstrate the versatility of molecular dynamics by simulating the thermodynamic properties of a few simple systems without setting foot in a laboratory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good motivation. The introduction (or theory section if there is a separate section for this) usually includes the background theory required for your reader to understand what you have done. This is included in your methodology section, which is usually instead a concise summary of your simulation details needed to reproduce your results. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Aims &amp;amp; Objectives==&lt;br /&gt;
To use computational modelling to determine key thermodynamic features of simple systems:&lt;br /&gt;
* Investigate the change in density of a system with varying temperature and pressure &lt;br /&gt;
* Investigate the change in constant volume heat capacity of a system with temperature&lt;br /&gt;
* Investigate the change in radial distribution function of a system in the solid, liquid and gas phases&lt;br /&gt;
* Determine the diffusion coefficient for a system in the solid, liquid and gas phases&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
This investigation uses the software LAMMPS (Large-scale Atomic/Molecular Massively Parallel Simulator), to run simulations on simple systems. &lt;br /&gt;
Trajectories of atoms were visualised using the software VMD (Visual Molecular Dynamics). &amp;lt;span style=color:red&amp;gt; A citation of LAMMPS would be good - it is a serious endeavour by many people and worthy of acknowledgement.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting up the system===&lt;br /&gt;
For the simulation of a simple liquid, initial coordinates for atoms cannot be randomly generated and therefore a crystal lattice (simple cubic) is generated which is then melted - the simulation is set to run and over time the atoms rearrange into a configuration of higher disorder more closely modelling a liquid. Atoms cannot be given random starting coordinates to model this liquid configuration as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
Other key specifications of the system are below:&lt;br /&gt;
* the mass of all atoms was set to 1.0&lt;br /&gt;
* the interaction between atoms in the system was modelled on a Leonard-Jones potential&lt;br /&gt;
* the cut-off distance was set to 3.0 in reduced units&lt;br /&gt;
* the pairwise force field coefficients were set to 1.0 for both the potential well depth and the zero-potential distance &lt;br /&gt;
* all atoms were assigned random velocities following the Maxwell-Boltzmann distribution&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; The last point is not necessary since you have done NPT/NVT calculations, the thermostat will equilibrate temperatures. It is also a very routine detail - assumed to be so.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating thermodynamic quantities===&lt;br /&gt;
The simulation measures thermodynamics properties of the system for example: total energy, temperature, pressure, mean squared displacement and the velocity auto-correlation function of the system, at certain time-steps for a certain number of runs. &lt;br /&gt;
&lt;br /&gt;
Before simulations were run to gather data, it was confirmed that the system reaches equilibrium. Graphs showing how total energy, temperature and pressure change with time for a time-step of 0.001 are displayed below. After approximately 0.3 seconds, the system reaches equilibrium and fluctuates around an equilibrium value for each of the properties. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Graphs/data proving the system is equilibrated is not usually shown in a scientific paper, unless there is cause - it is assumed this is done correctly. Simply &amp;quot;... were equilibrated for X time units at Y and Z&amp;quot; would be sufficient. These graphs/data would be more at home in the tasks section. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 1: Temperature as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 2: Pressure as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 3: Total energy as a function of time.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 time-steps were tested to determine the most adequate. Figure 4 to the right shows how the total energy changes over time for each of the 5 timesteps. It can be seen that a time-step of 0.0025 is the highest time-step that still gives an accurate equilibrium total energy, hence, this time-step was used in further simulations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|600px|thumb|right|Figure 4: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the equation of state of the model described above, by calculating the density of a NpT system at varying pressure and temperature. 2 pressures and 5 temperatures were chosen (p = 2.5, 2.75; T = 1.75, 2, 2, 2.25, 3, 5), and a simulation was run for each combination giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the change in constant volume heat capacity with temperature. 2 densities and 5 temperatures were chosen (&amp;lt;math&amp;gt;\rho&amp;lt;/math&amp;gt;= 0.2, 0.8; T = 2.0, 2.2, 2.4, 2.6, 2.8), giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to model the radial distribution function as a function of distance, using the software VMD. 3 simulations were run, each with a specified density and temperature correlating to a system in each of the 3 phases&amp;lt;ref name=&amp;quot;L-J Article&amp;quot; /&amp;gt;: solid, liquid and gas. &lt;br /&gt;
* Solid: Density = 1.25, Temperature = 1.0&lt;br /&gt;
* Liquid: Density = 0.8, Temperature = 1.2 &lt;br /&gt;
* Gas: Density = 0.025, Temperature = 1.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; You do not really need to specify VMD here - there are a host of programs that can calculate a RDF, and not so hard a program to write yourself. If you insist on specifying VMD, the full name and citation would be good.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mean squared displacement (MSD) and velocity autocorrelation function (VACF) were calculated using the same densities and temperatures specified above (same as RDF)  to model a system in each of the 3 phases. Both the MSD and VACF were used to calculate the diffusion coefficient (D) for each phase, using the following relationships.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{3}\int_0^\infty \mathrm{d}\tau \left\langle\mathbf{v}\left(0\right)\cdot\mathbf{v}\left(\tau\right)\right\rangle&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Results &amp;amp; Discussion==&lt;br /&gt;
===Equations of state===&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|center|Figure 5: Density as a function of temperature for a system at 2 different pressures, as well as the corresponding densities as predicted by the ideal gas law.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Scientific style: instead of e.g. &amp;quot;more closely models and ideal gas&amp;quot; perhaps something like &amp;quot;tends toward the ideal gas eq. of state in the high temperature limit. Also an explanation of why this is would be beneficial here - think about what happens in terms of phase space sampling at a given temperature. How could you connect that to the PES and PE/KE a given LJ particle has?  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Heat capacity at constant volume===&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|center|Figure 6: Constant volume heat capacity as a function of temperature for 2 different densities.]]&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
===Radial distribution function===&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|600px|thumb|center|Figure 7: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse with no order.&lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; A more quantitative discussion would be good.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Diffusion coefficient===&lt;br /&gt;
&amp;lt;b&amp;gt;MSD Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 8: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 9: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 10: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step for a system with 1,000,000 atoms are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 11: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 12: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 13: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 14: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure 10) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; A discussion of finite size effects - even if not a systematic investigation - would have been nice here. &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;VACF Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:FinaleJPW.png|350px|thumb|none|Figure 15: VACF as a function of time for the solid and liquid phases along with the 1D Harmonic oscillator.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|350px|thumb|none|Figure 16: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|350px|thumb|none|Figure 17: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The trapezium rule was used to calculate the integral of the VACF for each phase.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were then calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure 18.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 18: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 15), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms. &lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system. &lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Equation of state simulations, on a system of constant pressure determined that the density of a system at constant pressure decreased with increasing temperature. The simulated density is lower than that predicted by the ideal gas law as the system is not behaving ideally  (there are interactions between the particles), however this discrepancy decreases with increasing temperature.&lt;br /&gt;
&lt;br /&gt;
Heat capacity simulations showed the expected trend of heat capacity at constant volume decreasing with increasing temperature. Furthermore, heat capacity increases with increasing density as there are more particles and hence more energy states that need to be filled to increase the temperature, therefore requiring a larger amount of energy to do so.&lt;br /&gt;
&lt;br /&gt;
Radial distribution function simulations gave information about the coordination around particles in each phase. The solid has a regular ordered crystal structure and hence the radial distribution function displays many peaks. For liquids there is some short range order, shown by 4 peaks of decreasing intensity corresponding to 4 initial coordination shells around the liquid, however it decays quickly due to the ability of particles to diffuse away, resulting in very little long range order. For a gas, there is one initial coordination shell shown by the sharp initial peak, however it then decays to the bulk density value and remains constant due to the high diffusive nature of a gas, there is no long range order past this first coordination shell. &lt;br /&gt;
&lt;br /&gt;
Both methods of calculation of the diffusion coefficient give the expected results, with a gas having a large value, liquid a small value and the solid with a value close to 0. The values obtained from each method compare well to each other, as well as the values obtained from the 1,000,000 atom simulation. However, it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. Furthermore, the VACF method will have significant error due to the error in using the trapezium rule to calculate the integral of the VACF. &lt;br /&gt;
&lt;br /&gt;
In conclusion, molecular dynamics simulation has allowed fast and accurate &amp;lt;span style=color:red&amp;gt; how are you measuring accuracy. You would need to fit LJ parameters for a specific system, then compare to experiment or a higher accuracy simulation/theory. &amp;lt;/span&amp;gt; calculations of a range of key thermodynamic properties of a range of systems. It is clear that the use of these simulations is invaluable for the determination of these properties with applications in a range of industries, on key example being in the design of power stations. Furthermore, none of the simulations took longer than 5 minutes &amp;lt;span style=color:red&amp;gt; How long is a piece of string? Yes they are very cheap, but you cannot specify a time without giving the length of the simulations exactly, software package details (you did this), computer architecture etc. &amp;lt;/span&amp;gt; , illustrating another key benefit of using molecular dynamics simulations. In future calculations, calculations should be done on larger systems to acquire a more accurate average, as well as possibly introducing a second type of particle into the system to analyse how it effects the properties of the system.&amp;lt;span style=color:red&amp;gt; Nice that you&#039;ve attempted a small outlook. Perhaps think about the LJ model itself. Would you want to keep using larger and larger LJ systems. Would you want to use specific LJ parameters next time for a specific system? Or perhaps a different force field? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tasks==&lt;br /&gt;
The answers to all tasks are below, some have already been answered in the report above. &lt;br /&gt;
&lt;br /&gt;
===Introduction to molecular dynamics simulation===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by &amp;lt;math&amp;gt; x\left(t\right) = A\cos\left(\omega t + \phi\right)&amp;lt;/math&amp;gt; (the values of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:HO_1.png|350px|thumb|center|Figure 19: Analytical position as a function of time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO2.png|350px|thumb|center|Figure 20: Total energy as a function time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO3.png|350px|thumb|center|Figure 21: Error between the velocity-Verlet algorithm and analytical values as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHO4.png|500px|thumb|center|Figure 22: Error maximum as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; required time step for HO missing.   &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK:&amp;lt;/big&amp;gt; For a single Lennard-Jones interaction, &amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;, find the separation, &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt;, at which the potential energy is zero. What is the force at this separation? Find the equilibrium separation, &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, and work out the well depth (&amp;lt;math&amp;gt;\phi\left(r_{eq}\right)&amp;lt;/math&amp;gt;). Evaluate the integrals &amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\int_{2.5\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\int_{3\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;\sigma = \epsilon = 1.0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* The separation r&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; at which the potential energy is zero, is when &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The force at this separation is equal to &amp;lt;math&amp;gt;24\epsilon/\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The equilibrium separation &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;eq&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = 2&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;1/6&amp;lt;/sup&amp;gt;&amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The potential well depth is equal to &amp;lt;math&amp;gt;-\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
* Evaluation of integrals:&lt;br /&gt;
&lt;br /&gt;
[[File:Reallastboy.PNG|400px|none]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions. Estimate the volume of &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; water molecules under standard conditions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Assumptions:&lt;br /&gt;
* 1mL of water = 1g of water &lt;br /&gt;
&lt;br /&gt;
Number of water molecules in 1g:&lt;br /&gt;
* Moles in 1g = 1/18 &lt;br /&gt;
* Number of molecules = N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; x 1/18 = &amp;lt;b&amp;gt;3.35 x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Volume of 10000 water molecules:&lt;br /&gt;
* Moles = 10000/N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Mass = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt; x 18 = 2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;g&lt;br /&gt;
* Volume = &amp;lt;b&amp;gt;2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, &#039;&#039;after the periodic boundary conditions have been applied&#039;&#039;?&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
It ends up at the point with coordinates - &amp;lt;math&amp;gt;(0.2, 0.1, 0.7)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: The Lennard-Jones parameters for argon are &amp;lt;math&amp;gt;\sigma = 0.34\mathrm{nm}, \epsilon\ /\ k_B= 120 \mathrm{K}&amp;lt;/math&amp;gt;. If the LJ cutoff is &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;, what is it in real units? What is the well depth in &amp;lt;math&amp;gt;\mathrm{kJ\ mol}^{-1}&amp;lt;/math&amp;gt;? What is the reduced temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt; in real units?&lt;br /&gt;
&lt;br /&gt;
* LJ cutoff in real units &amp;lt;math&amp;gt;= 1.088 nm&amp;lt;/math&amp;gt;&lt;br /&gt;
* Well Depth &amp;lt;math&amp;gt;= 0.998 kJ mol&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Reduced Temperature &amp;lt;math&amp;gt; = 180K&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Equilibration===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Atoms cannot be given random starting coordinates as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &amp;lt;span style=color:red&amp;gt; Yes. but why is this a bad things in terms of the simulation? Under what simulation parameters would the system equilibrate correctly anyway? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For a face-centred cubic lattice with a lattice point density of 1.2, the side length of the cubic unit cell is 1.494.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A face-centred cubic lattice has 4 lattice points and hence four atoms, whereas a cubic lattice has 1 of each. Therefore, there would be 4000 atoms in a 10 x 10 x 10 box.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Line 1: Sets the mass of all atoms of type 1 to 1.0&lt;br /&gt;
* Line 2: States that the interaction between atoms is to be modelled on the Leonard-Jones potential with a cut off distance of 3.0&lt;br /&gt;
* Line 3: Sets the pairwise force field coefficients for all atoms, in this case, this is the well depth and the distance at 0 potential - both are set to 1.0&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet Algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The initial script sets the time-step as a variable which can be called later in the script, the second script does not do this. Therefore, if a simulation is to be run on a different time-step, the input file with the initial script only needs to change the time-step in one place (where the variable is defined). Whereas, in the second script, the time-step will have to be changed everywhere that it is used in the input file. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). Does the simulation reach equilibrium? How long does this take? When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results? Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 23: Temperature as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 24: Pressure as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 25: Total energy as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It takes approximately 0.3s for the system to reach equilibrium. &amp;lt;span style=color:red&amp;gt; seconds? I thought we were in LJ units.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|500px|thumb|none|Figure 26: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Of the 5 timesteps, 0.0025 is the largest to give acceptable results. A timestep of 0.015 is particularly bad as the system does not reach equilibrium at all. The other 4 time steps do all reach equilibrium however 0.001 and 0.0025 are the only two which reach an accurate equilibrium value for total energy.&lt;br /&gt;
&lt;br /&gt;
===Running simulations under specific conditions===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Choose 5 temperatures (above the critical temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt;), and two pressures (you can get a good idea of what a reasonable pressure is in Lennard-Jones units by looking at the average pressure of your simulations from the last section). This gives ten phase points &amp;amp;mdash; five temperatures at each pressure. Create 10 copies of npt.in, and modify each to run a simulation at one of your chosen &amp;lt;math&amp;gt;\left(p, T\right)&amp;lt;/math&amp;gt; points. You should be able to use the results of the previous section to choose a timestep. Submit these ten jobs to the HPC portal. While you wait for them to finish, you should read the next section.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Derivation_1_PictureJPW.PNG|400px|thumb|none|Figure 27: Derivation of velocity scaling factor &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. How often will values of the temperature, etc., be sampled for the average? How many measurements contribute to the average? Looking to the following line, how much time will you simulate?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The three numbers correspond Nevery, Nrepeat and Nfreq.&lt;br /&gt;
&lt;br /&gt;
* Nevery corresponds to how often input values are sampled for the average - for example, temperature will be sampled for the average every 100 timesteps.&lt;br /&gt;
* Nrepeat corresponds to the number of values used to calculate the average - in this case 1000 values (measurements) are used (contribute) to calculating the average.&lt;br /&gt;
* Nfreq corresponds to the timestep at which the average is calculated - the 100000th timestep.&lt;br /&gt;
&lt;br /&gt;
This therefore means that there are 100000 timesteps and with a timestep of 0.0025, the time simulated = 250 seconds. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.  Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|none|Figure 28: Density as a function of temperature for a system at 2 different pressures.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
===Calculating heat capacities using statistical physics===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|none|Figure 29: Constant volume heat capacity as a function of temperature.]]&lt;br /&gt;
&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
An example of the input script used can be found below:&lt;br /&gt;
&lt;br /&gt;
[[File:ExampleInputFileJPW.in]]&lt;br /&gt;
&lt;br /&gt;
===Structural properties and the radial distribution function===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. In the solid case, illustrate which lattice sites the first three peaks correspond to. What is the lattice spacing? What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|500px|thumb|none|Figure 30: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse and therefore the chance of finding another particle is equal to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; You did not answer the some of the question: In the solid case, illustrate which lattice sites the first three peaks correspond to. What is the lattice spacing? What is the coordination number for each of the first three peaks?&#039;&#039;&#039;. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic properties and the diffusion coefficient===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the D subfolder, there is a file &#039;&#039;liq.in&#039;&#039; that will run a simulation at specified density and temperature to calculate the mean squared displacement and velocity autocorrelation function of your system. Run one of these simulations for a vapour, liquid, and solid. You have also been given some simulated data from much larger systems (approximately one million atoms). You will need these files later.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 30: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 31: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 32: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 33: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 34: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 35: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 36: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure X) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent? Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? Attach a copy of your plot to your writeup.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The derivation for the normalised velocity autocorrelation function for a 1D harmonic oscillator is shown below, along with two trigonometric identities used in the derivation.&lt;br /&gt;
&lt;br /&gt;
[[File:Trigonometric_IdentitiesJPW.PNG|400px|thumb|none|Figure 37: Trigonometric identities used in derivation of VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
[[File:JPWD2.PNG|600px|thumb|none|Figure 38: Derivation of the VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
&lt;br /&gt;
A plot showing the VACF for the liquid and solid simulations, as well as for a 1D harmonic oscillator with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; is shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:FinaleJPW.png|600px|thumb|none|Figure 39: VACF as a function of timestep for the liquid and solid phases as well as for a 1D harmonic oscillator.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 39), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms.&lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the trapezium rule to approximate the integral under the velocity autocorrelation function for the solid, liquid, and gas, and use these values to estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. You should make a plot of the running integral in each case. Are they as you expect? Repeat this procedure for the VACF data that you were given from the one million atom simulations. What do you think is the largest source of error in your estimates of D from the VACF?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|400px|thumb|none|Figure 40: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|400px|thumb|none|Figure 41: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure X.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 42: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;L-J Article&amp;quot;&amp;gt;J.P.Hansen, L.Verlet, &amp;lt;i&amp;gt;Phys.Rev.&amp;lt;/i&amp;gt;, 1969, &amp;lt;b&amp;gt;184&amp;lt;/b&amp;gt;, 151&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696395</id>
		<title>User:Jpw115</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696395"/>
		<updated>2018-04-23T16:17:15Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Equilibration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=color:red&amp;gt; colour red &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Liquid Simulations - Jack Williams=&lt;br /&gt;
==Abstract==&lt;br /&gt;
Key thermodynamic properties of a system modelled on the Leonard-Jones potential were investigated using molecular dynamics simulation. Density and heat capacity were measured as functions of temperature to analyse how the system evolves with changing temperature, both were discovered to decrease with increasing temperature. Radial distribution functions were calculated to analyse the structure of the system in each of the 3 phases. It was discovered that solids, due to the crystalline fixed structure have high long range order, liquids have some order that decreases over time due to the ability of the particles to diffuse away, and gasses have negligible long range order due to the very low density of the gaseous system. The diffusion coefficient for each phase was measured using two methods, the mean squared displacement method (MSD) and the velocity autocorrelation method (VACF). Both produced the expected results of a high diffusion coefficient for a gas, fairly low for liquid and a diffusion coefficient close to zero for the solid phase. Both methods produced similar results, however due to the error in calculating the integral in the VACF method (trapezium rule), the values calculated using the MSD method are more accurate. These results compared well to simulations run on larger systems, which due to the larger amount of data contributing to the average, are more accurate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good abstract: tells the reader concisely what you did and your main results/conclusions. My only qualm is that saying you &amp;quot;discovered&amp;quot; long vs. short range order in the phases of matter seems like it is a novel result. Perhaps &amp;quot;verified&amp;quot; would have been better. This is a minor point though.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Knowledge and understanding of the thermodynamic properties of systems, for example the phase transitions, has a wide range of applications in a number of industries. One key industry in which this knowledge is vital for proper function, is in power generation, for example in fossil fuel power stations and nuclear power stations. Both types of station function via heating liquid water which then evaporates forming steam, which is used to turn a turbine connected to a generator which generates electrical energy. The steam then condenses back to liquid water to be re-used. &lt;br /&gt;
To maximise efficiency, certain factors, for example the dimensions of the system carrying the water, need to be controlled:&lt;br /&gt;
* Initially, to avoid the waste of thermal energy produced from the burning of fossil fuels (or generated from nuclear fission), knowledge of the heat capacity of water can be used to determine the optimal volume of water in which to heat based on the amount of energy generated from the burning of the fuel. &lt;br /&gt;
* The steam driving the turbine needs to be at a high pressure to ensure the turbine is being spun at a maximal rate. Knowledge of how the pressure of water varies with temperature as well as the volume of container is important in determining the required dimensions of the system containing the water, to ensure optimal steam pressure Furthermore, knowledge of how the phase transitions of water is vital in ensuring that the steam does not condense back to water before passing through the turbine.  &lt;br /&gt;
&lt;br /&gt;
Originally these properties would have been determined through experimentation, however today the use of molecular dynamics simulations allows their determination in a much more cheap and facile way. This investigation aims to demonstrate the versatility of molecular dynamics by simulating the thermodynamic properties of a few simple systems without setting foot in a laboratory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good motivation. The introduction (or theory section if there is a separate section for this) usually includes the background theory required for your reader to understand what you have done. This is included in your methodology section, which is usually instead a concise summary of your simulation details needed to reproduce your results. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Aims &amp;amp; Objectives==&lt;br /&gt;
To use computational modelling to determine key thermodynamic features of simple systems:&lt;br /&gt;
* Investigate the change in density of a system with varying temperature and pressure &lt;br /&gt;
* Investigate the change in constant volume heat capacity of a system with temperature&lt;br /&gt;
* Investigate the change in radial distribution function of a system in the solid, liquid and gas phases&lt;br /&gt;
* Determine the diffusion coefficient for a system in the solid, liquid and gas phases&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
This investigation uses the software LAMMPS (Large-scale Atomic/Molecular Massively Parallel Simulator), to run simulations on simple systems. &lt;br /&gt;
Trajectories of atoms were visualised using the software VMD (Visual Molecular Dynamics). &amp;lt;span style=color:red&amp;gt; A citation of LAMMPS would be good - it is a serious endeavour by many people and worthy of acknowledgement.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting up the system===&lt;br /&gt;
For the simulation of a simple liquid, initial coordinates for atoms cannot be randomly generated and therefore a crystal lattice (simple cubic) is generated which is then melted - the simulation is set to run and over time the atoms rearrange into a configuration of higher disorder more closely modelling a liquid. Atoms cannot be given random starting coordinates to model this liquid configuration as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
Other key specifications of the system are below:&lt;br /&gt;
* the mass of all atoms was set to 1.0&lt;br /&gt;
* the interaction between atoms in the system was modelled on a Leonard-Jones potential&lt;br /&gt;
* the cut-off distance was set to 3.0 in reduced units&lt;br /&gt;
* the pairwise force field coefficients were set to 1.0 for both the potential well depth and the zero-potential distance &lt;br /&gt;
* all atoms were assigned random velocities following the Maxwell-Boltzmann distribution&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; The last point is not necessary since you have done NPT/NVT calculations, the thermostat will equilibrate temperatures. It is also a very routine detail - assumed to be so.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating thermodynamic quantities===&lt;br /&gt;
The simulation measures thermodynamics properties of the system for example: total energy, temperature, pressure, mean squared displacement and the velocity auto-correlation function of the system, at certain time-steps for a certain number of runs. &lt;br /&gt;
&lt;br /&gt;
Before simulations were run to gather data, it was confirmed that the system reaches equilibrium. Graphs showing how total energy, temperature and pressure change with time for a time-step of 0.001 are displayed below. After approximately 0.3 seconds, the system reaches equilibrium and fluctuates around an equilibrium value for each of the properties. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Graphs/data proving the system is equilibrated is not usually shown in a scientific paper, unless there is cause - it is assumed this is done correctly. Simply &amp;quot;... were equilibrated for X time units at Y and Z&amp;quot; would be sufficient. These graphs/data would be more at home in the tasks section. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 1: Temperature as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 2: Pressure as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 3: Total energy as a function of time.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 time-steps were tested to determine the most adequate. Figure 4 to the right shows how the total energy changes over time for each of the 5 timesteps. It can be seen that a time-step of 0.0025 is the highest time-step that still gives an accurate equilibrium total energy, hence, this time-step was used in further simulations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|600px|thumb|right|Figure 4: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the equation of state of the model described above, by calculating the density of a NpT system at varying pressure and temperature. 2 pressures and 5 temperatures were chosen (p = 2.5, 2.75; T = 1.75, 2, 2, 2.25, 3, 5), and a simulation was run for each combination giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the change in constant volume heat capacity with temperature. 2 densities and 5 temperatures were chosen (&amp;lt;math&amp;gt;\rho&amp;lt;/math&amp;gt;= 0.2, 0.8; T = 2.0, 2.2, 2.4, 2.6, 2.8), giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to model the radial distribution function as a function of distance, using the software VMD. 3 simulations were run, each with a specified density and temperature correlating to a system in each of the 3 phases&amp;lt;ref name=&amp;quot;L-J Article&amp;quot; /&amp;gt;: solid, liquid and gas. &lt;br /&gt;
* Solid: Density = 1.25, Temperature = 1.0&lt;br /&gt;
* Liquid: Density = 0.8, Temperature = 1.2 &lt;br /&gt;
* Gas: Density = 0.025, Temperature = 1.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; You do not really need to specify VMD here - there are a host of programs that can calculate a RDF, and not so hard a program to write yourself. If you insist on specifying VMD, the full name and citation would be good.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mean squared displacement (MSD) and velocity autocorrelation function (VACF) were calculated using the same densities and temperatures specified above (same as RDF)  to model a system in each of the 3 phases. Both the MSD and VACF were used to calculate the diffusion coefficient (D) for each phase, using the following relationships.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{3}\int_0^\infty \mathrm{d}\tau \left\langle\mathbf{v}\left(0\right)\cdot\mathbf{v}\left(\tau\right)\right\rangle&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Results &amp;amp; Discussion==&lt;br /&gt;
===Equations of state===&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|center|Figure 5: Density as a function of temperature for a system at 2 different pressures, as well as the corresponding densities as predicted by the ideal gas law.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Scientific style: instead of e.g. &amp;quot;more closely models and ideal gas&amp;quot; perhaps something like &amp;quot;tends toward the ideal gas eq. of state in the high temperature limit. Also an explanation of why this is would be beneficial here - think about what happens in terms of phase space sampling at a given temperature. How could you connect that to the PES and PE/KE a given LJ particle has?  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Heat capacity at constant volume===&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|center|Figure 6: Constant volume heat capacity as a function of temperature for 2 different densities.]]&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
===Radial distribution function===&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|600px|thumb|center|Figure 7: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse with no order.&lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; A more quantitative discussion would be good.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Diffusion coefficient===&lt;br /&gt;
&amp;lt;b&amp;gt;MSD Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 8: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 9: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 10: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step for a system with 1,000,000 atoms are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 11: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 12: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 13: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 14: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure 10) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; A discussion of finite size effects - even if not a systematic investigation - would have been nice here. &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;VACF Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:FinaleJPW.png|350px|thumb|none|Figure 15: VACF as a function of time for the solid and liquid phases along with the 1D Harmonic oscillator.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|350px|thumb|none|Figure 16: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|350px|thumb|none|Figure 17: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The trapezium rule was used to calculate the integral of the VACF for each phase.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were then calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure 18.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 18: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 15), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms. &lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system. &lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Equation of state simulations, on a system of constant pressure determined that the density of a system at constant pressure decreased with increasing temperature. The simulated density is lower than that predicted by the ideal gas law as the system is not behaving ideally  (there are interactions between the particles), however this discrepancy decreases with increasing temperature.&lt;br /&gt;
&lt;br /&gt;
Heat capacity simulations showed the expected trend of heat capacity at constant volume decreasing with increasing temperature. Furthermore, heat capacity increases with increasing density as there are more particles and hence more energy states that need to be filled to increase the temperature, therefore requiring a larger amount of energy to do so.&lt;br /&gt;
&lt;br /&gt;
Radial distribution function simulations gave information about the coordination around particles in each phase. The solid has a regular ordered crystal structure and hence the radial distribution function displays many peaks. For liquids there is some short range order, shown by 4 peaks of decreasing intensity corresponding to 4 initial coordination shells around the liquid, however it decays quickly due to the ability of particles to diffuse away, resulting in very little long range order. For a gas, there is one initial coordination shell shown by the sharp initial peak, however it then decays to the bulk density value and remains constant due to the high diffusive nature of a gas, there is no long range order past this first coordination shell. &lt;br /&gt;
&lt;br /&gt;
Both methods of calculation of the diffusion coefficient give the expected results, with a gas having a large value, liquid a small value and the solid with a value close to 0. The values obtained from each method compare well to each other, as well as the values obtained from the 1,000,000 atom simulation. However, it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. Furthermore, the VACF method will have significant error due to the error in using the trapezium rule to calculate the integral of the VACF. &lt;br /&gt;
&lt;br /&gt;
In conclusion, molecular dynamics simulation has allowed fast and accurate &amp;lt;span style=color:red&amp;gt; how are you measuring accuracy. You would need to fit LJ parameters for a specific system, then compare to experiment or a higher accuracy simulation/theory. &amp;lt;/span&amp;gt; calculations of a range of key thermodynamic properties of a range of systems. It is clear that the use of these simulations is invaluable for the determination of these properties with applications in a range of industries, on key example being in the design of power stations. Furthermore, none of the simulations took longer than 5 minutes &amp;lt;span style=color:red&amp;gt; How long is a piece of string? Yes they are very cheap, but you cannot specify a time without giving the length of the simulations exactly, software package details (you did this), computer architecture etc. &amp;lt;/span&amp;gt; , illustrating another key benefit of using molecular dynamics simulations. In future calculations, calculations should be done on larger systems to acquire a more accurate average, as well as possibly introducing a second type of particle into the system to analyse how it effects the properties of the system.&amp;lt;span style=color:red&amp;gt; Nice that you&#039;ve attempted a small outlook. Perhaps think about the LJ model itself. Would you want to keep using larger and larger LJ systems. Would you want to use specific LJ parameters next time for a specific system? Or perhaps a different force field? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tasks==&lt;br /&gt;
The answers to all tasks are below, some have already been answered in the report above. &lt;br /&gt;
&lt;br /&gt;
===Introduction to molecular dynamics simulation===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by &amp;lt;math&amp;gt; x\left(t\right) = A\cos\left(\omega t + \phi\right)&amp;lt;/math&amp;gt; (the values of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:HO_1.png|350px|thumb|center|Figure 19: Analytical position as a function of time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO2.png|350px|thumb|center|Figure 20: Total energy as a function time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO3.png|350px|thumb|center|Figure 21: Error between the velocity-Verlet algorithm and analytical values as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHO4.png|500px|thumb|center|Figure 22: Error maximum as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; required time step for HO missing.   &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK:&amp;lt;/big&amp;gt; For a single Lennard-Jones interaction, &amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;, find the separation, &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt;, at which the potential energy is zero. What is the force at this separation? Find the equilibrium separation, &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, and work out the well depth (&amp;lt;math&amp;gt;\phi\left(r_{eq}\right)&amp;lt;/math&amp;gt;). Evaluate the integrals &amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\int_{2.5\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\int_{3\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;\sigma = \epsilon = 1.0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* The separation r&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; at which the potential energy is zero, is when &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The force at this separation is equal to &amp;lt;math&amp;gt;24\epsilon/\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The equilibrium separation &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;eq&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = 2&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;1/6&amp;lt;/sup&amp;gt;&amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The potential well depth is equal to &amp;lt;math&amp;gt;-\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
* Evaluation of integrals:&lt;br /&gt;
&lt;br /&gt;
[[File:Reallastboy.PNG|400px|none]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions. Estimate the volume of &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; water molecules under standard conditions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Assumptions:&lt;br /&gt;
* 1mL of water = 1g of water &lt;br /&gt;
&lt;br /&gt;
Number of water molecules in 1g:&lt;br /&gt;
* Moles in 1g = 1/18 &lt;br /&gt;
* Number of molecules = N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; x 1/18 = &amp;lt;b&amp;gt;3.35 x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Volume of 10000 water molecules:&lt;br /&gt;
* Moles = 10000/N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Mass = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt; x 18 = 2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;g&lt;br /&gt;
* Volume = &amp;lt;b&amp;gt;2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, &#039;&#039;after the periodic boundary conditions have been applied&#039;&#039;?&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
It ends up at the point with coordinates - &amp;lt;math&amp;gt;(0.2, 0.1, 0.7)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: The Lennard-Jones parameters for argon are &amp;lt;math&amp;gt;\sigma = 0.34\mathrm{nm}, \epsilon\ /\ k_B= 120 \mathrm{K}&amp;lt;/math&amp;gt;. If the LJ cutoff is &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;, what is it in real units? What is the well depth in &amp;lt;math&amp;gt;\mathrm{kJ\ mol}^{-1}&amp;lt;/math&amp;gt;? What is the reduced temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt; in real units?&lt;br /&gt;
&lt;br /&gt;
* LJ cutoff in real units &amp;lt;math&amp;gt;= 1.088 nm&amp;lt;/math&amp;gt;&lt;br /&gt;
* Well Depth &amp;lt;math&amp;gt;= 0.998 kJ mol&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Reduced Temperature &amp;lt;math&amp;gt; = 180K&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Equilibration===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Atoms cannot be given random starting coordinates as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &amp;lt;span style=color:red&amp;gt; Yes. but why is this a bad things in terms of the simulation? Under what simulation parameters would the system equilibrate correctly anyway? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For a face-centred cubic lattice with a lattice point density of 1.2, the side length of the cubic unit cell is 1.494.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A face-centred cubic lattice has 4 lattice points and hence four atoms, whereas a cubic lattice has 1 of each. Therefore, there would be 4000 atoms in a 10 x 10 x 10 box.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Line 1: Sets the mass of all atoms of type 1 to 1.0&lt;br /&gt;
* Line 2: States that the interaction between atoms is to be modelled on the Leonard-Jones potential with a cut off distance of 3.0&lt;br /&gt;
* Line 3: Sets the pairwise force field coefficients for all atoms, in this case, this is the well depth and the distance at 0 potential - both are set to 1.0&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet Algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The initial script sets the time-step as a variable which can be called later in the script, the second script does not do this. Therefore, if a simulation is to be run on a different time-step, the input file with the initial script only needs to change the time-step in one place (where the variable is defined). Whereas, in the second script, the time-step will have to be changed everywhere that it is used in the input file. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). Does the simulation reach equilibrium? How long does this take? When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results? Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 23: Temperature as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 24: Pressure as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 25: Total energy as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It takes approximately 0.3s for the system to reach equilibrium. &amp;lt;span style=color:red&amp;gt; seconds? I thought we were in LJ units.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|500px|thumb|none|Figure 26: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Of the 5 timesteps, 0.0025 is the largest to give acceptable results. A timestep of 0.015 is particularly bad as the system does not reach equilibrium at all. The other 4 time steps do all reach equilibrium however 0.001 and 0.0025 are the only two which reach an accurate equilibrium value for total energy.&lt;br /&gt;
&lt;br /&gt;
===Running simulations under specific conditions===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Choose 5 temperatures (above the critical temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt;), and two pressures (you can get a good idea of what a reasonable pressure is in Lennard-Jones units by looking at the average pressure of your simulations from the last section). This gives ten phase points &amp;amp;mdash; five temperatures at each pressure. Create 10 copies of npt.in, and modify each to run a simulation at one of your chosen &amp;lt;math&amp;gt;\left(p, T\right)&amp;lt;/math&amp;gt; points. You should be able to use the results of the previous section to choose a timestep. Submit these ten jobs to the HPC portal. While you wait for them to finish, you should read the next section.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Derivation_1_PictureJPW.PNG|400px|thumb|none|Figure 27: Derivation of velocity scaling factor &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. How often will values of the temperature, etc., be sampled for the average? How many measurements contribute to the average? Looking to the following line, how much time will you simulate?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The three numbers correspond Nevery, Nrepeat and Nfreq.&lt;br /&gt;
&lt;br /&gt;
* Nevery corresponds to how often input values are sampled for the average - for example, temperature will be sampled for the average every 100 timesteps.&lt;br /&gt;
* Nrepeat corresponds to the number of values used to calculate the average - in this case 1000 values (measurements) are used (contribute) to calculating the average.&lt;br /&gt;
* Nfreq corresponds to the timestep at which the average is calculated - the 100000th timestep.&lt;br /&gt;
&lt;br /&gt;
This therefore means that there are 100000 timesteps and with a timestep of 0.0025, the time simulated = 250 seconds. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.  Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|none|Figure 28: Density as a function of temperature for a system at 2 different pressures.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
===Calculating heat capacities using statistical physics===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|none|Figure 29: Constant volume heat capacity as a function of temperature.]]&lt;br /&gt;
&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
An example of the input script used can be found below:&lt;br /&gt;
&lt;br /&gt;
[[File:ExampleInputFileJPW.in]]&lt;br /&gt;
&lt;br /&gt;
===Structural properties and the radial distribution function===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. In the solid case, illustrate which lattice sites the first three peaks correspond to. What is the lattice spacing? What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|500px|thumb|none|Figure 30: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse and therefore the chance of finding another particle is equal to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
===Dynamic properties and the diffusion coefficient===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the D subfolder, there is a file &#039;&#039;liq.in&#039;&#039; that will run a simulation at specified density and temperature to calculate the mean squared displacement and velocity autocorrelation function of your system. Run one of these simulations for a vapour, liquid, and solid. You have also been given some simulated data from much larger systems (approximately one million atoms). You will need these files later.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 30: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 31: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 32: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 33: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 34: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 35: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 36: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure X) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent? Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? Attach a copy of your plot to your writeup.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The derivation for the normalised velocity autocorrelation function for a 1D harmonic oscillator is shown below, along with two trigonometric identities used in the derivation.&lt;br /&gt;
&lt;br /&gt;
[[File:Trigonometric_IdentitiesJPW.PNG|400px|thumb|none|Figure 37: Trigonometric identities used in derivation of VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
[[File:JPWD2.PNG|600px|thumb|none|Figure 38: Derivation of the VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
&lt;br /&gt;
A plot showing the VACF for the liquid and solid simulations, as well as for a 1D harmonic oscillator with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; is shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:FinaleJPW.png|600px|thumb|none|Figure 39: VACF as a function of timestep for the liquid and solid phases as well as for a 1D harmonic oscillator.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 39), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms.&lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the trapezium rule to approximate the integral under the velocity autocorrelation function for the solid, liquid, and gas, and use these values to estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. You should make a plot of the running integral in each case. Are they as you expect? Repeat this procedure for the VACF data that you were given from the one million atom simulations. What do you think is the largest source of error in your estimates of D from the VACF?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|400px|thumb|none|Figure 40: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|400px|thumb|none|Figure 41: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure X.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 42: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;L-J Article&amp;quot;&amp;gt;J.P.Hansen, L.Verlet, &amp;lt;i&amp;gt;Phys.Rev.&amp;lt;/i&amp;gt;, 1969, &amp;lt;b&amp;gt;184&amp;lt;/b&amp;gt;, 151&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696394</id>
		<title>User:Jpw115</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696394"/>
		<updated>2018-04-23T16:15:48Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Equilibration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=color:red&amp;gt; colour red &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Liquid Simulations - Jack Williams=&lt;br /&gt;
==Abstract==&lt;br /&gt;
Key thermodynamic properties of a system modelled on the Leonard-Jones potential were investigated using molecular dynamics simulation. Density and heat capacity were measured as functions of temperature to analyse how the system evolves with changing temperature, both were discovered to decrease with increasing temperature. Radial distribution functions were calculated to analyse the structure of the system in each of the 3 phases. It was discovered that solids, due to the crystalline fixed structure have high long range order, liquids have some order that decreases over time due to the ability of the particles to diffuse away, and gasses have negligible long range order due to the very low density of the gaseous system. The diffusion coefficient for each phase was measured using two methods, the mean squared displacement method (MSD) and the velocity autocorrelation method (VACF). Both produced the expected results of a high diffusion coefficient for a gas, fairly low for liquid and a diffusion coefficient close to zero for the solid phase. Both methods produced similar results, however due to the error in calculating the integral in the VACF method (trapezium rule), the values calculated using the MSD method are more accurate. These results compared well to simulations run on larger systems, which due to the larger amount of data contributing to the average, are more accurate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good abstract: tells the reader concisely what you did and your main results/conclusions. My only qualm is that saying you &amp;quot;discovered&amp;quot; long vs. short range order in the phases of matter seems like it is a novel result. Perhaps &amp;quot;verified&amp;quot; would have been better. This is a minor point though.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Knowledge and understanding of the thermodynamic properties of systems, for example the phase transitions, has a wide range of applications in a number of industries. One key industry in which this knowledge is vital for proper function, is in power generation, for example in fossil fuel power stations and nuclear power stations. Both types of station function via heating liquid water which then evaporates forming steam, which is used to turn a turbine connected to a generator which generates electrical energy. The steam then condenses back to liquid water to be re-used. &lt;br /&gt;
To maximise efficiency, certain factors, for example the dimensions of the system carrying the water, need to be controlled:&lt;br /&gt;
* Initially, to avoid the waste of thermal energy produced from the burning of fossil fuels (or generated from nuclear fission), knowledge of the heat capacity of water can be used to determine the optimal volume of water in which to heat based on the amount of energy generated from the burning of the fuel. &lt;br /&gt;
* The steam driving the turbine needs to be at a high pressure to ensure the turbine is being spun at a maximal rate. Knowledge of how the pressure of water varies with temperature as well as the volume of container is important in determining the required dimensions of the system containing the water, to ensure optimal steam pressure Furthermore, knowledge of how the phase transitions of water is vital in ensuring that the steam does not condense back to water before passing through the turbine.  &lt;br /&gt;
&lt;br /&gt;
Originally these properties would have been determined through experimentation, however today the use of molecular dynamics simulations allows their determination in a much more cheap and facile way. This investigation aims to demonstrate the versatility of molecular dynamics by simulating the thermodynamic properties of a few simple systems without setting foot in a laboratory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good motivation. The introduction (or theory section if there is a separate section for this) usually includes the background theory required for your reader to understand what you have done. This is included in your methodology section, which is usually instead a concise summary of your simulation details needed to reproduce your results. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Aims &amp;amp; Objectives==&lt;br /&gt;
To use computational modelling to determine key thermodynamic features of simple systems:&lt;br /&gt;
* Investigate the change in density of a system with varying temperature and pressure &lt;br /&gt;
* Investigate the change in constant volume heat capacity of a system with temperature&lt;br /&gt;
* Investigate the change in radial distribution function of a system in the solid, liquid and gas phases&lt;br /&gt;
* Determine the diffusion coefficient for a system in the solid, liquid and gas phases&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
This investigation uses the software LAMMPS (Large-scale Atomic/Molecular Massively Parallel Simulator), to run simulations on simple systems. &lt;br /&gt;
Trajectories of atoms were visualised using the software VMD (Visual Molecular Dynamics). &amp;lt;span style=color:red&amp;gt; A citation of LAMMPS would be good - it is a serious endeavour by many people and worthy of acknowledgement.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting up the system===&lt;br /&gt;
For the simulation of a simple liquid, initial coordinates for atoms cannot be randomly generated and therefore a crystal lattice (simple cubic) is generated which is then melted - the simulation is set to run and over time the atoms rearrange into a configuration of higher disorder more closely modelling a liquid. Atoms cannot be given random starting coordinates to model this liquid configuration as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
Other key specifications of the system are below:&lt;br /&gt;
* the mass of all atoms was set to 1.0&lt;br /&gt;
* the interaction between atoms in the system was modelled on a Leonard-Jones potential&lt;br /&gt;
* the cut-off distance was set to 3.0 in reduced units&lt;br /&gt;
* the pairwise force field coefficients were set to 1.0 for both the potential well depth and the zero-potential distance &lt;br /&gt;
* all atoms were assigned random velocities following the Maxwell-Boltzmann distribution&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; The last point is not necessary since you have done NPT/NVT calculations, the thermostat will equilibrate temperatures. It is also a very routine detail - assumed to be so.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating thermodynamic quantities===&lt;br /&gt;
The simulation measures thermodynamics properties of the system for example: total energy, temperature, pressure, mean squared displacement and the velocity auto-correlation function of the system, at certain time-steps for a certain number of runs. &lt;br /&gt;
&lt;br /&gt;
Before simulations were run to gather data, it was confirmed that the system reaches equilibrium. Graphs showing how total energy, temperature and pressure change with time for a time-step of 0.001 are displayed below. After approximately 0.3 seconds, the system reaches equilibrium and fluctuates around an equilibrium value for each of the properties. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Graphs/data proving the system is equilibrated is not usually shown in a scientific paper, unless there is cause - it is assumed this is done correctly. Simply &amp;quot;... were equilibrated for X time units at Y and Z&amp;quot; would be sufficient. These graphs/data would be more at home in the tasks section. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 1: Temperature as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 2: Pressure as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 3: Total energy as a function of time.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 time-steps were tested to determine the most adequate. Figure 4 to the right shows how the total energy changes over time for each of the 5 timesteps. It can be seen that a time-step of 0.0025 is the highest time-step that still gives an accurate equilibrium total energy, hence, this time-step was used in further simulations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|600px|thumb|right|Figure 4: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the equation of state of the model described above, by calculating the density of a NpT system at varying pressure and temperature. 2 pressures and 5 temperatures were chosen (p = 2.5, 2.75; T = 1.75, 2, 2, 2.25, 3, 5), and a simulation was run for each combination giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the change in constant volume heat capacity with temperature. 2 densities and 5 temperatures were chosen (&amp;lt;math&amp;gt;\rho&amp;lt;/math&amp;gt;= 0.2, 0.8; T = 2.0, 2.2, 2.4, 2.6, 2.8), giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to model the radial distribution function as a function of distance, using the software VMD. 3 simulations were run, each with a specified density and temperature correlating to a system in each of the 3 phases&amp;lt;ref name=&amp;quot;L-J Article&amp;quot; /&amp;gt;: solid, liquid and gas. &lt;br /&gt;
* Solid: Density = 1.25, Temperature = 1.0&lt;br /&gt;
* Liquid: Density = 0.8, Temperature = 1.2 &lt;br /&gt;
* Gas: Density = 0.025, Temperature = 1.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; You do not really need to specify VMD here - there are a host of programs that can calculate a RDF, and not so hard a program to write yourself. If you insist on specifying VMD, the full name and citation would be good.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mean squared displacement (MSD) and velocity autocorrelation function (VACF) were calculated using the same densities and temperatures specified above (same as RDF)  to model a system in each of the 3 phases. Both the MSD and VACF were used to calculate the diffusion coefficient (D) for each phase, using the following relationships.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{3}\int_0^\infty \mathrm{d}\tau \left\langle\mathbf{v}\left(0\right)\cdot\mathbf{v}\left(\tau\right)\right\rangle&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Results &amp;amp; Discussion==&lt;br /&gt;
===Equations of state===&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|center|Figure 5: Density as a function of temperature for a system at 2 different pressures, as well as the corresponding densities as predicted by the ideal gas law.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Scientific style: instead of e.g. &amp;quot;more closely models and ideal gas&amp;quot; perhaps something like &amp;quot;tends toward the ideal gas eq. of state in the high temperature limit. Also an explanation of why this is would be beneficial here - think about what happens in terms of phase space sampling at a given temperature. How could you connect that to the PES and PE/KE a given LJ particle has?  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Heat capacity at constant volume===&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|center|Figure 6: Constant volume heat capacity as a function of temperature for 2 different densities.]]&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
===Radial distribution function===&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|600px|thumb|center|Figure 7: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse with no order.&lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; A more quantitative discussion would be good.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Diffusion coefficient===&lt;br /&gt;
&amp;lt;b&amp;gt;MSD Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 8: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 9: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 10: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step for a system with 1,000,000 atoms are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 11: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 12: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 13: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 14: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure 10) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; A discussion of finite size effects - even if not a systematic investigation - would have been nice here. &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;VACF Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:FinaleJPW.png|350px|thumb|none|Figure 15: VACF as a function of time for the solid and liquid phases along with the 1D Harmonic oscillator.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|350px|thumb|none|Figure 16: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|350px|thumb|none|Figure 17: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The trapezium rule was used to calculate the integral of the VACF for each phase.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were then calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure 18.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 18: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 15), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms. &lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system. &lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Equation of state simulations, on a system of constant pressure determined that the density of a system at constant pressure decreased with increasing temperature. The simulated density is lower than that predicted by the ideal gas law as the system is not behaving ideally  (there are interactions between the particles), however this discrepancy decreases with increasing temperature.&lt;br /&gt;
&lt;br /&gt;
Heat capacity simulations showed the expected trend of heat capacity at constant volume decreasing with increasing temperature. Furthermore, heat capacity increases with increasing density as there are more particles and hence more energy states that need to be filled to increase the temperature, therefore requiring a larger amount of energy to do so.&lt;br /&gt;
&lt;br /&gt;
Radial distribution function simulations gave information about the coordination around particles in each phase. The solid has a regular ordered crystal structure and hence the radial distribution function displays many peaks. For liquids there is some short range order, shown by 4 peaks of decreasing intensity corresponding to 4 initial coordination shells around the liquid, however it decays quickly due to the ability of particles to diffuse away, resulting in very little long range order. For a gas, there is one initial coordination shell shown by the sharp initial peak, however it then decays to the bulk density value and remains constant due to the high diffusive nature of a gas, there is no long range order past this first coordination shell. &lt;br /&gt;
&lt;br /&gt;
Both methods of calculation of the diffusion coefficient give the expected results, with a gas having a large value, liquid a small value and the solid with a value close to 0. The values obtained from each method compare well to each other, as well as the values obtained from the 1,000,000 atom simulation. However, it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. Furthermore, the VACF method will have significant error due to the error in using the trapezium rule to calculate the integral of the VACF. &lt;br /&gt;
&lt;br /&gt;
In conclusion, molecular dynamics simulation has allowed fast and accurate &amp;lt;span style=color:red&amp;gt; how are you measuring accuracy. You would need to fit LJ parameters for a specific system, then compare to experiment or a higher accuracy simulation/theory. &amp;lt;/span&amp;gt; calculations of a range of key thermodynamic properties of a range of systems. It is clear that the use of these simulations is invaluable for the determination of these properties with applications in a range of industries, on key example being in the design of power stations. Furthermore, none of the simulations took longer than 5 minutes &amp;lt;span style=color:red&amp;gt; How long is a piece of string? Yes they are very cheap, but you cannot specify a time without giving the length of the simulations exactly, software package details (you did this), computer architecture etc. &amp;lt;/span&amp;gt; , illustrating another key benefit of using molecular dynamics simulations. In future calculations, calculations should be done on larger systems to acquire a more accurate average, as well as possibly introducing a second type of particle into the system to analyse how it effects the properties of the system.&amp;lt;span style=color:red&amp;gt; Nice that you&#039;ve attempted a small outlook. Perhaps think about the LJ model itself. Would you want to keep using larger and larger LJ systems. Would you want to use specific LJ parameters next time for a specific system? Or perhaps a different force field? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tasks==&lt;br /&gt;
The answers to all tasks are below, some have already been answered in the report above. &lt;br /&gt;
&lt;br /&gt;
===Introduction to molecular dynamics simulation===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by &amp;lt;math&amp;gt; x\left(t\right) = A\cos\left(\omega t + \phi\right)&amp;lt;/math&amp;gt; (the values of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:HO_1.png|350px|thumb|center|Figure 19: Analytical position as a function of time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO2.png|350px|thumb|center|Figure 20: Total energy as a function time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO3.png|350px|thumb|center|Figure 21: Error between the velocity-Verlet algorithm and analytical values as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHO4.png|500px|thumb|center|Figure 22: Error maximum as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; required time step for HO missing.   &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK:&amp;lt;/big&amp;gt; For a single Lennard-Jones interaction, &amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;, find the separation, &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt;, at which the potential energy is zero. What is the force at this separation? Find the equilibrium separation, &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, and work out the well depth (&amp;lt;math&amp;gt;\phi\left(r_{eq}\right)&amp;lt;/math&amp;gt;). Evaluate the integrals &amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\int_{2.5\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\int_{3\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;\sigma = \epsilon = 1.0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* The separation r&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; at which the potential energy is zero, is when &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The force at this separation is equal to &amp;lt;math&amp;gt;24\epsilon/\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The equilibrium separation &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;eq&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = 2&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;1/6&amp;lt;/sup&amp;gt;&amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The potential well depth is equal to &amp;lt;math&amp;gt;-\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
* Evaluation of integrals:&lt;br /&gt;
&lt;br /&gt;
[[File:Reallastboy.PNG|400px|none]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions. Estimate the volume of &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; water molecules under standard conditions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Assumptions:&lt;br /&gt;
* 1mL of water = 1g of water &lt;br /&gt;
&lt;br /&gt;
Number of water molecules in 1g:&lt;br /&gt;
* Moles in 1g = 1/18 &lt;br /&gt;
* Number of molecules = N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; x 1/18 = &amp;lt;b&amp;gt;3.35 x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Volume of 10000 water molecules:&lt;br /&gt;
* Moles = 10000/N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Mass = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt; x 18 = 2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;g&lt;br /&gt;
* Volume = &amp;lt;b&amp;gt;2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, &#039;&#039;after the periodic boundary conditions have been applied&#039;&#039;?&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
It ends up at the point with coordinates - &amp;lt;math&amp;gt;(0.2, 0.1, 0.7)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: The Lennard-Jones parameters for argon are &amp;lt;math&amp;gt;\sigma = 0.34\mathrm{nm}, \epsilon\ /\ k_B= 120 \mathrm{K}&amp;lt;/math&amp;gt;. If the LJ cutoff is &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;, what is it in real units? What is the well depth in &amp;lt;math&amp;gt;\mathrm{kJ\ mol}^{-1}&amp;lt;/math&amp;gt;? What is the reduced temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt; in real units?&lt;br /&gt;
&lt;br /&gt;
* LJ cutoff in real units &amp;lt;math&amp;gt;= 1.088 nm&amp;lt;/math&amp;gt;&lt;br /&gt;
* Well Depth &amp;lt;math&amp;gt;= 0.998 kJ mol&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Reduced Temperature &amp;lt;math&amp;gt; = 180K&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Equilibration===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Atoms cannot be given random starting coordinates as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &amp;lt;span style=color:red&amp;gt; Yes. but why is this a bad things in terms of the simulation? Under what simulation parameters would the system equilibrate correctly anyway? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For a face-centred cubic lattice with a lattice point density of 1.2, the side length of the cubic unit cell is 1.494.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A face-centred cubic lattice has 4 lattice points and hence four atoms, whereas a cubic lattice has 1 of each. Therefore, there would be 4000 atoms in a 10 x 10 x 10 box.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Line 1: Sets the mass of all atoms of type 1 to 1.0&lt;br /&gt;
* Line 2: States that the interaction between atoms is to be modelled on the Leonard-Jones potential with a cut off distance of 3.0&lt;br /&gt;
* Line 3: Sets the pairwise force field coefficients for all atoms, in this case, this is the well depth and the distance at 0 potential - both are set to 1.0&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet Algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The initial script sets the time-step as a variable which can be called later in the script, the second script does not do this. Therefore, if a simulation is to be run on a different time-step, the input file with the initial script only needs to change the time-step in one place (where the variable is defined). Whereas, in the second script, the time-step will have to be changed everywhere that it is used in the input file. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). Does the simulation reach equilibrium? How long does this take? When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results? Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 23: Temperature as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 24: Pressure as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 25: Total energy as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It takes approximately 0.3s for the system to reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|500px|thumb|none|Figure 26: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Of the 5 timesteps, 0.0025 is the largest to give acceptable results. A timestep of 0.015 is particularly bad as the system does not reach equilibrium at all. The other 4 time steps do all reach equilibrium however 0.001 and 0.0025 are the only two which reach an accurate equilibrium value for total energy.&lt;br /&gt;
&lt;br /&gt;
===Running simulations under specific conditions===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Choose 5 temperatures (above the critical temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt;), and two pressures (you can get a good idea of what a reasonable pressure is in Lennard-Jones units by looking at the average pressure of your simulations from the last section). This gives ten phase points &amp;amp;mdash; five temperatures at each pressure. Create 10 copies of npt.in, and modify each to run a simulation at one of your chosen &amp;lt;math&amp;gt;\left(p, T\right)&amp;lt;/math&amp;gt; points. You should be able to use the results of the previous section to choose a timestep. Submit these ten jobs to the HPC portal. While you wait for them to finish, you should read the next section.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Derivation_1_PictureJPW.PNG|400px|thumb|none|Figure 27: Derivation of velocity scaling factor &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. How often will values of the temperature, etc., be sampled for the average? How many measurements contribute to the average? Looking to the following line, how much time will you simulate?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The three numbers correspond Nevery, Nrepeat and Nfreq.&lt;br /&gt;
&lt;br /&gt;
* Nevery corresponds to how often input values are sampled for the average - for example, temperature will be sampled for the average every 100 timesteps.&lt;br /&gt;
* Nrepeat corresponds to the number of values used to calculate the average - in this case 1000 values (measurements) are used (contribute) to calculating the average.&lt;br /&gt;
* Nfreq corresponds to the timestep at which the average is calculated - the 100000th timestep.&lt;br /&gt;
&lt;br /&gt;
This therefore means that there are 100000 timesteps and with a timestep of 0.0025, the time simulated = 250 seconds. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.  Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|none|Figure 28: Density as a function of temperature for a system at 2 different pressures.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
===Calculating heat capacities using statistical physics===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|none|Figure 29: Constant volume heat capacity as a function of temperature.]]&lt;br /&gt;
&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
An example of the input script used can be found below:&lt;br /&gt;
&lt;br /&gt;
[[File:ExampleInputFileJPW.in]]&lt;br /&gt;
&lt;br /&gt;
===Structural properties and the radial distribution function===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. In the solid case, illustrate which lattice sites the first three peaks correspond to. What is the lattice spacing? What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|500px|thumb|none|Figure 30: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse and therefore the chance of finding another particle is equal to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
===Dynamic properties and the diffusion coefficient===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the D subfolder, there is a file &#039;&#039;liq.in&#039;&#039; that will run a simulation at specified density and temperature to calculate the mean squared displacement and velocity autocorrelation function of your system. Run one of these simulations for a vapour, liquid, and solid. You have also been given some simulated data from much larger systems (approximately one million atoms). You will need these files later.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 30: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 31: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 32: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 33: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 34: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 35: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 36: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure X) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent? Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? Attach a copy of your plot to your writeup.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The derivation for the normalised velocity autocorrelation function for a 1D harmonic oscillator is shown below, along with two trigonometric identities used in the derivation.&lt;br /&gt;
&lt;br /&gt;
[[File:Trigonometric_IdentitiesJPW.PNG|400px|thumb|none|Figure 37: Trigonometric identities used in derivation of VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
[[File:JPWD2.PNG|600px|thumb|none|Figure 38: Derivation of the VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
&lt;br /&gt;
A plot showing the VACF for the liquid and solid simulations, as well as for a 1D harmonic oscillator with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; is shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:FinaleJPW.png|600px|thumb|none|Figure 39: VACF as a function of timestep for the liquid and solid phases as well as for a 1D harmonic oscillator.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 39), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms.&lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the trapezium rule to approximate the integral under the velocity autocorrelation function for the solid, liquid, and gas, and use these values to estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. You should make a plot of the running integral in each case. Are they as you expect? Repeat this procedure for the VACF data that you were given from the one million atom simulations. What do you think is the largest source of error in your estimates of D from the VACF?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|400px|thumb|none|Figure 40: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|400px|thumb|none|Figure 41: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure X.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 42: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;L-J Article&amp;quot;&amp;gt;J.P.Hansen, L.Verlet, &amp;lt;i&amp;gt;Phys.Rev.&amp;lt;/i&amp;gt;, 1969, &amp;lt;b&amp;gt;184&amp;lt;/b&amp;gt;, 151&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696393</id>
		<title>User:Jpw115</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696393"/>
		<updated>2018-04-23T16:12:21Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Introduction to molecular dynamics simulation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=color:red&amp;gt; colour red &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Liquid Simulations - Jack Williams=&lt;br /&gt;
==Abstract==&lt;br /&gt;
Key thermodynamic properties of a system modelled on the Leonard-Jones potential were investigated using molecular dynamics simulation. Density and heat capacity were measured as functions of temperature to analyse how the system evolves with changing temperature, both were discovered to decrease with increasing temperature. Radial distribution functions were calculated to analyse the structure of the system in each of the 3 phases. It was discovered that solids, due to the crystalline fixed structure have high long range order, liquids have some order that decreases over time due to the ability of the particles to diffuse away, and gasses have negligible long range order due to the very low density of the gaseous system. The diffusion coefficient for each phase was measured using two methods, the mean squared displacement method (MSD) and the velocity autocorrelation method (VACF). Both produced the expected results of a high diffusion coefficient for a gas, fairly low for liquid and a diffusion coefficient close to zero for the solid phase. Both methods produced similar results, however due to the error in calculating the integral in the VACF method (trapezium rule), the values calculated using the MSD method are more accurate. These results compared well to simulations run on larger systems, which due to the larger amount of data contributing to the average, are more accurate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good abstract: tells the reader concisely what you did and your main results/conclusions. My only qualm is that saying you &amp;quot;discovered&amp;quot; long vs. short range order in the phases of matter seems like it is a novel result. Perhaps &amp;quot;verified&amp;quot; would have been better. This is a minor point though.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Knowledge and understanding of the thermodynamic properties of systems, for example the phase transitions, has a wide range of applications in a number of industries. One key industry in which this knowledge is vital for proper function, is in power generation, for example in fossil fuel power stations and nuclear power stations. Both types of station function via heating liquid water which then evaporates forming steam, which is used to turn a turbine connected to a generator which generates electrical energy. The steam then condenses back to liquid water to be re-used. &lt;br /&gt;
To maximise efficiency, certain factors, for example the dimensions of the system carrying the water, need to be controlled:&lt;br /&gt;
* Initially, to avoid the waste of thermal energy produced from the burning of fossil fuels (or generated from nuclear fission), knowledge of the heat capacity of water can be used to determine the optimal volume of water in which to heat based on the amount of energy generated from the burning of the fuel. &lt;br /&gt;
* The steam driving the turbine needs to be at a high pressure to ensure the turbine is being spun at a maximal rate. Knowledge of how the pressure of water varies with temperature as well as the volume of container is important in determining the required dimensions of the system containing the water, to ensure optimal steam pressure Furthermore, knowledge of how the phase transitions of water is vital in ensuring that the steam does not condense back to water before passing through the turbine.  &lt;br /&gt;
&lt;br /&gt;
Originally these properties would have been determined through experimentation, however today the use of molecular dynamics simulations allows their determination in a much more cheap and facile way. This investigation aims to demonstrate the versatility of molecular dynamics by simulating the thermodynamic properties of a few simple systems without setting foot in a laboratory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good motivation. The introduction (or theory section if there is a separate section for this) usually includes the background theory required for your reader to understand what you have done. This is included in your methodology section, which is usually instead a concise summary of your simulation details needed to reproduce your results. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Aims &amp;amp; Objectives==&lt;br /&gt;
To use computational modelling to determine key thermodynamic features of simple systems:&lt;br /&gt;
* Investigate the change in density of a system with varying temperature and pressure &lt;br /&gt;
* Investigate the change in constant volume heat capacity of a system with temperature&lt;br /&gt;
* Investigate the change in radial distribution function of a system in the solid, liquid and gas phases&lt;br /&gt;
* Determine the diffusion coefficient for a system in the solid, liquid and gas phases&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
This investigation uses the software LAMMPS (Large-scale Atomic/Molecular Massively Parallel Simulator), to run simulations on simple systems. &lt;br /&gt;
Trajectories of atoms were visualised using the software VMD (Visual Molecular Dynamics). &amp;lt;span style=color:red&amp;gt; A citation of LAMMPS would be good - it is a serious endeavour by many people and worthy of acknowledgement.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting up the system===&lt;br /&gt;
For the simulation of a simple liquid, initial coordinates for atoms cannot be randomly generated and therefore a crystal lattice (simple cubic) is generated which is then melted - the simulation is set to run and over time the atoms rearrange into a configuration of higher disorder more closely modelling a liquid. Atoms cannot be given random starting coordinates to model this liquid configuration as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
Other key specifications of the system are below:&lt;br /&gt;
* the mass of all atoms was set to 1.0&lt;br /&gt;
* the interaction between atoms in the system was modelled on a Leonard-Jones potential&lt;br /&gt;
* the cut-off distance was set to 3.0 in reduced units&lt;br /&gt;
* the pairwise force field coefficients were set to 1.0 for both the potential well depth and the zero-potential distance &lt;br /&gt;
* all atoms were assigned random velocities following the Maxwell-Boltzmann distribution&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; The last point is not necessary since you have done NPT/NVT calculations, the thermostat will equilibrate temperatures. It is also a very routine detail - assumed to be so.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating thermodynamic quantities===&lt;br /&gt;
The simulation measures thermodynamics properties of the system for example: total energy, temperature, pressure, mean squared displacement and the velocity auto-correlation function of the system, at certain time-steps for a certain number of runs. &lt;br /&gt;
&lt;br /&gt;
Before simulations were run to gather data, it was confirmed that the system reaches equilibrium. Graphs showing how total energy, temperature and pressure change with time for a time-step of 0.001 are displayed below. After approximately 0.3 seconds, the system reaches equilibrium and fluctuates around an equilibrium value for each of the properties. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Graphs/data proving the system is equilibrated is not usually shown in a scientific paper, unless there is cause - it is assumed this is done correctly. Simply &amp;quot;... were equilibrated for X time units at Y and Z&amp;quot; would be sufficient. These graphs/data would be more at home in the tasks section. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 1: Temperature as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 2: Pressure as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 3: Total energy as a function of time.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 time-steps were tested to determine the most adequate. Figure 4 to the right shows how the total energy changes over time for each of the 5 timesteps. It can be seen that a time-step of 0.0025 is the highest time-step that still gives an accurate equilibrium total energy, hence, this time-step was used in further simulations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|600px|thumb|right|Figure 4: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the equation of state of the model described above, by calculating the density of a NpT system at varying pressure and temperature. 2 pressures and 5 temperatures were chosen (p = 2.5, 2.75; T = 1.75, 2, 2, 2.25, 3, 5), and a simulation was run for each combination giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the change in constant volume heat capacity with temperature. 2 densities and 5 temperatures were chosen (&amp;lt;math&amp;gt;\rho&amp;lt;/math&amp;gt;= 0.2, 0.8; T = 2.0, 2.2, 2.4, 2.6, 2.8), giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to model the radial distribution function as a function of distance, using the software VMD. 3 simulations were run, each with a specified density and temperature correlating to a system in each of the 3 phases&amp;lt;ref name=&amp;quot;L-J Article&amp;quot; /&amp;gt;: solid, liquid and gas. &lt;br /&gt;
* Solid: Density = 1.25, Temperature = 1.0&lt;br /&gt;
* Liquid: Density = 0.8, Temperature = 1.2 &lt;br /&gt;
* Gas: Density = 0.025, Temperature = 1.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; You do not really need to specify VMD here - there are a host of programs that can calculate a RDF, and not so hard a program to write yourself. If you insist on specifying VMD, the full name and citation would be good.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mean squared displacement (MSD) and velocity autocorrelation function (VACF) were calculated using the same densities and temperatures specified above (same as RDF)  to model a system in each of the 3 phases. Both the MSD and VACF were used to calculate the diffusion coefficient (D) for each phase, using the following relationships.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{3}\int_0^\infty \mathrm{d}\tau \left\langle\mathbf{v}\left(0\right)\cdot\mathbf{v}\left(\tau\right)\right\rangle&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Results &amp;amp; Discussion==&lt;br /&gt;
===Equations of state===&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|center|Figure 5: Density as a function of temperature for a system at 2 different pressures, as well as the corresponding densities as predicted by the ideal gas law.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Scientific style: instead of e.g. &amp;quot;more closely models and ideal gas&amp;quot; perhaps something like &amp;quot;tends toward the ideal gas eq. of state in the high temperature limit. Also an explanation of why this is would be beneficial here - think about what happens in terms of phase space sampling at a given temperature. How could you connect that to the PES and PE/KE a given LJ particle has?  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Heat capacity at constant volume===&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|center|Figure 6: Constant volume heat capacity as a function of temperature for 2 different densities.]]&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
===Radial distribution function===&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|600px|thumb|center|Figure 7: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse with no order.&lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; A more quantitative discussion would be good.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Diffusion coefficient===&lt;br /&gt;
&amp;lt;b&amp;gt;MSD Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 8: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 9: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 10: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step for a system with 1,000,000 atoms are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 11: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 12: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 13: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 14: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure 10) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; A discussion of finite size effects - even if not a systematic investigation - would have been nice here. &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;VACF Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:FinaleJPW.png|350px|thumb|none|Figure 15: VACF as a function of time for the solid and liquid phases along with the 1D Harmonic oscillator.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|350px|thumb|none|Figure 16: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|350px|thumb|none|Figure 17: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The trapezium rule was used to calculate the integral of the VACF for each phase.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were then calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure 18.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 18: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 15), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms. &lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system. &lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Equation of state simulations, on a system of constant pressure determined that the density of a system at constant pressure decreased with increasing temperature. The simulated density is lower than that predicted by the ideal gas law as the system is not behaving ideally  (there are interactions between the particles), however this discrepancy decreases with increasing temperature.&lt;br /&gt;
&lt;br /&gt;
Heat capacity simulations showed the expected trend of heat capacity at constant volume decreasing with increasing temperature. Furthermore, heat capacity increases with increasing density as there are more particles and hence more energy states that need to be filled to increase the temperature, therefore requiring a larger amount of energy to do so.&lt;br /&gt;
&lt;br /&gt;
Radial distribution function simulations gave information about the coordination around particles in each phase. The solid has a regular ordered crystal structure and hence the radial distribution function displays many peaks. For liquids there is some short range order, shown by 4 peaks of decreasing intensity corresponding to 4 initial coordination shells around the liquid, however it decays quickly due to the ability of particles to diffuse away, resulting in very little long range order. For a gas, there is one initial coordination shell shown by the sharp initial peak, however it then decays to the bulk density value and remains constant due to the high diffusive nature of a gas, there is no long range order past this first coordination shell. &lt;br /&gt;
&lt;br /&gt;
Both methods of calculation of the diffusion coefficient give the expected results, with a gas having a large value, liquid a small value and the solid with a value close to 0. The values obtained from each method compare well to each other, as well as the values obtained from the 1,000,000 atom simulation. However, it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. Furthermore, the VACF method will have significant error due to the error in using the trapezium rule to calculate the integral of the VACF. &lt;br /&gt;
&lt;br /&gt;
In conclusion, molecular dynamics simulation has allowed fast and accurate &amp;lt;span style=color:red&amp;gt; how are you measuring accuracy. You would need to fit LJ parameters for a specific system, then compare to experiment or a higher accuracy simulation/theory. &amp;lt;/span&amp;gt; calculations of a range of key thermodynamic properties of a range of systems. It is clear that the use of these simulations is invaluable for the determination of these properties with applications in a range of industries, on key example being in the design of power stations. Furthermore, none of the simulations took longer than 5 minutes &amp;lt;span style=color:red&amp;gt; How long is a piece of string? Yes they are very cheap, but you cannot specify a time without giving the length of the simulations exactly, software package details (you did this), computer architecture etc. &amp;lt;/span&amp;gt; , illustrating another key benefit of using molecular dynamics simulations. In future calculations, calculations should be done on larger systems to acquire a more accurate average, as well as possibly introducing a second type of particle into the system to analyse how it effects the properties of the system.&amp;lt;span style=color:red&amp;gt; Nice that you&#039;ve attempted a small outlook. Perhaps think about the LJ model itself. Would you want to keep using larger and larger LJ systems. Would you want to use specific LJ parameters next time for a specific system? Or perhaps a different force field? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tasks==&lt;br /&gt;
The answers to all tasks are below, some have already been answered in the report above. &lt;br /&gt;
&lt;br /&gt;
===Introduction to molecular dynamics simulation===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by &amp;lt;math&amp;gt; x\left(t\right) = A\cos\left(\omega t + \phi\right)&amp;lt;/math&amp;gt; (the values of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:HO_1.png|350px|thumb|center|Figure 19: Analytical position as a function of time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO2.png|350px|thumb|center|Figure 20: Total energy as a function time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO3.png|350px|thumb|center|Figure 21: Error between the velocity-Verlet algorithm and analytical values as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHO4.png|500px|thumb|center|Figure 22: Error maximum as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; required time step for HO missing.   &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK:&amp;lt;/big&amp;gt; For a single Lennard-Jones interaction, &amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;, find the separation, &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt;, at which the potential energy is zero. What is the force at this separation? Find the equilibrium separation, &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, and work out the well depth (&amp;lt;math&amp;gt;\phi\left(r_{eq}\right)&amp;lt;/math&amp;gt;). Evaluate the integrals &amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\int_{2.5\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\int_{3\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;\sigma = \epsilon = 1.0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* The separation r&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; at which the potential energy is zero, is when &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The force at this separation is equal to &amp;lt;math&amp;gt;24\epsilon/\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The equilibrium separation &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;eq&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = 2&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;1/6&amp;lt;/sup&amp;gt;&amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The potential well depth is equal to &amp;lt;math&amp;gt;-\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
* Evaluation of integrals:&lt;br /&gt;
&lt;br /&gt;
[[File:Reallastboy.PNG|400px|none]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions. Estimate the volume of &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; water molecules under standard conditions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Assumptions:&lt;br /&gt;
* 1mL of water = 1g of water &lt;br /&gt;
&lt;br /&gt;
Number of water molecules in 1g:&lt;br /&gt;
* Moles in 1g = 1/18 &lt;br /&gt;
* Number of molecules = N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; x 1/18 = &amp;lt;b&amp;gt;3.35 x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Volume of 10000 water molecules:&lt;br /&gt;
* Moles = 10000/N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Mass = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt; x 18 = 2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;g&lt;br /&gt;
* Volume = &amp;lt;b&amp;gt;2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, &#039;&#039;after the periodic boundary conditions have been applied&#039;&#039;?&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
It ends up at the point with coordinates - &amp;lt;math&amp;gt;(0.2, 0.1, 0.7)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: The Lennard-Jones parameters for argon are &amp;lt;math&amp;gt;\sigma = 0.34\mathrm{nm}, \epsilon\ /\ k_B= 120 \mathrm{K}&amp;lt;/math&amp;gt;. If the LJ cutoff is &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;, what is it in real units? What is the well depth in &amp;lt;math&amp;gt;\mathrm{kJ\ mol}^{-1}&amp;lt;/math&amp;gt;? What is the reduced temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt; in real units?&lt;br /&gt;
&lt;br /&gt;
* LJ cutoff in real units &amp;lt;math&amp;gt;= 1.088 nm&amp;lt;/math&amp;gt;&lt;br /&gt;
* Well Depth &amp;lt;math&amp;gt;= 0.998 kJ mol&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Reduced Temperature &amp;lt;math&amp;gt; = 180K&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Equilibration===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Atoms cannot be given random starting coordinates as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For a face-centred cubic lattice with a lattice point density of 1.2, the side length of the cubic unit cell is 1.494.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A face-centred cubic lattice has 4 lattice points and hence four atoms, whereas a cubic lattice has 1 of each. Therefore, there would be 4000 atoms in a 10 x 10 x 10 box.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Line 1: Sets the mass of all atoms of type 1 to 1.0&lt;br /&gt;
* Line 2: States that the interaction between atoms is to be modelled on the Leonard-Jones potential with a cut off distance of 3.0&lt;br /&gt;
* Line 3: Sets the pairwise force field coefficients for all atoms, in this case, this is the well depth and the distance at 0 potential - both are set to 1.0&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet Algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The initial script sets the time-step as a variable which can be called later in the script, the second script does not do this. Therefore, if a simulation is to be run on a different time-step, the input file with the initial script only needs to change the time-step in one place (where the variable is defined). Whereas, in the second script, the time-step will have to be changed everywhere that it is used in the input file. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). Does the simulation reach equilibrium? How long does this take? When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results? Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 23: Temperature as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 24: Pressure as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 25: Total energy as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It takes approximately 0.3s for the system to reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|500px|thumb|none|Figure 26: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Of the 5 timesteps, 0.0025 is the largest to give acceptable results. A timestep of 0.015 is particularly bad as the system does not reach equilibrium at all. The other 4 time steps do all reach equilibrium however 0.001 and 0.0025 are the only two which reach an accurate equilibrium value for total energy.&lt;br /&gt;
&lt;br /&gt;
===Running simulations under specific conditions===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Choose 5 temperatures (above the critical temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt;), and two pressures (you can get a good idea of what a reasonable pressure is in Lennard-Jones units by looking at the average pressure of your simulations from the last section). This gives ten phase points &amp;amp;mdash; five temperatures at each pressure. Create 10 copies of npt.in, and modify each to run a simulation at one of your chosen &amp;lt;math&amp;gt;\left(p, T\right)&amp;lt;/math&amp;gt; points. You should be able to use the results of the previous section to choose a timestep. Submit these ten jobs to the HPC portal. While you wait for them to finish, you should read the next section.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Derivation_1_PictureJPW.PNG|400px|thumb|none|Figure 27: Derivation of velocity scaling factor &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. How often will values of the temperature, etc., be sampled for the average? How many measurements contribute to the average? Looking to the following line, how much time will you simulate?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The three numbers correspond Nevery, Nrepeat and Nfreq.&lt;br /&gt;
&lt;br /&gt;
* Nevery corresponds to how often input values are sampled for the average - for example, temperature will be sampled for the average every 100 timesteps.&lt;br /&gt;
* Nrepeat corresponds to the number of values used to calculate the average - in this case 1000 values (measurements) are used (contribute) to calculating the average.&lt;br /&gt;
* Nfreq corresponds to the timestep at which the average is calculated - the 100000th timestep.&lt;br /&gt;
&lt;br /&gt;
This therefore means that there are 100000 timesteps and with a timestep of 0.0025, the time simulated = 250 seconds. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.  Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|none|Figure 28: Density as a function of temperature for a system at 2 different pressures.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
===Calculating heat capacities using statistical physics===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|none|Figure 29: Constant volume heat capacity as a function of temperature.]]&lt;br /&gt;
&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
An example of the input script used can be found below:&lt;br /&gt;
&lt;br /&gt;
[[File:ExampleInputFileJPW.in]]&lt;br /&gt;
&lt;br /&gt;
===Structural properties and the radial distribution function===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. In the solid case, illustrate which lattice sites the first three peaks correspond to. What is the lattice spacing? What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|500px|thumb|none|Figure 30: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse and therefore the chance of finding another particle is equal to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
===Dynamic properties and the diffusion coefficient===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the D subfolder, there is a file &#039;&#039;liq.in&#039;&#039; that will run a simulation at specified density and temperature to calculate the mean squared displacement and velocity autocorrelation function of your system. Run one of these simulations for a vapour, liquid, and solid. You have also been given some simulated data from much larger systems (approximately one million atoms). You will need these files later.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 30: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 31: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 32: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 33: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 34: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 35: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 36: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure X) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent? Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? Attach a copy of your plot to your writeup.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The derivation for the normalised velocity autocorrelation function for a 1D harmonic oscillator is shown below, along with two trigonometric identities used in the derivation.&lt;br /&gt;
&lt;br /&gt;
[[File:Trigonometric_IdentitiesJPW.PNG|400px|thumb|none|Figure 37: Trigonometric identities used in derivation of VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
[[File:JPWD2.PNG|600px|thumb|none|Figure 38: Derivation of the VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
&lt;br /&gt;
A plot showing the VACF for the liquid and solid simulations, as well as for a 1D harmonic oscillator with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; is shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:FinaleJPW.png|600px|thumb|none|Figure 39: VACF as a function of timestep for the liquid and solid phases as well as for a 1D harmonic oscillator.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 39), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms.&lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the trapezium rule to approximate the integral under the velocity autocorrelation function for the solid, liquid, and gas, and use these values to estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. You should make a plot of the running integral in each case. Are they as you expect? Repeat this procedure for the VACF data that you were given from the one million atom simulations. What do you think is the largest source of error in your estimates of D from the VACF?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|400px|thumb|none|Figure 40: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|400px|thumb|none|Figure 41: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure X.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 42: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;L-J Article&amp;quot;&amp;gt;J.P.Hansen, L.Verlet, &amp;lt;i&amp;gt;Phys.Rev.&amp;lt;/i&amp;gt;, 1969, &amp;lt;b&amp;gt;184&amp;lt;/b&amp;gt;, 151&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696392</id>
		<title>User:Jpw115</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696392"/>
		<updated>2018-04-23T16:07:22Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=color:red&amp;gt; colour red &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Liquid Simulations - Jack Williams=&lt;br /&gt;
==Abstract==&lt;br /&gt;
Key thermodynamic properties of a system modelled on the Leonard-Jones potential were investigated using molecular dynamics simulation. Density and heat capacity were measured as functions of temperature to analyse how the system evolves with changing temperature, both were discovered to decrease with increasing temperature. Radial distribution functions were calculated to analyse the structure of the system in each of the 3 phases. It was discovered that solids, due to the crystalline fixed structure have high long range order, liquids have some order that decreases over time due to the ability of the particles to diffuse away, and gasses have negligible long range order due to the very low density of the gaseous system. The diffusion coefficient for each phase was measured using two methods, the mean squared displacement method (MSD) and the velocity autocorrelation method (VACF). Both produced the expected results of a high diffusion coefficient for a gas, fairly low for liquid and a diffusion coefficient close to zero for the solid phase. Both methods produced similar results, however due to the error in calculating the integral in the VACF method (trapezium rule), the values calculated using the MSD method are more accurate. These results compared well to simulations run on larger systems, which due to the larger amount of data contributing to the average, are more accurate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good abstract: tells the reader concisely what you did and your main results/conclusions. My only qualm is that saying you &amp;quot;discovered&amp;quot; long vs. short range order in the phases of matter seems like it is a novel result. Perhaps &amp;quot;verified&amp;quot; would have been better. This is a minor point though.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Knowledge and understanding of the thermodynamic properties of systems, for example the phase transitions, has a wide range of applications in a number of industries. One key industry in which this knowledge is vital for proper function, is in power generation, for example in fossil fuel power stations and nuclear power stations. Both types of station function via heating liquid water which then evaporates forming steam, which is used to turn a turbine connected to a generator which generates electrical energy. The steam then condenses back to liquid water to be re-used. &lt;br /&gt;
To maximise efficiency, certain factors, for example the dimensions of the system carrying the water, need to be controlled:&lt;br /&gt;
* Initially, to avoid the waste of thermal energy produced from the burning of fossil fuels (or generated from nuclear fission), knowledge of the heat capacity of water can be used to determine the optimal volume of water in which to heat based on the amount of energy generated from the burning of the fuel. &lt;br /&gt;
* The steam driving the turbine needs to be at a high pressure to ensure the turbine is being spun at a maximal rate. Knowledge of how the pressure of water varies with temperature as well as the volume of container is important in determining the required dimensions of the system containing the water, to ensure optimal steam pressure Furthermore, knowledge of how the phase transitions of water is vital in ensuring that the steam does not condense back to water before passing through the turbine.  &lt;br /&gt;
&lt;br /&gt;
Originally these properties would have been determined through experimentation, however today the use of molecular dynamics simulations allows their determination in a much more cheap and facile way. This investigation aims to demonstrate the versatility of molecular dynamics by simulating the thermodynamic properties of a few simple systems without setting foot in a laboratory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good motivation. The introduction (or theory section if there is a separate section for this) usually includes the background theory required for your reader to understand what you have done. This is included in your methodology section, which is usually instead a concise summary of your simulation details needed to reproduce your results. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Aims &amp;amp; Objectives==&lt;br /&gt;
To use computational modelling to determine key thermodynamic features of simple systems:&lt;br /&gt;
* Investigate the change in density of a system with varying temperature and pressure &lt;br /&gt;
* Investigate the change in constant volume heat capacity of a system with temperature&lt;br /&gt;
* Investigate the change in radial distribution function of a system in the solid, liquid and gas phases&lt;br /&gt;
* Determine the diffusion coefficient for a system in the solid, liquid and gas phases&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
This investigation uses the software LAMMPS (Large-scale Atomic/Molecular Massively Parallel Simulator), to run simulations on simple systems. &lt;br /&gt;
Trajectories of atoms were visualised using the software VMD (Visual Molecular Dynamics). &amp;lt;span style=color:red&amp;gt; A citation of LAMMPS would be good - it is a serious endeavour by many people and worthy of acknowledgement.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting up the system===&lt;br /&gt;
For the simulation of a simple liquid, initial coordinates for atoms cannot be randomly generated and therefore a crystal lattice (simple cubic) is generated which is then melted - the simulation is set to run and over time the atoms rearrange into a configuration of higher disorder more closely modelling a liquid. Atoms cannot be given random starting coordinates to model this liquid configuration as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
Other key specifications of the system are below:&lt;br /&gt;
* the mass of all atoms was set to 1.0&lt;br /&gt;
* the interaction between atoms in the system was modelled on a Leonard-Jones potential&lt;br /&gt;
* the cut-off distance was set to 3.0 in reduced units&lt;br /&gt;
* the pairwise force field coefficients were set to 1.0 for both the potential well depth and the zero-potential distance &lt;br /&gt;
* all atoms were assigned random velocities following the Maxwell-Boltzmann distribution&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; The last point is not necessary since you have done NPT/NVT calculations, the thermostat will equilibrate temperatures. It is also a very routine detail - assumed to be so.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating thermodynamic quantities===&lt;br /&gt;
The simulation measures thermodynamics properties of the system for example: total energy, temperature, pressure, mean squared displacement and the velocity auto-correlation function of the system, at certain time-steps for a certain number of runs. &lt;br /&gt;
&lt;br /&gt;
Before simulations were run to gather data, it was confirmed that the system reaches equilibrium. Graphs showing how total energy, temperature and pressure change with time for a time-step of 0.001 are displayed below. After approximately 0.3 seconds, the system reaches equilibrium and fluctuates around an equilibrium value for each of the properties. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Graphs/data proving the system is equilibrated is not usually shown in a scientific paper, unless there is cause - it is assumed this is done correctly. Simply &amp;quot;... were equilibrated for X time units at Y and Z&amp;quot; would be sufficient. These graphs/data would be more at home in the tasks section. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 1: Temperature as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 2: Pressure as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 3: Total energy as a function of time.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 time-steps were tested to determine the most adequate. Figure 4 to the right shows how the total energy changes over time for each of the 5 timesteps. It can be seen that a time-step of 0.0025 is the highest time-step that still gives an accurate equilibrium total energy, hence, this time-step was used in further simulations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|600px|thumb|right|Figure 4: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the equation of state of the model described above, by calculating the density of a NpT system at varying pressure and temperature. 2 pressures and 5 temperatures were chosen (p = 2.5, 2.75; T = 1.75, 2, 2, 2.25, 3, 5), and a simulation was run for each combination giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the change in constant volume heat capacity with temperature. 2 densities and 5 temperatures were chosen (&amp;lt;math&amp;gt;\rho&amp;lt;/math&amp;gt;= 0.2, 0.8; T = 2.0, 2.2, 2.4, 2.6, 2.8), giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to model the radial distribution function as a function of distance, using the software VMD. 3 simulations were run, each with a specified density and temperature correlating to a system in each of the 3 phases&amp;lt;ref name=&amp;quot;L-J Article&amp;quot; /&amp;gt;: solid, liquid and gas. &lt;br /&gt;
* Solid: Density = 1.25, Temperature = 1.0&lt;br /&gt;
* Liquid: Density = 0.8, Temperature = 1.2 &lt;br /&gt;
* Gas: Density = 0.025, Temperature = 1.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; You do not really need to specify VMD here - there are a host of programs that can calculate a RDF, and not so hard a program to write yourself. If you insist on specifying VMD, the full name and citation would be good.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mean squared displacement (MSD) and velocity autocorrelation function (VACF) were calculated using the same densities and temperatures specified above (same as RDF)  to model a system in each of the 3 phases. Both the MSD and VACF were used to calculate the diffusion coefficient (D) for each phase, using the following relationships.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{3}\int_0^\infty \mathrm{d}\tau \left\langle\mathbf{v}\left(0\right)\cdot\mathbf{v}\left(\tau\right)\right\rangle&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Results &amp;amp; Discussion==&lt;br /&gt;
===Equations of state===&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|center|Figure 5: Density as a function of temperature for a system at 2 different pressures, as well as the corresponding densities as predicted by the ideal gas law.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Scientific style: instead of e.g. &amp;quot;more closely models and ideal gas&amp;quot; perhaps something like &amp;quot;tends toward the ideal gas eq. of state in the high temperature limit. Also an explanation of why this is would be beneficial here - think about what happens in terms of phase space sampling at a given temperature. How could you connect that to the PES and PE/KE a given LJ particle has?  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Heat capacity at constant volume===&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|center|Figure 6: Constant volume heat capacity as a function of temperature for 2 different densities.]]&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
===Radial distribution function===&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|600px|thumb|center|Figure 7: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse with no order.&lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; A more quantitative discussion would be good.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Diffusion coefficient===&lt;br /&gt;
&amp;lt;b&amp;gt;MSD Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 8: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 9: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 10: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step for a system with 1,000,000 atoms are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 11: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 12: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 13: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 14: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure 10) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; A discussion of finite size effects - even if not a systematic investigation - would have been nice here. &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;VACF Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:FinaleJPW.png|350px|thumb|none|Figure 15: VACF as a function of time for the solid and liquid phases along with the 1D Harmonic oscillator.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|350px|thumb|none|Figure 16: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|350px|thumb|none|Figure 17: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The trapezium rule was used to calculate the integral of the VACF for each phase.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were then calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure 18.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 18: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 15), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms. &lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system. &lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Equation of state simulations, on a system of constant pressure determined that the density of a system at constant pressure decreased with increasing temperature. The simulated density is lower than that predicted by the ideal gas law as the system is not behaving ideally  (there are interactions between the particles), however this discrepancy decreases with increasing temperature.&lt;br /&gt;
&lt;br /&gt;
Heat capacity simulations showed the expected trend of heat capacity at constant volume decreasing with increasing temperature. Furthermore, heat capacity increases with increasing density as there are more particles and hence more energy states that need to be filled to increase the temperature, therefore requiring a larger amount of energy to do so.&lt;br /&gt;
&lt;br /&gt;
Radial distribution function simulations gave information about the coordination around particles in each phase. The solid has a regular ordered crystal structure and hence the radial distribution function displays many peaks. For liquids there is some short range order, shown by 4 peaks of decreasing intensity corresponding to 4 initial coordination shells around the liquid, however it decays quickly due to the ability of particles to diffuse away, resulting in very little long range order. For a gas, there is one initial coordination shell shown by the sharp initial peak, however it then decays to the bulk density value and remains constant due to the high diffusive nature of a gas, there is no long range order past this first coordination shell. &lt;br /&gt;
&lt;br /&gt;
Both methods of calculation of the diffusion coefficient give the expected results, with a gas having a large value, liquid a small value and the solid with a value close to 0. The values obtained from each method compare well to each other, as well as the values obtained from the 1,000,000 atom simulation. However, it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. Furthermore, the VACF method will have significant error due to the error in using the trapezium rule to calculate the integral of the VACF. &lt;br /&gt;
&lt;br /&gt;
In conclusion, molecular dynamics simulation has allowed fast and accurate &amp;lt;span style=color:red&amp;gt; how are you measuring accuracy. You would need to fit LJ parameters for a specific system, then compare to experiment or a higher accuracy simulation/theory. &amp;lt;/span&amp;gt; calculations of a range of key thermodynamic properties of a range of systems. It is clear that the use of these simulations is invaluable for the determination of these properties with applications in a range of industries, on key example being in the design of power stations. Furthermore, none of the simulations took longer than 5 minutes &amp;lt;span style=color:red&amp;gt; How long is a piece of string? Yes they are very cheap, but you cannot specify a time without giving the length of the simulations exactly, software package details (you did this), computer architecture etc. &amp;lt;/span&amp;gt; , illustrating another key benefit of using molecular dynamics simulations. In future calculations, calculations should be done on larger systems to acquire a more accurate average, as well as possibly introducing a second type of particle into the system to analyse how it effects the properties of the system.&amp;lt;span style=color:red&amp;gt; Nice that you&#039;ve attempted a small outlook. Perhaps think about the LJ model itself. Would you want to keep using larger and larger LJ systems. Would you want to use specific LJ parameters next time for a specific system? Or perhaps a different force field? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tasks==&lt;br /&gt;
The answers to all tasks are below, some have already been answered in the report above. &lt;br /&gt;
&lt;br /&gt;
===Introduction to molecular dynamics simulation===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by &amp;lt;math&amp;gt; x\left(t\right) = A\cos\left(\omega t + \phi\right)&amp;lt;/math&amp;gt; (the values of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:HO_1.png|350px|thumb|center|Figure 19: Analytical position as a function of time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO2.png|350px|thumb|center|Figure 20: Total energy as a function time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO3.png|350px|thumb|center|Figure 21: Error between the velocity-Verlet algorithm and analytical values as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHO4.png|500px|thumb|center|Figure 22: Error maximum as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK:&amp;lt;/big&amp;gt; For a single Lennard-Jones interaction, &amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;, find the separation, &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt;, at which the potential energy is zero. What is the force at this separation? Find the equilibrium separation, &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, and work out the well depth (&amp;lt;math&amp;gt;\phi\left(r_{eq}\right)&amp;lt;/math&amp;gt;). Evaluate the integrals &amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\int_{2.5\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\int_{3\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;\sigma = \epsilon = 1.0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* The separation r&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; at which the potential energy is zero, is when &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The force at this separation is equal to &amp;lt;math&amp;gt;24\epsilon/\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The equilibrium separation &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;eq&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = 2&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;1/6&amp;lt;/sup&amp;gt;&amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The potential well depth is equal to &amp;lt;math&amp;gt;-\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
* Evaluation of integrals:&lt;br /&gt;
&lt;br /&gt;
[[File:Reallastboy.PNG|400px|none]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions. Estimate the volume of &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; water molecules under standard conditions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Assumptions:&lt;br /&gt;
* 1mL of water = 1g of water &lt;br /&gt;
&lt;br /&gt;
Number of water molecules in 1g:&lt;br /&gt;
* Moles in 1g = 1/18 &lt;br /&gt;
* Number of molecules = N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; x 1/18 = &amp;lt;b&amp;gt;3.35 x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Volume of 10000 water molecules:&lt;br /&gt;
* Moles = 10000/N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Mass = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt; x 18 = 2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;g&lt;br /&gt;
* Volume = &amp;lt;b&amp;gt;2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, &#039;&#039;after the periodic boundary conditions have been applied&#039;&#039;?&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
It ends up at the point with coordinates - &amp;lt;math&amp;gt;(0.2, 0.1, 0.7)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: The Lennard-Jones parameters for argon are &amp;lt;math&amp;gt;\sigma = 0.34\mathrm{nm}, \epsilon\ /\ k_B= 120 \mathrm{K}&amp;lt;/math&amp;gt;. If the LJ cutoff is &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;, what is it in real units? What is the well depth in &amp;lt;math&amp;gt;\mathrm{kJ\ mol}^{-1}&amp;lt;/math&amp;gt;? What is the reduced temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt; in real units?&lt;br /&gt;
&lt;br /&gt;
* LJ cutoff in real units &amp;lt;math&amp;gt;= 1.088 nm&amp;lt;/math&amp;gt;&lt;br /&gt;
* Well Depth &amp;lt;math&amp;gt;= 0.998 kJ mol&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Reduced Temperature &amp;lt;math&amp;gt; = 180K&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Equilibration===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Atoms cannot be given random starting coordinates as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For a face-centred cubic lattice with a lattice point density of 1.2, the side length of the cubic unit cell is 1.494.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A face-centred cubic lattice has 4 lattice points and hence four atoms, whereas a cubic lattice has 1 of each. Therefore, there would be 4000 atoms in a 10 x 10 x 10 box.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Line 1: Sets the mass of all atoms of type 1 to 1.0&lt;br /&gt;
* Line 2: States that the interaction between atoms is to be modelled on the Leonard-Jones potential with a cut off distance of 3.0&lt;br /&gt;
* Line 3: Sets the pairwise force field coefficients for all atoms, in this case, this is the well depth and the distance at 0 potential - both are set to 1.0&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet Algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The initial script sets the time-step as a variable which can be called later in the script, the second script does not do this. Therefore, if a simulation is to be run on a different time-step, the input file with the initial script only needs to change the time-step in one place (where the variable is defined). Whereas, in the second script, the time-step will have to be changed everywhere that it is used in the input file. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). Does the simulation reach equilibrium? How long does this take? When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results? Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 23: Temperature as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 24: Pressure as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 25: Total energy as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It takes approximately 0.3s for the system to reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|500px|thumb|none|Figure 26: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Of the 5 timesteps, 0.0025 is the largest to give acceptable results. A timestep of 0.015 is particularly bad as the system does not reach equilibrium at all. The other 4 time steps do all reach equilibrium however 0.001 and 0.0025 are the only two which reach an accurate equilibrium value for total energy.&lt;br /&gt;
&lt;br /&gt;
===Running simulations under specific conditions===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Choose 5 temperatures (above the critical temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt;), and two pressures (you can get a good idea of what a reasonable pressure is in Lennard-Jones units by looking at the average pressure of your simulations from the last section). This gives ten phase points &amp;amp;mdash; five temperatures at each pressure. Create 10 copies of npt.in, and modify each to run a simulation at one of your chosen &amp;lt;math&amp;gt;\left(p, T\right)&amp;lt;/math&amp;gt; points. You should be able to use the results of the previous section to choose a timestep. Submit these ten jobs to the HPC portal. While you wait for them to finish, you should read the next section.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Derivation_1_PictureJPW.PNG|400px|thumb|none|Figure 27: Derivation of velocity scaling factor &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. How often will values of the temperature, etc., be sampled for the average? How many measurements contribute to the average? Looking to the following line, how much time will you simulate?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The three numbers correspond Nevery, Nrepeat and Nfreq.&lt;br /&gt;
&lt;br /&gt;
* Nevery corresponds to how often input values are sampled for the average - for example, temperature will be sampled for the average every 100 timesteps.&lt;br /&gt;
* Nrepeat corresponds to the number of values used to calculate the average - in this case 1000 values (measurements) are used (contribute) to calculating the average.&lt;br /&gt;
* Nfreq corresponds to the timestep at which the average is calculated - the 100000th timestep.&lt;br /&gt;
&lt;br /&gt;
This therefore means that there are 100000 timesteps and with a timestep of 0.0025, the time simulated = 250 seconds. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.  Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|none|Figure 28: Density as a function of temperature for a system at 2 different pressures.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
===Calculating heat capacities using statistical physics===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|none|Figure 29: Constant volume heat capacity as a function of temperature.]]&lt;br /&gt;
&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
An example of the input script used can be found below:&lt;br /&gt;
&lt;br /&gt;
[[File:ExampleInputFileJPW.in]]&lt;br /&gt;
&lt;br /&gt;
===Structural properties and the radial distribution function===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. In the solid case, illustrate which lattice sites the first three peaks correspond to. What is the lattice spacing? What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|500px|thumb|none|Figure 30: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse and therefore the chance of finding another particle is equal to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
===Dynamic properties and the diffusion coefficient===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the D subfolder, there is a file &#039;&#039;liq.in&#039;&#039; that will run a simulation at specified density and temperature to calculate the mean squared displacement and velocity autocorrelation function of your system. Run one of these simulations for a vapour, liquid, and solid. You have also been given some simulated data from much larger systems (approximately one million atoms). You will need these files later.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 30: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 31: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 32: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 33: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 34: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 35: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 36: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure X) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent? Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? Attach a copy of your plot to your writeup.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The derivation for the normalised velocity autocorrelation function for a 1D harmonic oscillator is shown below, along with two trigonometric identities used in the derivation.&lt;br /&gt;
&lt;br /&gt;
[[File:Trigonometric_IdentitiesJPW.PNG|400px|thumb|none|Figure 37: Trigonometric identities used in derivation of VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
[[File:JPWD2.PNG|600px|thumb|none|Figure 38: Derivation of the VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
&lt;br /&gt;
A plot showing the VACF for the liquid and solid simulations, as well as for a 1D harmonic oscillator with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; is shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:FinaleJPW.png|600px|thumb|none|Figure 39: VACF as a function of timestep for the liquid and solid phases as well as for a 1D harmonic oscillator.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 39), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms.&lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the trapezium rule to approximate the integral under the velocity autocorrelation function for the solid, liquid, and gas, and use these values to estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. You should make a plot of the running integral in each case. Are they as you expect? Repeat this procedure for the VACF data that you were given from the one million atom simulations. What do you think is the largest source of error in your estimates of D from the VACF?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|400px|thumb|none|Figure 40: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|400px|thumb|none|Figure 41: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure X.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 42: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;L-J Article&amp;quot;&amp;gt;J.P.Hansen, L.Verlet, &amp;lt;i&amp;gt;Phys.Rev.&amp;lt;/i&amp;gt;, 1969, &amp;lt;b&amp;gt;184&amp;lt;/b&amp;gt;, 151&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696391</id>
		<title>User:Jpw115</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696391"/>
		<updated>2018-04-23T16:00:05Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Diffusion coefficient */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=color:red&amp;gt; colour red &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Liquid Simulations - Jack Williams=&lt;br /&gt;
==Abstract==&lt;br /&gt;
Key thermodynamic properties of a system modelled on the Leonard-Jones potential were investigated using molecular dynamics simulation. Density and heat capacity were measured as functions of temperature to analyse how the system evolves with changing temperature, both were discovered to decrease with increasing temperature. Radial distribution functions were calculated to analyse the structure of the system in each of the 3 phases. It was discovered that solids, due to the crystalline fixed structure have high long range order, liquids have some order that decreases over time due to the ability of the particles to diffuse away, and gasses have negligible long range order due to the very low density of the gaseous system. The diffusion coefficient for each phase was measured using two methods, the mean squared displacement method (MSD) and the velocity autocorrelation method (VACF). Both produced the expected results of a high diffusion coefficient for a gas, fairly low for liquid and a diffusion coefficient close to zero for the solid phase. Both methods produced similar results, however due to the error in calculating the integral in the VACF method (trapezium rule), the values calculated using the MSD method are more accurate. These results compared well to simulations run on larger systems, which due to the larger amount of data contributing to the average, are more accurate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good abstract: tells the reader concisely what you did and your main results/conclusions. My only qualm is that saying you &amp;quot;discovered&amp;quot; long vs. short range order in the phases of matter seems like it is a novel result. Perhaps &amp;quot;verified&amp;quot; would have been better. This is a minor point though.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Knowledge and understanding of the thermodynamic properties of systems, for example the phase transitions, has a wide range of applications in a number of industries. One key industry in which this knowledge is vital for proper function, is in power generation, for example in fossil fuel power stations and nuclear power stations. Both types of station function via heating liquid water which then evaporates forming steam, which is used to turn a turbine connected to a generator which generates electrical energy. The steam then condenses back to liquid water to be re-used. &lt;br /&gt;
To maximise efficiency, certain factors, for example the dimensions of the system carrying the water, need to be controlled:&lt;br /&gt;
* Initially, to avoid the waste of thermal energy produced from the burning of fossil fuels (or generated from nuclear fission), knowledge of the heat capacity of water can be used to determine the optimal volume of water in which to heat based on the amount of energy generated from the burning of the fuel. &lt;br /&gt;
* The steam driving the turbine needs to be at a high pressure to ensure the turbine is being spun at a maximal rate. Knowledge of how the pressure of water varies with temperature as well as the volume of container is important in determining the required dimensions of the system containing the water, to ensure optimal steam pressure Furthermore, knowledge of how the phase transitions of water is vital in ensuring that the steam does not condense back to water before passing through the turbine.  &lt;br /&gt;
&lt;br /&gt;
Originally these properties would have been determined through experimentation, however today the use of molecular dynamics simulations allows their determination in a much more cheap and facile way. This investigation aims to demonstrate the versatility of molecular dynamics by simulating the thermodynamic properties of a few simple systems without setting foot in a laboratory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good motivation. The introduction (or theory section if there is a separate section for this) usually includes the background theory required for your reader to understand what you have done. This is included in your methodology section, which is usually instead a concise summary of your simulation details needed to reproduce your results. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Aims &amp;amp; Objectives==&lt;br /&gt;
To use computational modelling to determine key thermodynamic features of simple systems:&lt;br /&gt;
* Investigate the change in density of a system with varying temperature and pressure &lt;br /&gt;
* Investigate the change in constant volume heat capacity of a system with temperature&lt;br /&gt;
* Investigate the change in radial distribution function of a system in the solid, liquid and gas phases&lt;br /&gt;
* Determine the diffusion coefficient for a system in the solid, liquid and gas phases&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
This investigation uses the software LAMMPS (Large-scale Atomic/Molecular Massively Parallel Simulator), to run simulations on simple systems. &lt;br /&gt;
Trajectories of atoms were visualised using the software VMD (Visual Molecular Dynamics). &amp;lt;span style=color:red&amp;gt; A citation of LAMMPS would be good - it is a serious endeavour by many people and worthy of acknowledgement.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting up the system===&lt;br /&gt;
For the simulation of a simple liquid, initial coordinates for atoms cannot be randomly generated and therefore a crystal lattice (simple cubic) is generated which is then melted - the simulation is set to run and over time the atoms rearrange into a configuration of higher disorder more closely modelling a liquid. Atoms cannot be given random starting coordinates to model this liquid configuration as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
Other key specifications of the system are below:&lt;br /&gt;
* the mass of all atoms was set to 1.0&lt;br /&gt;
* the interaction between atoms in the system was modelled on a Leonard-Jones potential&lt;br /&gt;
* the cut-off distance was set to 3.0 in reduced units&lt;br /&gt;
* the pairwise force field coefficients were set to 1.0 for both the potential well depth and the zero-potential distance &lt;br /&gt;
* all atoms were assigned random velocities following the Maxwell-Boltzmann distribution&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; The last point is not necessary since you have done NPT/NVT calculations, the thermostat will equilibrate temperatures. It is also a very routine detail - assumed to be so.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating thermodynamic quantities===&lt;br /&gt;
The simulation measures thermodynamics properties of the system for example: total energy, temperature, pressure, mean squared displacement and the velocity auto-correlation function of the system, at certain time-steps for a certain number of runs. &lt;br /&gt;
&lt;br /&gt;
Before simulations were run to gather data, it was confirmed that the system reaches equilibrium. Graphs showing how total energy, temperature and pressure change with time for a time-step of 0.001 are displayed below. After approximately 0.3 seconds, the system reaches equilibrium and fluctuates around an equilibrium value for each of the properties. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Graphs/data proving the system is equilibrated is not usually shown in a scientific paper, unless there is cause - it is assumed this is done correctly. Simply &amp;quot;... were equilibrated for X time units at Y and Z&amp;quot; would be sufficient. These graphs/data would be more at home in the tasks section. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 1: Temperature as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 2: Pressure as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 3: Total energy as a function of time.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 time-steps were tested to determine the most adequate. Figure 4 to the right shows how the total energy changes over time for each of the 5 timesteps. It can be seen that a time-step of 0.0025 is the highest time-step that still gives an accurate equilibrium total energy, hence, this time-step was used in further simulations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|600px|thumb|right|Figure 4: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the equation of state of the model described above, by calculating the density of a NpT system at varying pressure and temperature. 2 pressures and 5 temperatures were chosen (p = 2.5, 2.75; T = 1.75, 2, 2, 2.25, 3, 5), and a simulation was run for each combination giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the change in constant volume heat capacity with temperature. 2 densities and 5 temperatures were chosen (&amp;lt;math&amp;gt;\rho&amp;lt;/math&amp;gt;= 0.2, 0.8; T = 2.0, 2.2, 2.4, 2.6, 2.8), giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to model the radial distribution function as a function of distance, using the software VMD. 3 simulations were run, each with a specified density and temperature correlating to a system in each of the 3 phases&amp;lt;ref name=&amp;quot;L-J Article&amp;quot; /&amp;gt;: solid, liquid and gas. &lt;br /&gt;
* Solid: Density = 1.25, Temperature = 1.0&lt;br /&gt;
* Liquid: Density = 0.8, Temperature = 1.2 &lt;br /&gt;
* Gas: Density = 0.025, Temperature = 1.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; You do not really need to specify VMD here - there are a host of programs that can calculate a RDF, and not so hard a program to write yourself. If you insist on specifying VMD, the full name and citation would be good.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mean squared displacement (MSD) and velocity autocorrelation function (VACF) were calculated using the same densities and temperatures specified above (same as RDF)  to model a system in each of the 3 phases. Both the MSD and VACF were used to calculate the diffusion coefficient (D) for each phase, using the following relationships.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{3}\int_0^\infty \mathrm{d}\tau \left\langle\mathbf{v}\left(0\right)\cdot\mathbf{v}\left(\tau\right)\right\rangle&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Results &amp;amp; Discussion==&lt;br /&gt;
===Equations of state===&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|center|Figure 5: Density as a function of temperature for a system at 2 different pressures, as well as the corresponding densities as predicted by the ideal gas law.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Scientific style: instead of e.g. &amp;quot;more closely models and ideal gas&amp;quot; perhaps something like &amp;quot;tends toward the ideal gas eq. of state in the high temperature limit. Also an explanation of why this is would be beneficial here - think about what happens in terms of phase space sampling at a given temperature. How could you connect that to the PES and PE/KE a given LJ particle has?  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Heat capacity at constant volume===&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|center|Figure 6: Constant volume heat capacity as a function of temperature for 2 different densities.]]&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
===Radial distribution function===&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|600px|thumb|center|Figure 7: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse with no order.&lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; A more quantitative discussion would be good.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Diffusion coefficient===&lt;br /&gt;
&amp;lt;b&amp;gt;MSD Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 8: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 9: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 10: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step for a system with 1,000,000 atoms are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 11: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 12: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 13: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 14: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure 10) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; A discussion of finite size effects - even if not a systematic investigation - would have been nice here. &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;VACF Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:FinaleJPW.png|350px|thumb|none|Figure 15: VACF as a function of time for the solid and liquid phases along with the 1D Harmonic oscillator.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|350px|thumb|none|Figure 16: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|350px|thumb|none|Figure 17: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The trapezium rule was used to calculate the integral of the VACF for each phase.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were then calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure 18.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 18: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 15), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms. &lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system. &lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Equation of state simulations, on a system of constant pressure determined that the density of a system at constant pressure decreased with increasing temperature. The simulated density is lower than that predicted by the ideal gas law as the system is not behaving ideally  (there are interactions between the particles), however this discrepancy decreases with increasing temperature.&lt;br /&gt;
&lt;br /&gt;
Heat capacity simulations showed the expected trend of heat capacity at constant volume decreasing with increasing temperature. Furthermore, heat capacity increases with increasing density as there are more particles and hence more energy states that need to be filled to increase the temperature, therefore requiring a larger amount of energy to do so.&lt;br /&gt;
&lt;br /&gt;
Radial distribution function simulations gave information about the coordination around particles in each phase. The solid has a regular ordered crystal structure and hence the radial distribution function displays many peaks. For liquids there is some short range order, shown by 4 peaks of decreasing intensity corresponding to 4 initial coordination shells around the liquid, however it decays quickly due to the ability of particles to diffuse away, resulting in very little long range order. For a gas, there is one initial coordination shell shown by the sharp initial peak, however it then decays to the bulk density value and remains constant due to the high diffusive nature of a gas, there is no long range order past this first coordination shell. &lt;br /&gt;
&lt;br /&gt;
Both methods of calculation of the diffusion coefficient give the expected results, with a gas having a large value, liquid a small value and the solid with a value close to 0. The values obtained from each method compare well to each other, as well as the values obtained from the 1,000,000 atom simulation. However, it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. Furthermore, the VACF method will have significant error due to the error in using the trapezium rule to calculate the integral of the VACF. &lt;br /&gt;
&lt;br /&gt;
In conclusion, molecular dynamics simulation has allowed fast and accurate calculations of a range of key thermodynamic properties of a range of systems. It is clear that the use of these simulations is invaluable for the determination of these properties with applications in a range of industries, on key example being in the design of power stations. Furthermore, none of the simulations took longer than 5 minutes, illustrating another key benefit of using molecular dynamics simulations. In future calculations, calculations should be done on larger systems to acquire a more accurate average, as well as possibly introducing a second type of particle into the system to analyse how it effects the properties of the system.&lt;br /&gt;
&lt;br /&gt;
==Tasks==&lt;br /&gt;
The answers to all tasks are below, some have already been answered in the report above. &lt;br /&gt;
&lt;br /&gt;
===Introduction to molecular dynamics simulation===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by &amp;lt;math&amp;gt; x\left(t\right) = A\cos\left(\omega t + \phi\right)&amp;lt;/math&amp;gt; (the values of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:HO_1.png|350px|thumb|center|Figure 19: Analytical position as a function of time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO2.png|350px|thumb|center|Figure 20: Total energy as a function time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO3.png|350px|thumb|center|Figure 21: Error between the velocity-Verlet algorithm and analytical values as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHO4.png|500px|thumb|center|Figure 22: Error maximum as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK:&amp;lt;/big&amp;gt; For a single Lennard-Jones interaction, &amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;, find the separation, &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt;, at which the potential energy is zero. What is the force at this separation? Find the equilibrium separation, &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, and work out the well depth (&amp;lt;math&amp;gt;\phi\left(r_{eq}\right)&amp;lt;/math&amp;gt;). Evaluate the integrals &amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\int_{2.5\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\int_{3\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;\sigma = \epsilon = 1.0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* The separation r&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; at which the potential energy is zero, is when &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The force at this separation is equal to &amp;lt;math&amp;gt;24\epsilon/\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The equilibrium separation &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;eq&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = 2&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;1/6&amp;lt;/sup&amp;gt;&amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The potential well depth is equal to &amp;lt;math&amp;gt;-\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
* Evaluation of integrals:&lt;br /&gt;
&lt;br /&gt;
[[File:Reallastboy.PNG|400px|none]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions. Estimate the volume of &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; water molecules under standard conditions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Assumptions:&lt;br /&gt;
* 1mL of water = 1g of water &lt;br /&gt;
&lt;br /&gt;
Number of water molecules in 1g:&lt;br /&gt;
* Moles in 1g = 1/18 &lt;br /&gt;
* Number of molecules = N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; x 1/18 = &amp;lt;b&amp;gt;3.35 x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Volume of 10000 water molecules:&lt;br /&gt;
* Moles = 10000/N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Mass = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt; x 18 = 2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;g&lt;br /&gt;
* Volume = &amp;lt;b&amp;gt;2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, &#039;&#039;after the periodic boundary conditions have been applied&#039;&#039;?&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
It ends up at the point with coordinates - &amp;lt;math&amp;gt;(0.2, 0.1, 0.7)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: The Lennard-Jones parameters for argon are &amp;lt;math&amp;gt;\sigma = 0.34\mathrm{nm}, \epsilon\ /\ k_B= 120 \mathrm{K}&amp;lt;/math&amp;gt;. If the LJ cutoff is &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;, what is it in real units? What is the well depth in &amp;lt;math&amp;gt;\mathrm{kJ\ mol}^{-1}&amp;lt;/math&amp;gt;? What is the reduced temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt; in real units?&lt;br /&gt;
&lt;br /&gt;
* LJ cutoff in real units &amp;lt;math&amp;gt;= 1.088 nm&amp;lt;/math&amp;gt;&lt;br /&gt;
* Well Depth &amp;lt;math&amp;gt;= 0.998 kJ mol&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Reduced Temperature &amp;lt;math&amp;gt; = 180K&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Equilibration===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Atoms cannot be given random starting coordinates as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For a face-centred cubic lattice with a lattice point density of 1.2, the side length of the cubic unit cell is 1.494.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A face-centred cubic lattice has 4 lattice points and hence four atoms, whereas a cubic lattice has 1 of each. Therefore, there would be 4000 atoms in a 10 x 10 x 10 box.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Line 1: Sets the mass of all atoms of type 1 to 1.0&lt;br /&gt;
* Line 2: States that the interaction between atoms is to be modelled on the Leonard-Jones potential with a cut off distance of 3.0&lt;br /&gt;
* Line 3: Sets the pairwise force field coefficients for all atoms, in this case, this is the well depth and the distance at 0 potential - both are set to 1.0&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet Algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The initial script sets the time-step as a variable which can be called later in the script, the second script does not do this. Therefore, if a simulation is to be run on a different time-step, the input file with the initial script only needs to change the time-step in one place (where the variable is defined). Whereas, in the second script, the time-step will have to be changed everywhere that it is used in the input file. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). Does the simulation reach equilibrium? How long does this take? When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results? Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 23: Temperature as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 24: Pressure as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 25: Total energy as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It takes approximately 0.3s for the system to reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|500px|thumb|none|Figure 26: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Of the 5 timesteps, 0.0025 is the largest to give acceptable results. A timestep of 0.015 is particularly bad as the system does not reach equilibrium at all. The other 4 time steps do all reach equilibrium however 0.001 and 0.0025 are the only two which reach an accurate equilibrium value for total energy.&lt;br /&gt;
&lt;br /&gt;
===Running simulations under specific conditions===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Choose 5 temperatures (above the critical temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt;), and two pressures (you can get a good idea of what a reasonable pressure is in Lennard-Jones units by looking at the average pressure of your simulations from the last section). This gives ten phase points &amp;amp;mdash; five temperatures at each pressure. Create 10 copies of npt.in, and modify each to run a simulation at one of your chosen &amp;lt;math&amp;gt;\left(p, T\right)&amp;lt;/math&amp;gt; points. You should be able to use the results of the previous section to choose a timestep. Submit these ten jobs to the HPC portal. While you wait for them to finish, you should read the next section.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Derivation_1_PictureJPW.PNG|400px|thumb|none|Figure 27: Derivation of velocity scaling factor &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. How often will values of the temperature, etc., be sampled for the average? How many measurements contribute to the average? Looking to the following line, how much time will you simulate?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The three numbers correspond Nevery, Nrepeat and Nfreq.&lt;br /&gt;
&lt;br /&gt;
* Nevery corresponds to how often input values are sampled for the average - for example, temperature will be sampled for the average every 100 timesteps.&lt;br /&gt;
* Nrepeat corresponds to the number of values used to calculate the average - in this case 1000 values (measurements) are used (contribute) to calculating the average.&lt;br /&gt;
* Nfreq corresponds to the timestep at which the average is calculated - the 100000th timestep.&lt;br /&gt;
&lt;br /&gt;
This therefore means that there are 100000 timesteps and with a timestep of 0.0025, the time simulated = 250 seconds. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.  Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|none|Figure 28: Density as a function of temperature for a system at 2 different pressures.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
===Calculating heat capacities using statistical physics===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|none|Figure 29: Constant volume heat capacity as a function of temperature.]]&lt;br /&gt;
&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
An example of the input script used can be found below:&lt;br /&gt;
&lt;br /&gt;
[[File:ExampleInputFileJPW.in]]&lt;br /&gt;
&lt;br /&gt;
===Structural properties and the radial distribution function===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. In the solid case, illustrate which lattice sites the first three peaks correspond to. What is the lattice spacing? What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|500px|thumb|none|Figure 30: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse and therefore the chance of finding another particle is equal to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
===Dynamic properties and the diffusion coefficient===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the D subfolder, there is a file &#039;&#039;liq.in&#039;&#039; that will run a simulation at specified density and temperature to calculate the mean squared displacement and velocity autocorrelation function of your system. Run one of these simulations for a vapour, liquid, and solid. You have also been given some simulated data from much larger systems (approximately one million atoms). You will need these files later.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 30: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 31: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 32: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 33: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 34: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 35: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 36: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure X) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent? Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? Attach a copy of your plot to your writeup.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The derivation for the normalised velocity autocorrelation function for a 1D harmonic oscillator is shown below, along with two trigonometric identities used in the derivation.&lt;br /&gt;
&lt;br /&gt;
[[File:Trigonometric_IdentitiesJPW.PNG|400px|thumb|none|Figure 37: Trigonometric identities used in derivation of VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
[[File:JPWD2.PNG|600px|thumb|none|Figure 38: Derivation of the VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
&lt;br /&gt;
A plot showing the VACF for the liquid and solid simulations, as well as for a 1D harmonic oscillator with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; is shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:FinaleJPW.png|600px|thumb|none|Figure 39: VACF as a function of timestep for the liquid and solid phases as well as for a 1D harmonic oscillator.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 39), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms.&lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the trapezium rule to approximate the integral under the velocity autocorrelation function for the solid, liquid, and gas, and use these values to estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. You should make a plot of the running integral in each case. Are they as you expect? Repeat this procedure for the VACF data that you were given from the one million atom simulations. What do you think is the largest source of error in your estimates of D from the VACF?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|400px|thumb|none|Figure 40: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|400px|thumb|none|Figure 41: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure X.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 42: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;L-J Article&amp;quot;&amp;gt;J.P.Hansen, L.Verlet, &amp;lt;i&amp;gt;Phys.Rev.&amp;lt;/i&amp;gt;, 1969, &amp;lt;b&amp;gt;184&amp;lt;/b&amp;gt;, 151&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696390</id>
		<title>User:Jpw115</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696390"/>
		<updated>2018-04-23T15:58:30Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Radial distribution function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=color:red&amp;gt; colour red &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Liquid Simulations - Jack Williams=&lt;br /&gt;
==Abstract==&lt;br /&gt;
Key thermodynamic properties of a system modelled on the Leonard-Jones potential were investigated using molecular dynamics simulation. Density and heat capacity were measured as functions of temperature to analyse how the system evolves with changing temperature, both were discovered to decrease with increasing temperature. Radial distribution functions were calculated to analyse the structure of the system in each of the 3 phases. It was discovered that solids, due to the crystalline fixed structure have high long range order, liquids have some order that decreases over time due to the ability of the particles to diffuse away, and gasses have negligible long range order due to the very low density of the gaseous system. The diffusion coefficient for each phase was measured using two methods, the mean squared displacement method (MSD) and the velocity autocorrelation method (VACF). Both produced the expected results of a high diffusion coefficient for a gas, fairly low for liquid and a diffusion coefficient close to zero for the solid phase. Both methods produced similar results, however due to the error in calculating the integral in the VACF method (trapezium rule), the values calculated using the MSD method are more accurate. These results compared well to simulations run on larger systems, which due to the larger amount of data contributing to the average, are more accurate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good abstract: tells the reader concisely what you did and your main results/conclusions. My only qualm is that saying you &amp;quot;discovered&amp;quot; long vs. short range order in the phases of matter seems like it is a novel result. Perhaps &amp;quot;verified&amp;quot; would have been better. This is a minor point though.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Knowledge and understanding of the thermodynamic properties of systems, for example the phase transitions, has a wide range of applications in a number of industries. One key industry in which this knowledge is vital for proper function, is in power generation, for example in fossil fuel power stations and nuclear power stations. Both types of station function via heating liquid water which then evaporates forming steam, which is used to turn a turbine connected to a generator which generates electrical energy. The steam then condenses back to liquid water to be re-used. &lt;br /&gt;
To maximise efficiency, certain factors, for example the dimensions of the system carrying the water, need to be controlled:&lt;br /&gt;
* Initially, to avoid the waste of thermal energy produced from the burning of fossil fuels (or generated from nuclear fission), knowledge of the heat capacity of water can be used to determine the optimal volume of water in which to heat based on the amount of energy generated from the burning of the fuel. &lt;br /&gt;
* The steam driving the turbine needs to be at a high pressure to ensure the turbine is being spun at a maximal rate. Knowledge of how the pressure of water varies with temperature as well as the volume of container is important in determining the required dimensions of the system containing the water, to ensure optimal steam pressure Furthermore, knowledge of how the phase transitions of water is vital in ensuring that the steam does not condense back to water before passing through the turbine.  &lt;br /&gt;
&lt;br /&gt;
Originally these properties would have been determined through experimentation, however today the use of molecular dynamics simulations allows their determination in a much more cheap and facile way. This investigation aims to demonstrate the versatility of molecular dynamics by simulating the thermodynamic properties of a few simple systems without setting foot in a laboratory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good motivation. The introduction (or theory section if there is a separate section for this) usually includes the background theory required for your reader to understand what you have done. This is included in your methodology section, which is usually instead a concise summary of your simulation details needed to reproduce your results. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Aims &amp;amp; Objectives==&lt;br /&gt;
To use computational modelling to determine key thermodynamic features of simple systems:&lt;br /&gt;
* Investigate the change in density of a system with varying temperature and pressure &lt;br /&gt;
* Investigate the change in constant volume heat capacity of a system with temperature&lt;br /&gt;
* Investigate the change in radial distribution function of a system in the solid, liquid and gas phases&lt;br /&gt;
* Determine the diffusion coefficient for a system in the solid, liquid and gas phases&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
This investigation uses the software LAMMPS (Large-scale Atomic/Molecular Massively Parallel Simulator), to run simulations on simple systems. &lt;br /&gt;
Trajectories of atoms were visualised using the software VMD (Visual Molecular Dynamics). &amp;lt;span style=color:red&amp;gt; A citation of LAMMPS would be good - it is a serious endeavour by many people and worthy of acknowledgement.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting up the system===&lt;br /&gt;
For the simulation of a simple liquid, initial coordinates for atoms cannot be randomly generated and therefore a crystal lattice (simple cubic) is generated which is then melted - the simulation is set to run and over time the atoms rearrange into a configuration of higher disorder more closely modelling a liquid. Atoms cannot be given random starting coordinates to model this liquid configuration as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
Other key specifications of the system are below:&lt;br /&gt;
* the mass of all atoms was set to 1.0&lt;br /&gt;
* the interaction between atoms in the system was modelled on a Leonard-Jones potential&lt;br /&gt;
* the cut-off distance was set to 3.0 in reduced units&lt;br /&gt;
* the pairwise force field coefficients were set to 1.0 for both the potential well depth and the zero-potential distance &lt;br /&gt;
* all atoms were assigned random velocities following the Maxwell-Boltzmann distribution&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; The last point is not necessary since you have done NPT/NVT calculations, the thermostat will equilibrate temperatures. It is also a very routine detail - assumed to be so.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating thermodynamic quantities===&lt;br /&gt;
The simulation measures thermodynamics properties of the system for example: total energy, temperature, pressure, mean squared displacement and the velocity auto-correlation function of the system, at certain time-steps for a certain number of runs. &lt;br /&gt;
&lt;br /&gt;
Before simulations were run to gather data, it was confirmed that the system reaches equilibrium. Graphs showing how total energy, temperature and pressure change with time for a time-step of 0.001 are displayed below. After approximately 0.3 seconds, the system reaches equilibrium and fluctuates around an equilibrium value for each of the properties. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Graphs/data proving the system is equilibrated is not usually shown in a scientific paper, unless there is cause - it is assumed this is done correctly. Simply &amp;quot;... were equilibrated for X time units at Y and Z&amp;quot; would be sufficient. These graphs/data would be more at home in the tasks section. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 1: Temperature as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 2: Pressure as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 3: Total energy as a function of time.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 time-steps were tested to determine the most adequate. Figure 4 to the right shows how the total energy changes over time for each of the 5 timesteps. It can be seen that a time-step of 0.0025 is the highest time-step that still gives an accurate equilibrium total energy, hence, this time-step was used in further simulations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|600px|thumb|right|Figure 4: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the equation of state of the model described above, by calculating the density of a NpT system at varying pressure and temperature. 2 pressures and 5 temperatures were chosen (p = 2.5, 2.75; T = 1.75, 2, 2, 2.25, 3, 5), and a simulation was run for each combination giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the change in constant volume heat capacity with temperature. 2 densities and 5 temperatures were chosen (&amp;lt;math&amp;gt;\rho&amp;lt;/math&amp;gt;= 0.2, 0.8; T = 2.0, 2.2, 2.4, 2.6, 2.8), giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to model the radial distribution function as a function of distance, using the software VMD. 3 simulations were run, each with a specified density and temperature correlating to a system in each of the 3 phases&amp;lt;ref name=&amp;quot;L-J Article&amp;quot; /&amp;gt;: solid, liquid and gas. &lt;br /&gt;
* Solid: Density = 1.25, Temperature = 1.0&lt;br /&gt;
* Liquid: Density = 0.8, Temperature = 1.2 &lt;br /&gt;
* Gas: Density = 0.025, Temperature = 1.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; You do not really need to specify VMD here - there are a host of programs that can calculate a RDF, and not so hard a program to write yourself. If you insist on specifying VMD, the full name and citation would be good.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mean squared displacement (MSD) and velocity autocorrelation function (VACF) were calculated using the same densities and temperatures specified above (same as RDF)  to model a system in each of the 3 phases. Both the MSD and VACF were used to calculate the diffusion coefficient (D) for each phase, using the following relationships.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{3}\int_0^\infty \mathrm{d}\tau \left\langle\mathbf{v}\left(0\right)\cdot\mathbf{v}\left(\tau\right)\right\rangle&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Results &amp;amp; Discussion==&lt;br /&gt;
===Equations of state===&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|center|Figure 5: Density as a function of temperature for a system at 2 different pressures, as well as the corresponding densities as predicted by the ideal gas law.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Scientific style: instead of e.g. &amp;quot;more closely models and ideal gas&amp;quot; perhaps something like &amp;quot;tends toward the ideal gas eq. of state in the high temperature limit. Also an explanation of why this is would be beneficial here - think about what happens in terms of phase space sampling at a given temperature. How could you connect that to the PES and PE/KE a given LJ particle has?  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Heat capacity at constant volume===&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|center|Figure 6: Constant volume heat capacity as a function of temperature for 2 different densities.]]&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
===Radial distribution function===&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|600px|thumb|center|Figure 7: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse with no order.&lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; A more quantitative discussion would be good.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Diffusion coefficient===&lt;br /&gt;
&amp;lt;b&amp;gt;MSD Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 8: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 9: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 10: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step for a system with 1,000,000 atoms are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 11: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 12: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 13: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 14: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure 10) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;VACF Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:FinaleJPW.png|350px|thumb|none|Figure 15: VACF as a function of time for the solid and liquid phases along with the 1D Harmonic oscillator.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|350px|thumb|none|Figure 16: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|350px|thumb|none|Figure 17: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The trapezium rule was used to calculate the integral of the VACF for each phase.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were then calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure 18.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 18: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 15), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms. &lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system. &lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Equation of state simulations, on a system of constant pressure determined that the density of a system at constant pressure decreased with increasing temperature. The simulated density is lower than that predicted by the ideal gas law as the system is not behaving ideally  (there are interactions between the particles), however this discrepancy decreases with increasing temperature.&lt;br /&gt;
&lt;br /&gt;
Heat capacity simulations showed the expected trend of heat capacity at constant volume decreasing with increasing temperature. Furthermore, heat capacity increases with increasing density as there are more particles and hence more energy states that need to be filled to increase the temperature, therefore requiring a larger amount of energy to do so.&lt;br /&gt;
&lt;br /&gt;
Radial distribution function simulations gave information about the coordination around particles in each phase. The solid has a regular ordered crystal structure and hence the radial distribution function displays many peaks. For liquids there is some short range order, shown by 4 peaks of decreasing intensity corresponding to 4 initial coordination shells around the liquid, however it decays quickly due to the ability of particles to diffuse away, resulting in very little long range order. For a gas, there is one initial coordination shell shown by the sharp initial peak, however it then decays to the bulk density value and remains constant due to the high diffusive nature of a gas, there is no long range order past this first coordination shell. &lt;br /&gt;
&lt;br /&gt;
Both methods of calculation of the diffusion coefficient give the expected results, with a gas having a large value, liquid a small value and the solid with a value close to 0. The values obtained from each method compare well to each other, as well as the values obtained from the 1,000,000 atom simulation. However, it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. Furthermore, the VACF method will have significant error due to the error in using the trapezium rule to calculate the integral of the VACF. &lt;br /&gt;
&lt;br /&gt;
In conclusion, molecular dynamics simulation has allowed fast and accurate calculations of a range of key thermodynamic properties of a range of systems. It is clear that the use of these simulations is invaluable for the determination of these properties with applications in a range of industries, on key example being in the design of power stations. Furthermore, none of the simulations took longer than 5 minutes, illustrating another key benefit of using molecular dynamics simulations. In future calculations, calculations should be done on larger systems to acquire a more accurate average, as well as possibly introducing a second type of particle into the system to analyse how it effects the properties of the system.&lt;br /&gt;
&lt;br /&gt;
==Tasks==&lt;br /&gt;
The answers to all tasks are below, some have already been answered in the report above. &lt;br /&gt;
&lt;br /&gt;
===Introduction to molecular dynamics simulation===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by &amp;lt;math&amp;gt; x\left(t\right) = A\cos\left(\omega t + \phi\right)&amp;lt;/math&amp;gt; (the values of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:HO_1.png|350px|thumb|center|Figure 19: Analytical position as a function of time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO2.png|350px|thumb|center|Figure 20: Total energy as a function time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO3.png|350px|thumb|center|Figure 21: Error between the velocity-Verlet algorithm and analytical values as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHO4.png|500px|thumb|center|Figure 22: Error maximum as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK:&amp;lt;/big&amp;gt; For a single Lennard-Jones interaction, &amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;, find the separation, &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt;, at which the potential energy is zero. What is the force at this separation? Find the equilibrium separation, &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, and work out the well depth (&amp;lt;math&amp;gt;\phi\left(r_{eq}\right)&amp;lt;/math&amp;gt;). Evaluate the integrals &amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\int_{2.5\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\int_{3\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;\sigma = \epsilon = 1.0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* The separation r&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; at which the potential energy is zero, is when &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The force at this separation is equal to &amp;lt;math&amp;gt;24\epsilon/\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The equilibrium separation &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;eq&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = 2&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;1/6&amp;lt;/sup&amp;gt;&amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The potential well depth is equal to &amp;lt;math&amp;gt;-\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
* Evaluation of integrals:&lt;br /&gt;
&lt;br /&gt;
[[File:Reallastboy.PNG|400px|none]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions. Estimate the volume of &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; water molecules under standard conditions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Assumptions:&lt;br /&gt;
* 1mL of water = 1g of water &lt;br /&gt;
&lt;br /&gt;
Number of water molecules in 1g:&lt;br /&gt;
* Moles in 1g = 1/18 &lt;br /&gt;
* Number of molecules = N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; x 1/18 = &amp;lt;b&amp;gt;3.35 x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Volume of 10000 water molecules:&lt;br /&gt;
* Moles = 10000/N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Mass = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt; x 18 = 2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;g&lt;br /&gt;
* Volume = &amp;lt;b&amp;gt;2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, &#039;&#039;after the periodic boundary conditions have been applied&#039;&#039;?&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
It ends up at the point with coordinates - &amp;lt;math&amp;gt;(0.2, 0.1, 0.7)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: The Lennard-Jones parameters for argon are &amp;lt;math&amp;gt;\sigma = 0.34\mathrm{nm}, \epsilon\ /\ k_B= 120 \mathrm{K}&amp;lt;/math&amp;gt;. If the LJ cutoff is &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;, what is it in real units? What is the well depth in &amp;lt;math&amp;gt;\mathrm{kJ\ mol}^{-1}&amp;lt;/math&amp;gt;? What is the reduced temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt; in real units?&lt;br /&gt;
&lt;br /&gt;
* LJ cutoff in real units &amp;lt;math&amp;gt;= 1.088 nm&amp;lt;/math&amp;gt;&lt;br /&gt;
* Well Depth &amp;lt;math&amp;gt;= 0.998 kJ mol&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Reduced Temperature &amp;lt;math&amp;gt; = 180K&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Equilibration===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Atoms cannot be given random starting coordinates as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For a face-centred cubic lattice with a lattice point density of 1.2, the side length of the cubic unit cell is 1.494.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A face-centred cubic lattice has 4 lattice points and hence four atoms, whereas a cubic lattice has 1 of each. Therefore, there would be 4000 atoms in a 10 x 10 x 10 box.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Line 1: Sets the mass of all atoms of type 1 to 1.0&lt;br /&gt;
* Line 2: States that the interaction between atoms is to be modelled on the Leonard-Jones potential with a cut off distance of 3.0&lt;br /&gt;
* Line 3: Sets the pairwise force field coefficients for all atoms, in this case, this is the well depth and the distance at 0 potential - both are set to 1.0&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet Algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The initial script sets the time-step as a variable which can be called later in the script, the second script does not do this. Therefore, if a simulation is to be run on a different time-step, the input file with the initial script only needs to change the time-step in one place (where the variable is defined). Whereas, in the second script, the time-step will have to be changed everywhere that it is used in the input file. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). Does the simulation reach equilibrium? How long does this take? When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results? Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 23: Temperature as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 24: Pressure as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 25: Total energy as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It takes approximately 0.3s for the system to reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|500px|thumb|none|Figure 26: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Of the 5 timesteps, 0.0025 is the largest to give acceptable results. A timestep of 0.015 is particularly bad as the system does not reach equilibrium at all. The other 4 time steps do all reach equilibrium however 0.001 and 0.0025 are the only two which reach an accurate equilibrium value for total energy.&lt;br /&gt;
&lt;br /&gt;
===Running simulations under specific conditions===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Choose 5 temperatures (above the critical temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt;), and two pressures (you can get a good idea of what a reasonable pressure is in Lennard-Jones units by looking at the average pressure of your simulations from the last section). This gives ten phase points &amp;amp;mdash; five temperatures at each pressure. Create 10 copies of npt.in, and modify each to run a simulation at one of your chosen &amp;lt;math&amp;gt;\left(p, T\right)&amp;lt;/math&amp;gt; points. You should be able to use the results of the previous section to choose a timestep. Submit these ten jobs to the HPC portal. While you wait for them to finish, you should read the next section.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Derivation_1_PictureJPW.PNG|400px|thumb|none|Figure 27: Derivation of velocity scaling factor &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. How often will values of the temperature, etc., be sampled for the average? How many measurements contribute to the average? Looking to the following line, how much time will you simulate?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The three numbers correspond Nevery, Nrepeat and Nfreq.&lt;br /&gt;
&lt;br /&gt;
* Nevery corresponds to how often input values are sampled for the average - for example, temperature will be sampled for the average every 100 timesteps.&lt;br /&gt;
* Nrepeat corresponds to the number of values used to calculate the average - in this case 1000 values (measurements) are used (contribute) to calculating the average.&lt;br /&gt;
* Nfreq corresponds to the timestep at which the average is calculated - the 100000th timestep.&lt;br /&gt;
&lt;br /&gt;
This therefore means that there are 100000 timesteps and with a timestep of 0.0025, the time simulated = 250 seconds. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.  Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|none|Figure 28: Density as a function of temperature for a system at 2 different pressures.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
===Calculating heat capacities using statistical physics===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|none|Figure 29: Constant volume heat capacity as a function of temperature.]]&lt;br /&gt;
&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
An example of the input script used can be found below:&lt;br /&gt;
&lt;br /&gt;
[[File:ExampleInputFileJPW.in]]&lt;br /&gt;
&lt;br /&gt;
===Structural properties and the radial distribution function===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. In the solid case, illustrate which lattice sites the first three peaks correspond to. What is the lattice spacing? What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|500px|thumb|none|Figure 30: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse and therefore the chance of finding another particle is equal to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
===Dynamic properties and the diffusion coefficient===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the D subfolder, there is a file &#039;&#039;liq.in&#039;&#039; that will run a simulation at specified density and temperature to calculate the mean squared displacement and velocity autocorrelation function of your system. Run one of these simulations for a vapour, liquid, and solid. You have also been given some simulated data from much larger systems (approximately one million atoms). You will need these files later.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 30: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 31: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 32: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 33: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 34: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 35: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 36: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure X) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent? Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? Attach a copy of your plot to your writeup.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The derivation for the normalised velocity autocorrelation function for a 1D harmonic oscillator is shown below, along with two trigonometric identities used in the derivation.&lt;br /&gt;
&lt;br /&gt;
[[File:Trigonometric_IdentitiesJPW.PNG|400px|thumb|none|Figure 37: Trigonometric identities used in derivation of VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
[[File:JPWD2.PNG|600px|thumb|none|Figure 38: Derivation of the VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
&lt;br /&gt;
A plot showing the VACF for the liquid and solid simulations, as well as for a 1D harmonic oscillator with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; is shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:FinaleJPW.png|600px|thumb|none|Figure 39: VACF as a function of timestep for the liquid and solid phases as well as for a 1D harmonic oscillator.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 39), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms.&lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the trapezium rule to approximate the integral under the velocity autocorrelation function for the solid, liquid, and gas, and use these values to estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. You should make a plot of the running integral in each case. Are they as you expect? Repeat this procedure for the VACF data that you were given from the one million atom simulations. What do you think is the largest source of error in your estimates of D from the VACF?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|400px|thumb|none|Figure 40: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|400px|thumb|none|Figure 41: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure X.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 42: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;L-J Article&amp;quot;&amp;gt;J.P.Hansen, L.Verlet, &amp;lt;i&amp;gt;Phys.Rev.&amp;lt;/i&amp;gt;, 1969, &amp;lt;b&amp;gt;184&amp;lt;/b&amp;gt;, 151&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696389</id>
		<title>User:Jpw115</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696389"/>
		<updated>2018-04-23T15:57:36Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Equations of state */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=color:red&amp;gt; colour red &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Liquid Simulations - Jack Williams=&lt;br /&gt;
==Abstract==&lt;br /&gt;
Key thermodynamic properties of a system modelled on the Leonard-Jones potential were investigated using molecular dynamics simulation. Density and heat capacity were measured as functions of temperature to analyse how the system evolves with changing temperature, both were discovered to decrease with increasing temperature. Radial distribution functions were calculated to analyse the structure of the system in each of the 3 phases. It was discovered that solids, due to the crystalline fixed structure have high long range order, liquids have some order that decreases over time due to the ability of the particles to diffuse away, and gasses have negligible long range order due to the very low density of the gaseous system. The diffusion coefficient for each phase was measured using two methods, the mean squared displacement method (MSD) and the velocity autocorrelation method (VACF). Both produced the expected results of a high diffusion coefficient for a gas, fairly low for liquid and a diffusion coefficient close to zero for the solid phase. Both methods produced similar results, however due to the error in calculating the integral in the VACF method (trapezium rule), the values calculated using the MSD method are more accurate. These results compared well to simulations run on larger systems, which due to the larger amount of data contributing to the average, are more accurate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good abstract: tells the reader concisely what you did and your main results/conclusions. My only qualm is that saying you &amp;quot;discovered&amp;quot; long vs. short range order in the phases of matter seems like it is a novel result. Perhaps &amp;quot;verified&amp;quot; would have been better. This is a minor point though.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Knowledge and understanding of the thermodynamic properties of systems, for example the phase transitions, has a wide range of applications in a number of industries. One key industry in which this knowledge is vital for proper function, is in power generation, for example in fossil fuel power stations and nuclear power stations. Both types of station function via heating liquid water which then evaporates forming steam, which is used to turn a turbine connected to a generator which generates electrical energy. The steam then condenses back to liquid water to be re-used. &lt;br /&gt;
To maximise efficiency, certain factors, for example the dimensions of the system carrying the water, need to be controlled:&lt;br /&gt;
* Initially, to avoid the waste of thermal energy produced from the burning of fossil fuels (or generated from nuclear fission), knowledge of the heat capacity of water can be used to determine the optimal volume of water in which to heat based on the amount of energy generated from the burning of the fuel. &lt;br /&gt;
* The steam driving the turbine needs to be at a high pressure to ensure the turbine is being spun at a maximal rate. Knowledge of how the pressure of water varies with temperature as well as the volume of container is important in determining the required dimensions of the system containing the water, to ensure optimal steam pressure Furthermore, knowledge of how the phase transitions of water is vital in ensuring that the steam does not condense back to water before passing through the turbine.  &lt;br /&gt;
&lt;br /&gt;
Originally these properties would have been determined through experimentation, however today the use of molecular dynamics simulations allows their determination in a much more cheap and facile way. This investigation aims to demonstrate the versatility of molecular dynamics by simulating the thermodynamic properties of a few simple systems without setting foot in a laboratory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good motivation. The introduction (or theory section if there is a separate section for this) usually includes the background theory required for your reader to understand what you have done. This is included in your methodology section, which is usually instead a concise summary of your simulation details needed to reproduce your results. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Aims &amp;amp; Objectives==&lt;br /&gt;
To use computational modelling to determine key thermodynamic features of simple systems:&lt;br /&gt;
* Investigate the change in density of a system with varying temperature and pressure &lt;br /&gt;
* Investigate the change in constant volume heat capacity of a system with temperature&lt;br /&gt;
* Investigate the change in radial distribution function of a system in the solid, liquid and gas phases&lt;br /&gt;
* Determine the diffusion coefficient for a system in the solid, liquid and gas phases&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
This investigation uses the software LAMMPS (Large-scale Atomic/Molecular Massively Parallel Simulator), to run simulations on simple systems. &lt;br /&gt;
Trajectories of atoms were visualised using the software VMD (Visual Molecular Dynamics). &amp;lt;span style=color:red&amp;gt; A citation of LAMMPS would be good - it is a serious endeavour by many people and worthy of acknowledgement.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting up the system===&lt;br /&gt;
For the simulation of a simple liquid, initial coordinates for atoms cannot be randomly generated and therefore a crystal lattice (simple cubic) is generated which is then melted - the simulation is set to run and over time the atoms rearrange into a configuration of higher disorder more closely modelling a liquid. Atoms cannot be given random starting coordinates to model this liquid configuration as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
Other key specifications of the system are below:&lt;br /&gt;
* the mass of all atoms was set to 1.0&lt;br /&gt;
* the interaction between atoms in the system was modelled on a Leonard-Jones potential&lt;br /&gt;
* the cut-off distance was set to 3.0 in reduced units&lt;br /&gt;
* the pairwise force field coefficients were set to 1.0 for both the potential well depth and the zero-potential distance &lt;br /&gt;
* all atoms were assigned random velocities following the Maxwell-Boltzmann distribution&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; The last point is not necessary since you have done NPT/NVT calculations, the thermostat will equilibrate temperatures. It is also a very routine detail - assumed to be so.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating thermodynamic quantities===&lt;br /&gt;
The simulation measures thermodynamics properties of the system for example: total energy, temperature, pressure, mean squared displacement and the velocity auto-correlation function of the system, at certain time-steps for a certain number of runs. &lt;br /&gt;
&lt;br /&gt;
Before simulations were run to gather data, it was confirmed that the system reaches equilibrium. Graphs showing how total energy, temperature and pressure change with time for a time-step of 0.001 are displayed below. After approximately 0.3 seconds, the system reaches equilibrium and fluctuates around an equilibrium value for each of the properties. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Graphs/data proving the system is equilibrated is not usually shown in a scientific paper, unless there is cause - it is assumed this is done correctly. Simply &amp;quot;... were equilibrated for X time units at Y and Z&amp;quot; would be sufficient. These graphs/data would be more at home in the tasks section. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 1: Temperature as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 2: Pressure as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 3: Total energy as a function of time.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 time-steps were tested to determine the most adequate. Figure 4 to the right shows how the total energy changes over time for each of the 5 timesteps. It can be seen that a time-step of 0.0025 is the highest time-step that still gives an accurate equilibrium total energy, hence, this time-step was used in further simulations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|600px|thumb|right|Figure 4: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the equation of state of the model described above, by calculating the density of a NpT system at varying pressure and temperature. 2 pressures and 5 temperatures were chosen (p = 2.5, 2.75; T = 1.75, 2, 2, 2.25, 3, 5), and a simulation was run for each combination giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the change in constant volume heat capacity with temperature. 2 densities and 5 temperatures were chosen (&amp;lt;math&amp;gt;\rho&amp;lt;/math&amp;gt;= 0.2, 0.8; T = 2.0, 2.2, 2.4, 2.6, 2.8), giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to model the radial distribution function as a function of distance, using the software VMD. 3 simulations were run, each with a specified density and temperature correlating to a system in each of the 3 phases&amp;lt;ref name=&amp;quot;L-J Article&amp;quot; /&amp;gt;: solid, liquid and gas. &lt;br /&gt;
* Solid: Density = 1.25, Temperature = 1.0&lt;br /&gt;
* Liquid: Density = 0.8, Temperature = 1.2 &lt;br /&gt;
* Gas: Density = 0.025, Temperature = 1.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; You do not really need to specify VMD here - there are a host of programs that can calculate a RDF, and not so hard a program to write yourself. If you insist on specifying VMD, the full name and citation would be good.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mean squared displacement (MSD) and velocity autocorrelation function (VACF) were calculated using the same densities and temperatures specified above (same as RDF)  to model a system in each of the 3 phases. Both the MSD and VACF were used to calculate the diffusion coefficient (D) for each phase, using the following relationships.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{3}\int_0^\infty \mathrm{d}\tau \left\langle\mathbf{v}\left(0\right)\cdot\mathbf{v}\left(\tau\right)\right\rangle&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Results &amp;amp; Discussion==&lt;br /&gt;
===Equations of state===&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|center|Figure 5: Density as a function of temperature for a system at 2 different pressures, as well as the corresponding densities as predicted by the ideal gas law.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Scientific style: instead of e.g. &amp;quot;more closely models and ideal gas&amp;quot; perhaps something like &amp;quot;tends toward the ideal gas eq. of state in the high temperature limit. Also an explanation of why this is would be beneficial here - think about what happens in terms of phase space sampling at a given temperature. How could you connect that to the PES and PE/KE a given LJ particle has?  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Heat capacity at constant volume===&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|center|Figure 6: Constant volume heat capacity as a function of temperature for 2 different densities.]]&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
===Radial distribution function===&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|600px|thumb|center|Figure 7: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse with no order.&lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
===Diffusion coefficient===&lt;br /&gt;
&amp;lt;b&amp;gt;MSD Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 8: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 9: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 10: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step for a system with 1,000,000 atoms are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 11: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 12: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 13: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 14: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure 10) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;VACF Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:FinaleJPW.png|350px|thumb|none|Figure 15: VACF as a function of time for the solid and liquid phases along with the 1D Harmonic oscillator.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|350px|thumb|none|Figure 16: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|350px|thumb|none|Figure 17: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The trapezium rule was used to calculate the integral of the VACF for each phase.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were then calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure 18.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 18: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 15), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms. &lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system. &lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Equation of state simulations, on a system of constant pressure determined that the density of a system at constant pressure decreased with increasing temperature. The simulated density is lower than that predicted by the ideal gas law as the system is not behaving ideally  (there are interactions between the particles), however this discrepancy decreases with increasing temperature.&lt;br /&gt;
&lt;br /&gt;
Heat capacity simulations showed the expected trend of heat capacity at constant volume decreasing with increasing temperature. Furthermore, heat capacity increases with increasing density as there are more particles and hence more energy states that need to be filled to increase the temperature, therefore requiring a larger amount of energy to do so.&lt;br /&gt;
&lt;br /&gt;
Radial distribution function simulations gave information about the coordination around particles in each phase. The solid has a regular ordered crystal structure and hence the radial distribution function displays many peaks. For liquids there is some short range order, shown by 4 peaks of decreasing intensity corresponding to 4 initial coordination shells around the liquid, however it decays quickly due to the ability of particles to diffuse away, resulting in very little long range order. For a gas, there is one initial coordination shell shown by the sharp initial peak, however it then decays to the bulk density value and remains constant due to the high diffusive nature of a gas, there is no long range order past this first coordination shell. &lt;br /&gt;
&lt;br /&gt;
Both methods of calculation of the diffusion coefficient give the expected results, with a gas having a large value, liquid a small value and the solid with a value close to 0. The values obtained from each method compare well to each other, as well as the values obtained from the 1,000,000 atom simulation. However, it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. Furthermore, the VACF method will have significant error due to the error in using the trapezium rule to calculate the integral of the VACF. &lt;br /&gt;
&lt;br /&gt;
In conclusion, molecular dynamics simulation has allowed fast and accurate calculations of a range of key thermodynamic properties of a range of systems. It is clear that the use of these simulations is invaluable for the determination of these properties with applications in a range of industries, on key example being in the design of power stations. Furthermore, none of the simulations took longer than 5 minutes, illustrating another key benefit of using molecular dynamics simulations. In future calculations, calculations should be done on larger systems to acquire a more accurate average, as well as possibly introducing a second type of particle into the system to analyse how it effects the properties of the system.&lt;br /&gt;
&lt;br /&gt;
==Tasks==&lt;br /&gt;
The answers to all tasks are below, some have already been answered in the report above. &lt;br /&gt;
&lt;br /&gt;
===Introduction to molecular dynamics simulation===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by &amp;lt;math&amp;gt; x\left(t\right) = A\cos\left(\omega t + \phi\right)&amp;lt;/math&amp;gt; (the values of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:HO_1.png|350px|thumb|center|Figure 19: Analytical position as a function of time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO2.png|350px|thumb|center|Figure 20: Total energy as a function time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO3.png|350px|thumb|center|Figure 21: Error between the velocity-Verlet algorithm and analytical values as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHO4.png|500px|thumb|center|Figure 22: Error maximum as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK:&amp;lt;/big&amp;gt; For a single Lennard-Jones interaction, &amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;, find the separation, &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt;, at which the potential energy is zero. What is the force at this separation? Find the equilibrium separation, &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, and work out the well depth (&amp;lt;math&amp;gt;\phi\left(r_{eq}\right)&amp;lt;/math&amp;gt;). Evaluate the integrals &amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\int_{2.5\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\int_{3\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;\sigma = \epsilon = 1.0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* The separation r&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; at which the potential energy is zero, is when &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The force at this separation is equal to &amp;lt;math&amp;gt;24\epsilon/\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The equilibrium separation &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;eq&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = 2&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;1/6&amp;lt;/sup&amp;gt;&amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The potential well depth is equal to &amp;lt;math&amp;gt;-\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
* Evaluation of integrals:&lt;br /&gt;
&lt;br /&gt;
[[File:Reallastboy.PNG|400px|none]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions. Estimate the volume of &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; water molecules under standard conditions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Assumptions:&lt;br /&gt;
* 1mL of water = 1g of water &lt;br /&gt;
&lt;br /&gt;
Number of water molecules in 1g:&lt;br /&gt;
* Moles in 1g = 1/18 &lt;br /&gt;
* Number of molecules = N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; x 1/18 = &amp;lt;b&amp;gt;3.35 x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Volume of 10000 water molecules:&lt;br /&gt;
* Moles = 10000/N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Mass = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt; x 18 = 2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;g&lt;br /&gt;
* Volume = &amp;lt;b&amp;gt;2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, &#039;&#039;after the periodic boundary conditions have been applied&#039;&#039;?&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
It ends up at the point with coordinates - &amp;lt;math&amp;gt;(0.2, 0.1, 0.7)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: The Lennard-Jones parameters for argon are &amp;lt;math&amp;gt;\sigma = 0.34\mathrm{nm}, \epsilon\ /\ k_B= 120 \mathrm{K}&amp;lt;/math&amp;gt;. If the LJ cutoff is &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;, what is it in real units? What is the well depth in &amp;lt;math&amp;gt;\mathrm{kJ\ mol}^{-1}&amp;lt;/math&amp;gt;? What is the reduced temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt; in real units?&lt;br /&gt;
&lt;br /&gt;
* LJ cutoff in real units &amp;lt;math&amp;gt;= 1.088 nm&amp;lt;/math&amp;gt;&lt;br /&gt;
* Well Depth &amp;lt;math&amp;gt;= 0.998 kJ mol&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Reduced Temperature &amp;lt;math&amp;gt; = 180K&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Equilibration===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Atoms cannot be given random starting coordinates as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For a face-centred cubic lattice with a lattice point density of 1.2, the side length of the cubic unit cell is 1.494.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A face-centred cubic lattice has 4 lattice points and hence four atoms, whereas a cubic lattice has 1 of each. Therefore, there would be 4000 atoms in a 10 x 10 x 10 box.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Line 1: Sets the mass of all atoms of type 1 to 1.0&lt;br /&gt;
* Line 2: States that the interaction between atoms is to be modelled on the Leonard-Jones potential with a cut off distance of 3.0&lt;br /&gt;
* Line 3: Sets the pairwise force field coefficients for all atoms, in this case, this is the well depth and the distance at 0 potential - both are set to 1.0&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet Algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The initial script sets the time-step as a variable which can be called later in the script, the second script does not do this. Therefore, if a simulation is to be run on a different time-step, the input file with the initial script only needs to change the time-step in one place (where the variable is defined). Whereas, in the second script, the time-step will have to be changed everywhere that it is used in the input file. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). Does the simulation reach equilibrium? How long does this take? When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results? Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 23: Temperature as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 24: Pressure as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 25: Total energy as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It takes approximately 0.3s for the system to reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|500px|thumb|none|Figure 26: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Of the 5 timesteps, 0.0025 is the largest to give acceptable results. A timestep of 0.015 is particularly bad as the system does not reach equilibrium at all. The other 4 time steps do all reach equilibrium however 0.001 and 0.0025 are the only two which reach an accurate equilibrium value for total energy.&lt;br /&gt;
&lt;br /&gt;
===Running simulations under specific conditions===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Choose 5 temperatures (above the critical temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt;), and two pressures (you can get a good idea of what a reasonable pressure is in Lennard-Jones units by looking at the average pressure of your simulations from the last section). This gives ten phase points &amp;amp;mdash; five temperatures at each pressure. Create 10 copies of npt.in, and modify each to run a simulation at one of your chosen &amp;lt;math&amp;gt;\left(p, T\right)&amp;lt;/math&amp;gt; points. You should be able to use the results of the previous section to choose a timestep. Submit these ten jobs to the HPC portal. While you wait for them to finish, you should read the next section.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Derivation_1_PictureJPW.PNG|400px|thumb|none|Figure 27: Derivation of velocity scaling factor &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. How often will values of the temperature, etc., be sampled for the average? How many measurements contribute to the average? Looking to the following line, how much time will you simulate?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The three numbers correspond Nevery, Nrepeat and Nfreq.&lt;br /&gt;
&lt;br /&gt;
* Nevery corresponds to how often input values are sampled for the average - for example, temperature will be sampled for the average every 100 timesteps.&lt;br /&gt;
* Nrepeat corresponds to the number of values used to calculate the average - in this case 1000 values (measurements) are used (contribute) to calculating the average.&lt;br /&gt;
* Nfreq corresponds to the timestep at which the average is calculated - the 100000th timestep.&lt;br /&gt;
&lt;br /&gt;
This therefore means that there are 100000 timesteps and with a timestep of 0.0025, the time simulated = 250 seconds. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.  Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|none|Figure 28: Density as a function of temperature for a system at 2 different pressures.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
===Calculating heat capacities using statistical physics===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|none|Figure 29: Constant volume heat capacity as a function of temperature.]]&lt;br /&gt;
&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
An example of the input script used can be found below:&lt;br /&gt;
&lt;br /&gt;
[[File:ExampleInputFileJPW.in]]&lt;br /&gt;
&lt;br /&gt;
===Structural properties and the radial distribution function===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. In the solid case, illustrate which lattice sites the first three peaks correspond to. What is the lattice spacing? What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|500px|thumb|none|Figure 30: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse and therefore the chance of finding another particle is equal to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
===Dynamic properties and the diffusion coefficient===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the D subfolder, there is a file &#039;&#039;liq.in&#039;&#039; that will run a simulation at specified density and temperature to calculate the mean squared displacement and velocity autocorrelation function of your system. Run one of these simulations for a vapour, liquid, and solid. You have also been given some simulated data from much larger systems (approximately one million atoms). You will need these files later.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 30: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 31: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 32: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 33: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 34: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 35: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 36: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure X) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent? Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? Attach a copy of your plot to your writeup.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The derivation for the normalised velocity autocorrelation function for a 1D harmonic oscillator is shown below, along with two trigonometric identities used in the derivation.&lt;br /&gt;
&lt;br /&gt;
[[File:Trigonometric_IdentitiesJPW.PNG|400px|thumb|none|Figure 37: Trigonometric identities used in derivation of VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
[[File:JPWD2.PNG|600px|thumb|none|Figure 38: Derivation of the VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
&lt;br /&gt;
A plot showing the VACF for the liquid and solid simulations, as well as for a 1D harmonic oscillator with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; is shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:FinaleJPW.png|600px|thumb|none|Figure 39: VACF as a function of timestep for the liquid and solid phases as well as for a 1D harmonic oscillator.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 39), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms.&lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the trapezium rule to approximate the integral under the velocity autocorrelation function for the solid, liquid, and gas, and use these values to estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. You should make a plot of the running integral in each case. Are they as you expect? Repeat this procedure for the VACF data that you were given from the one million atom simulations. What do you think is the largest source of error in your estimates of D from the VACF?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|400px|thumb|none|Figure 40: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|400px|thumb|none|Figure 41: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure X.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 42: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;L-J Article&amp;quot;&amp;gt;J.P.Hansen, L.Verlet, &amp;lt;i&amp;gt;Phys.Rev.&amp;lt;/i&amp;gt;, 1969, &amp;lt;b&amp;gt;184&amp;lt;/b&amp;gt;, 151&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696388</id>
		<title>User:Jpw115</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696388"/>
		<updated>2018-04-23T15:53:57Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Calculating thermodynamic quantities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=color:red&amp;gt; colour red &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Liquid Simulations - Jack Williams=&lt;br /&gt;
==Abstract==&lt;br /&gt;
Key thermodynamic properties of a system modelled on the Leonard-Jones potential were investigated using molecular dynamics simulation. Density and heat capacity were measured as functions of temperature to analyse how the system evolves with changing temperature, both were discovered to decrease with increasing temperature. Radial distribution functions were calculated to analyse the structure of the system in each of the 3 phases. It was discovered that solids, due to the crystalline fixed structure have high long range order, liquids have some order that decreases over time due to the ability of the particles to diffuse away, and gasses have negligible long range order due to the very low density of the gaseous system. The diffusion coefficient for each phase was measured using two methods, the mean squared displacement method (MSD) and the velocity autocorrelation method (VACF). Both produced the expected results of a high diffusion coefficient for a gas, fairly low for liquid and a diffusion coefficient close to zero for the solid phase. Both methods produced similar results, however due to the error in calculating the integral in the VACF method (trapezium rule), the values calculated using the MSD method are more accurate. These results compared well to simulations run on larger systems, which due to the larger amount of data contributing to the average, are more accurate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good abstract: tells the reader concisely what you did and your main results/conclusions. My only qualm is that saying you &amp;quot;discovered&amp;quot; long vs. short range order in the phases of matter seems like it is a novel result. Perhaps &amp;quot;verified&amp;quot; would have been better. This is a minor point though.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Knowledge and understanding of the thermodynamic properties of systems, for example the phase transitions, has a wide range of applications in a number of industries. One key industry in which this knowledge is vital for proper function, is in power generation, for example in fossil fuel power stations and nuclear power stations. Both types of station function via heating liquid water which then evaporates forming steam, which is used to turn a turbine connected to a generator which generates electrical energy. The steam then condenses back to liquid water to be re-used. &lt;br /&gt;
To maximise efficiency, certain factors, for example the dimensions of the system carrying the water, need to be controlled:&lt;br /&gt;
* Initially, to avoid the waste of thermal energy produced from the burning of fossil fuels (or generated from nuclear fission), knowledge of the heat capacity of water can be used to determine the optimal volume of water in which to heat based on the amount of energy generated from the burning of the fuel. &lt;br /&gt;
* The steam driving the turbine needs to be at a high pressure to ensure the turbine is being spun at a maximal rate. Knowledge of how the pressure of water varies with temperature as well as the volume of container is important in determining the required dimensions of the system containing the water, to ensure optimal steam pressure Furthermore, knowledge of how the phase transitions of water is vital in ensuring that the steam does not condense back to water before passing through the turbine.  &lt;br /&gt;
&lt;br /&gt;
Originally these properties would have been determined through experimentation, however today the use of molecular dynamics simulations allows their determination in a much more cheap and facile way. This investigation aims to demonstrate the versatility of molecular dynamics by simulating the thermodynamic properties of a few simple systems without setting foot in a laboratory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good motivation. The introduction (or theory section if there is a separate section for this) usually includes the background theory required for your reader to understand what you have done. This is included in your methodology section, which is usually instead a concise summary of your simulation details needed to reproduce your results. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Aims &amp;amp; Objectives==&lt;br /&gt;
To use computational modelling to determine key thermodynamic features of simple systems:&lt;br /&gt;
* Investigate the change in density of a system with varying temperature and pressure &lt;br /&gt;
* Investigate the change in constant volume heat capacity of a system with temperature&lt;br /&gt;
* Investigate the change in radial distribution function of a system in the solid, liquid and gas phases&lt;br /&gt;
* Determine the diffusion coefficient for a system in the solid, liquid and gas phases&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
This investigation uses the software LAMMPS (Large-scale Atomic/Molecular Massively Parallel Simulator), to run simulations on simple systems. &lt;br /&gt;
Trajectories of atoms were visualised using the software VMD (Visual Molecular Dynamics). &amp;lt;span style=color:red&amp;gt; A citation of LAMMPS would be good - it is a serious endeavour by many people and worthy of acknowledgement.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting up the system===&lt;br /&gt;
For the simulation of a simple liquid, initial coordinates for atoms cannot be randomly generated and therefore a crystal lattice (simple cubic) is generated which is then melted - the simulation is set to run and over time the atoms rearrange into a configuration of higher disorder more closely modelling a liquid. Atoms cannot be given random starting coordinates to model this liquid configuration as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
Other key specifications of the system are below:&lt;br /&gt;
* the mass of all atoms was set to 1.0&lt;br /&gt;
* the interaction between atoms in the system was modelled on a Leonard-Jones potential&lt;br /&gt;
* the cut-off distance was set to 3.0 in reduced units&lt;br /&gt;
* the pairwise force field coefficients were set to 1.0 for both the potential well depth and the zero-potential distance &lt;br /&gt;
* all atoms were assigned random velocities following the Maxwell-Boltzmann distribution&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; The last point is not necessary since you have done NPT/NVT calculations, the thermostat will equilibrate temperatures. It is also a very routine detail - assumed to be so.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating thermodynamic quantities===&lt;br /&gt;
The simulation measures thermodynamics properties of the system for example: total energy, temperature, pressure, mean squared displacement and the velocity auto-correlation function of the system, at certain time-steps for a certain number of runs. &lt;br /&gt;
&lt;br /&gt;
Before simulations were run to gather data, it was confirmed that the system reaches equilibrium. Graphs showing how total energy, temperature and pressure change with time for a time-step of 0.001 are displayed below. After approximately 0.3 seconds, the system reaches equilibrium and fluctuates around an equilibrium value for each of the properties. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Graphs/data proving the system is equilibrated is not usually shown in a scientific paper, unless there is cause - it is assumed this is done correctly. Simply &amp;quot;... were equilibrated for X time units at Y and Z&amp;quot; would be sufficient. These graphs/data would be more at home in the tasks section. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 1: Temperature as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 2: Pressure as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 3: Total energy as a function of time.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 time-steps were tested to determine the most adequate. Figure 4 to the right shows how the total energy changes over time for each of the 5 timesteps. It can be seen that a time-step of 0.0025 is the highest time-step that still gives an accurate equilibrium total energy, hence, this time-step was used in further simulations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|600px|thumb|right|Figure 4: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the equation of state of the model described above, by calculating the density of a NpT system at varying pressure and temperature. 2 pressures and 5 temperatures were chosen (p = 2.5, 2.75; T = 1.75, 2, 2, 2.25, 3, 5), and a simulation was run for each combination giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the change in constant volume heat capacity with temperature. 2 densities and 5 temperatures were chosen (&amp;lt;math&amp;gt;\rho&amp;lt;/math&amp;gt;= 0.2, 0.8; T = 2.0, 2.2, 2.4, 2.6, 2.8), giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to model the radial distribution function as a function of distance, using the software VMD. 3 simulations were run, each with a specified density and temperature correlating to a system in each of the 3 phases&amp;lt;ref name=&amp;quot;L-J Article&amp;quot; /&amp;gt;: solid, liquid and gas. &lt;br /&gt;
* Solid: Density = 1.25, Temperature = 1.0&lt;br /&gt;
* Liquid: Density = 0.8, Temperature = 1.2 &lt;br /&gt;
* Gas: Density = 0.025, Temperature = 1.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; You do not really need to specify VMD here - there are a host of programs that can calculate a RDF, and not so hard a program to write yourself. If you insist on specifying VMD, the full name and citation would be good.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mean squared displacement (MSD) and velocity autocorrelation function (VACF) were calculated using the same densities and temperatures specified above (same as RDF)  to model a system in each of the 3 phases. Both the MSD and VACF were used to calculate the diffusion coefficient (D) for each phase, using the following relationships.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{3}\int_0^\infty \mathrm{d}\tau \left\langle\mathbf{v}\left(0\right)\cdot\mathbf{v}\left(\tau\right)\right\rangle&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Results &amp;amp; Discussion==&lt;br /&gt;
===Equations of state===&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|center|Figure 5: Density as a function of temperature for a system at 2 different pressures, as well as the corresponding densities as predicted by the ideal gas law.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
===Heat capacity at constant volume===&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|center|Figure 6: Constant volume heat capacity as a function of temperature for 2 different densities.]]&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
===Radial distribution function===&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|600px|thumb|center|Figure 7: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse with no order.&lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
===Diffusion coefficient===&lt;br /&gt;
&amp;lt;b&amp;gt;MSD Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 8: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 9: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 10: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step for a system with 1,000,000 atoms are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 11: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 12: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 13: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 14: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure 10) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;VACF Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:FinaleJPW.png|350px|thumb|none|Figure 15: VACF as a function of time for the solid and liquid phases along with the 1D Harmonic oscillator.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|350px|thumb|none|Figure 16: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|350px|thumb|none|Figure 17: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The trapezium rule was used to calculate the integral of the VACF for each phase.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were then calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure 18.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 18: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 15), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms. &lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system. &lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Equation of state simulations, on a system of constant pressure determined that the density of a system at constant pressure decreased with increasing temperature. The simulated density is lower than that predicted by the ideal gas law as the system is not behaving ideally  (there are interactions between the particles), however this discrepancy decreases with increasing temperature.&lt;br /&gt;
&lt;br /&gt;
Heat capacity simulations showed the expected trend of heat capacity at constant volume decreasing with increasing temperature. Furthermore, heat capacity increases with increasing density as there are more particles and hence more energy states that need to be filled to increase the temperature, therefore requiring a larger amount of energy to do so.&lt;br /&gt;
&lt;br /&gt;
Radial distribution function simulations gave information about the coordination around particles in each phase. The solid has a regular ordered crystal structure and hence the radial distribution function displays many peaks. For liquids there is some short range order, shown by 4 peaks of decreasing intensity corresponding to 4 initial coordination shells around the liquid, however it decays quickly due to the ability of particles to diffuse away, resulting in very little long range order. For a gas, there is one initial coordination shell shown by the sharp initial peak, however it then decays to the bulk density value and remains constant due to the high diffusive nature of a gas, there is no long range order past this first coordination shell. &lt;br /&gt;
&lt;br /&gt;
Both methods of calculation of the diffusion coefficient give the expected results, with a gas having a large value, liquid a small value and the solid with a value close to 0. The values obtained from each method compare well to each other, as well as the values obtained from the 1,000,000 atom simulation. However, it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. Furthermore, the VACF method will have significant error due to the error in using the trapezium rule to calculate the integral of the VACF. &lt;br /&gt;
&lt;br /&gt;
In conclusion, molecular dynamics simulation has allowed fast and accurate calculations of a range of key thermodynamic properties of a range of systems. It is clear that the use of these simulations is invaluable for the determination of these properties with applications in a range of industries, on key example being in the design of power stations. Furthermore, none of the simulations took longer than 5 minutes, illustrating another key benefit of using molecular dynamics simulations. In future calculations, calculations should be done on larger systems to acquire a more accurate average, as well as possibly introducing a second type of particle into the system to analyse how it effects the properties of the system.&lt;br /&gt;
&lt;br /&gt;
==Tasks==&lt;br /&gt;
The answers to all tasks are below, some have already been answered in the report above. &lt;br /&gt;
&lt;br /&gt;
===Introduction to molecular dynamics simulation===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by &amp;lt;math&amp;gt; x\left(t\right) = A\cos\left(\omega t + \phi\right)&amp;lt;/math&amp;gt; (the values of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:HO_1.png|350px|thumb|center|Figure 19: Analytical position as a function of time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO2.png|350px|thumb|center|Figure 20: Total energy as a function time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO3.png|350px|thumb|center|Figure 21: Error between the velocity-Verlet algorithm and analytical values as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHO4.png|500px|thumb|center|Figure 22: Error maximum as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK:&amp;lt;/big&amp;gt; For a single Lennard-Jones interaction, &amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;, find the separation, &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt;, at which the potential energy is zero. What is the force at this separation? Find the equilibrium separation, &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, and work out the well depth (&amp;lt;math&amp;gt;\phi\left(r_{eq}\right)&amp;lt;/math&amp;gt;). Evaluate the integrals &amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\int_{2.5\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\int_{3\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;\sigma = \epsilon = 1.0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* The separation r&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; at which the potential energy is zero, is when &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The force at this separation is equal to &amp;lt;math&amp;gt;24\epsilon/\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The equilibrium separation &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;eq&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = 2&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;1/6&amp;lt;/sup&amp;gt;&amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The potential well depth is equal to &amp;lt;math&amp;gt;-\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
* Evaluation of integrals:&lt;br /&gt;
&lt;br /&gt;
[[File:Reallastboy.PNG|400px|none]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions. Estimate the volume of &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; water molecules under standard conditions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Assumptions:&lt;br /&gt;
* 1mL of water = 1g of water &lt;br /&gt;
&lt;br /&gt;
Number of water molecules in 1g:&lt;br /&gt;
* Moles in 1g = 1/18 &lt;br /&gt;
* Number of molecules = N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; x 1/18 = &amp;lt;b&amp;gt;3.35 x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Volume of 10000 water molecules:&lt;br /&gt;
* Moles = 10000/N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Mass = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt; x 18 = 2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;g&lt;br /&gt;
* Volume = &amp;lt;b&amp;gt;2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, &#039;&#039;after the periodic boundary conditions have been applied&#039;&#039;?&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
It ends up at the point with coordinates - &amp;lt;math&amp;gt;(0.2, 0.1, 0.7)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: The Lennard-Jones parameters for argon are &amp;lt;math&amp;gt;\sigma = 0.34\mathrm{nm}, \epsilon\ /\ k_B= 120 \mathrm{K}&amp;lt;/math&amp;gt;. If the LJ cutoff is &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;, what is it in real units? What is the well depth in &amp;lt;math&amp;gt;\mathrm{kJ\ mol}^{-1}&amp;lt;/math&amp;gt;? What is the reduced temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt; in real units?&lt;br /&gt;
&lt;br /&gt;
* LJ cutoff in real units &amp;lt;math&amp;gt;= 1.088 nm&amp;lt;/math&amp;gt;&lt;br /&gt;
* Well Depth &amp;lt;math&amp;gt;= 0.998 kJ mol&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Reduced Temperature &amp;lt;math&amp;gt; = 180K&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Equilibration===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Atoms cannot be given random starting coordinates as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For a face-centred cubic lattice with a lattice point density of 1.2, the side length of the cubic unit cell is 1.494.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A face-centred cubic lattice has 4 lattice points and hence four atoms, whereas a cubic lattice has 1 of each. Therefore, there would be 4000 atoms in a 10 x 10 x 10 box.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Line 1: Sets the mass of all atoms of type 1 to 1.0&lt;br /&gt;
* Line 2: States that the interaction between atoms is to be modelled on the Leonard-Jones potential with a cut off distance of 3.0&lt;br /&gt;
* Line 3: Sets the pairwise force field coefficients for all atoms, in this case, this is the well depth and the distance at 0 potential - both are set to 1.0&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet Algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The initial script sets the time-step as a variable which can be called later in the script, the second script does not do this. Therefore, if a simulation is to be run on a different time-step, the input file with the initial script only needs to change the time-step in one place (where the variable is defined). Whereas, in the second script, the time-step will have to be changed everywhere that it is used in the input file. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). Does the simulation reach equilibrium? How long does this take? When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results? Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 23: Temperature as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 24: Pressure as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 25: Total energy as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It takes approximately 0.3s for the system to reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|500px|thumb|none|Figure 26: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Of the 5 timesteps, 0.0025 is the largest to give acceptable results. A timestep of 0.015 is particularly bad as the system does not reach equilibrium at all. The other 4 time steps do all reach equilibrium however 0.001 and 0.0025 are the only two which reach an accurate equilibrium value for total energy.&lt;br /&gt;
&lt;br /&gt;
===Running simulations under specific conditions===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Choose 5 temperatures (above the critical temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt;), and two pressures (you can get a good idea of what a reasonable pressure is in Lennard-Jones units by looking at the average pressure of your simulations from the last section). This gives ten phase points &amp;amp;mdash; five temperatures at each pressure. Create 10 copies of npt.in, and modify each to run a simulation at one of your chosen &amp;lt;math&amp;gt;\left(p, T\right)&amp;lt;/math&amp;gt; points. You should be able to use the results of the previous section to choose a timestep. Submit these ten jobs to the HPC portal. While you wait for them to finish, you should read the next section.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Derivation_1_PictureJPW.PNG|400px|thumb|none|Figure 27: Derivation of velocity scaling factor &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. How often will values of the temperature, etc., be sampled for the average? How many measurements contribute to the average? Looking to the following line, how much time will you simulate?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The three numbers correspond Nevery, Nrepeat and Nfreq.&lt;br /&gt;
&lt;br /&gt;
* Nevery corresponds to how often input values are sampled for the average - for example, temperature will be sampled for the average every 100 timesteps.&lt;br /&gt;
* Nrepeat corresponds to the number of values used to calculate the average - in this case 1000 values (measurements) are used (contribute) to calculating the average.&lt;br /&gt;
* Nfreq corresponds to the timestep at which the average is calculated - the 100000th timestep.&lt;br /&gt;
&lt;br /&gt;
This therefore means that there are 100000 timesteps and with a timestep of 0.0025, the time simulated = 250 seconds. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.  Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|none|Figure 28: Density as a function of temperature for a system at 2 different pressures.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
===Calculating heat capacities using statistical physics===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|none|Figure 29: Constant volume heat capacity as a function of temperature.]]&lt;br /&gt;
&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
An example of the input script used can be found below:&lt;br /&gt;
&lt;br /&gt;
[[File:ExampleInputFileJPW.in]]&lt;br /&gt;
&lt;br /&gt;
===Structural properties and the radial distribution function===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. In the solid case, illustrate which lattice sites the first three peaks correspond to. What is the lattice spacing? What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|500px|thumb|none|Figure 30: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse and therefore the chance of finding another particle is equal to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
===Dynamic properties and the diffusion coefficient===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the D subfolder, there is a file &#039;&#039;liq.in&#039;&#039; that will run a simulation at specified density and temperature to calculate the mean squared displacement and velocity autocorrelation function of your system. Run one of these simulations for a vapour, liquid, and solid. You have also been given some simulated data from much larger systems (approximately one million atoms). You will need these files later.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 30: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 31: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 32: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 33: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 34: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 35: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 36: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure X) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent? Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? Attach a copy of your plot to your writeup.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The derivation for the normalised velocity autocorrelation function for a 1D harmonic oscillator is shown below, along with two trigonometric identities used in the derivation.&lt;br /&gt;
&lt;br /&gt;
[[File:Trigonometric_IdentitiesJPW.PNG|400px|thumb|none|Figure 37: Trigonometric identities used in derivation of VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
[[File:JPWD2.PNG|600px|thumb|none|Figure 38: Derivation of the VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
&lt;br /&gt;
A plot showing the VACF for the liquid and solid simulations, as well as for a 1D harmonic oscillator with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; is shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:FinaleJPW.png|600px|thumb|none|Figure 39: VACF as a function of timestep for the liquid and solid phases as well as for a 1D harmonic oscillator.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 39), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms.&lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the trapezium rule to approximate the integral under the velocity autocorrelation function for the solid, liquid, and gas, and use these values to estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. You should make a plot of the running integral in each case. Are they as you expect? Repeat this procedure for the VACF data that you were given from the one million atom simulations. What do you think is the largest source of error in your estimates of D from the VACF?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|400px|thumb|none|Figure 40: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|400px|thumb|none|Figure 41: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure X.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 42: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;L-J Article&amp;quot;&amp;gt;J.P.Hansen, L.Verlet, &amp;lt;i&amp;gt;Phys.Rev.&amp;lt;/i&amp;gt;, 1969, &amp;lt;b&amp;gt;184&amp;lt;/b&amp;gt;, 151&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696387</id>
		<title>User:Jpw115</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696387"/>
		<updated>2018-04-23T15:50:15Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Calculating thermodynamic quantities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=color:red&amp;gt; colour red &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Liquid Simulations - Jack Williams=&lt;br /&gt;
==Abstract==&lt;br /&gt;
Key thermodynamic properties of a system modelled on the Leonard-Jones potential were investigated using molecular dynamics simulation. Density and heat capacity were measured as functions of temperature to analyse how the system evolves with changing temperature, both were discovered to decrease with increasing temperature. Radial distribution functions were calculated to analyse the structure of the system in each of the 3 phases. It was discovered that solids, due to the crystalline fixed structure have high long range order, liquids have some order that decreases over time due to the ability of the particles to diffuse away, and gasses have negligible long range order due to the very low density of the gaseous system. The diffusion coefficient for each phase was measured using two methods, the mean squared displacement method (MSD) and the velocity autocorrelation method (VACF). Both produced the expected results of a high diffusion coefficient for a gas, fairly low for liquid and a diffusion coefficient close to zero for the solid phase. Both methods produced similar results, however due to the error in calculating the integral in the VACF method (trapezium rule), the values calculated using the MSD method are more accurate. These results compared well to simulations run on larger systems, which due to the larger amount of data contributing to the average, are more accurate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good abstract: tells the reader concisely what you did and your main results/conclusions. My only qualm is that saying you &amp;quot;discovered&amp;quot; long vs. short range order in the phases of matter seems like it is a novel result. Perhaps &amp;quot;verified&amp;quot; would have been better. This is a minor point though.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Knowledge and understanding of the thermodynamic properties of systems, for example the phase transitions, has a wide range of applications in a number of industries. One key industry in which this knowledge is vital for proper function, is in power generation, for example in fossil fuel power stations and nuclear power stations. Both types of station function via heating liquid water which then evaporates forming steam, which is used to turn a turbine connected to a generator which generates electrical energy. The steam then condenses back to liquid water to be re-used. &lt;br /&gt;
To maximise efficiency, certain factors, for example the dimensions of the system carrying the water, need to be controlled:&lt;br /&gt;
* Initially, to avoid the waste of thermal energy produced from the burning of fossil fuels (or generated from nuclear fission), knowledge of the heat capacity of water can be used to determine the optimal volume of water in which to heat based on the amount of energy generated from the burning of the fuel. &lt;br /&gt;
* The steam driving the turbine needs to be at a high pressure to ensure the turbine is being spun at a maximal rate. Knowledge of how the pressure of water varies with temperature as well as the volume of container is important in determining the required dimensions of the system containing the water, to ensure optimal steam pressure Furthermore, knowledge of how the phase transitions of water is vital in ensuring that the steam does not condense back to water before passing through the turbine.  &lt;br /&gt;
&lt;br /&gt;
Originally these properties would have been determined through experimentation, however today the use of molecular dynamics simulations allows their determination in a much more cheap and facile way. This investigation aims to demonstrate the versatility of molecular dynamics by simulating the thermodynamic properties of a few simple systems without setting foot in a laboratory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good motivation. The introduction (or theory section if there is a separate section for this) usually includes the background theory required for your reader to understand what you have done. This is included in your methodology section, which is usually instead a concise summary of your simulation details needed to reproduce your results. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Aims &amp;amp; Objectives==&lt;br /&gt;
To use computational modelling to determine key thermodynamic features of simple systems:&lt;br /&gt;
* Investigate the change in density of a system with varying temperature and pressure &lt;br /&gt;
* Investigate the change in constant volume heat capacity of a system with temperature&lt;br /&gt;
* Investigate the change in radial distribution function of a system in the solid, liquid and gas phases&lt;br /&gt;
* Determine the diffusion coefficient for a system in the solid, liquid and gas phases&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
This investigation uses the software LAMMPS (Large-scale Atomic/Molecular Massively Parallel Simulator), to run simulations on simple systems. &lt;br /&gt;
Trajectories of atoms were visualised using the software VMD (Visual Molecular Dynamics). &amp;lt;span style=color:red&amp;gt; A citation of LAMMPS would be good - it is a serious endeavour by many people and worthy of acknowledgement.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting up the system===&lt;br /&gt;
For the simulation of a simple liquid, initial coordinates for atoms cannot be randomly generated and therefore a crystal lattice (simple cubic) is generated which is then melted - the simulation is set to run and over time the atoms rearrange into a configuration of higher disorder more closely modelling a liquid. Atoms cannot be given random starting coordinates to model this liquid configuration as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
Other key specifications of the system are below:&lt;br /&gt;
* the mass of all atoms was set to 1.0&lt;br /&gt;
* the interaction between atoms in the system was modelled on a Leonard-Jones potential&lt;br /&gt;
* the cut-off distance was set to 3.0 in reduced units&lt;br /&gt;
* the pairwise force field coefficients were set to 1.0 for both the potential well depth and the zero-potential distance &lt;br /&gt;
* all atoms were assigned random velocities following the Maxwell-Boltzmann distribution&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; The last point is not necessary since you have done NPT/NVT calculations, the thermostat will equilibrate temperatures. It is also a very routine detail - assumed to be so.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating thermodynamic quantities===&lt;br /&gt;
The simulation measures thermodynamics properties of the system for example: total energy, temperature, pressure, mean squared displacement and the velocity auto-correlation function of the system, at certain time-steps for a certain number of runs. &lt;br /&gt;
&lt;br /&gt;
Before simulations were run to gather data, it was confirmed that the system reaches equilibrium. Graphs showing how total energy, temperature and pressure change with time for a time-step of 0.001 are displayed below. After approximately 0.3 seconds, the system reaches equilibrium and fluctuates around an equilibrium value for each of the properties. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Graphs/data proving the system is equilibrated is not usually shown in a scientific paper, unless there is cause - it is assumed this is done correctly. Simply &amp;quot;... were equilibrated for X time units at Y and Z&amp;quot; would be sufficient. These graphs/data would be more at home in the tasks section. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 1: Temperature as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 2: Pressure as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 3: Total energy as a function of time.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 time-steps were tested to determine the most adequate. Figure 4 to the right shows how the total energy changes over time for each of the 5 timesteps. It can be seen that a time-step of 0.0025 is the highest time-step that still gives an accurate equilibrium total energy, hence, this time-step was used in further simulations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|600px|thumb|right|Figure 4: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the equation of state of the model described above, by calculating the density of a NpT system at varying pressure and temperature. 2 pressures and 5 temperatures were chosen (p = 2.5, 2.75; T = 1.75, 2, 2, 2.25, 3, 5), and a simulation was run for each combination giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the change in constant volume heat capacity with temperature. 2 densities and 5 temperatures were chosen (&amp;lt;math&amp;gt;\rho&amp;lt;/math&amp;gt;= 0.2, 0.8; T = 2.0, 2.2, 2.4, 2.6, 2.8), giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to model the radial distribution function as a function of distance, using the software VMD. 3 simulations were run, each with a specified density and temperature correlating to a system in each of the 3 phases&amp;lt;ref name=&amp;quot;L-J Article&amp;quot; /&amp;gt;: solid, liquid and gas. &lt;br /&gt;
* Solid: Density = 1.25, Temperature = 1.0&lt;br /&gt;
* Liquid: Density = 0.8, Temperature = 1.2 &lt;br /&gt;
* Gas: Density = 0.025, Temperature = 1.2&lt;br /&gt;
&lt;br /&gt;
The mean squared displacement (MSD) and velocity autocorrelation function (VACF) were calculated using the same densities and temperatures specified above (same as RDF)  to model a system in each of the 3 phases. Both the MSD and VACF were used to calculate the diffusion coefficient (D) for each phase, using the following relationships.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{3}\int_0^\infty \mathrm{d}\tau \left\langle\mathbf{v}\left(0\right)\cdot\mathbf{v}\left(\tau\right)\right\rangle&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Results &amp;amp; Discussion==&lt;br /&gt;
===Equations of state===&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|center|Figure 5: Density as a function of temperature for a system at 2 different pressures, as well as the corresponding densities as predicted by the ideal gas law.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
===Heat capacity at constant volume===&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|center|Figure 6: Constant volume heat capacity as a function of temperature for 2 different densities.]]&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
===Radial distribution function===&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|600px|thumb|center|Figure 7: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse with no order.&lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
===Diffusion coefficient===&lt;br /&gt;
&amp;lt;b&amp;gt;MSD Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 8: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 9: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 10: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step for a system with 1,000,000 atoms are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 11: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 12: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 13: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 14: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure 10) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;VACF Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:FinaleJPW.png|350px|thumb|none|Figure 15: VACF as a function of time for the solid and liquid phases along with the 1D Harmonic oscillator.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|350px|thumb|none|Figure 16: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|350px|thumb|none|Figure 17: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The trapezium rule was used to calculate the integral of the VACF for each phase.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were then calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure 18.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 18: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 15), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms. &lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system. &lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Equation of state simulations, on a system of constant pressure determined that the density of a system at constant pressure decreased with increasing temperature. The simulated density is lower than that predicted by the ideal gas law as the system is not behaving ideally  (there are interactions between the particles), however this discrepancy decreases with increasing temperature.&lt;br /&gt;
&lt;br /&gt;
Heat capacity simulations showed the expected trend of heat capacity at constant volume decreasing with increasing temperature. Furthermore, heat capacity increases with increasing density as there are more particles and hence more energy states that need to be filled to increase the temperature, therefore requiring a larger amount of energy to do so.&lt;br /&gt;
&lt;br /&gt;
Radial distribution function simulations gave information about the coordination around particles in each phase. The solid has a regular ordered crystal structure and hence the radial distribution function displays many peaks. For liquids there is some short range order, shown by 4 peaks of decreasing intensity corresponding to 4 initial coordination shells around the liquid, however it decays quickly due to the ability of particles to diffuse away, resulting in very little long range order. For a gas, there is one initial coordination shell shown by the sharp initial peak, however it then decays to the bulk density value and remains constant due to the high diffusive nature of a gas, there is no long range order past this first coordination shell. &lt;br /&gt;
&lt;br /&gt;
Both methods of calculation of the diffusion coefficient give the expected results, with a gas having a large value, liquid a small value and the solid with a value close to 0. The values obtained from each method compare well to each other, as well as the values obtained from the 1,000,000 atom simulation. However, it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. Furthermore, the VACF method will have significant error due to the error in using the trapezium rule to calculate the integral of the VACF. &lt;br /&gt;
&lt;br /&gt;
In conclusion, molecular dynamics simulation has allowed fast and accurate calculations of a range of key thermodynamic properties of a range of systems. It is clear that the use of these simulations is invaluable for the determination of these properties with applications in a range of industries, on key example being in the design of power stations. Furthermore, none of the simulations took longer than 5 minutes, illustrating another key benefit of using molecular dynamics simulations. In future calculations, calculations should be done on larger systems to acquire a more accurate average, as well as possibly introducing a second type of particle into the system to analyse how it effects the properties of the system.&lt;br /&gt;
&lt;br /&gt;
==Tasks==&lt;br /&gt;
The answers to all tasks are below, some have already been answered in the report above. &lt;br /&gt;
&lt;br /&gt;
===Introduction to molecular dynamics simulation===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by &amp;lt;math&amp;gt; x\left(t\right) = A\cos\left(\omega t + \phi\right)&amp;lt;/math&amp;gt; (the values of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:HO_1.png|350px|thumb|center|Figure 19: Analytical position as a function of time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO2.png|350px|thumb|center|Figure 20: Total energy as a function time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO3.png|350px|thumb|center|Figure 21: Error between the velocity-Verlet algorithm and analytical values as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHO4.png|500px|thumb|center|Figure 22: Error maximum as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK:&amp;lt;/big&amp;gt; For a single Lennard-Jones interaction, &amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;, find the separation, &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt;, at which the potential energy is zero. What is the force at this separation? Find the equilibrium separation, &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, and work out the well depth (&amp;lt;math&amp;gt;\phi\left(r_{eq}\right)&amp;lt;/math&amp;gt;). Evaluate the integrals &amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\int_{2.5\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\int_{3\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;\sigma = \epsilon = 1.0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* The separation r&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; at which the potential energy is zero, is when &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The force at this separation is equal to &amp;lt;math&amp;gt;24\epsilon/\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The equilibrium separation &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;eq&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = 2&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;1/6&amp;lt;/sup&amp;gt;&amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The potential well depth is equal to &amp;lt;math&amp;gt;-\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
* Evaluation of integrals:&lt;br /&gt;
&lt;br /&gt;
[[File:Reallastboy.PNG|400px|none]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions. Estimate the volume of &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; water molecules under standard conditions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Assumptions:&lt;br /&gt;
* 1mL of water = 1g of water &lt;br /&gt;
&lt;br /&gt;
Number of water molecules in 1g:&lt;br /&gt;
* Moles in 1g = 1/18 &lt;br /&gt;
* Number of molecules = N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; x 1/18 = &amp;lt;b&amp;gt;3.35 x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Volume of 10000 water molecules:&lt;br /&gt;
* Moles = 10000/N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Mass = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt; x 18 = 2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;g&lt;br /&gt;
* Volume = &amp;lt;b&amp;gt;2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, &#039;&#039;after the periodic boundary conditions have been applied&#039;&#039;?&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
It ends up at the point with coordinates - &amp;lt;math&amp;gt;(0.2, 0.1, 0.7)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: The Lennard-Jones parameters for argon are &amp;lt;math&amp;gt;\sigma = 0.34\mathrm{nm}, \epsilon\ /\ k_B= 120 \mathrm{K}&amp;lt;/math&amp;gt;. If the LJ cutoff is &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;, what is it in real units? What is the well depth in &amp;lt;math&amp;gt;\mathrm{kJ\ mol}^{-1}&amp;lt;/math&amp;gt;? What is the reduced temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt; in real units?&lt;br /&gt;
&lt;br /&gt;
* LJ cutoff in real units &amp;lt;math&amp;gt;= 1.088 nm&amp;lt;/math&amp;gt;&lt;br /&gt;
* Well Depth &amp;lt;math&amp;gt;= 0.998 kJ mol&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Reduced Temperature &amp;lt;math&amp;gt; = 180K&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Equilibration===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Atoms cannot be given random starting coordinates as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For a face-centred cubic lattice with a lattice point density of 1.2, the side length of the cubic unit cell is 1.494.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A face-centred cubic lattice has 4 lattice points and hence four atoms, whereas a cubic lattice has 1 of each. Therefore, there would be 4000 atoms in a 10 x 10 x 10 box.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Line 1: Sets the mass of all atoms of type 1 to 1.0&lt;br /&gt;
* Line 2: States that the interaction between atoms is to be modelled on the Leonard-Jones potential with a cut off distance of 3.0&lt;br /&gt;
* Line 3: Sets the pairwise force field coefficients for all atoms, in this case, this is the well depth and the distance at 0 potential - both are set to 1.0&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet Algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The initial script sets the time-step as a variable which can be called later in the script, the second script does not do this. Therefore, if a simulation is to be run on a different time-step, the input file with the initial script only needs to change the time-step in one place (where the variable is defined). Whereas, in the second script, the time-step will have to be changed everywhere that it is used in the input file. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). Does the simulation reach equilibrium? How long does this take? When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results? Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 23: Temperature as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 24: Pressure as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 25: Total energy as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It takes approximately 0.3s for the system to reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|500px|thumb|none|Figure 26: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Of the 5 timesteps, 0.0025 is the largest to give acceptable results. A timestep of 0.015 is particularly bad as the system does not reach equilibrium at all. The other 4 time steps do all reach equilibrium however 0.001 and 0.0025 are the only two which reach an accurate equilibrium value for total energy.&lt;br /&gt;
&lt;br /&gt;
===Running simulations under specific conditions===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Choose 5 temperatures (above the critical temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt;), and two pressures (you can get a good idea of what a reasonable pressure is in Lennard-Jones units by looking at the average pressure of your simulations from the last section). This gives ten phase points &amp;amp;mdash; five temperatures at each pressure. Create 10 copies of npt.in, and modify each to run a simulation at one of your chosen &amp;lt;math&amp;gt;\left(p, T\right)&amp;lt;/math&amp;gt; points. You should be able to use the results of the previous section to choose a timestep. Submit these ten jobs to the HPC portal. While you wait for them to finish, you should read the next section.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Derivation_1_PictureJPW.PNG|400px|thumb|none|Figure 27: Derivation of velocity scaling factor &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. How often will values of the temperature, etc., be sampled for the average? How many measurements contribute to the average? Looking to the following line, how much time will you simulate?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The three numbers correspond Nevery, Nrepeat and Nfreq.&lt;br /&gt;
&lt;br /&gt;
* Nevery corresponds to how often input values are sampled for the average - for example, temperature will be sampled for the average every 100 timesteps.&lt;br /&gt;
* Nrepeat corresponds to the number of values used to calculate the average - in this case 1000 values (measurements) are used (contribute) to calculating the average.&lt;br /&gt;
* Nfreq corresponds to the timestep at which the average is calculated - the 100000th timestep.&lt;br /&gt;
&lt;br /&gt;
This therefore means that there are 100000 timesteps and with a timestep of 0.0025, the time simulated = 250 seconds. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.  Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|none|Figure 28: Density as a function of temperature for a system at 2 different pressures.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
===Calculating heat capacities using statistical physics===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|none|Figure 29: Constant volume heat capacity as a function of temperature.]]&lt;br /&gt;
&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
An example of the input script used can be found below:&lt;br /&gt;
&lt;br /&gt;
[[File:ExampleInputFileJPW.in]]&lt;br /&gt;
&lt;br /&gt;
===Structural properties and the radial distribution function===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. In the solid case, illustrate which lattice sites the first three peaks correspond to. What is the lattice spacing? What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|500px|thumb|none|Figure 30: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse and therefore the chance of finding another particle is equal to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
===Dynamic properties and the diffusion coefficient===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the D subfolder, there is a file &#039;&#039;liq.in&#039;&#039; that will run a simulation at specified density and temperature to calculate the mean squared displacement and velocity autocorrelation function of your system. Run one of these simulations for a vapour, liquid, and solid. You have also been given some simulated data from much larger systems (approximately one million atoms). You will need these files later.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 30: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 31: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 32: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 33: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 34: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 35: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 36: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure X) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent? Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? Attach a copy of your plot to your writeup.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The derivation for the normalised velocity autocorrelation function for a 1D harmonic oscillator is shown below, along with two trigonometric identities used in the derivation.&lt;br /&gt;
&lt;br /&gt;
[[File:Trigonometric_IdentitiesJPW.PNG|400px|thumb|none|Figure 37: Trigonometric identities used in derivation of VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
[[File:JPWD2.PNG|600px|thumb|none|Figure 38: Derivation of the VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
&lt;br /&gt;
A plot showing the VACF for the liquid and solid simulations, as well as for a 1D harmonic oscillator with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; is shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:FinaleJPW.png|600px|thumb|none|Figure 39: VACF as a function of timestep for the liquid and solid phases as well as for a 1D harmonic oscillator.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 39), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms.&lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the trapezium rule to approximate the integral under the velocity autocorrelation function for the solid, liquid, and gas, and use these values to estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. You should make a plot of the running integral in each case. Are they as you expect? Repeat this procedure for the VACF data that you were given from the one million atom simulations. What do you think is the largest source of error in your estimates of D from the VACF?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|400px|thumb|none|Figure 40: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|400px|thumb|none|Figure 41: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure X.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 42: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;L-J Article&amp;quot;&amp;gt;J.P.Hansen, L.Verlet, &amp;lt;i&amp;gt;Phys.Rev.&amp;lt;/i&amp;gt;, 1969, &amp;lt;b&amp;gt;184&amp;lt;/b&amp;gt;, 151&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696386</id>
		<title>User:Jpw115</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696386"/>
		<updated>2018-04-23T15:47:08Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Setting up the system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=color:red&amp;gt; colour red &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Liquid Simulations - Jack Williams=&lt;br /&gt;
==Abstract==&lt;br /&gt;
Key thermodynamic properties of a system modelled on the Leonard-Jones potential were investigated using molecular dynamics simulation. Density and heat capacity were measured as functions of temperature to analyse how the system evolves with changing temperature, both were discovered to decrease with increasing temperature. Radial distribution functions were calculated to analyse the structure of the system in each of the 3 phases. It was discovered that solids, due to the crystalline fixed structure have high long range order, liquids have some order that decreases over time due to the ability of the particles to diffuse away, and gasses have negligible long range order due to the very low density of the gaseous system. The diffusion coefficient for each phase was measured using two methods, the mean squared displacement method (MSD) and the velocity autocorrelation method (VACF). Both produced the expected results of a high diffusion coefficient for a gas, fairly low for liquid and a diffusion coefficient close to zero for the solid phase. Both methods produced similar results, however due to the error in calculating the integral in the VACF method (trapezium rule), the values calculated using the MSD method are more accurate. These results compared well to simulations run on larger systems, which due to the larger amount of data contributing to the average, are more accurate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good abstract: tells the reader concisely what you did and your main results/conclusions. My only qualm is that saying you &amp;quot;discovered&amp;quot; long vs. short range order in the phases of matter seems like it is a novel result. Perhaps &amp;quot;verified&amp;quot; would have been better. This is a minor point though.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Knowledge and understanding of the thermodynamic properties of systems, for example the phase transitions, has a wide range of applications in a number of industries. One key industry in which this knowledge is vital for proper function, is in power generation, for example in fossil fuel power stations and nuclear power stations. Both types of station function via heating liquid water which then evaporates forming steam, which is used to turn a turbine connected to a generator which generates electrical energy. The steam then condenses back to liquid water to be re-used. &lt;br /&gt;
To maximise efficiency, certain factors, for example the dimensions of the system carrying the water, need to be controlled:&lt;br /&gt;
* Initially, to avoid the waste of thermal energy produced from the burning of fossil fuels (or generated from nuclear fission), knowledge of the heat capacity of water can be used to determine the optimal volume of water in which to heat based on the amount of energy generated from the burning of the fuel. &lt;br /&gt;
* The steam driving the turbine needs to be at a high pressure to ensure the turbine is being spun at a maximal rate. Knowledge of how the pressure of water varies with temperature as well as the volume of container is important in determining the required dimensions of the system containing the water, to ensure optimal steam pressure Furthermore, knowledge of how the phase transitions of water is vital in ensuring that the steam does not condense back to water before passing through the turbine.  &lt;br /&gt;
&lt;br /&gt;
Originally these properties would have been determined through experimentation, however today the use of molecular dynamics simulations allows their determination in a much more cheap and facile way. This investigation aims to demonstrate the versatility of molecular dynamics by simulating the thermodynamic properties of a few simple systems without setting foot in a laboratory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good motivation. The introduction (or theory section if there is a separate section for this) usually includes the background theory required for your reader to understand what you have done. This is included in your methodology section, which is usually instead a concise summary of your simulation details needed to reproduce your results. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Aims &amp;amp; Objectives==&lt;br /&gt;
To use computational modelling to determine key thermodynamic features of simple systems:&lt;br /&gt;
* Investigate the change in density of a system with varying temperature and pressure &lt;br /&gt;
* Investigate the change in constant volume heat capacity of a system with temperature&lt;br /&gt;
* Investigate the change in radial distribution function of a system in the solid, liquid and gas phases&lt;br /&gt;
* Determine the diffusion coefficient for a system in the solid, liquid and gas phases&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
This investigation uses the software LAMMPS (Large-scale Atomic/Molecular Massively Parallel Simulator), to run simulations on simple systems. &lt;br /&gt;
Trajectories of atoms were visualised using the software VMD (Visual Molecular Dynamics). &amp;lt;span style=color:red&amp;gt; A citation of LAMMPS would be good - it is a serious endeavour by many people and worthy of acknowledgement.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting up the system===&lt;br /&gt;
For the simulation of a simple liquid, initial coordinates for atoms cannot be randomly generated and therefore a crystal lattice (simple cubic) is generated which is then melted - the simulation is set to run and over time the atoms rearrange into a configuration of higher disorder more closely modelling a liquid. Atoms cannot be given random starting coordinates to model this liquid configuration as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
Other key specifications of the system are below:&lt;br /&gt;
* the mass of all atoms was set to 1.0&lt;br /&gt;
* the interaction between atoms in the system was modelled on a Leonard-Jones potential&lt;br /&gt;
* the cut-off distance was set to 3.0 in reduced units&lt;br /&gt;
* the pairwise force field coefficients were set to 1.0 for both the potential well depth and the zero-potential distance &lt;br /&gt;
* all atoms were assigned random velocities following the Maxwell-Boltzmann distribution&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; The last point is not necessary since you have done NPT/NVT calculations, the thermostat will equilibrate temperatures. It is also a very routine detail - assumed to be so.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating thermodynamic quantities===&lt;br /&gt;
The simulation measures thermodynamics properties of the system for example: total energy, temperature, pressure, mean squared displacement and the velocity auto-correlation function of the system, at certain time-steps for a certain number of runs. &lt;br /&gt;
&lt;br /&gt;
Before simulations were run to gather data, it was confirmed that the system reaches equilibrium. Graphs showing how total energy, temperature and pressure change with time for a time-step of 0.001 are displayed below. After approximately 0.3 seconds, the system reaches equilibrium and fluctuates around an equilibrium value for each of the properties. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 1: Temperature as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 2: Pressure as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 3: Total energy as a function of time.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 time-steps were tested to determine the most adequate. Figure 4 to the right shows how the total energy changes over time for each of the 5 timesteps. It can be seen that a time-step of 0.0025 is the highest time-step that still gives an accurate equilibrium total energy, hence, this time-step was used in further simulations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|600px|thumb|right|Figure 4: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the equation of state of the model described above, by calculating the density of a NpT system at varying pressure and temperature. 2 pressures and 5 temperatures were chosen (p = 2.5, 2.75; T = 1.75, 2, 2, 2.25, 3, 5), and a simulation was run for each combination giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the change in constant volume heat capacity with temperature. 2 densities and 5 temperatures were chosen (&amp;lt;math&amp;gt;\rho&amp;lt;/math&amp;gt;= 0.2, 0.8; T = 2.0, 2.2, 2.4, 2.6, 2.8), giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to model the radial distribution function as a function of distance, using the software VMD. 3 simulations were run, each with a specified density and temperature correlating to a system in each of the 3 phases&amp;lt;ref name=&amp;quot;L-J Article&amp;quot; /&amp;gt;: solid, liquid and gas. &lt;br /&gt;
* Solid: Density = 1.25, Temperature = 1.0&lt;br /&gt;
* Liquid: Density = 0.8, Temperature = 1.2 &lt;br /&gt;
* Gas: Density = 0.025, Temperature = 1.2&lt;br /&gt;
&lt;br /&gt;
The mean squared displacement (MSD) and velocity autocorrelation function (VACF) were calculated using the same densities and temperatures specified above (same as RDF)  to model a system in each of the 3 phases. Both the MSD and VACF were used to calculate the diffusion coefficient (D) for each phase, using the following relationships.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{3}\int_0^\infty \mathrm{d}\tau \left\langle\mathbf{v}\left(0\right)\cdot\mathbf{v}\left(\tau\right)\right\rangle&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Results &amp;amp; Discussion==&lt;br /&gt;
===Equations of state===&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|center|Figure 5: Density as a function of temperature for a system at 2 different pressures, as well as the corresponding densities as predicted by the ideal gas law.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
===Heat capacity at constant volume===&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|center|Figure 6: Constant volume heat capacity as a function of temperature for 2 different densities.]]&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
===Radial distribution function===&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|600px|thumb|center|Figure 7: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse with no order.&lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
===Diffusion coefficient===&lt;br /&gt;
&amp;lt;b&amp;gt;MSD Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 8: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 9: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 10: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step for a system with 1,000,000 atoms are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 11: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 12: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 13: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 14: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure 10) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;VACF Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:FinaleJPW.png|350px|thumb|none|Figure 15: VACF as a function of time for the solid and liquid phases along with the 1D Harmonic oscillator.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|350px|thumb|none|Figure 16: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|350px|thumb|none|Figure 17: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The trapezium rule was used to calculate the integral of the VACF for each phase.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were then calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure 18.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 18: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 15), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms. &lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system. &lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Equation of state simulations, on a system of constant pressure determined that the density of a system at constant pressure decreased with increasing temperature. The simulated density is lower than that predicted by the ideal gas law as the system is not behaving ideally  (there are interactions between the particles), however this discrepancy decreases with increasing temperature.&lt;br /&gt;
&lt;br /&gt;
Heat capacity simulations showed the expected trend of heat capacity at constant volume decreasing with increasing temperature. Furthermore, heat capacity increases with increasing density as there are more particles and hence more energy states that need to be filled to increase the temperature, therefore requiring a larger amount of energy to do so.&lt;br /&gt;
&lt;br /&gt;
Radial distribution function simulations gave information about the coordination around particles in each phase. The solid has a regular ordered crystal structure and hence the radial distribution function displays many peaks. For liquids there is some short range order, shown by 4 peaks of decreasing intensity corresponding to 4 initial coordination shells around the liquid, however it decays quickly due to the ability of particles to diffuse away, resulting in very little long range order. For a gas, there is one initial coordination shell shown by the sharp initial peak, however it then decays to the bulk density value and remains constant due to the high diffusive nature of a gas, there is no long range order past this first coordination shell. &lt;br /&gt;
&lt;br /&gt;
Both methods of calculation of the diffusion coefficient give the expected results, with a gas having a large value, liquid a small value and the solid with a value close to 0. The values obtained from each method compare well to each other, as well as the values obtained from the 1,000,000 atom simulation. However, it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. Furthermore, the VACF method will have significant error due to the error in using the trapezium rule to calculate the integral of the VACF. &lt;br /&gt;
&lt;br /&gt;
In conclusion, molecular dynamics simulation has allowed fast and accurate calculations of a range of key thermodynamic properties of a range of systems. It is clear that the use of these simulations is invaluable for the determination of these properties with applications in a range of industries, on key example being in the design of power stations. Furthermore, none of the simulations took longer than 5 minutes, illustrating another key benefit of using molecular dynamics simulations. In future calculations, calculations should be done on larger systems to acquire a more accurate average, as well as possibly introducing a second type of particle into the system to analyse how it effects the properties of the system.&lt;br /&gt;
&lt;br /&gt;
==Tasks==&lt;br /&gt;
The answers to all tasks are below, some have already been answered in the report above. &lt;br /&gt;
&lt;br /&gt;
===Introduction to molecular dynamics simulation===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by &amp;lt;math&amp;gt; x\left(t\right) = A\cos\left(\omega t + \phi\right)&amp;lt;/math&amp;gt; (the values of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:HO_1.png|350px|thumb|center|Figure 19: Analytical position as a function of time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO2.png|350px|thumb|center|Figure 20: Total energy as a function time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO3.png|350px|thumb|center|Figure 21: Error between the velocity-Verlet algorithm and analytical values as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHO4.png|500px|thumb|center|Figure 22: Error maximum as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK:&amp;lt;/big&amp;gt; For a single Lennard-Jones interaction, &amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;, find the separation, &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt;, at which the potential energy is zero. What is the force at this separation? Find the equilibrium separation, &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, and work out the well depth (&amp;lt;math&amp;gt;\phi\left(r_{eq}\right)&amp;lt;/math&amp;gt;). Evaluate the integrals &amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\int_{2.5\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\int_{3\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;\sigma = \epsilon = 1.0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* The separation r&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; at which the potential energy is zero, is when &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The force at this separation is equal to &amp;lt;math&amp;gt;24\epsilon/\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The equilibrium separation &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;eq&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = 2&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;1/6&amp;lt;/sup&amp;gt;&amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The potential well depth is equal to &amp;lt;math&amp;gt;-\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
* Evaluation of integrals:&lt;br /&gt;
&lt;br /&gt;
[[File:Reallastboy.PNG|400px|none]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions. Estimate the volume of &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; water molecules under standard conditions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Assumptions:&lt;br /&gt;
* 1mL of water = 1g of water &lt;br /&gt;
&lt;br /&gt;
Number of water molecules in 1g:&lt;br /&gt;
* Moles in 1g = 1/18 &lt;br /&gt;
* Number of molecules = N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; x 1/18 = &amp;lt;b&amp;gt;3.35 x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Volume of 10000 water molecules:&lt;br /&gt;
* Moles = 10000/N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Mass = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt; x 18 = 2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;g&lt;br /&gt;
* Volume = &amp;lt;b&amp;gt;2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, &#039;&#039;after the periodic boundary conditions have been applied&#039;&#039;?&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
It ends up at the point with coordinates - &amp;lt;math&amp;gt;(0.2, 0.1, 0.7)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: The Lennard-Jones parameters for argon are &amp;lt;math&amp;gt;\sigma = 0.34\mathrm{nm}, \epsilon\ /\ k_B= 120 \mathrm{K}&amp;lt;/math&amp;gt;. If the LJ cutoff is &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;, what is it in real units? What is the well depth in &amp;lt;math&amp;gt;\mathrm{kJ\ mol}^{-1}&amp;lt;/math&amp;gt;? What is the reduced temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt; in real units?&lt;br /&gt;
&lt;br /&gt;
* LJ cutoff in real units &amp;lt;math&amp;gt;= 1.088 nm&amp;lt;/math&amp;gt;&lt;br /&gt;
* Well Depth &amp;lt;math&amp;gt;= 0.998 kJ mol&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Reduced Temperature &amp;lt;math&amp;gt; = 180K&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Equilibration===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Atoms cannot be given random starting coordinates as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For a face-centred cubic lattice with a lattice point density of 1.2, the side length of the cubic unit cell is 1.494.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A face-centred cubic lattice has 4 lattice points and hence four atoms, whereas a cubic lattice has 1 of each. Therefore, there would be 4000 atoms in a 10 x 10 x 10 box.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Line 1: Sets the mass of all atoms of type 1 to 1.0&lt;br /&gt;
* Line 2: States that the interaction between atoms is to be modelled on the Leonard-Jones potential with a cut off distance of 3.0&lt;br /&gt;
* Line 3: Sets the pairwise force field coefficients for all atoms, in this case, this is the well depth and the distance at 0 potential - both are set to 1.0&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet Algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The initial script sets the time-step as a variable which can be called later in the script, the second script does not do this. Therefore, if a simulation is to be run on a different time-step, the input file with the initial script only needs to change the time-step in one place (where the variable is defined). Whereas, in the second script, the time-step will have to be changed everywhere that it is used in the input file. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). Does the simulation reach equilibrium? How long does this take? When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results? Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 23: Temperature as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 24: Pressure as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 25: Total energy as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It takes approximately 0.3s for the system to reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|500px|thumb|none|Figure 26: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Of the 5 timesteps, 0.0025 is the largest to give acceptable results. A timestep of 0.015 is particularly bad as the system does not reach equilibrium at all. The other 4 time steps do all reach equilibrium however 0.001 and 0.0025 are the only two which reach an accurate equilibrium value for total energy.&lt;br /&gt;
&lt;br /&gt;
===Running simulations under specific conditions===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Choose 5 temperatures (above the critical temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt;), and two pressures (you can get a good idea of what a reasonable pressure is in Lennard-Jones units by looking at the average pressure of your simulations from the last section). This gives ten phase points &amp;amp;mdash; five temperatures at each pressure. Create 10 copies of npt.in, and modify each to run a simulation at one of your chosen &amp;lt;math&amp;gt;\left(p, T\right)&amp;lt;/math&amp;gt; points. You should be able to use the results of the previous section to choose a timestep. Submit these ten jobs to the HPC portal. While you wait for them to finish, you should read the next section.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Derivation_1_PictureJPW.PNG|400px|thumb|none|Figure 27: Derivation of velocity scaling factor &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. How often will values of the temperature, etc., be sampled for the average? How many measurements contribute to the average? Looking to the following line, how much time will you simulate?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The three numbers correspond Nevery, Nrepeat and Nfreq.&lt;br /&gt;
&lt;br /&gt;
* Nevery corresponds to how often input values are sampled for the average - for example, temperature will be sampled for the average every 100 timesteps.&lt;br /&gt;
* Nrepeat corresponds to the number of values used to calculate the average - in this case 1000 values (measurements) are used (contribute) to calculating the average.&lt;br /&gt;
* Nfreq corresponds to the timestep at which the average is calculated - the 100000th timestep.&lt;br /&gt;
&lt;br /&gt;
This therefore means that there are 100000 timesteps and with a timestep of 0.0025, the time simulated = 250 seconds. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.  Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|none|Figure 28: Density as a function of temperature for a system at 2 different pressures.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
===Calculating heat capacities using statistical physics===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|none|Figure 29: Constant volume heat capacity as a function of temperature.]]&lt;br /&gt;
&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
An example of the input script used can be found below:&lt;br /&gt;
&lt;br /&gt;
[[File:ExampleInputFileJPW.in]]&lt;br /&gt;
&lt;br /&gt;
===Structural properties and the radial distribution function===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. In the solid case, illustrate which lattice sites the first three peaks correspond to. What is the lattice spacing? What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|500px|thumb|none|Figure 30: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse and therefore the chance of finding another particle is equal to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
===Dynamic properties and the diffusion coefficient===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the D subfolder, there is a file &#039;&#039;liq.in&#039;&#039; that will run a simulation at specified density and temperature to calculate the mean squared displacement and velocity autocorrelation function of your system. Run one of these simulations for a vapour, liquid, and solid. You have also been given some simulated data from much larger systems (approximately one million atoms). You will need these files later.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 30: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 31: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 32: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 33: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 34: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 35: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 36: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure X) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent? Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? Attach a copy of your plot to your writeup.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The derivation for the normalised velocity autocorrelation function for a 1D harmonic oscillator is shown below, along with two trigonometric identities used in the derivation.&lt;br /&gt;
&lt;br /&gt;
[[File:Trigonometric_IdentitiesJPW.PNG|400px|thumb|none|Figure 37: Trigonometric identities used in derivation of VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
[[File:JPWD2.PNG|600px|thumb|none|Figure 38: Derivation of the VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
&lt;br /&gt;
A plot showing the VACF for the liquid and solid simulations, as well as for a 1D harmonic oscillator with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; is shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:FinaleJPW.png|600px|thumb|none|Figure 39: VACF as a function of timestep for the liquid and solid phases as well as for a 1D harmonic oscillator.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 39), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms.&lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the trapezium rule to approximate the integral under the velocity autocorrelation function for the solid, liquid, and gas, and use these values to estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. You should make a plot of the running integral in each case. Are they as you expect? Repeat this procedure for the VACF data that you were given from the one million atom simulations. What do you think is the largest source of error in your estimates of D from the VACF?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|400px|thumb|none|Figure 40: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|400px|thumb|none|Figure 41: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure X.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 42: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;L-J Article&amp;quot;&amp;gt;J.P.Hansen, L.Verlet, &amp;lt;i&amp;gt;Phys.Rev.&amp;lt;/i&amp;gt;, 1969, &amp;lt;b&amp;gt;184&amp;lt;/b&amp;gt;, 151&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696385</id>
		<title>User:Jpw115</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696385"/>
		<updated>2018-04-23T15:45:25Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Methods */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=color:red&amp;gt; colour red &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Liquid Simulations - Jack Williams=&lt;br /&gt;
==Abstract==&lt;br /&gt;
Key thermodynamic properties of a system modelled on the Leonard-Jones potential were investigated using molecular dynamics simulation. Density and heat capacity were measured as functions of temperature to analyse how the system evolves with changing temperature, both were discovered to decrease with increasing temperature. Radial distribution functions were calculated to analyse the structure of the system in each of the 3 phases. It was discovered that solids, due to the crystalline fixed structure have high long range order, liquids have some order that decreases over time due to the ability of the particles to diffuse away, and gasses have negligible long range order due to the very low density of the gaseous system. The diffusion coefficient for each phase was measured using two methods, the mean squared displacement method (MSD) and the velocity autocorrelation method (VACF). Both produced the expected results of a high diffusion coefficient for a gas, fairly low for liquid and a diffusion coefficient close to zero for the solid phase. Both methods produced similar results, however due to the error in calculating the integral in the VACF method (trapezium rule), the values calculated using the MSD method are more accurate. These results compared well to simulations run on larger systems, which due to the larger amount of data contributing to the average, are more accurate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good abstract: tells the reader concisely what you did and your main results/conclusions. My only qualm is that saying you &amp;quot;discovered&amp;quot; long vs. short range order in the phases of matter seems like it is a novel result. Perhaps &amp;quot;verified&amp;quot; would have been better. This is a minor point though.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Knowledge and understanding of the thermodynamic properties of systems, for example the phase transitions, has a wide range of applications in a number of industries. One key industry in which this knowledge is vital for proper function, is in power generation, for example in fossil fuel power stations and nuclear power stations. Both types of station function via heating liquid water which then evaporates forming steam, which is used to turn a turbine connected to a generator which generates electrical energy. The steam then condenses back to liquid water to be re-used. &lt;br /&gt;
To maximise efficiency, certain factors, for example the dimensions of the system carrying the water, need to be controlled:&lt;br /&gt;
* Initially, to avoid the waste of thermal energy produced from the burning of fossil fuels (or generated from nuclear fission), knowledge of the heat capacity of water can be used to determine the optimal volume of water in which to heat based on the amount of energy generated from the burning of the fuel. &lt;br /&gt;
* The steam driving the turbine needs to be at a high pressure to ensure the turbine is being spun at a maximal rate. Knowledge of how the pressure of water varies with temperature as well as the volume of container is important in determining the required dimensions of the system containing the water, to ensure optimal steam pressure Furthermore, knowledge of how the phase transitions of water is vital in ensuring that the steam does not condense back to water before passing through the turbine.  &lt;br /&gt;
&lt;br /&gt;
Originally these properties would have been determined through experimentation, however today the use of molecular dynamics simulations allows their determination in a much more cheap and facile way. This investigation aims to demonstrate the versatility of molecular dynamics by simulating the thermodynamic properties of a few simple systems without setting foot in a laboratory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good motivation. The introduction (or theory section if there is a separate section for this) usually includes the background theory required for your reader to understand what you have done. This is included in your methodology section, which is usually instead a concise summary of your simulation details needed to reproduce your results. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Aims &amp;amp; Objectives==&lt;br /&gt;
To use computational modelling to determine key thermodynamic features of simple systems:&lt;br /&gt;
* Investigate the change in density of a system with varying temperature and pressure &lt;br /&gt;
* Investigate the change in constant volume heat capacity of a system with temperature&lt;br /&gt;
* Investigate the change in radial distribution function of a system in the solid, liquid and gas phases&lt;br /&gt;
* Determine the diffusion coefficient for a system in the solid, liquid and gas phases&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
This investigation uses the software LAMMPS (Large-scale Atomic/Molecular Massively Parallel Simulator), to run simulations on simple systems. &lt;br /&gt;
Trajectories of atoms were visualised using the software VMD (Visual Molecular Dynamics). &amp;lt;span style=color:red&amp;gt; A citation of LAMMPS would be good - it is a serious endeavour by many people and worthy of acknowledgement.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting up the system===&lt;br /&gt;
For the simulation of a simple liquid, initial coordinates for atoms cannot be randomly generated and therefore a crystal lattice (simple cubic) is generated which is then melted - the simulation is set to run and over time the atoms rearrange into a configuration of higher disorder more closely modelling a liquid. Atoms cannot be given random starting coordinates to model this liquid configuration as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
Other key specifications of the system are below:&lt;br /&gt;
* the mass of all atoms was set to 1.0&lt;br /&gt;
* the interaction between atoms in the system was modelled on a Leonard-Jones potential&lt;br /&gt;
* the cut-off distance was set to 3.0 in reduced units&lt;br /&gt;
* the pairwise force field coefficients were set to 1.0 for both the potential well depth and the zero-potential distance &lt;br /&gt;
* all atoms were assigned random velocities following the Maxwell-Boltzmann distribution&lt;br /&gt;
&lt;br /&gt;
===Calculating thermodynamic quantities===&lt;br /&gt;
The simulation measures thermodynamics properties of the system for example: total energy, temperature, pressure, mean squared displacement and the velocity auto-correlation function of the system, at certain time-steps for a certain number of runs. &lt;br /&gt;
&lt;br /&gt;
Before simulations were run to gather data, it was confirmed that the system reaches equilibrium. Graphs showing how total energy, temperature and pressure change with time for a time-step of 0.001 are displayed below. After approximately 0.3 seconds, the system reaches equilibrium and fluctuates around an equilibrium value for each of the properties. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 1: Temperature as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 2: Pressure as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 3: Total energy as a function of time.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 time-steps were tested to determine the most adequate. Figure 4 to the right shows how the total energy changes over time for each of the 5 timesteps. It can be seen that a time-step of 0.0025 is the highest time-step that still gives an accurate equilibrium total energy, hence, this time-step was used in further simulations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|600px|thumb|right|Figure 4: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the equation of state of the model described above, by calculating the density of a NpT system at varying pressure and temperature. 2 pressures and 5 temperatures were chosen (p = 2.5, 2.75; T = 1.75, 2, 2, 2.25, 3, 5), and a simulation was run for each combination giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the change in constant volume heat capacity with temperature. 2 densities and 5 temperatures were chosen (&amp;lt;math&amp;gt;\rho&amp;lt;/math&amp;gt;= 0.2, 0.8; T = 2.0, 2.2, 2.4, 2.6, 2.8), giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to model the radial distribution function as a function of distance, using the software VMD. 3 simulations were run, each with a specified density and temperature correlating to a system in each of the 3 phases&amp;lt;ref name=&amp;quot;L-J Article&amp;quot; /&amp;gt;: solid, liquid and gas. &lt;br /&gt;
* Solid: Density = 1.25, Temperature = 1.0&lt;br /&gt;
* Liquid: Density = 0.8, Temperature = 1.2 &lt;br /&gt;
* Gas: Density = 0.025, Temperature = 1.2&lt;br /&gt;
&lt;br /&gt;
The mean squared displacement (MSD) and velocity autocorrelation function (VACF) were calculated using the same densities and temperatures specified above (same as RDF)  to model a system in each of the 3 phases. Both the MSD and VACF were used to calculate the diffusion coefficient (D) for each phase, using the following relationships.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{3}\int_0^\infty \mathrm{d}\tau \left\langle\mathbf{v}\left(0\right)\cdot\mathbf{v}\left(\tau\right)\right\rangle&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Results &amp;amp; Discussion==&lt;br /&gt;
===Equations of state===&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|center|Figure 5: Density as a function of temperature for a system at 2 different pressures, as well as the corresponding densities as predicted by the ideal gas law.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
===Heat capacity at constant volume===&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|center|Figure 6: Constant volume heat capacity as a function of temperature for 2 different densities.]]&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
===Radial distribution function===&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|600px|thumb|center|Figure 7: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse with no order.&lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
===Diffusion coefficient===&lt;br /&gt;
&amp;lt;b&amp;gt;MSD Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 8: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 9: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 10: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step for a system with 1,000,000 atoms are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 11: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 12: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 13: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 14: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure 10) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;VACF Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:FinaleJPW.png|350px|thumb|none|Figure 15: VACF as a function of time for the solid and liquid phases along with the 1D Harmonic oscillator.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|350px|thumb|none|Figure 16: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|350px|thumb|none|Figure 17: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The trapezium rule was used to calculate the integral of the VACF for each phase.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were then calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure 18.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 18: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 15), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms. &lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system. &lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Equation of state simulations, on a system of constant pressure determined that the density of a system at constant pressure decreased with increasing temperature. The simulated density is lower than that predicted by the ideal gas law as the system is not behaving ideally  (there are interactions between the particles), however this discrepancy decreases with increasing temperature.&lt;br /&gt;
&lt;br /&gt;
Heat capacity simulations showed the expected trend of heat capacity at constant volume decreasing with increasing temperature. Furthermore, heat capacity increases with increasing density as there are more particles and hence more energy states that need to be filled to increase the temperature, therefore requiring a larger amount of energy to do so.&lt;br /&gt;
&lt;br /&gt;
Radial distribution function simulations gave information about the coordination around particles in each phase. The solid has a regular ordered crystal structure and hence the radial distribution function displays many peaks. For liquids there is some short range order, shown by 4 peaks of decreasing intensity corresponding to 4 initial coordination shells around the liquid, however it decays quickly due to the ability of particles to diffuse away, resulting in very little long range order. For a gas, there is one initial coordination shell shown by the sharp initial peak, however it then decays to the bulk density value and remains constant due to the high diffusive nature of a gas, there is no long range order past this first coordination shell. &lt;br /&gt;
&lt;br /&gt;
Both methods of calculation of the diffusion coefficient give the expected results, with a gas having a large value, liquid a small value and the solid with a value close to 0. The values obtained from each method compare well to each other, as well as the values obtained from the 1,000,000 atom simulation. However, it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. Furthermore, the VACF method will have significant error due to the error in using the trapezium rule to calculate the integral of the VACF. &lt;br /&gt;
&lt;br /&gt;
In conclusion, molecular dynamics simulation has allowed fast and accurate calculations of a range of key thermodynamic properties of a range of systems. It is clear that the use of these simulations is invaluable for the determination of these properties with applications in a range of industries, on key example being in the design of power stations. Furthermore, none of the simulations took longer than 5 minutes, illustrating another key benefit of using molecular dynamics simulations. In future calculations, calculations should be done on larger systems to acquire a more accurate average, as well as possibly introducing a second type of particle into the system to analyse how it effects the properties of the system.&lt;br /&gt;
&lt;br /&gt;
==Tasks==&lt;br /&gt;
The answers to all tasks are below, some have already been answered in the report above. &lt;br /&gt;
&lt;br /&gt;
===Introduction to molecular dynamics simulation===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by &amp;lt;math&amp;gt; x\left(t\right) = A\cos\left(\omega t + \phi\right)&amp;lt;/math&amp;gt; (the values of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:HO_1.png|350px|thumb|center|Figure 19: Analytical position as a function of time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO2.png|350px|thumb|center|Figure 20: Total energy as a function time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO3.png|350px|thumb|center|Figure 21: Error between the velocity-Verlet algorithm and analytical values as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHO4.png|500px|thumb|center|Figure 22: Error maximum as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK:&amp;lt;/big&amp;gt; For a single Lennard-Jones interaction, &amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;, find the separation, &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt;, at which the potential energy is zero. What is the force at this separation? Find the equilibrium separation, &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, and work out the well depth (&amp;lt;math&amp;gt;\phi\left(r_{eq}\right)&amp;lt;/math&amp;gt;). Evaluate the integrals &amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\int_{2.5\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\int_{3\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;\sigma = \epsilon = 1.0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* The separation r&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; at which the potential energy is zero, is when &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The force at this separation is equal to &amp;lt;math&amp;gt;24\epsilon/\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The equilibrium separation &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;eq&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = 2&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;1/6&amp;lt;/sup&amp;gt;&amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The potential well depth is equal to &amp;lt;math&amp;gt;-\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
* Evaluation of integrals:&lt;br /&gt;
&lt;br /&gt;
[[File:Reallastboy.PNG|400px|none]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions. Estimate the volume of &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; water molecules under standard conditions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Assumptions:&lt;br /&gt;
* 1mL of water = 1g of water &lt;br /&gt;
&lt;br /&gt;
Number of water molecules in 1g:&lt;br /&gt;
* Moles in 1g = 1/18 &lt;br /&gt;
* Number of molecules = N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; x 1/18 = &amp;lt;b&amp;gt;3.35 x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Volume of 10000 water molecules:&lt;br /&gt;
* Moles = 10000/N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Mass = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt; x 18 = 2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;g&lt;br /&gt;
* Volume = &amp;lt;b&amp;gt;2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, &#039;&#039;after the periodic boundary conditions have been applied&#039;&#039;?&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
It ends up at the point with coordinates - &amp;lt;math&amp;gt;(0.2, 0.1, 0.7)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: The Lennard-Jones parameters for argon are &amp;lt;math&amp;gt;\sigma = 0.34\mathrm{nm}, \epsilon\ /\ k_B= 120 \mathrm{K}&amp;lt;/math&amp;gt;. If the LJ cutoff is &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;, what is it in real units? What is the well depth in &amp;lt;math&amp;gt;\mathrm{kJ\ mol}^{-1}&amp;lt;/math&amp;gt;? What is the reduced temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt; in real units?&lt;br /&gt;
&lt;br /&gt;
* LJ cutoff in real units &amp;lt;math&amp;gt;= 1.088 nm&amp;lt;/math&amp;gt;&lt;br /&gt;
* Well Depth &amp;lt;math&amp;gt;= 0.998 kJ mol&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Reduced Temperature &amp;lt;math&amp;gt; = 180K&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Equilibration===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Atoms cannot be given random starting coordinates as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For a face-centred cubic lattice with a lattice point density of 1.2, the side length of the cubic unit cell is 1.494.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A face-centred cubic lattice has 4 lattice points and hence four atoms, whereas a cubic lattice has 1 of each. Therefore, there would be 4000 atoms in a 10 x 10 x 10 box.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Line 1: Sets the mass of all atoms of type 1 to 1.0&lt;br /&gt;
* Line 2: States that the interaction between atoms is to be modelled on the Leonard-Jones potential with a cut off distance of 3.0&lt;br /&gt;
* Line 3: Sets the pairwise force field coefficients for all atoms, in this case, this is the well depth and the distance at 0 potential - both are set to 1.0&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet Algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The initial script sets the time-step as a variable which can be called later in the script, the second script does not do this. Therefore, if a simulation is to be run on a different time-step, the input file with the initial script only needs to change the time-step in one place (where the variable is defined). Whereas, in the second script, the time-step will have to be changed everywhere that it is used in the input file. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). Does the simulation reach equilibrium? How long does this take? When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results? Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 23: Temperature as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 24: Pressure as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 25: Total energy as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It takes approximately 0.3s for the system to reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|500px|thumb|none|Figure 26: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Of the 5 timesteps, 0.0025 is the largest to give acceptable results. A timestep of 0.015 is particularly bad as the system does not reach equilibrium at all. The other 4 time steps do all reach equilibrium however 0.001 and 0.0025 are the only two which reach an accurate equilibrium value for total energy.&lt;br /&gt;
&lt;br /&gt;
===Running simulations under specific conditions===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Choose 5 temperatures (above the critical temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt;), and two pressures (you can get a good idea of what a reasonable pressure is in Lennard-Jones units by looking at the average pressure of your simulations from the last section). This gives ten phase points &amp;amp;mdash; five temperatures at each pressure. Create 10 copies of npt.in, and modify each to run a simulation at one of your chosen &amp;lt;math&amp;gt;\left(p, T\right)&amp;lt;/math&amp;gt; points. You should be able to use the results of the previous section to choose a timestep. Submit these ten jobs to the HPC portal. While you wait for them to finish, you should read the next section.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Derivation_1_PictureJPW.PNG|400px|thumb|none|Figure 27: Derivation of velocity scaling factor &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. How often will values of the temperature, etc., be sampled for the average? How many measurements contribute to the average? Looking to the following line, how much time will you simulate?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The three numbers correspond Nevery, Nrepeat and Nfreq.&lt;br /&gt;
&lt;br /&gt;
* Nevery corresponds to how often input values are sampled for the average - for example, temperature will be sampled for the average every 100 timesteps.&lt;br /&gt;
* Nrepeat corresponds to the number of values used to calculate the average - in this case 1000 values (measurements) are used (contribute) to calculating the average.&lt;br /&gt;
* Nfreq corresponds to the timestep at which the average is calculated - the 100000th timestep.&lt;br /&gt;
&lt;br /&gt;
This therefore means that there are 100000 timesteps and with a timestep of 0.0025, the time simulated = 250 seconds. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.  Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|none|Figure 28: Density as a function of temperature for a system at 2 different pressures.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
===Calculating heat capacities using statistical physics===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|none|Figure 29: Constant volume heat capacity as a function of temperature.]]&lt;br /&gt;
&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
An example of the input script used can be found below:&lt;br /&gt;
&lt;br /&gt;
[[File:ExampleInputFileJPW.in]]&lt;br /&gt;
&lt;br /&gt;
===Structural properties and the radial distribution function===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. In the solid case, illustrate which lattice sites the first three peaks correspond to. What is the lattice spacing? What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|500px|thumb|none|Figure 30: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse and therefore the chance of finding another particle is equal to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
===Dynamic properties and the diffusion coefficient===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the D subfolder, there is a file &#039;&#039;liq.in&#039;&#039; that will run a simulation at specified density and temperature to calculate the mean squared displacement and velocity autocorrelation function of your system. Run one of these simulations for a vapour, liquid, and solid. You have also been given some simulated data from much larger systems (approximately one million atoms). You will need these files later.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 30: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 31: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 32: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 33: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 34: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 35: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 36: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure X) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent? Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? Attach a copy of your plot to your writeup.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The derivation for the normalised velocity autocorrelation function for a 1D harmonic oscillator is shown below, along with two trigonometric identities used in the derivation.&lt;br /&gt;
&lt;br /&gt;
[[File:Trigonometric_IdentitiesJPW.PNG|400px|thumb|none|Figure 37: Trigonometric identities used in derivation of VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
[[File:JPWD2.PNG|600px|thumb|none|Figure 38: Derivation of the VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
&lt;br /&gt;
A plot showing the VACF for the liquid and solid simulations, as well as for a 1D harmonic oscillator with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; is shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:FinaleJPW.png|600px|thumb|none|Figure 39: VACF as a function of timestep for the liquid and solid phases as well as for a 1D harmonic oscillator.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 39), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms.&lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the trapezium rule to approximate the integral under the velocity autocorrelation function for the solid, liquid, and gas, and use these values to estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. You should make a plot of the running integral in each case. Are they as you expect? Repeat this procedure for the VACF data that you were given from the one million atom simulations. What do you think is the largest source of error in your estimates of D from the VACF?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|400px|thumb|none|Figure 40: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|400px|thumb|none|Figure 41: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure X.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 42: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;L-J Article&amp;quot;&amp;gt;J.P.Hansen, L.Verlet, &amp;lt;i&amp;gt;Phys.Rev.&amp;lt;/i&amp;gt;, 1969, &amp;lt;b&amp;gt;184&amp;lt;/b&amp;gt;, 151&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696384</id>
		<title>User:Jpw115</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696384"/>
		<updated>2018-04-23T15:44:06Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=color:red&amp;gt; colour red &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Liquid Simulations - Jack Williams=&lt;br /&gt;
==Abstract==&lt;br /&gt;
Key thermodynamic properties of a system modelled on the Leonard-Jones potential were investigated using molecular dynamics simulation. Density and heat capacity were measured as functions of temperature to analyse how the system evolves with changing temperature, both were discovered to decrease with increasing temperature. Radial distribution functions were calculated to analyse the structure of the system in each of the 3 phases. It was discovered that solids, due to the crystalline fixed structure have high long range order, liquids have some order that decreases over time due to the ability of the particles to diffuse away, and gasses have negligible long range order due to the very low density of the gaseous system. The diffusion coefficient for each phase was measured using two methods, the mean squared displacement method (MSD) and the velocity autocorrelation method (VACF). Both produced the expected results of a high diffusion coefficient for a gas, fairly low for liquid and a diffusion coefficient close to zero for the solid phase. Both methods produced similar results, however due to the error in calculating the integral in the VACF method (trapezium rule), the values calculated using the MSD method are more accurate. These results compared well to simulations run on larger systems, which due to the larger amount of data contributing to the average, are more accurate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good abstract: tells the reader concisely what you did and your main results/conclusions. My only qualm is that saying you &amp;quot;discovered&amp;quot; long vs. short range order in the phases of matter seems like it is a novel result. Perhaps &amp;quot;verified&amp;quot; would have been better. This is a minor point though.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Knowledge and understanding of the thermodynamic properties of systems, for example the phase transitions, has a wide range of applications in a number of industries. One key industry in which this knowledge is vital for proper function, is in power generation, for example in fossil fuel power stations and nuclear power stations. Both types of station function via heating liquid water which then evaporates forming steam, which is used to turn a turbine connected to a generator which generates electrical energy. The steam then condenses back to liquid water to be re-used. &lt;br /&gt;
To maximise efficiency, certain factors, for example the dimensions of the system carrying the water, need to be controlled:&lt;br /&gt;
* Initially, to avoid the waste of thermal energy produced from the burning of fossil fuels (or generated from nuclear fission), knowledge of the heat capacity of water can be used to determine the optimal volume of water in which to heat based on the amount of energy generated from the burning of the fuel. &lt;br /&gt;
* The steam driving the turbine needs to be at a high pressure to ensure the turbine is being spun at a maximal rate. Knowledge of how the pressure of water varies with temperature as well as the volume of container is important in determining the required dimensions of the system containing the water, to ensure optimal steam pressure Furthermore, knowledge of how the phase transitions of water is vital in ensuring that the steam does not condense back to water before passing through the turbine.  &lt;br /&gt;
&lt;br /&gt;
Originally these properties would have been determined through experimentation, however today the use of molecular dynamics simulations allows their determination in a much more cheap and facile way. This investigation aims to demonstrate the versatility of molecular dynamics by simulating the thermodynamic properties of a few simple systems without setting foot in a laboratory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good motivation. The introduction (or theory section if there is a separate section for this) usually includes the background theory required for your reader to understand what you have done. This is included in your methodology section, which is usually instead a concise summary of your simulation details needed to reproduce your results. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Aims &amp;amp; Objectives==&lt;br /&gt;
To use computational modelling to determine key thermodynamic features of simple systems:&lt;br /&gt;
* Investigate the change in density of a system with varying temperature and pressure &lt;br /&gt;
* Investigate the change in constant volume heat capacity of a system with temperature&lt;br /&gt;
* Investigate the change in radial distribution function of a system in the solid, liquid and gas phases&lt;br /&gt;
* Determine the diffusion coefficient for a system in the solid, liquid and gas phases&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
This investigation uses the software LAMMPS (Large-scale Atomic/Molecular Massively Parallel Simulator), to run simulations on simple systems. &lt;br /&gt;
Trajectories of atoms were visualised using the software VMD (Visual Molecular Dynamics). &lt;br /&gt;
&lt;br /&gt;
===Setting up the system===&lt;br /&gt;
For the simulation of a simple liquid, initial coordinates for atoms cannot be randomly generated and therefore a crystal lattice (simple cubic) is generated which is then melted - the simulation is set to run and over time the atoms rearrange into a configuration of higher disorder more closely modelling a liquid. Atoms cannot be given random starting coordinates to model this liquid configuration as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
Other key specifications of the system are below:&lt;br /&gt;
* the mass of all atoms was set to 1.0&lt;br /&gt;
* the interaction between atoms in the system was modelled on a Leonard-Jones potential&lt;br /&gt;
* the cut-off distance was set to 3.0 in reduced units&lt;br /&gt;
* the pairwise force field coefficients were set to 1.0 for both the potential well depth and the zero-potential distance &lt;br /&gt;
* all atoms were assigned random velocities following the Maxwell-Boltzmann distribution&lt;br /&gt;
&lt;br /&gt;
===Calculating thermodynamic quantities===&lt;br /&gt;
The simulation measures thermodynamics properties of the system for example: total energy, temperature, pressure, mean squared displacement and the velocity auto-correlation function of the system, at certain time-steps for a certain number of runs. &lt;br /&gt;
&lt;br /&gt;
Before simulations were run to gather data, it was confirmed that the system reaches equilibrium. Graphs showing how total energy, temperature and pressure change with time for a time-step of 0.001 are displayed below. After approximately 0.3 seconds, the system reaches equilibrium and fluctuates around an equilibrium value for each of the properties. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 1: Temperature as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 2: Pressure as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 3: Total energy as a function of time.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 time-steps were tested to determine the most adequate. Figure 4 to the right shows how the total energy changes over time for each of the 5 timesteps. It can be seen that a time-step of 0.0025 is the highest time-step that still gives an accurate equilibrium total energy, hence, this time-step was used in further simulations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|600px|thumb|right|Figure 4: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the equation of state of the model described above, by calculating the density of a NpT system at varying pressure and temperature. 2 pressures and 5 temperatures were chosen (p = 2.5, 2.75; T = 1.75, 2, 2, 2.25, 3, 5), and a simulation was run for each combination giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the change in constant volume heat capacity with temperature. 2 densities and 5 temperatures were chosen (&amp;lt;math&amp;gt;\rho&amp;lt;/math&amp;gt;= 0.2, 0.8; T = 2.0, 2.2, 2.4, 2.6, 2.8), giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to model the radial distribution function as a function of distance, using the software VMD. 3 simulations were run, each with a specified density and temperature correlating to a system in each of the 3 phases&amp;lt;ref name=&amp;quot;L-J Article&amp;quot; /&amp;gt;: solid, liquid and gas. &lt;br /&gt;
* Solid: Density = 1.25, Temperature = 1.0&lt;br /&gt;
* Liquid: Density = 0.8, Temperature = 1.2 &lt;br /&gt;
* Gas: Density = 0.025, Temperature = 1.2&lt;br /&gt;
&lt;br /&gt;
The mean squared displacement (MSD) and velocity autocorrelation function (VACF) were calculated using the same densities and temperatures specified above (same as RDF)  to model a system in each of the 3 phases. Both the MSD and VACF were used to calculate the diffusion coefficient (D) for each phase, using the following relationships.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{3}\int_0^\infty \mathrm{d}\tau \left\langle\mathbf{v}\left(0\right)\cdot\mathbf{v}\left(\tau\right)\right\rangle&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Results &amp;amp; Discussion==&lt;br /&gt;
===Equations of state===&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|center|Figure 5: Density as a function of temperature for a system at 2 different pressures, as well as the corresponding densities as predicted by the ideal gas law.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
===Heat capacity at constant volume===&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|center|Figure 6: Constant volume heat capacity as a function of temperature for 2 different densities.]]&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
===Radial distribution function===&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|600px|thumb|center|Figure 7: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse with no order.&lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
===Diffusion coefficient===&lt;br /&gt;
&amp;lt;b&amp;gt;MSD Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 8: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 9: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 10: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step for a system with 1,000,000 atoms are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 11: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 12: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 13: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 14: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure 10) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;VACF Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:FinaleJPW.png|350px|thumb|none|Figure 15: VACF as a function of time for the solid and liquid phases along with the 1D Harmonic oscillator.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|350px|thumb|none|Figure 16: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|350px|thumb|none|Figure 17: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The trapezium rule was used to calculate the integral of the VACF for each phase.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were then calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure 18.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 18: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 15), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms. &lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system. &lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Equation of state simulations, on a system of constant pressure determined that the density of a system at constant pressure decreased with increasing temperature. The simulated density is lower than that predicted by the ideal gas law as the system is not behaving ideally  (there are interactions between the particles), however this discrepancy decreases with increasing temperature.&lt;br /&gt;
&lt;br /&gt;
Heat capacity simulations showed the expected trend of heat capacity at constant volume decreasing with increasing temperature. Furthermore, heat capacity increases with increasing density as there are more particles and hence more energy states that need to be filled to increase the temperature, therefore requiring a larger amount of energy to do so.&lt;br /&gt;
&lt;br /&gt;
Radial distribution function simulations gave information about the coordination around particles in each phase. The solid has a regular ordered crystal structure and hence the radial distribution function displays many peaks. For liquids there is some short range order, shown by 4 peaks of decreasing intensity corresponding to 4 initial coordination shells around the liquid, however it decays quickly due to the ability of particles to diffuse away, resulting in very little long range order. For a gas, there is one initial coordination shell shown by the sharp initial peak, however it then decays to the bulk density value and remains constant due to the high diffusive nature of a gas, there is no long range order past this first coordination shell. &lt;br /&gt;
&lt;br /&gt;
Both methods of calculation of the diffusion coefficient give the expected results, with a gas having a large value, liquid a small value and the solid with a value close to 0. The values obtained from each method compare well to each other, as well as the values obtained from the 1,000,000 atom simulation. However, it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. Furthermore, the VACF method will have significant error due to the error in using the trapezium rule to calculate the integral of the VACF. &lt;br /&gt;
&lt;br /&gt;
In conclusion, molecular dynamics simulation has allowed fast and accurate calculations of a range of key thermodynamic properties of a range of systems. It is clear that the use of these simulations is invaluable for the determination of these properties with applications in a range of industries, on key example being in the design of power stations. Furthermore, none of the simulations took longer than 5 minutes, illustrating another key benefit of using molecular dynamics simulations. In future calculations, calculations should be done on larger systems to acquire a more accurate average, as well as possibly introducing a second type of particle into the system to analyse how it effects the properties of the system.&lt;br /&gt;
&lt;br /&gt;
==Tasks==&lt;br /&gt;
The answers to all tasks are below, some have already been answered in the report above. &lt;br /&gt;
&lt;br /&gt;
===Introduction to molecular dynamics simulation===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by &amp;lt;math&amp;gt; x\left(t\right) = A\cos\left(\omega t + \phi\right)&amp;lt;/math&amp;gt; (the values of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:HO_1.png|350px|thumb|center|Figure 19: Analytical position as a function of time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO2.png|350px|thumb|center|Figure 20: Total energy as a function time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO3.png|350px|thumb|center|Figure 21: Error between the velocity-Verlet algorithm and analytical values as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHO4.png|500px|thumb|center|Figure 22: Error maximum as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK:&amp;lt;/big&amp;gt; For a single Lennard-Jones interaction, &amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;, find the separation, &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt;, at which the potential energy is zero. What is the force at this separation? Find the equilibrium separation, &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, and work out the well depth (&amp;lt;math&amp;gt;\phi\left(r_{eq}\right)&amp;lt;/math&amp;gt;). Evaluate the integrals &amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\int_{2.5\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\int_{3\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;\sigma = \epsilon = 1.0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* The separation r&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; at which the potential energy is zero, is when &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The force at this separation is equal to &amp;lt;math&amp;gt;24\epsilon/\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The equilibrium separation &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;eq&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = 2&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;1/6&amp;lt;/sup&amp;gt;&amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The potential well depth is equal to &amp;lt;math&amp;gt;-\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
* Evaluation of integrals:&lt;br /&gt;
&lt;br /&gt;
[[File:Reallastboy.PNG|400px|none]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions. Estimate the volume of &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; water molecules under standard conditions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Assumptions:&lt;br /&gt;
* 1mL of water = 1g of water &lt;br /&gt;
&lt;br /&gt;
Number of water molecules in 1g:&lt;br /&gt;
* Moles in 1g = 1/18 &lt;br /&gt;
* Number of molecules = N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; x 1/18 = &amp;lt;b&amp;gt;3.35 x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Volume of 10000 water molecules:&lt;br /&gt;
* Moles = 10000/N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Mass = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt; x 18 = 2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;g&lt;br /&gt;
* Volume = &amp;lt;b&amp;gt;2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, &#039;&#039;after the periodic boundary conditions have been applied&#039;&#039;?&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
It ends up at the point with coordinates - &amp;lt;math&amp;gt;(0.2, 0.1, 0.7)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: The Lennard-Jones parameters for argon are &amp;lt;math&amp;gt;\sigma = 0.34\mathrm{nm}, \epsilon\ /\ k_B= 120 \mathrm{K}&amp;lt;/math&amp;gt;. If the LJ cutoff is &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;, what is it in real units? What is the well depth in &amp;lt;math&amp;gt;\mathrm{kJ\ mol}^{-1}&amp;lt;/math&amp;gt;? What is the reduced temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt; in real units?&lt;br /&gt;
&lt;br /&gt;
* LJ cutoff in real units &amp;lt;math&amp;gt;= 1.088 nm&amp;lt;/math&amp;gt;&lt;br /&gt;
* Well Depth &amp;lt;math&amp;gt;= 0.998 kJ mol&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Reduced Temperature &amp;lt;math&amp;gt; = 180K&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Equilibration===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Atoms cannot be given random starting coordinates as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For a face-centred cubic lattice with a lattice point density of 1.2, the side length of the cubic unit cell is 1.494.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A face-centred cubic lattice has 4 lattice points and hence four atoms, whereas a cubic lattice has 1 of each. Therefore, there would be 4000 atoms in a 10 x 10 x 10 box.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Line 1: Sets the mass of all atoms of type 1 to 1.0&lt;br /&gt;
* Line 2: States that the interaction between atoms is to be modelled on the Leonard-Jones potential with a cut off distance of 3.0&lt;br /&gt;
* Line 3: Sets the pairwise force field coefficients for all atoms, in this case, this is the well depth and the distance at 0 potential - both are set to 1.0&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet Algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The initial script sets the time-step as a variable which can be called later in the script, the second script does not do this. Therefore, if a simulation is to be run on a different time-step, the input file with the initial script only needs to change the time-step in one place (where the variable is defined). Whereas, in the second script, the time-step will have to be changed everywhere that it is used in the input file. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). Does the simulation reach equilibrium? How long does this take? When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results? Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 23: Temperature as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 24: Pressure as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 25: Total energy as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It takes approximately 0.3s for the system to reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|500px|thumb|none|Figure 26: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Of the 5 timesteps, 0.0025 is the largest to give acceptable results. A timestep of 0.015 is particularly bad as the system does not reach equilibrium at all. The other 4 time steps do all reach equilibrium however 0.001 and 0.0025 are the only two which reach an accurate equilibrium value for total energy.&lt;br /&gt;
&lt;br /&gt;
===Running simulations under specific conditions===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Choose 5 temperatures (above the critical temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt;), and two pressures (you can get a good idea of what a reasonable pressure is in Lennard-Jones units by looking at the average pressure of your simulations from the last section). This gives ten phase points &amp;amp;mdash; five temperatures at each pressure. Create 10 copies of npt.in, and modify each to run a simulation at one of your chosen &amp;lt;math&amp;gt;\left(p, T\right)&amp;lt;/math&amp;gt; points. You should be able to use the results of the previous section to choose a timestep. Submit these ten jobs to the HPC portal. While you wait for them to finish, you should read the next section.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Derivation_1_PictureJPW.PNG|400px|thumb|none|Figure 27: Derivation of velocity scaling factor &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. How often will values of the temperature, etc., be sampled for the average? How many measurements contribute to the average? Looking to the following line, how much time will you simulate?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The three numbers correspond Nevery, Nrepeat and Nfreq.&lt;br /&gt;
&lt;br /&gt;
* Nevery corresponds to how often input values are sampled for the average - for example, temperature will be sampled for the average every 100 timesteps.&lt;br /&gt;
* Nrepeat corresponds to the number of values used to calculate the average - in this case 1000 values (measurements) are used (contribute) to calculating the average.&lt;br /&gt;
* Nfreq corresponds to the timestep at which the average is calculated - the 100000th timestep.&lt;br /&gt;
&lt;br /&gt;
This therefore means that there are 100000 timesteps and with a timestep of 0.0025, the time simulated = 250 seconds. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.  Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|none|Figure 28: Density as a function of temperature for a system at 2 different pressures.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
===Calculating heat capacities using statistical physics===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|none|Figure 29: Constant volume heat capacity as a function of temperature.]]&lt;br /&gt;
&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
An example of the input script used can be found below:&lt;br /&gt;
&lt;br /&gt;
[[File:ExampleInputFileJPW.in]]&lt;br /&gt;
&lt;br /&gt;
===Structural properties and the radial distribution function===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. In the solid case, illustrate which lattice sites the first three peaks correspond to. What is the lattice spacing? What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|500px|thumb|none|Figure 30: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse and therefore the chance of finding another particle is equal to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
===Dynamic properties and the diffusion coefficient===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the D subfolder, there is a file &#039;&#039;liq.in&#039;&#039; that will run a simulation at specified density and temperature to calculate the mean squared displacement and velocity autocorrelation function of your system. Run one of these simulations for a vapour, liquid, and solid. You have also been given some simulated data from much larger systems (approximately one million atoms). You will need these files later.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 30: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 31: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 32: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 33: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 34: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 35: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 36: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure X) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent? Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? Attach a copy of your plot to your writeup.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The derivation for the normalised velocity autocorrelation function for a 1D harmonic oscillator is shown below, along with two trigonometric identities used in the derivation.&lt;br /&gt;
&lt;br /&gt;
[[File:Trigonometric_IdentitiesJPW.PNG|400px|thumb|none|Figure 37: Trigonometric identities used in derivation of VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
[[File:JPWD2.PNG|600px|thumb|none|Figure 38: Derivation of the VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
&lt;br /&gt;
A plot showing the VACF for the liquid and solid simulations, as well as for a 1D harmonic oscillator with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; is shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:FinaleJPW.png|600px|thumb|none|Figure 39: VACF as a function of timestep for the liquid and solid phases as well as for a 1D harmonic oscillator.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 39), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms.&lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the trapezium rule to approximate the integral under the velocity autocorrelation function for the solid, liquid, and gas, and use these values to estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. You should make a plot of the running integral in each case. Are they as you expect? Repeat this procedure for the VACF data that you were given from the one million atom simulations. What do you think is the largest source of error in your estimates of D from the VACF?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|400px|thumb|none|Figure 40: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|400px|thumb|none|Figure 41: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure X.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 42: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;L-J Article&amp;quot;&amp;gt;J.P.Hansen, L.Verlet, &amp;lt;i&amp;gt;Phys.Rev.&amp;lt;/i&amp;gt;, 1969, &amp;lt;b&amp;gt;184&amp;lt;/b&amp;gt;, 151&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696383</id>
		<title>User:Jpw115</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696383"/>
		<updated>2018-04-23T15:42:12Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Abstract */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=color:red&amp;gt; colour red &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Liquid Simulations - Jack Williams=&lt;br /&gt;
==Abstract==&lt;br /&gt;
Key thermodynamic properties of a system modelled on the Leonard-Jones potential were investigated using molecular dynamics simulation. Density and heat capacity were measured as functions of temperature to analyse how the system evolves with changing temperature, both were discovered to decrease with increasing temperature. Radial distribution functions were calculated to analyse the structure of the system in each of the 3 phases. It was discovered that solids, due to the crystalline fixed structure have high long range order, liquids have some order that decreases over time due to the ability of the particles to diffuse away, and gasses have negligible long range order due to the very low density of the gaseous system. The diffusion coefficient for each phase was measured using two methods, the mean squared displacement method (MSD) and the velocity autocorrelation method (VACF). Both produced the expected results of a high diffusion coefficient for a gas, fairly low for liquid and a diffusion coefficient close to zero for the solid phase. Both methods produced similar results, however due to the error in calculating the integral in the VACF method (trapezium rule), the values calculated using the MSD method are more accurate. These results compared well to simulations run on larger systems, which due to the larger amount of data contributing to the average, are more accurate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good abstract: tells the reader concisely what you did and your main results/conclusions. My only qualm is that saying you &amp;quot;discovered&amp;quot; long vs. short range order in the phases of matter seems like it is a novel result. Perhaps &amp;quot;verified&amp;quot; would have been better. This is a minor point though.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Knowledge and understanding of the thermodynamic properties of systems, for example the phase transitions, has a wide range of applications in a number of industries. One key industry in which this knowledge is vital for proper function, is in power generation, for example in fossil fuel power stations and nuclear power stations. Both types of station function via heating liquid water which then evaporates forming steam, which is used to turn a turbine connected to a generator which generates electrical energy. The steam then condenses back to liquid water to be re-used. &lt;br /&gt;
To maximise efficiency, certain factors, for example the dimensions of the system carrying the water, need to be controlled:&lt;br /&gt;
* Initially, to avoid the waste of thermal energy produced from the burning of fossil fuels (or generated from nuclear fission), knowledge of the heat capacity of water can be used to determine the optimal volume of water in which to heat based on the amount of energy generated from the burning of the fuel. &lt;br /&gt;
* The steam driving the turbine needs to be at a high pressure to ensure the turbine is being spun at a maximal rate. Knowledge of how the pressure of water varies with temperature as well as the volume of container is important in determining the required dimensions of the system containing the water, to ensure optimal steam pressure Furthermore, knowledge of how the phase transitions of water is vital in ensuring that the steam does not condense back to water before passing through the turbine.  &lt;br /&gt;
&lt;br /&gt;
Originally these properties would have been determined through experimentation, however today the use of molecular dynamics simulations allows their determination in a much more cheap and facile way. This investigation aims to demonstrate the versatility of molecular dynamics by simulating the thermodynamic properties of a few simple systems without setting foot in a laboratory.&lt;br /&gt;
&lt;br /&gt;
==Aims &amp;amp; Objectives==&lt;br /&gt;
To use computational modelling to determine key thermodynamic features of simple systems:&lt;br /&gt;
* Investigate the change in density of a system with varying temperature and pressure &lt;br /&gt;
* Investigate the change in constant volume heat capacity of a system with temperature&lt;br /&gt;
* Investigate the change in radial distribution function of a system in the solid, liquid and gas phases&lt;br /&gt;
* Determine the diffusion coefficient for a system in the solid, liquid and gas phases&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
This investigation uses the software LAMMPS (Large-scale Atomic/Molecular Massively Parallel Simulator), to run simulations on simple systems. &lt;br /&gt;
Trajectories of atoms were visualised using the software VMD (Visual Molecular Dynamics). &lt;br /&gt;
&lt;br /&gt;
===Setting up the system===&lt;br /&gt;
For the simulation of a simple liquid, initial coordinates for atoms cannot be randomly generated and therefore a crystal lattice (simple cubic) is generated which is then melted - the simulation is set to run and over time the atoms rearrange into a configuration of higher disorder more closely modelling a liquid. Atoms cannot be given random starting coordinates to model this liquid configuration as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
Other key specifications of the system are below:&lt;br /&gt;
* the mass of all atoms was set to 1.0&lt;br /&gt;
* the interaction between atoms in the system was modelled on a Leonard-Jones potential&lt;br /&gt;
* the cut-off distance was set to 3.0 in reduced units&lt;br /&gt;
* the pairwise force field coefficients were set to 1.0 for both the potential well depth and the zero-potential distance &lt;br /&gt;
* all atoms were assigned random velocities following the Maxwell-Boltzmann distribution&lt;br /&gt;
&lt;br /&gt;
===Calculating thermodynamic quantities===&lt;br /&gt;
The simulation measures thermodynamics properties of the system for example: total energy, temperature, pressure, mean squared displacement and the velocity auto-correlation function of the system, at certain time-steps for a certain number of runs. &lt;br /&gt;
&lt;br /&gt;
Before simulations were run to gather data, it was confirmed that the system reaches equilibrium. Graphs showing how total energy, temperature and pressure change with time for a time-step of 0.001 are displayed below. After approximately 0.3 seconds, the system reaches equilibrium and fluctuates around an equilibrium value for each of the properties. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 1: Temperature as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 2: Pressure as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 3: Total energy as a function of time.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 time-steps were tested to determine the most adequate. Figure 4 to the right shows how the total energy changes over time for each of the 5 timesteps. It can be seen that a time-step of 0.0025 is the highest time-step that still gives an accurate equilibrium total energy, hence, this time-step was used in further simulations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|600px|thumb|right|Figure 4: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the equation of state of the model described above, by calculating the density of a NpT system at varying pressure and temperature. 2 pressures and 5 temperatures were chosen (p = 2.5, 2.75; T = 1.75, 2, 2, 2.25, 3, 5), and a simulation was run for each combination giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the change in constant volume heat capacity with temperature. 2 densities and 5 temperatures were chosen (&amp;lt;math&amp;gt;\rho&amp;lt;/math&amp;gt;= 0.2, 0.8; T = 2.0, 2.2, 2.4, 2.6, 2.8), giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to model the radial distribution function as a function of distance, using the software VMD. 3 simulations were run, each with a specified density and temperature correlating to a system in each of the 3 phases&amp;lt;ref name=&amp;quot;L-J Article&amp;quot; /&amp;gt;: solid, liquid and gas. &lt;br /&gt;
* Solid: Density = 1.25, Temperature = 1.0&lt;br /&gt;
* Liquid: Density = 0.8, Temperature = 1.2 &lt;br /&gt;
* Gas: Density = 0.025, Temperature = 1.2&lt;br /&gt;
&lt;br /&gt;
The mean squared displacement (MSD) and velocity autocorrelation function (VACF) were calculated using the same densities and temperatures specified above (same as RDF)  to model a system in each of the 3 phases. Both the MSD and VACF were used to calculate the diffusion coefficient (D) for each phase, using the following relationships.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{3}\int_0^\infty \mathrm{d}\tau \left\langle\mathbf{v}\left(0\right)\cdot\mathbf{v}\left(\tau\right)\right\rangle&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Results &amp;amp; Discussion==&lt;br /&gt;
===Equations of state===&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|center|Figure 5: Density as a function of temperature for a system at 2 different pressures, as well as the corresponding densities as predicted by the ideal gas law.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
===Heat capacity at constant volume===&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|center|Figure 6: Constant volume heat capacity as a function of temperature for 2 different densities.]]&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
===Radial distribution function===&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|600px|thumb|center|Figure 7: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse with no order.&lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
===Diffusion coefficient===&lt;br /&gt;
&amp;lt;b&amp;gt;MSD Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 8: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 9: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 10: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step for a system with 1,000,000 atoms are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 11: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 12: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 13: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 14: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure 10) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;VACF Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:FinaleJPW.png|350px|thumb|none|Figure 15: VACF as a function of time for the solid and liquid phases along with the 1D Harmonic oscillator.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|350px|thumb|none|Figure 16: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|350px|thumb|none|Figure 17: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The trapezium rule was used to calculate the integral of the VACF for each phase.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were then calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure 18.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 18: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 15), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms. &lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system. &lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Equation of state simulations, on a system of constant pressure determined that the density of a system at constant pressure decreased with increasing temperature. The simulated density is lower than that predicted by the ideal gas law as the system is not behaving ideally  (there are interactions between the particles), however this discrepancy decreases with increasing temperature.&lt;br /&gt;
&lt;br /&gt;
Heat capacity simulations showed the expected trend of heat capacity at constant volume decreasing with increasing temperature. Furthermore, heat capacity increases with increasing density as there are more particles and hence more energy states that need to be filled to increase the temperature, therefore requiring a larger amount of energy to do so.&lt;br /&gt;
&lt;br /&gt;
Radial distribution function simulations gave information about the coordination around particles in each phase. The solid has a regular ordered crystal structure and hence the radial distribution function displays many peaks. For liquids there is some short range order, shown by 4 peaks of decreasing intensity corresponding to 4 initial coordination shells around the liquid, however it decays quickly due to the ability of particles to diffuse away, resulting in very little long range order. For a gas, there is one initial coordination shell shown by the sharp initial peak, however it then decays to the bulk density value and remains constant due to the high diffusive nature of a gas, there is no long range order past this first coordination shell. &lt;br /&gt;
&lt;br /&gt;
Both methods of calculation of the diffusion coefficient give the expected results, with a gas having a large value, liquid a small value and the solid with a value close to 0. The values obtained from each method compare well to each other, as well as the values obtained from the 1,000,000 atom simulation. However, it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. Furthermore, the VACF method will have significant error due to the error in using the trapezium rule to calculate the integral of the VACF. &lt;br /&gt;
&lt;br /&gt;
In conclusion, molecular dynamics simulation has allowed fast and accurate calculations of a range of key thermodynamic properties of a range of systems. It is clear that the use of these simulations is invaluable for the determination of these properties with applications in a range of industries, on key example being in the design of power stations. Furthermore, none of the simulations took longer than 5 minutes, illustrating another key benefit of using molecular dynamics simulations. In future calculations, calculations should be done on larger systems to acquire a more accurate average, as well as possibly introducing a second type of particle into the system to analyse how it effects the properties of the system.&lt;br /&gt;
&lt;br /&gt;
==Tasks==&lt;br /&gt;
The answers to all tasks are below, some have already been answered in the report above. &lt;br /&gt;
&lt;br /&gt;
===Introduction to molecular dynamics simulation===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by &amp;lt;math&amp;gt; x\left(t\right) = A\cos\left(\omega t + \phi\right)&amp;lt;/math&amp;gt; (the values of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:HO_1.png|350px|thumb|center|Figure 19: Analytical position as a function of time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO2.png|350px|thumb|center|Figure 20: Total energy as a function time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO3.png|350px|thumb|center|Figure 21: Error between the velocity-Verlet algorithm and analytical values as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHO4.png|500px|thumb|center|Figure 22: Error maximum as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK:&amp;lt;/big&amp;gt; For a single Lennard-Jones interaction, &amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;, find the separation, &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt;, at which the potential energy is zero. What is the force at this separation? Find the equilibrium separation, &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, and work out the well depth (&amp;lt;math&amp;gt;\phi\left(r_{eq}\right)&amp;lt;/math&amp;gt;). Evaluate the integrals &amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\int_{2.5\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\int_{3\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;\sigma = \epsilon = 1.0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* The separation r&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; at which the potential energy is zero, is when &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The force at this separation is equal to &amp;lt;math&amp;gt;24\epsilon/\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The equilibrium separation &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;eq&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = 2&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;1/6&amp;lt;/sup&amp;gt;&amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The potential well depth is equal to &amp;lt;math&amp;gt;-\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
* Evaluation of integrals:&lt;br /&gt;
&lt;br /&gt;
[[File:Reallastboy.PNG|400px|none]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions. Estimate the volume of &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; water molecules under standard conditions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Assumptions:&lt;br /&gt;
* 1mL of water = 1g of water &lt;br /&gt;
&lt;br /&gt;
Number of water molecules in 1g:&lt;br /&gt;
* Moles in 1g = 1/18 &lt;br /&gt;
* Number of molecules = N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; x 1/18 = &amp;lt;b&amp;gt;3.35 x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Volume of 10000 water molecules:&lt;br /&gt;
* Moles = 10000/N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Mass = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt; x 18 = 2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;g&lt;br /&gt;
* Volume = &amp;lt;b&amp;gt;2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, &#039;&#039;after the periodic boundary conditions have been applied&#039;&#039;?&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
It ends up at the point with coordinates - &amp;lt;math&amp;gt;(0.2, 0.1, 0.7)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: The Lennard-Jones parameters for argon are &amp;lt;math&amp;gt;\sigma = 0.34\mathrm{nm}, \epsilon\ /\ k_B= 120 \mathrm{K}&amp;lt;/math&amp;gt;. If the LJ cutoff is &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;, what is it in real units? What is the well depth in &amp;lt;math&amp;gt;\mathrm{kJ\ mol}^{-1}&amp;lt;/math&amp;gt;? What is the reduced temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt; in real units?&lt;br /&gt;
&lt;br /&gt;
* LJ cutoff in real units &amp;lt;math&amp;gt;= 1.088 nm&amp;lt;/math&amp;gt;&lt;br /&gt;
* Well Depth &amp;lt;math&amp;gt;= 0.998 kJ mol&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Reduced Temperature &amp;lt;math&amp;gt; = 180K&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Equilibration===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Atoms cannot be given random starting coordinates as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For a face-centred cubic lattice with a lattice point density of 1.2, the side length of the cubic unit cell is 1.494.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A face-centred cubic lattice has 4 lattice points and hence four atoms, whereas a cubic lattice has 1 of each. Therefore, there would be 4000 atoms in a 10 x 10 x 10 box.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Line 1: Sets the mass of all atoms of type 1 to 1.0&lt;br /&gt;
* Line 2: States that the interaction between atoms is to be modelled on the Leonard-Jones potential with a cut off distance of 3.0&lt;br /&gt;
* Line 3: Sets the pairwise force field coefficients for all atoms, in this case, this is the well depth and the distance at 0 potential - both are set to 1.0&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet Algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The initial script sets the time-step as a variable which can be called later in the script, the second script does not do this. Therefore, if a simulation is to be run on a different time-step, the input file with the initial script only needs to change the time-step in one place (where the variable is defined). Whereas, in the second script, the time-step will have to be changed everywhere that it is used in the input file. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). Does the simulation reach equilibrium? How long does this take? When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results? Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 23: Temperature as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 24: Pressure as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 25: Total energy as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It takes approximately 0.3s for the system to reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|500px|thumb|none|Figure 26: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Of the 5 timesteps, 0.0025 is the largest to give acceptable results. A timestep of 0.015 is particularly bad as the system does not reach equilibrium at all. The other 4 time steps do all reach equilibrium however 0.001 and 0.0025 are the only two which reach an accurate equilibrium value for total energy.&lt;br /&gt;
&lt;br /&gt;
===Running simulations under specific conditions===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Choose 5 temperatures (above the critical temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt;), and two pressures (you can get a good idea of what a reasonable pressure is in Lennard-Jones units by looking at the average pressure of your simulations from the last section). This gives ten phase points &amp;amp;mdash; five temperatures at each pressure. Create 10 copies of npt.in, and modify each to run a simulation at one of your chosen &amp;lt;math&amp;gt;\left(p, T\right)&amp;lt;/math&amp;gt; points. You should be able to use the results of the previous section to choose a timestep. Submit these ten jobs to the HPC portal. While you wait for them to finish, you should read the next section.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Derivation_1_PictureJPW.PNG|400px|thumb|none|Figure 27: Derivation of velocity scaling factor &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. How often will values of the temperature, etc., be sampled for the average? How many measurements contribute to the average? Looking to the following line, how much time will you simulate?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The three numbers correspond Nevery, Nrepeat and Nfreq.&lt;br /&gt;
&lt;br /&gt;
* Nevery corresponds to how often input values are sampled for the average - for example, temperature will be sampled for the average every 100 timesteps.&lt;br /&gt;
* Nrepeat corresponds to the number of values used to calculate the average - in this case 1000 values (measurements) are used (contribute) to calculating the average.&lt;br /&gt;
* Nfreq corresponds to the timestep at which the average is calculated - the 100000th timestep.&lt;br /&gt;
&lt;br /&gt;
This therefore means that there are 100000 timesteps and with a timestep of 0.0025, the time simulated = 250 seconds. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.  Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|none|Figure 28: Density as a function of temperature for a system at 2 different pressures.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
===Calculating heat capacities using statistical physics===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|none|Figure 29: Constant volume heat capacity as a function of temperature.]]&lt;br /&gt;
&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
An example of the input script used can be found below:&lt;br /&gt;
&lt;br /&gt;
[[File:ExampleInputFileJPW.in]]&lt;br /&gt;
&lt;br /&gt;
===Structural properties and the radial distribution function===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. In the solid case, illustrate which lattice sites the first three peaks correspond to. What is the lattice spacing? What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|500px|thumb|none|Figure 30: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse and therefore the chance of finding another particle is equal to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
===Dynamic properties and the diffusion coefficient===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the D subfolder, there is a file &#039;&#039;liq.in&#039;&#039; that will run a simulation at specified density and temperature to calculate the mean squared displacement and velocity autocorrelation function of your system. Run one of these simulations for a vapour, liquid, and solid. You have also been given some simulated data from much larger systems (approximately one million atoms). You will need these files later.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 30: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 31: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 32: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 33: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 34: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 35: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 36: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure X) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent? Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? Attach a copy of your plot to your writeup.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The derivation for the normalised velocity autocorrelation function for a 1D harmonic oscillator is shown below, along with two trigonometric identities used in the derivation.&lt;br /&gt;
&lt;br /&gt;
[[File:Trigonometric_IdentitiesJPW.PNG|400px|thumb|none|Figure 37: Trigonometric identities used in derivation of VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
[[File:JPWD2.PNG|600px|thumb|none|Figure 38: Derivation of the VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
&lt;br /&gt;
A plot showing the VACF for the liquid and solid simulations, as well as for a 1D harmonic oscillator with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; is shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:FinaleJPW.png|600px|thumb|none|Figure 39: VACF as a function of timestep for the liquid and solid phases as well as for a 1D harmonic oscillator.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 39), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms.&lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the trapezium rule to approximate the integral under the velocity autocorrelation function for the solid, liquid, and gas, and use these values to estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. You should make a plot of the running integral in each case. Are they as you expect? Repeat this procedure for the VACF data that you were given from the one million atom simulations. What do you think is the largest source of error in your estimates of D from the VACF?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|400px|thumb|none|Figure 40: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|400px|thumb|none|Figure 41: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure X.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 42: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;L-J Article&amp;quot;&amp;gt;J.P.Hansen, L.Verlet, &amp;lt;i&amp;gt;Phys.Rev.&amp;lt;/i&amp;gt;, 1969, &amp;lt;b&amp;gt;184&amp;lt;/b&amp;gt;, 151&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696382</id>
		<title>User:Jpw115</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=User:Jpw115&amp;diff=696382"/>
		<updated>2018-04-23T15:40:13Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Liquid Simulations - Jack Williams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=color:red&amp;gt; colour red &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Liquid Simulations - Jack Williams=&lt;br /&gt;
==Abstract==&lt;br /&gt;
Key thermodynamic properties of a system modelled on the Leonard-Jones potential were investigated using molecular dynamics simulation. Density and heat capacity were measured as functions of temperature to analyse how the system evolves with changing temperature, both were discovered to decrease with increasing temperature. Radial distribution functions were calculated to analyse the structure of the system in each of the 3 phases. It was discovered that solids, due to the crystalline fixed structure have high long range order, liquids have some order that decreases over time due to the ability of the particles to diffuse away, and gasses have negligible long range order due to the very low density of the gaseous system. The diffusion coefficient for each phase was measured using two methods, the mean squared displacement method (MSD) and the velocity autocorrelation method (VACF). Both produced the expected results of a high diffusion coefficient for a gas, fairly low for liquid and a diffusion coefficient close to zero for the solid phase. Both methods produced similar results, however due to the error in calculating the integral in the VACF method (trapezium rule), the values calculated using the MSD method are more accurate. These results compared well to simulations run on larger systems, which due to the larger amount of data contributing to the average, are more accurate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good abstract: tells the reader concisely what you did and your main results/conclusions. My only qualm is that saying you &amp;quot;discovered&amp;quot; long vs. short range order in the phases of matter seems like it is a novel result. Perhaps &amp;quot;verified&amp;quot; would have been better. This is a minor point though.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Knowledge and understanding of the thermodynamic properties of systems, for example the phase transitions, has a wide range of applications in a number of industries. One key industry in which this knowledge is vital for proper function, is in power generation, for example in fossil fuel power stations and nuclear power stations. Both types of station function via heating liquid water which then evaporates forming steam, which is used to turn a turbine connected to a generator which generates electrical energy. The steam then condenses back to liquid water to be re-used. &lt;br /&gt;
To maximise efficiency, certain factors, for example the dimensions of the system carrying the water, need to be controlled:&lt;br /&gt;
* Initially, to avoid the waste of thermal energy produced from the burning of fossil fuels (or generated from nuclear fission), knowledge of the heat capacity of water can be used to determine the optimal volume of water in which to heat based on the amount of energy generated from the burning of the fuel. &lt;br /&gt;
* The steam driving the turbine needs to be at a high pressure to ensure the turbine is being spun at a maximal rate. Knowledge of how the pressure of water varies with temperature as well as the volume of container is important in determining the required dimensions of the system containing the water, to ensure optimal steam pressure Furthermore, knowledge of how the phase transitions of water is vital in ensuring that the steam does not condense back to water before passing through the turbine.  &lt;br /&gt;
&lt;br /&gt;
Originally these properties would have been determined through experimentation, however today the use of molecular dynamics simulations allows their determination in a much more cheap and facile way. This investigation aims to demonstrate the versatility of molecular dynamics by simulating the thermodynamic properties of a few simple systems without setting foot in a laboratory.&lt;br /&gt;
&lt;br /&gt;
==Aims &amp;amp; Objectives==&lt;br /&gt;
To use computational modelling to determine key thermodynamic features of simple systems:&lt;br /&gt;
* Investigate the change in density of a system with varying temperature and pressure &lt;br /&gt;
* Investigate the change in constant volume heat capacity of a system with temperature&lt;br /&gt;
* Investigate the change in radial distribution function of a system in the solid, liquid and gas phases&lt;br /&gt;
* Determine the diffusion coefficient for a system in the solid, liquid and gas phases&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
This investigation uses the software LAMMPS (Large-scale Atomic/Molecular Massively Parallel Simulator), to run simulations on simple systems. &lt;br /&gt;
Trajectories of atoms were visualised using the software VMD (Visual Molecular Dynamics). &lt;br /&gt;
&lt;br /&gt;
===Setting up the system===&lt;br /&gt;
For the simulation of a simple liquid, initial coordinates for atoms cannot be randomly generated and therefore a crystal lattice (simple cubic) is generated which is then melted - the simulation is set to run and over time the atoms rearrange into a configuration of higher disorder more closely modelling a liquid. Atoms cannot be given random starting coordinates to model this liquid configuration as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
Other key specifications of the system are below:&lt;br /&gt;
* the mass of all atoms was set to 1.0&lt;br /&gt;
* the interaction between atoms in the system was modelled on a Leonard-Jones potential&lt;br /&gt;
* the cut-off distance was set to 3.0 in reduced units&lt;br /&gt;
* the pairwise force field coefficients were set to 1.0 for both the potential well depth and the zero-potential distance &lt;br /&gt;
* all atoms were assigned random velocities following the Maxwell-Boltzmann distribution&lt;br /&gt;
&lt;br /&gt;
===Calculating thermodynamic quantities===&lt;br /&gt;
The simulation measures thermodynamics properties of the system for example: total energy, temperature, pressure, mean squared displacement and the velocity auto-correlation function of the system, at certain time-steps for a certain number of runs. &lt;br /&gt;
&lt;br /&gt;
Before simulations were run to gather data, it was confirmed that the system reaches equilibrium. Graphs showing how total energy, temperature and pressure change with time for a time-step of 0.001 are displayed below. After approximately 0.3 seconds, the system reaches equilibrium and fluctuates around an equilibrium value for each of the properties. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 1: Temperature as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 2: Pressure as a function of time.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 3: Total energy as a function of time.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 time-steps were tested to determine the most adequate. Figure 4 to the right shows how the total energy changes over time for each of the 5 timesteps. It can be seen that a time-step of 0.0025 is the highest time-step that still gives an accurate equilibrium total energy, hence, this time-step was used in further simulations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|600px|thumb|right|Figure 4: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the equation of state of the model described above, by calculating the density of a NpT system at varying pressure and temperature. 2 pressures and 5 temperatures were chosen (p = 2.5, 2.75; T = 1.75, 2, 2, 2.25, 3, 5), and a simulation was run for each combination giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to determine the change in constant volume heat capacity with temperature. 2 densities and 5 temperatures were chosen (&amp;lt;math&amp;gt;\rho&amp;lt;/math&amp;gt;= 0.2, 0.8; T = 2.0, 2.2, 2.4, 2.6, 2.8), giving a total of 10 phase points.&lt;br /&gt;
&lt;br /&gt;
Simulations were run to model the radial distribution function as a function of distance, using the software VMD. 3 simulations were run, each with a specified density and temperature correlating to a system in each of the 3 phases&amp;lt;ref name=&amp;quot;L-J Article&amp;quot; /&amp;gt;: solid, liquid and gas. &lt;br /&gt;
* Solid: Density = 1.25, Temperature = 1.0&lt;br /&gt;
* Liquid: Density = 0.8, Temperature = 1.2 &lt;br /&gt;
* Gas: Density = 0.025, Temperature = 1.2&lt;br /&gt;
&lt;br /&gt;
The mean squared displacement (MSD) and velocity autocorrelation function (VACF) were calculated using the same densities and temperatures specified above (same as RDF)  to model a system in each of the 3 phases. Both the MSD and VACF were used to calculate the diffusion coefficient (D) for each phase, using the following relationships.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{3}\int_0^\infty \mathrm{d}\tau \left\langle\mathbf{v}\left(0\right)\cdot\mathbf{v}\left(\tau\right)\right\rangle&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Results &amp;amp; Discussion==&lt;br /&gt;
===Equations of state===&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|center|Figure 5: Density as a function of temperature for a system at 2 different pressures, as well as the corresponding densities as predicted by the ideal gas law.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
===Heat capacity at constant volume===&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|center|Figure 6: Constant volume heat capacity as a function of temperature for 2 different densities.]]&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
===Radial distribution function===&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|600px|thumb|center|Figure 7: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse with no order.&lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
===Diffusion coefficient===&lt;br /&gt;
&amp;lt;b&amp;gt;MSD Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 8: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 9: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 10: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plots displaying the mean squared displacement as a function of time-step for a system with 1,000,000 atoms are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 11: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 12: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 13: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 14: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure 10) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;VACF Method&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:FinaleJPW.png|350px|thumb|none|Figure 15: VACF as a function of time for the solid and liquid phases along with the 1D Harmonic oscillator.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|350px|thumb|none|Figure 16: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|350px|thumb|none|Figure 17: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The trapezium rule was used to calculate the integral of the VACF for each phase.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were then calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure 18.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 18: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 15), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms. &lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system. &lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Equation of state simulations, on a system of constant pressure determined that the density of a system at constant pressure decreased with increasing temperature. The simulated density is lower than that predicted by the ideal gas law as the system is not behaving ideally  (there are interactions between the particles), however this discrepancy decreases with increasing temperature.&lt;br /&gt;
&lt;br /&gt;
Heat capacity simulations showed the expected trend of heat capacity at constant volume decreasing with increasing temperature. Furthermore, heat capacity increases with increasing density as there are more particles and hence more energy states that need to be filled to increase the temperature, therefore requiring a larger amount of energy to do so.&lt;br /&gt;
&lt;br /&gt;
Radial distribution function simulations gave information about the coordination around particles in each phase. The solid has a regular ordered crystal structure and hence the radial distribution function displays many peaks. For liquids there is some short range order, shown by 4 peaks of decreasing intensity corresponding to 4 initial coordination shells around the liquid, however it decays quickly due to the ability of particles to diffuse away, resulting in very little long range order. For a gas, there is one initial coordination shell shown by the sharp initial peak, however it then decays to the bulk density value and remains constant due to the high diffusive nature of a gas, there is no long range order past this first coordination shell. &lt;br /&gt;
&lt;br /&gt;
Both methods of calculation of the diffusion coefficient give the expected results, with a gas having a large value, liquid a small value and the solid with a value close to 0. The values obtained from each method compare well to each other, as well as the values obtained from the 1,000,000 atom simulation. However, it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. Furthermore, the VACF method will have significant error due to the error in using the trapezium rule to calculate the integral of the VACF. &lt;br /&gt;
&lt;br /&gt;
In conclusion, molecular dynamics simulation has allowed fast and accurate calculations of a range of key thermodynamic properties of a range of systems. It is clear that the use of these simulations is invaluable for the determination of these properties with applications in a range of industries, on key example being in the design of power stations. Furthermore, none of the simulations took longer than 5 minutes, illustrating another key benefit of using molecular dynamics simulations. In future calculations, calculations should be done on larger systems to acquire a more accurate average, as well as possibly introducing a second type of particle into the system to analyse how it effects the properties of the system.&lt;br /&gt;
&lt;br /&gt;
==Tasks==&lt;br /&gt;
The answers to all tasks are below, some have already been answered in the report above. &lt;br /&gt;
&lt;br /&gt;
===Introduction to molecular dynamics simulation===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by &amp;lt;math&amp;gt; x\left(t\right) = A\cos\left(\omega t + \phi\right)&amp;lt;/math&amp;gt; (the values of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:HO_1.png|350px|thumb|center|Figure 19: Analytical position as a function of time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO2.png|350px|thumb|center|Figure 20: Total energy as a function time for the harmonic oscillator]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWHO3.png|350px|thumb|center|Figure 21: Error between the velocity-Verlet algorithm and analytical values as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHO4.png|500px|thumb|center|Figure 22: Error maximum as a function of time for the harmonic oscillator]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK:&amp;lt;/big&amp;gt; For a single Lennard-Jones interaction, &amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;, find the separation, &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt;, at which the potential energy is zero. What is the force at this separation? Find the equilibrium separation, &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, and work out the well depth (&amp;lt;math&amp;gt;\phi\left(r_{eq}\right)&amp;lt;/math&amp;gt;). Evaluate the integrals &amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\int_{2.5\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\int_{3\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;\sigma = \epsilon = 1.0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* The separation r&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; at which the potential energy is zero, is when &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The force at this separation is equal to &amp;lt;math&amp;gt;24\epsilon/\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The equilibrium separation &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;eq&amp;lt;/sub&amp;gt;&amp;lt;math&amp;gt; = 2&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;1/6&amp;lt;/sup&amp;gt;&amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
* The potential well depth is equal to &amp;lt;math&amp;gt;-\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
* Evaluation of integrals:&lt;br /&gt;
&lt;br /&gt;
[[File:Reallastboy.PNG|400px|none]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions. Estimate the volume of &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; water molecules under standard conditions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Assumptions:&lt;br /&gt;
* 1mL of water = 1g of water &lt;br /&gt;
&lt;br /&gt;
Number of water molecules in 1g:&lt;br /&gt;
* Moles in 1g = 1/18 &lt;br /&gt;
* Number of molecules = N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; x 1/18 = &amp;lt;b&amp;gt;3.35 x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Volume of 10000 water molecules:&lt;br /&gt;
* Moles = 10000/N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt; = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Mass = 1.66 x10&amp;lt;sup&amp;gt;-20&amp;lt;/sup&amp;gt; x 18 = 2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;g&lt;br /&gt;
* Volume = &amp;lt;b&amp;gt;2.99 x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, &#039;&#039;after the periodic boundary conditions have been applied&#039;&#039;?&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
It ends up at the point with coordinates - &amp;lt;math&amp;gt;(0.2, 0.1, 0.7)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: The Lennard-Jones parameters for argon are &amp;lt;math&amp;gt;\sigma = 0.34\mathrm{nm}, \epsilon\ /\ k_B= 120 \mathrm{K}&amp;lt;/math&amp;gt;. If the LJ cutoff is &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;, what is it in real units? What is the well depth in &amp;lt;math&amp;gt;\mathrm{kJ\ mol}^{-1}&amp;lt;/math&amp;gt;? What is the reduced temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt; in real units?&lt;br /&gt;
&lt;br /&gt;
* LJ cutoff in real units &amp;lt;math&amp;gt;= 1.088 nm&amp;lt;/math&amp;gt;&lt;br /&gt;
* Well Depth &amp;lt;math&amp;gt;= 0.998 kJ mol&amp;lt;/math&amp;gt;&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;&lt;br /&gt;
* Reduced Temperature &amp;lt;math&amp;gt; = 180K&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Equilibration===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Atoms cannot be given random starting coordinates as there is a high chance of atoms being generated close to each other resulting in an unnatural interaction (repulsion) between the two. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For a face-centred cubic lattice with a lattice point density of 1.2, the side length of the cubic unit cell is 1.494.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A face-centred cubic lattice has 4 lattice points and hence four atoms, whereas a cubic lattice has 1 of each. Therefore, there would be 4000 atoms in a 10 x 10 x 10 box.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Line 1: Sets the mass of all atoms of type 1 to 1.0&lt;br /&gt;
* Line 2: States that the interaction between atoms is to be modelled on the Leonard-Jones potential with a cut off distance of 3.0&lt;br /&gt;
* Line 3: Sets the pairwise force field coefficients for all atoms, in this case, this is the well depth and the distance at 0 potential - both are set to 1.0&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Velocity-Verlet Algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The initial script sets the time-step as a variable which can be called later in the script, the second script does not do this. Therefore, if a simulation is to be run on a different time-step, the input file with the initial script only needs to change the time-step in one place (where the variable is defined). Whereas, in the second script, the time-step will have to be changed everywhere that it is used in the input file. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). Does the simulation reach equilibrium? How long does this take? When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results? Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWTxt0.001.png|350px|thumb|none|Figure 23: Temperature as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWPxt0001.png|350px|thumb|none|Figure 24: Pressure as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWExT.png|350px|thumb|none|Figure 25: Total energy as a function of time for a timestep of 0.001.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It takes approximately 0.3s for the system to reach equilibrium. &lt;br /&gt;
&lt;br /&gt;
[[File:TotalExTJPW.png|500px|thumb|none|Figure 26: Total energy as a function of time for 5 different timesteps.]]&lt;br /&gt;
&lt;br /&gt;
Of the 5 timesteps, 0.0025 is the largest to give acceptable results. A timestep of 0.015 is particularly bad as the system does not reach equilibrium at all. The other 4 time steps do all reach equilibrium however 0.001 and 0.0025 are the only two which reach an accurate equilibrium value for total energy.&lt;br /&gt;
&lt;br /&gt;
===Running simulations under specific conditions===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Choose 5 temperatures (above the critical temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt;), and two pressures (you can get a good idea of what a reasonable pressure is in Lennard-Jones units by looking at the average pressure of your simulations from the last section). This gives ten phase points &amp;amp;mdash; five temperatures at each pressure. Create 10 copies of npt.in, and modify each to run a simulation at one of your chosen &amp;lt;math&amp;gt;\left(p, T\right)&amp;lt;/math&amp;gt; points. You should be able to use the results of the previous section to choose a timestep. Submit these ten jobs to the HPC portal. While you wait for them to finish, you should read the next section.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Derivation_1_PictureJPW.PNG|400px|thumb|none|Figure 27: Derivation of velocity scaling factor &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. How often will values of the temperature, etc., be sampled for the average? How many measurements contribute to the average? Looking to the following line, how much time will you simulate?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The three numbers correspond Nevery, Nrepeat and Nfreq.&lt;br /&gt;
&lt;br /&gt;
* Nevery corresponds to how often input values are sampled for the average - for example, temperature will be sampled for the average every 100 timesteps.&lt;br /&gt;
* Nrepeat corresponds to the number of values used to calculate the average - in this case 1000 values (measurements) are used (contribute) to calculating the average.&lt;br /&gt;
* Nfreq corresponds to the timestep at which the average is calculated - the 100000th timestep.&lt;br /&gt;
&lt;br /&gt;
This therefore means that there are 100000 timesteps and with a timestep of 0.0025, the time simulated = 250 seconds. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.  Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWequationstate.png|600px|thumb|none|Figure 28: Density as a function of temperature for a system at 2 different pressures.]]&lt;br /&gt;
&lt;br /&gt;
For all systems, density decreases with increasing temperature. The simulated density is lower than that predicted by the ideal gas law. This is because the ideal gas law does not take into account all the interactions between particles, whereas the simulation contains information regarding pairwise interactions modelled on the L-J potential. Hence, in the simulation, the atoms are further apart due to these repulsive interactions, and the density is lower.&lt;br /&gt;
&lt;br /&gt;
The discrepancy between the simulated density and the density predicted by the ideal gas law decreases with increasing temperature as the particles have enough energy to overcome the repulsive interactions and move more freely - hence, as temperature increases, the system more closely models an ideal gas.&lt;br /&gt;
&lt;br /&gt;
===Calculating heat capacities using statistical physics===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:JPWHeatcap.png|600px|thumb|none|Figure 29: Constant volume heat capacity as a function of temperature.]]&lt;br /&gt;
&lt;br /&gt;
The expected trend of heat capacity decreasing with increasing temperature is observed. For this system, the density, number of particles and total energy remain constant. Furthermore, the total energy of the system at equilibrium is equal for every run. Hence, by analysing the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is evident that with increasing temperature, constant volume heat capacity decreases.  &lt;br /&gt;
&lt;br /&gt;
The heat capacity also increases with increasing density, this is due to there being more atoms and hence more energy states that need to be populated. Therefore, it requires a higher temperature to fill the states and increase the total energy of the system.&lt;br /&gt;
&lt;br /&gt;
An example of the input script used can be found below:&lt;br /&gt;
&lt;br /&gt;
[[File:ExampleInputFileJPW.in]]&lt;br /&gt;
&lt;br /&gt;
===Structural properties and the radial distribution function===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. In the solid case, illustrate which lattice sites the first three peaks correspond to. What is the lattice spacing? What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:RDF_GraphJPW.png|500px|thumb|none|Figure 30: Radial distribution function as a function of distance for a solid, liquid and gas.]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the gas shows one peak corresponding to the single coordination shell of the central particle. The RDF then decays to a value of 1, this is because outside of the primary coordination shell, the particles are very diffuse and therefore the chance of finding another particle is equal to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the liquid shows 4 peaks of decreasing intensity corresponding to coordination shells of increasing radius around the central particle. The decrease in intensity is due to the decrease in order of the particles in the shells as distance increases. As distance increases this order further decreases as particles are more free to move causing the RDF to decay to the bulk density value. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid shows multiple peaks of varying intensity. This is due to the fact that the solid is based on a crystal structure with a regular repeated and fixed structure. Again, the peaks coordinate to coordination shells around the central particle. In a solid therefore, there is always long range order.&lt;br /&gt;
&lt;br /&gt;
===Dynamic properties and the diffusion coefficient===&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the D subfolder, there is a file &#039;&#039;liq.in&#039;&#039; that will run a simulation at specified density and temperature to calculate the mean squared displacement and velocity autocorrelation function of your system. Run one of these simulations for a vapour, liquid, and solid. You have also been given some simulated data from much larger systems (approximately one million atoms). You will need these files later.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:JPWStandardGas.png|350px|thumb|none|Figure 30: Mean squared displacement as a function of timestep for a system in the gas phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_LiquidJPW.png|350px|thumb|none|Figure 31: Mean squared displacement as a function of timestep for a system in the liquid phase.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Standard_SolidJPW.png|350px|thumb|none|Figure 32: Mean squared displacement as a function of timestep for a system in the solid phase.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Gas_1_millionJPW.png|350px|thumb|none|Figure 33: Mean squared displacement as a function of timestep for a system in the gas phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Liquid_1_milJPW.png|350px|thumb|none|Figure 34: Mean squared displacement as a function of timestep for a system in the liquid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:1_million_solidJPW.png|350px|thumb|none|Figure 35: Mean squared displacement as a function of timestep for a system in the solid phase for a system of 1,000,000 atoms.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient for each system was calculated by measuring the gradient of the flat region of each graph. The values for each system are below:&lt;br /&gt;
&lt;br /&gt;
[[File:JPWDValues.PNG|400px|thumb|none|Figure 36: Diffusion coefficient values calculated from MSD method.]]&lt;br /&gt;
&lt;br /&gt;
First, analysing the mean squared displacement graphs, all graphs display the expected trends. For a solid, atoms are fixed in position and therefore the gradient is close to 0 as they do not deviate from their original positions. The fluctuations in the original simulation (Figure X) are caused by atoms vibrating, resulting in small deviations away from their starting positions.&lt;br /&gt;
&lt;br /&gt;
For both liquid and gas, the expected trends of MSD increasing with time are shown. As both liquid and gas particles are able to diffuse through the system, over time they diffuse further away from their starting position. For gas, the increase in MSD is much faster than for the liquid as the gas particles are able to diffuse much easier, due to the fact that in a gas the particles are much more diffuse allowing them to move more freely through the system, without interacting with other particles.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients are as expected with that of the gas being much larger than for the liquid and the solid, due to the gaseous system being much more diffuse. With the diffusion coefficient of the solid being close to 0, as the atoms are fixed and therefore cannot deviate from their original position. For the liquid system, there is some short range order however particles are able to move away from their starting position, though due to the much higher density than the gas, there are interactions between particles which increase the amount of time in which it takes them to move away.&lt;br /&gt;
&lt;br /&gt;
The data from the original simulation is very similar to that of the 1,000,000 atom simulation though it is to be expected that the 1,000,000 atom simulation is much more accurate as it is a larger system and therefore more data contributes to the average.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent? Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? Attach a copy of your plot to your writeup.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The derivation for the normalised velocity autocorrelation function for a 1D harmonic oscillator is shown below, along with two trigonometric identities used in the derivation.&lt;br /&gt;
&lt;br /&gt;
[[File:Trigonometric_IdentitiesJPW.PNG|400px|thumb|none|Figure 37: Trigonometric identities used in derivation of VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
[[File:JPWD2.PNG|600px|thumb|none|Figure 38: Derivation of the VACF of 1D Harmonic Oscillator]]&lt;br /&gt;
&lt;br /&gt;
A plot showing the VACF for the liquid and solid simulations, as well as for a 1D harmonic oscillator with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; is shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:FinaleJPW.png|600px|thumb|none|Figure 39: VACF as a function of timestep for the liquid and solid phases as well as for a 1D harmonic oscillator.]]&lt;br /&gt;
&lt;br /&gt;
In the VACF as a function of time plot (Figure 39), the maxima and minima of the solid and liquid functions correspond to the change in velocity of a particle after a collision. However, the VACF of the liquid decays much faster due to the more diffuse nature of the liquid allowing particles to diffuse away from each other, something that is not possible in a solid due to the fixed positions of the atoms.&lt;br /&gt;
&lt;br /&gt;
The VACF for the harmonic oscillator does not dampen as the model assumes that particles do not lose energy, furthermore the model does not take into account key interactions between particles (which the simulation does) for example the interactions of the Leonard-Jones system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the trapezium rule to approximate the integral under the velocity autocorrelation function for the solid, liquid, and gas, and use these values to estimate &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; in each case. You should make a plot of the running integral in each case. Are they as you expect? Repeat this procedure for the VACF data that you were given from the one million atom simulations. What do you think is the largest source of error in your estimates of D from the VACF?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_sJPW.png|400px|thumb|none|Figure 40: Running integral of the VACF for the original simulation.]]&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:VACF_Integral_1milJPW.png|400px|thumb|none|Figure 41: Running integral of the VACF for the 1,000,000 atom simulation.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients were calculated from the total integral using the relationship stated in the introduction, the calculated values are displayed below in Figure X.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: For the gas phase in the initial simulation, the running integral does not converge on one maximum value, the diffusion coefficient could not be accurately calculated.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Diffusion_JPW2.PNG|400px|thumb|none|Figure 42: Diffusion coefficient values calculated from VACF method.]]&lt;br /&gt;
&lt;br /&gt;
Again the diffusion coefficients are as expected, with that of the gas being much larger than for liquid and solid, and the solid diffusion coefficient being close to 0. Furthermore, the values compare well to those calculated using the MSD method. There is again similarity between the original simulation and 1,000,000 atom simulation however it is expected that the 1,000,000 atom simulation is more accurate due to more data contributing to the average. The largest source of error in the estimates of D (from the VACF method) comes from the error in using the trapezium rule.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;L-J Article&amp;quot;&amp;gt;J.P.Hansen, L.Verlet, &amp;lt;i&amp;gt;Phys.Rev.&amp;lt;/i&amp;gt;, 1969, &amp;lt;b&amp;gt;184&amp;lt;/b&amp;gt;, 151&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696318</id>
		<title>Rep:ZY3915liqsimu</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696318"/>
		<updated>2018-04-19T11:24:57Z</updated>

		<summary type="html">&lt;p&gt;Org12: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Overall feedback: The tasks were completed with quite a few mistakes. The report was very short and failed to convey a clear goal and motivation, but instead included vague statements about MD. Grammar and spelling were an issue. Please edit your work!.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Third year simulation experiment =&lt;br /&gt;
&lt;br /&gt;
=== Liquid simulation and the diffusion coefficient ===&lt;br /&gt;
Zhuohao You&lt;br /&gt;
&lt;br /&gt;
==== Abstract ====&lt;br /&gt;
Diffusion behaviour of water was modeled and investigated by molecular dynamic simulation with the assistant of high performance computing power. The connection of diffusion coefficient to the mean square displacement was exploited to calculated the diffusion coefficient base on the performed MSD for liquid, solid and vapour. A further experiment on diffusion coefficient of solid was carried to exam its relationship with temperature.&amp;lt;span style=color:red&amp;gt; The abstract of a scientific paper is meant to briefly convey what you have done and your main results and conclusions, perhaps with a very short motivation. While you have briefly touched upon what you have done, your abstract lacks specifics. What exactly were your main results and conclusions? Also spelling and grammar! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
With the development of high performance computing system, the accuracy of molecular dynamic simulation (MSD) &amp;lt;span style=color:red&amp;gt; molecular dynamics is usually represented by the acronym &amp;quot;MD&amp;quot;, &amp;quot;MDS&amp;quot; for molecular dynamics simulation(s) would be acceptable if specified. However &amp;quot;MSD&amp;quot; has the letters in the wrong order, and is a bit confusing given that MSD is also common for &amp;quot;mean squared displacement&amp;quot; &amp;lt;/span&amp;gt; was brought to a new level &amp;lt;span style=color:red&amp;gt; Arguably, yes. However, you have performed relatively small simulations using cheap and cheerful LJ potentials, so perhaps this comment is not very relevant to what you have done. &amp;lt;/span&amp;gt;.  MSD is a useful tool that gives rise to calculation of macroscopic properties from microscopic scale systems. By considering the interaction for a single particle with a limited amount of nearby particles, &#039;exact&#039; prediction of thermo and physical properties are possible depending in the scale of calculation. &amp;lt;span style=color:red&amp;gt; This point is arguable, since there a lot of technical subtleties, certainly an elaboration would be necessary after making such a bold claim with the use of &amp;quot;exact&amp;quot;. &amp;lt;/span&amp;gt;[1]   &lt;br /&gt;
&lt;br /&gt;
Using the college&#039;s high performance computing facilities &amp;lt;span style=color:red&amp;gt; simply &amp;quot;the college&#039;s&amp;quot; is not an adequate accreditation of the hpc resources you have used. &amp;lt;/span&amp;gt;, simulation of simple liquid &amp;lt;span style=color:red&amp;gt; what about the other phases you have simulated? &amp;lt;/span&amp;gt;was performed and an important property of diffusion coefficient was computed from the simulation with a method manipulating its relationship with the mean squared displacement of ensemble particles.      &lt;br /&gt;
&lt;br /&gt;
==== Aims and Objectives ====&lt;br /&gt;
In this experiment, simulation using Lennard-Jones potential was applied on a simple liquid system. (e.g. Argon) &amp;lt;span style=color:red&amp;gt; why single out argon? have you used LJ parameters for argon? &amp;lt;/span&amp;gt;And investigation of the diffusion coefficient property of the system in liquid, solid and vapour phase was carried to give comparisons between the three states. Furtherly, a variation in temperature for the solid state was investigated to exploit the relationship between temperate and diffusion coefficient.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
The input script was base on the given npt file with 8000 atoms and the molecular dynamic was calculated by the velocity Verlet algorithm with based on Lennard-Jones potential. All the simulation was completed on the college HPC system with the parallel computational pacakge LAMMPS. The diffusion coefficient was computed by the given method:&lt;br /&gt;
The easiest way to measure &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; is by exploiting its connection to the [http://en.wikipedia.org/wiki/Mean_squared_displacement mean squared displacement].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This is not sufficient information for another scientist to reproduce your results. What LJ parameters have you used, what cutoff? You mention the NPT ensemble, what pressure and temperature? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results and discussion ====&lt;br /&gt;
The mean squared displacement (MSD),  effectively measures how much the particles deviate from their equilibrium positions &amp;lt;span style=color:red&amp;gt; a more clear explanation would be valuable here &amp;lt;/span&amp;gt; . The value of MSD represents the extent of random motion in the system, and it can be calculated with the equation:&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001803.jpg]]&lt;br /&gt;
&lt;br /&gt;
In this experiment, calculation of MSD was all completed by HPC and was given in the results. &lt;br /&gt;
&lt;br /&gt;
[[File:Zyup0018701.jpg]] [[File:Zyup001802.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; No x axis label for the second graph. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As shown in two graphs, the simulation for liquid, solid and vapour gives the evolution of mean squared displacement over ti,me for both cases. (8000 atoms and a million atoms respectively) The first thing to see on the graphs was the abnormal position for liquid state and gas state in the first figure, as the liquid phase gave a larger MSD as time goes, which on the other hand, for the second figure did have the gas curve laying above the liquid curve. &lt;br /&gt;
&lt;br /&gt;
In a realistic sense, as the MSD measured the random of particles, the displacement for liquid molecules should be much smaller than the vapour counterpart, since the gas particles was supposed to be about 10 times more distant than liquid molecules in the space.  &lt;br /&gt;
&lt;br /&gt;
Therefore, it turn out that the simulation for vapour phase with this MSD method was inaccurate, or a much longer period of time was required for the system to reach the equilibrium. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;As mentioned above, the diffusion coefficient was calculated by the relationship:    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt; so one sixth of the gradient of the MSD graph was the diffusion coeffient:&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000171 cm2/s; D(sol)= 1.92x10-6 cm2/s; D(vap)= 0.000106 cm2/s  (8000atoms)&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000177cm2/s;  D(sol)= 0;                          D(vap)= 0.00627cm2/s      (a million atoms)&lt;br /&gt;
&lt;br /&gt;
The result was quite close to each other apart from the vapour case, and the data confirmed that for the 8000 atoms system, an equilibrium was not reach therefore the inaccuracy was due to a lack of simulation steps as the gradient was only valid in the diffusion region of the graph (i.e. the linear part). In the case of solid the diffusion coefficient was to low to be calculated.&lt;br /&gt;
&lt;br /&gt;
===== Extension =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; why have you included an extension in the middle of your results section? &amp;lt;/span&amp;gt;&lt;br /&gt;
As the simulation for solid was quite stable in the last section, further interest of examine the temperate-diffusion coefficient connection was developed from the literature[2]. Five additional simulation with different temperature for the solid system was carried to investigate if the MDS simulation could give a similar trend. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!T (reduced temperature)&lt;br /&gt;
!Diffusion coefficient cm2/s&lt;br /&gt;
|-&lt;br /&gt;
|0.6&lt;br /&gt;
|7.48E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.7&lt;br /&gt;
|7.85E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.8&lt;br /&gt;
|1.26E-06&lt;br /&gt;
|-&lt;br /&gt;
|0.9&lt;br /&gt;
|1.47E-06&lt;br /&gt;
|-&lt;br /&gt;
|1.0&lt;br /&gt;
|2.5E-06&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;The results of simulation was given in the table, and a clear trend of D increasing with temperature was illustrated.&lt;br /&gt;
[[File:Zyup001805.jpg]][[File:Zyup001804.jpg]]&lt;br /&gt;
&lt;br /&gt;
In general, the simulation gave the same relationship with the literature graph &amp;lt;span style=color:red&amp;gt; citation? &amp;lt;/span&amp;gt;, though the fluctuation in the computed curve was greater due to the weakness in size and timesteps. This was saying the error in the simulation can be averaged out with large scale simulation andFurther investigate of this relation could be carried with a greater size (e.g. a million atoms) and more steps to provide more reliable data for the different states.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
The MD simulation provides a powerful and relatively reliable tool for investigation of the simple systems as shown in the experiment, this provides an alternative method to gather thermo and physical data from Lab experiment. To ensure the accuracy of the simulated data,  a large size of model to mimic the interaction and long time of random motion to reach equillibrium was required.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; These are some very vague conclusions. The conclusion of a scientific paper is meant to summarise the main results and conclusions, and perhaps offer a brief outlook. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Reference hav =====&lt;br /&gt;
# Computational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes, Norbert Attig, Kurt Binder, Helmut Grubmuller ¨ , Kurt Kremer (Eds.), John von Neumann Institute for Computing, Julich, ¨ NIC Series, Vol. 23, ISBN 3-00-012641-4, pp. 1-28, 2004.&lt;br /&gt;
#Molecular and condition parameters dependent diffusion coefficient of water in poly(vinyl alcohol): a molecular dynamics simulation study,Colloid and Polymer Science, 2017, 295(5),859-868&lt;br /&gt;
&lt;br /&gt;
= TASK: =&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time , &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by  (the values of , , and  are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00181.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00182.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00183.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Error= C*t*sin( ωt + φ )     C is a constant that equals approx. 0.000417 in the case of timestep=0.1  ω=1.00 and φ=1.00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Timesteps below 0.63s would be valid in this case &amp;lt;span style=color:red&amp;gt; way too large &amp;lt;/span&amp;gt;. Ideally the total energy is conserved in a closed system, so it is better to monitor the total energy of a system to ensure the simulation was not collapsed in terms of a strong fluctuation in total energy.&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00184.jpg|800x263px]]&lt;br /&gt;
[[File:Zyup00185.jpg|714x300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; force is +ve, r_eq is 2^(1/6)*sigma. Numerical answers stated to way too many decimal places. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions.  55.5*N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/1000= 3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Estimate the volume of 10000 water molecules under standard conditions. 10000/3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;=2.99*10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00186.jpg|800x156px]]&lt;br /&gt;
[[File:Zyup00187.jpg|1000x200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Atom positions not after PBC not correct. Well depth off by factor of 1000, temperature not correct. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In case of two atoms generated on top of each other，the force between them will be very large and therefore leads to unwanted large acceleration to the system, cause a sudden blow up&#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of 0.8. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
1/(1.07722)3 = 0.800&lt;br /&gt;
4 atoms in one lattice, so 4/a3 = 1.2, a = 1.49380, side length is 1.49380.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;    4000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0              for every atom in type 1 mass = 1.0 (reduced unit)&lt;br /&gt;
pair_style lj/cut 3.0   cutoff Lennard-Jones potential with no Coulomb at 3.0 potential with no Coulomb at 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0  for all the pairs coefficient 1.0 1.0 was applied&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
velocity Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ask the demonstrator if you need help.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows easy variation of timesteps without worrying about forgetting to change the relevant steps to run. As the change in steps will be made by the codes as soon as the value of timesteps was changed. Instantaneous change of two related value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). &#039;&#039;&#039;[[File:Zyup00188.jpg|800x426px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Does the simulation reach equilibrium?   &#039;&#039;&#039;Yes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How long does this take?  &#039;&#039;&#039;0.3 reduced time&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00189.jpg|800x446px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results?     &#039;&#039;&#039;0.0025 &lt;br /&gt;
&lt;br /&gt;
Fluctuating in the region that covers the most accurate value from 0.0001&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;   0.015 it does not converge.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
  &lt;br /&gt;
γ = ( &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt; /T )0.5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; I think you meant to the power of 0.5 here, but it is typed as multiply as 0.5. Be more careful! Also, if you showed any working out, then I could safely say this was a typo, but since you have not, I cannot justify treating it as to the power of 0.5 &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
•	Nevery = 100 use input values every 100 timesteps&lt;br /&gt;
&lt;br /&gt;
•	Nrepeat = 1000 1000 of times to use input values for calculating averages&lt;br /&gt;
&lt;br /&gt;
•	Nfreq =10000  calculate averages every 10000 timesteps&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How often will values of the temperature, etc., be sampled for the average?     &#039;&#039;&#039;every 10000 timesteps &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How many measurements contribute to the average?   &#039;&#039;&#039;1000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Looking to the following line, how much time will you simulate?   &#039;&#039;&#039;100000 unit time&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001810.jpg|800x488px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;Lower, as ideal gas law ignores any interactions between particles apart from collisions while the L-J system takes the potential energy into account so that results in a lower density.&lt;br /&gt;
discrepancy increase with pressure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001811.jpg|800x420px]]&lt;br /&gt;
&lt;br /&gt;
Supposed to be constant for liquid but the fluctuation was within an acceptable range&lt;br /&gt;
&lt;br /&gt;
====== Scripts: ======&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY THE REQUIRED THERMODYNAMIC STATE ###&lt;br /&gt;
&lt;br /&gt;
variable D equal 0.2&lt;br /&gt;
&lt;br /&gt;
variable T equal 2.0&lt;br /&gt;
&lt;br /&gt;
variable timestep equal 0.0025&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
&lt;br /&gt;
lattice sc ${D}&lt;br /&gt;
&lt;br /&gt;
region box block 0 15 0 15 0 15&lt;br /&gt;
&lt;br /&gt;
create_box 1 box&lt;br /&gt;
&lt;br /&gt;
create_atoms 1 box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE PHYSICAL PROPERTIES OF ATOMS ###&lt;br /&gt;
&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
&lt;br /&gt;
pair_style lj/cut/opt 3.0&lt;br /&gt;
&lt;br /&gt;
pair_coeff 1 1 1.0 1.0&lt;br /&gt;
&lt;br /&gt;
neighbor 2.0 bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; ASSIGN ATOMIC VELOCITIES ###&lt;br /&gt;
&lt;br /&gt;
velocity all create ${T} 12345 dist gaussian rot yes mom yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY ENSEMBLE ###&lt;br /&gt;
&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; THERMODYNAMIC OUTPUT CONTROL ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom time etotal temp press&lt;br /&gt;
&lt;br /&gt;
thermo 10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RECORD TRAJECTORY ###&lt;br /&gt;
&lt;br /&gt;
dump traj all custom 1000 output-1 id x y z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RUN SIMULATION TO MELT CRYSTAL ###&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
unfix nve&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; BRING SYSTEM TO REQUIRED STATE ###&lt;br /&gt;
&lt;br /&gt;
variable tdamp equal ${timestep}*100&lt;br /&gt;
&lt;br /&gt;
variable pdamp equal ${timestep}*1000&lt;br /&gt;
&lt;br /&gt;
fix nvt all nvt temp ${T} ${T} ${tdamp}&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
unfix nvt&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; MEASURE SYSTEM STATE ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom step etotal temp vol density&lt;br /&gt;
&lt;br /&gt;
variable dens equal density&lt;br /&gt;
&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
&lt;br /&gt;
variable volu equal vol&lt;br /&gt;
&lt;br /&gt;
variable ener equal etotal&lt;br /&gt;
&lt;br /&gt;
variable ener2 equal etotal*etotal&lt;br /&gt;
&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_vol v_ener v_ener2 v_press2&lt;br /&gt;
&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
&lt;br /&gt;
variable avevolu equal f_aves[3]&lt;br /&gt;
&lt;br /&gt;
variable heatc equal 3375*3375*(f_aves[5]-f_aves[4]*f_aves[4])/(f_aves[2]*f_aves[2])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Averages&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Density: ${avedens}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Volume: ${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Temperature: ${avetemp}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Cv/V: ${heatc}/${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001812.jpg|800x457px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Liquid and vapour drop constantly due to the evenly distributing simple cubic structure while solid has fluctuation because of the Fcc structure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This does not really make sense, are you saying that the gas and liquid phase form a cubic lattice? - Then they would be the solid phase! We were looking for a discussion of the short range vs. long range order for each of the phases, relating this to the features of the RDF. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In the solid case, illustrate which lattice sites the first three peaks correspond to.&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039; What is the lattice spacing? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lattice spacing around 1.45 reduced unit. &lt;br /&gt;
&lt;br /&gt;
[0.5,0.5,0] corners; [1.0,0,0] centre of face; [1.0,0.5,0] centre of a different face&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Illustration? What are the coordination numbers? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate  in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001813.jpg]]&lt;br /&gt;
[[File:Zyup001814.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Yes diffusion coefficient should be higher for the gas than liquid - this data is not so good. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001815.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The minima give the location of the maximum difference for the liquid and solid system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This is not what we were looking for. Think about was the VACF actually corresponds to, and how the velocity changes after initiating the simulation. What happens when they particles begin to collide? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Because the HO model has a periodic motion while the Lennard Jones solid and liquid move randomly there for there is no pattern in this kind of motion. i.e. the dependence on previous velocity is rather low.&amp;lt;span style=color:red&amp;gt; Could be better explained - I get what you are trying to say. First of all LJ particles do not move randomly... or what would be the point of the simulation? But unlike the LJ system, the velocity of a simple HO in a closed system is exactly periodic. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Attach a copy of your plot to your writeup.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;[[File:Zyup001816.jpg|800x387]]&lt;br /&gt;
[[File:Zyup001817.jpg]]&lt;br /&gt;
[[File:Zyup001818.jpg]]&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696317</id>
		<title>Rep:ZY3915liqsimu</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696317"/>
		<updated>2018-04-19T11:21:12Z</updated>

		<summary type="html">&lt;p&gt;Org12: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Overall feedback: The tasks were completed with quite a few mistakes. The report very short and failed to convey a clear goal and motivation, but instead included vague statements about MD. Grammar were an issue, and the report did not have a writing style of a scientific report. Please edit your work!.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Third year simulation experiment =&lt;br /&gt;
&lt;br /&gt;
=== Liquid simulation and the diffusion coefficient ===&lt;br /&gt;
Zhuohao You&lt;br /&gt;
&lt;br /&gt;
==== Abstract ====&lt;br /&gt;
Diffusion behaviour of water was modeled and investigated by molecular dynamic simulation with the assistant of high performance computing power. The connection of diffusion coefficient to the mean square displacement was exploited to calculated the diffusion coefficient base on the performed MSD for liquid, solid and vapour. A further experiment on diffusion coefficient of solid was carried to exam its relationship with temperature.&amp;lt;span style=color:red&amp;gt; The abstract of a scientific paper is meant to briefly convey what you have done and your main results and conclusions, perhaps with a very short motivation. While you have briefly touched upon what you have done, your abstract lacks specifics. What exactly were your main results and conclusions? Also spelling and grammar! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
With the development of high performance computing system, the accuracy of molecular dynamic simulation (MSD) &amp;lt;span style=color:red&amp;gt; molecular dynamics is usually represented by the acronym &amp;quot;MD&amp;quot;, &amp;quot;MDS&amp;quot; for molecular dynamics simulation(s) would be acceptable if specified. However &amp;quot;MSD&amp;quot; has the letters in the wrong order, and is a bit confusing given that MSD is also common for &amp;quot;mean squared displacement&amp;quot; &amp;lt;/span&amp;gt; was brought to a new level &amp;lt;span style=color:red&amp;gt; Arguably, yes. However, you have performed relatively small simulations using cheap and cheerful LJ potentials, so perhaps this comment is not very relevant to what you have done. &amp;lt;/span&amp;gt;.  MSD is a useful tool that gives rise to calculation of macroscopic properties from microscopic scale systems. By considering the interaction for a single particle with a limited amount of nearby particles, &#039;exact&#039; prediction of thermo and physical properties are possible depending in the scale of calculation. &amp;lt;span style=color:red&amp;gt; This point is arguable, since there a lot of technical subtleties, certainly an elaboration would be necessary after making such a bold claim with the use of &amp;quot;exact&amp;quot;. &amp;lt;/span&amp;gt;[1]   &lt;br /&gt;
&lt;br /&gt;
Using the college&#039;s high performance computing facilities &amp;lt;span style=color:red&amp;gt; simply &amp;quot;the college&#039;s&amp;quot; is not an adequate accreditation of the hpc resources you have used. &amp;lt;/span&amp;gt;, simulation of simple liquid &amp;lt;span style=color:red&amp;gt; what about the other phases you have simulated? &amp;lt;/span&amp;gt;was performed and an important property of diffusion coefficient was computed from the simulation with a method manipulating its relationship with the mean squared displacement of ensemble particles.      &lt;br /&gt;
&lt;br /&gt;
==== Aims and Objectives ====&lt;br /&gt;
In this experiment, simulation using Lennard-Jones potential was applied on a simple liquid system. (e.g. Argon) &amp;lt;span style=color:red&amp;gt; why single out argon? have you used LJ parameters for argon? &amp;lt;/span&amp;gt;And investigation of the diffusion coefficient property of the system in liquid, solid and vapour phase was carried to give comparisons between the three states. Furtherly, a variation in temperature for the solid state was investigated to exploit the relationship between temperate and diffusion coefficient.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
The input script was base on the given npt file with 8000 atoms and the molecular dynamic was calculated by the velocity Verlet algorithm with based on Lennard-Jones potential. All the simulation was completed on the college HPC system with the parallel computational pacakge LAMMPS. The diffusion coefficient was computed by the given method:&lt;br /&gt;
The easiest way to measure &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; is by exploiting its connection to the [http://en.wikipedia.org/wiki/Mean_squared_displacement mean squared displacement].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This is not sufficient information for another scientist to reproduce your results. What LJ parameters have you used, what cutoff? You mention the NPT ensemble, what pressure and temperature? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results and discussion ====&lt;br /&gt;
The mean squared displacement (MSD),  effectively measures how much the particles deviate from their equilibrium positions &amp;lt;span style=color:red&amp;gt; a more clear explanation would be valuable here &amp;lt;/span&amp;gt; . The value of MSD represents the extent of random motion in the system, and it can be calculated with the equation:&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001803.jpg]]&lt;br /&gt;
&lt;br /&gt;
In this experiment, calculation of MSD was all completed by HPC and was given in the results. &lt;br /&gt;
&lt;br /&gt;
[[File:Zyup0018701.jpg]] [[File:Zyup001802.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; No x axis label for the second graph. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As shown in two graphs, the simulation for liquid, solid and vapour gives the evolution of mean squared displacement over ti,me for both cases. (8000 atoms and a million atoms respectively) The first thing to see on the graphs was the abnormal position for liquid state and gas state in the first figure, as the liquid phase gave a larger MSD as time goes, which on the other hand, for the second figure did have the gas curve laying above the liquid curve. &lt;br /&gt;
&lt;br /&gt;
In a realistic sense, as the MSD measured the random of particles, the displacement for liquid molecules should be much smaller than the vapour counterpart, since the gas particles was supposed to be about 10 times more distant than liquid molecules in the space.  &lt;br /&gt;
&lt;br /&gt;
Therefore, it turn out that the simulation for vapour phase with this MSD method was inaccurate, or a much longer period of time was required for the system to reach the equilibrium. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;As mentioned above, the diffusion coefficient was calculated by the relationship:    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt; so one sixth of the gradient of the MSD graph was the diffusion coeffient:&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000171 cm2/s; D(sol)= 1.92x10-6 cm2/s; D(vap)= 0.000106 cm2/s  (8000atoms)&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000177cm2/s;  D(sol)= 0;                          D(vap)= 0.00627cm2/s      (a million atoms)&lt;br /&gt;
&lt;br /&gt;
The result was quite close to each other apart from the vapour case, and the data confirmed that for the 8000 atoms system, an equilibrium was not reach therefore the inaccuracy was due to a lack of simulation steps as the gradient was only valid in the diffusion region of the graph (i.e. the linear part). In the case of solid the diffusion coefficient was to low to be calculated.&lt;br /&gt;
&lt;br /&gt;
===== Extension =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; why have you included an extension in the middle of your results section? &amp;lt;/span&amp;gt;&lt;br /&gt;
As the simulation for solid was quite stable in the last section, further interest of examine the temperate-diffusion coefficient connection was developed from the literature[2]. Five additional simulation with different temperature for the solid system was carried to investigate if the MDS simulation could give a similar trend. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!T (reduced temperature)&lt;br /&gt;
!Diffusion coefficient cm2/s&lt;br /&gt;
|-&lt;br /&gt;
|0.6&lt;br /&gt;
|7.48E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.7&lt;br /&gt;
|7.85E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.8&lt;br /&gt;
|1.26E-06&lt;br /&gt;
|-&lt;br /&gt;
|0.9&lt;br /&gt;
|1.47E-06&lt;br /&gt;
|-&lt;br /&gt;
|1.0&lt;br /&gt;
|2.5E-06&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;The results of simulation was given in the table, and a clear trend of D increasing with temperature was illustrated.&lt;br /&gt;
[[File:Zyup001805.jpg]][[File:Zyup001804.jpg]]&lt;br /&gt;
&lt;br /&gt;
In general, the simulation gave the same relationship with the literature graph &amp;lt;span style=color:red&amp;gt; citation? &amp;lt;/span&amp;gt;, though the fluctuation in the computed curve was greater due to the weakness in size and timesteps. This was saying the error in the simulation can be averaged out with large scale simulation andFurther investigate of this relation could be carried with a greater size (e.g. a million atoms) and more steps to provide more reliable data for the different states.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
The MD simulation provides a powerful and relatively reliable tool for investigation of the simple systems as shown in the experiment, this provides an alternative method to gather thermo and physical data from Lab experiment. To ensure the accuracy of the simulated data,  a large size of model to mimic the interaction and long time of random motion to reach equillibrium was required.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; These are some very vague conclusions. The conclusion of a scientific paper is meant to summarise the main results and conclusions, and perhaps offer a brief outlook. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Reference hav =====&lt;br /&gt;
# Computational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes, Norbert Attig, Kurt Binder, Helmut Grubmuller ¨ , Kurt Kremer (Eds.), John von Neumann Institute for Computing, Julich, ¨ NIC Series, Vol. 23, ISBN 3-00-012641-4, pp. 1-28, 2004.&lt;br /&gt;
#Molecular and condition parameters dependent diffusion coefficient of water in poly(vinyl alcohol): a molecular dynamics simulation study,Colloid and Polymer Science, 2017, 295(5),859-868&lt;br /&gt;
&lt;br /&gt;
= TASK: =&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time , &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by  (the values of , , and  are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00181.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00182.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00183.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Error= C*t*sin( ωt + φ )     C is a constant that equals approx. 0.000417 in the case of timestep=0.1  ω=1.00 and φ=1.00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Timesteps below 0.63s would be valid in this case &amp;lt;span style=color:red&amp;gt; way too large &amp;lt;/span&amp;gt;. Ideally the total energy is conserved in a closed system, so it is better to monitor the total energy of a system to ensure the simulation was not collapsed in terms of a strong fluctuation in total energy.&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00184.jpg|800x263px]]&lt;br /&gt;
[[File:Zyup00185.jpg|714x300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; force is +ve, r_eq is 2^(1/6)*sigma. Numerical answers stated to way too many decimal places. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions.  55.5*N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/1000= 3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Estimate the volume of 10000 water molecules under standard conditions. 10000/3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;=2.99*10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00186.jpg|800x156px]]&lt;br /&gt;
[[File:Zyup00187.jpg|1000x200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Atom positions not after PBC not correct. Well depth off by factor of 1000, temperature not correct. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In case of two atoms generated on top of each other，the force between them will be very large and therefore leads to unwanted large acceleration to the system, cause a sudden blow up&#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of 0.8. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
1/(1.07722)3 = 0.800&lt;br /&gt;
4 atoms in one lattice, so 4/a3 = 1.2, a = 1.49380, side length is 1.49380.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;    4000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0              for every atom in type 1 mass = 1.0 (reduced unit)&lt;br /&gt;
pair_style lj/cut 3.0   cutoff Lennard-Jones potential with no Coulomb at 3.0 potential with no Coulomb at 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0  for all the pairs coefficient 1.0 1.0 was applied&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
velocity Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ask the demonstrator if you need help.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows easy variation of timesteps without worrying about forgetting to change the relevant steps to run. As the change in steps will be made by the codes as soon as the value of timesteps was changed. Instantaneous change of two related value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). &#039;&#039;&#039;[[File:Zyup00188.jpg|800x426px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Does the simulation reach equilibrium?   &#039;&#039;&#039;Yes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How long does this take?  &#039;&#039;&#039;0.3 reduced time&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00189.jpg|800x446px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results?     &#039;&#039;&#039;0.0025 &lt;br /&gt;
&lt;br /&gt;
Fluctuating in the region that covers the most accurate value from 0.0001&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;   0.015 it does not converge.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
  &lt;br /&gt;
γ = ( &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt; /T )0.5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; I think you meant to the power of 0.5 here, but it is typed as multiply as 0.5. Be more careful! Also, if you showed any working out, then I could safely say this was a typo, but since you have not, I cannot justify treating it as to the power of 0.5 &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
•	Nevery = 100 use input values every 100 timesteps&lt;br /&gt;
&lt;br /&gt;
•	Nrepeat = 1000 1000 of times to use input values for calculating averages&lt;br /&gt;
&lt;br /&gt;
•	Nfreq =10000  calculate averages every 10000 timesteps&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How often will values of the temperature, etc., be sampled for the average?     &#039;&#039;&#039;every 10000 timesteps &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How many measurements contribute to the average?   &#039;&#039;&#039;1000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Looking to the following line, how much time will you simulate?   &#039;&#039;&#039;100000 unit time&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001810.jpg|800x488px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;Lower, as ideal gas law ignores any interactions between particles apart from collisions while the L-J system takes the potential energy into account so that results in a lower density.&lt;br /&gt;
discrepancy increase with pressure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001811.jpg|800x420px]]&lt;br /&gt;
&lt;br /&gt;
Supposed to be constant for liquid but the fluctuation was within an acceptable range&lt;br /&gt;
&lt;br /&gt;
====== Scripts: ======&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY THE REQUIRED THERMODYNAMIC STATE ###&lt;br /&gt;
&lt;br /&gt;
variable D equal 0.2&lt;br /&gt;
&lt;br /&gt;
variable T equal 2.0&lt;br /&gt;
&lt;br /&gt;
variable timestep equal 0.0025&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
&lt;br /&gt;
lattice sc ${D}&lt;br /&gt;
&lt;br /&gt;
region box block 0 15 0 15 0 15&lt;br /&gt;
&lt;br /&gt;
create_box 1 box&lt;br /&gt;
&lt;br /&gt;
create_atoms 1 box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE PHYSICAL PROPERTIES OF ATOMS ###&lt;br /&gt;
&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
&lt;br /&gt;
pair_style lj/cut/opt 3.0&lt;br /&gt;
&lt;br /&gt;
pair_coeff 1 1 1.0 1.0&lt;br /&gt;
&lt;br /&gt;
neighbor 2.0 bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; ASSIGN ATOMIC VELOCITIES ###&lt;br /&gt;
&lt;br /&gt;
velocity all create ${T} 12345 dist gaussian rot yes mom yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY ENSEMBLE ###&lt;br /&gt;
&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; THERMODYNAMIC OUTPUT CONTROL ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom time etotal temp press&lt;br /&gt;
&lt;br /&gt;
thermo 10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RECORD TRAJECTORY ###&lt;br /&gt;
&lt;br /&gt;
dump traj all custom 1000 output-1 id x y z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RUN SIMULATION TO MELT CRYSTAL ###&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
unfix nve&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; BRING SYSTEM TO REQUIRED STATE ###&lt;br /&gt;
&lt;br /&gt;
variable tdamp equal ${timestep}*100&lt;br /&gt;
&lt;br /&gt;
variable pdamp equal ${timestep}*1000&lt;br /&gt;
&lt;br /&gt;
fix nvt all nvt temp ${T} ${T} ${tdamp}&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
unfix nvt&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; MEASURE SYSTEM STATE ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom step etotal temp vol density&lt;br /&gt;
&lt;br /&gt;
variable dens equal density&lt;br /&gt;
&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
&lt;br /&gt;
variable volu equal vol&lt;br /&gt;
&lt;br /&gt;
variable ener equal etotal&lt;br /&gt;
&lt;br /&gt;
variable ener2 equal etotal*etotal&lt;br /&gt;
&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_vol v_ener v_ener2 v_press2&lt;br /&gt;
&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
&lt;br /&gt;
variable avevolu equal f_aves[3]&lt;br /&gt;
&lt;br /&gt;
variable heatc equal 3375*3375*(f_aves[5]-f_aves[4]*f_aves[4])/(f_aves[2]*f_aves[2])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Averages&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Density: ${avedens}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Volume: ${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Temperature: ${avetemp}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Cv/V: ${heatc}/${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001812.jpg|800x457px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Liquid and vapour drop constantly due to the evenly distributing simple cubic structure while solid has fluctuation because of the Fcc structure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This does not really make sense, are you saying that the gas and liquid phase form a cubic lattice? - Then they would be the solid phase! We were looking for a discussion of the short range vs. long range order for each of the phases, relating this to the features of the RDF. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In the solid case, illustrate which lattice sites the first three peaks correspond to.&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039; What is the lattice spacing? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lattice spacing around 1.45 reduced unit. &lt;br /&gt;
&lt;br /&gt;
[0.5,0.5,0] corners; [1.0,0,0] centre of face; [1.0,0.5,0] centre of a different face&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Illustration? What are the coordination numbers? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate  in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001813.jpg]]&lt;br /&gt;
[[File:Zyup001814.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Yes diffusion coefficient should be higher for the gas than liquid - this data is not so good. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001815.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The minima give the location of the maximum difference for the liquid and solid system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This is not what we were looking for. Think about was the VACF actually corresponds to, and how the velocity changes after initiating the simulation. What happens when they particles begin to collide? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Because the HO model has a periodic motion while the Lennard Jones solid and liquid move randomly there for there is no pattern in this kind of motion. i.e. the dependence on previous velocity is rather low.&amp;lt;span style=color:red&amp;gt; Could be better explained - I get what you are trying to say. First of all LJ particles do not move randomly... or what would be the point of the simulation? But unlike the LJ system, the velocity of a simple HO in a closed system is exactly periodic. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Attach a copy of your plot to your writeup.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;[[File:Zyup001816.jpg|800x387]]&lt;br /&gt;
[[File:Zyup001817.jpg]]&lt;br /&gt;
[[File:Zyup001818.jpg]]&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696316</id>
		<title>Rep:ZY3915liqsimu</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696316"/>
		<updated>2018-04-19T11:16:29Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* TASK: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; fff &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Third year simulation experiment =&lt;br /&gt;
&lt;br /&gt;
=== Liquid simulation and the diffusion coefficient ===&lt;br /&gt;
Zhuohao You&lt;br /&gt;
&lt;br /&gt;
==== Abstract ====&lt;br /&gt;
Diffusion behaviour of water was modeled and investigated by molecular dynamic simulation with the assistant of high performance computing power. The connection of diffusion coefficient to the mean square displacement was exploited to calculated the diffusion coefficient base on the performed MSD for liquid, solid and vapour. A further experiment on diffusion coefficient of solid was carried to exam its relationship with temperature.&amp;lt;span style=color:red&amp;gt; The abstract of a scientific paper is meant to briefly convey what you have done and your main results and conclusions, perhaps with a very short motivation. While you have briefly touched upon what you have done, your abstract lacks specifics. What exactly were your main results and conclusions? Also spelling and grammar! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
With the development of high performance computing system, the accuracy of molecular dynamic simulation (MSD) &amp;lt;span style=color:red&amp;gt; molecular dynamics is usually represented by the acronym &amp;quot;MD&amp;quot;, &amp;quot;MDS&amp;quot; for molecular dynamics simulation(s) would be acceptable if specified. However &amp;quot;MSD&amp;quot; has the letters in the wrong order, and is a bit confusing given that MSD is also common for &amp;quot;mean squared displacement&amp;quot; &amp;lt;/span&amp;gt; was brought to a new level &amp;lt;span style=color:red&amp;gt; Arguably, yes. However, you have performed relatively small simulations using cheap and cheerful LJ potentials, so perhaps this comment is not very relevant to what you have done. &amp;lt;/span&amp;gt;.  MSD is a useful tool that gives rise to calculation of macroscopic properties from microscopic scale systems. By considering the interaction for a single particle with a limited amount of nearby particles, &#039;exact&#039; prediction of thermo and physical properties are possible depending in the scale of calculation. &amp;lt;span style=color:red&amp;gt; This point is arguable, since there a lot of technical subtleties, certainly an elaboration would be necessary after making such a bold claim with the use of &amp;quot;exact&amp;quot;. &amp;lt;/span&amp;gt;[1]   &lt;br /&gt;
&lt;br /&gt;
Using the college&#039;s high performance computing facilities &amp;lt;span style=color:red&amp;gt; simply &amp;quot;the college&#039;s&amp;quot; is not an adequate accreditation of the hpc resources you have used. &amp;lt;/span&amp;gt;, simulation of simple liquid &amp;lt;span style=color:red&amp;gt; what about the other phases you have simulated? &amp;lt;/span&amp;gt;was performed and an important property of diffusion coefficient was computed from the simulation with a method manipulating its relationship with the mean squared displacement of ensemble particles.      &lt;br /&gt;
&lt;br /&gt;
==== Aims and Objectives ====&lt;br /&gt;
In this experiment, simulation using Lennard-Jones potential was applied on a simple liquid system. (e.g. Argon) &amp;lt;span style=color:red&amp;gt; why single out argon? have you used LJ parameters for argon? &amp;lt;/span&amp;gt;And investigation of the diffusion coefficient property of the system in liquid, solid and vapour phase was carried to give comparisons between the three states. Furtherly, a variation in temperature for the solid state was investigated to exploit the relationship between temperate and diffusion coefficient.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
The input script was base on the given npt file with 8000 atoms and the molecular dynamic was calculated by the velocity Verlet algorithm with based on Lennard-Jones potential. All the simulation was completed on the college HPC system with the parallel computational pacakge LAMMPS. The diffusion coefficient was computed by the given method:&lt;br /&gt;
The easiest way to measure &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; is by exploiting its connection to the [http://en.wikipedia.org/wiki/Mean_squared_displacement mean squared displacement].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This is not sufficient information for another scientist to reproduce your results. What LJ parameters have you used, what cutoff? You mention the NPT ensemble, what pressure and temperature? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results and discussion ====&lt;br /&gt;
The mean squared displacement (MSD),  effectively measures how much the particles deviate from their equilibrium positions &amp;lt;span style=color:red&amp;gt; a more clear explanation would be valuable here &amp;lt;/span&amp;gt; . The value of MSD represents the extent of random motion in the system, and it can be calculated with the equation:&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001803.jpg]]&lt;br /&gt;
&lt;br /&gt;
In this experiment, calculation of MSD was all completed by HPC and was given in the results. &lt;br /&gt;
&lt;br /&gt;
[[File:Zyup0018701.jpg]] [[File:Zyup001802.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; No x axis label for the second graph. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As shown in two graphs, the simulation for liquid, solid and vapour gives the evolution of mean squared displacement over ti,me for both cases. (8000 atoms and a million atoms respectively) The first thing to see on the graphs was the abnormal position for liquid state and gas state in the first figure, as the liquid phase gave a larger MSD as time goes, which on the other hand, for the second figure did have the gas curve laying above the liquid curve. &lt;br /&gt;
&lt;br /&gt;
In a realistic sense, as the MSD measured the random of particles, the displacement for liquid molecules should be much smaller than the vapour counterpart, since the gas particles was supposed to be about 10 times more distant than liquid molecules in the space.  &lt;br /&gt;
&lt;br /&gt;
Therefore, it turn out that the simulation for vapour phase with this MSD method was inaccurate, or a much longer period of time was required for the system to reach the equilibrium. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;As mentioned above, the diffusion coefficient was calculated by the relationship:    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt; so one sixth of the gradient of the MSD graph was the diffusion coeffient:&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000171 cm2/s; D(sol)= 1.92x10-6 cm2/s; D(vap)= 0.000106 cm2/s  (8000atoms)&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000177cm2/s;  D(sol)= 0;                          D(vap)= 0.00627cm2/s      (a million atoms)&lt;br /&gt;
&lt;br /&gt;
The result was quite close to each other apart from the vapour case, and the data confirmed that for the 8000 atoms system, an equilibrium was not reach therefore the inaccuracy was due to a lack of simulation steps as the gradient was only valid in the diffusion region of the graph (i.e. the linear part). In the case of solid the diffusion coefficient was to low to be calculated.&lt;br /&gt;
&lt;br /&gt;
===== Extension =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; why have you included an extension in the middle of your results section? &amp;lt;/span&amp;gt;&lt;br /&gt;
As the simulation for solid was quite stable in the last section, further interest of examine the temperate-diffusion coefficient connection was developed from the literature[2]. Five additional simulation with different temperature for the solid system was carried to investigate if the MDS simulation could give a similar trend. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!T (reduced temperature)&lt;br /&gt;
!Diffusion coefficient cm2/s&lt;br /&gt;
|-&lt;br /&gt;
|0.6&lt;br /&gt;
|7.48E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.7&lt;br /&gt;
|7.85E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.8&lt;br /&gt;
|1.26E-06&lt;br /&gt;
|-&lt;br /&gt;
|0.9&lt;br /&gt;
|1.47E-06&lt;br /&gt;
|-&lt;br /&gt;
|1.0&lt;br /&gt;
|2.5E-06&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;The results of simulation was given in the table, and a clear trend of D increasing with temperature was illustrated.&lt;br /&gt;
[[File:Zyup001805.jpg]][[File:Zyup001804.jpg]]&lt;br /&gt;
&lt;br /&gt;
In general, the simulation gave the same relationship with the literature graph &amp;lt;span style=color:red&amp;gt; citation? &amp;lt;/span&amp;gt;, though the fluctuation in the computed curve was greater due to the weakness in size and timesteps. This was saying the error in the simulation can be averaged out with large scale simulation andFurther investigate of this relation could be carried with a greater size (e.g. a million atoms) and more steps to provide more reliable data for the different states.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
The MD simulation provides a powerful and relatively reliable tool for investigation of the simple systems as shown in the experiment, this provides an alternative method to gather thermo and physical data from Lab experiment. To ensure the accuracy of the simulated data,  a large size of model to mimic the interaction and long time of random motion to reach equillibrium was required.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; These are some very vague conclusions. The conclusion of a scientific paper is meant to summarise the main results and conclusions, and perhaps offer a brief outlook. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Reference hav =====&lt;br /&gt;
# Computational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes, Norbert Attig, Kurt Binder, Helmut Grubmuller ¨ , Kurt Kremer (Eds.), John von Neumann Institute for Computing, Julich, ¨ NIC Series, Vol. 23, ISBN 3-00-012641-4, pp. 1-28, 2004.&lt;br /&gt;
#Molecular and condition parameters dependent diffusion coefficient of water in poly(vinyl alcohol): a molecular dynamics simulation study,Colloid and Polymer Science, 2017, 295(5),859-868&lt;br /&gt;
&lt;br /&gt;
= TASK: =&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time , &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by  (the values of , , and  are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00181.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00182.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00183.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Error= C*t*sin( ωt + φ )     C is a constant that equals approx. 0.000417 in the case of timestep=0.1  ω=1.00 and φ=1.00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Timesteps below 0.63s would be valid in this case &amp;lt;span style=color:red&amp;gt; way too large &amp;lt;/span&amp;gt;. Ideally the total energy is conserved in a closed system, so it is better to monitor the total energy of a system to ensure the simulation was not collapsed in terms of a strong fluctuation in total energy.&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00184.jpg|800x263px]]&lt;br /&gt;
[[File:Zyup00185.jpg|714x300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; force is +ve, r_eq is 2^(1/6)*sigma. Numerical answers stated to way too many decimal places. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions.  55.5*N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/1000= 3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Estimate the volume of 10000 water molecules under standard conditions. 10000/3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;=2.99*10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00186.jpg|800x156px]]&lt;br /&gt;
[[File:Zyup00187.jpg|1000x200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Atom positions not after PBC not correct. Well depth off by factor of 1000, temperature not correct. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In case of two atoms generated on top of each other，the force between them will be very large and therefore leads to unwanted large acceleration to the system, cause a sudden blow up&#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of 0.8. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
1/(1.07722)3 = 0.800&lt;br /&gt;
4 atoms in one lattice, so 4/a3 = 1.2, a = 1.49380, side length is 1.49380.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;    4000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0              for every atom in type 1 mass = 1.0 (reduced unit)&lt;br /&gt;
pair_style lj/cut 3.0   cutoff Lennard-Jones potential with no Coulomb at 3.0 potential with no Coulomb at 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0  for all the pairs coefficient 1.0 1.0 was applied&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
velocity Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ask the demonstrator if you need help.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows easy variation of timesteps without worrying about forgetting to change the relevant steps to run. As the change in steps will be made by the codes as soon as the value of timesteps was changed. Instantaneous change of two related value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). &#039;&#039;&#039;[[File:Zyup00188.jpg|800x426px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Does the simulation reach equilibrium?   &#039;&#039;&#039;Yes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How long does this take?  &#039;&#039;&#039;0.3 reduced time&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00189.jpg|800x446px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results?     &#039;&#039;&#039;0.0025 &lt;br /&gt;
&lt;br /&gt;
Fluctuating in the region that covers the most accurate value from 0.0001&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;   0.015 it does not converge.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
  &lt;br /&gt;
γ = ( &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt; /T )0.5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; I think you meant to the power of 0.5 here, but it is typed as multiply as 0.5. Be more careful! Also, if you showed any working out, then I could safely say this was a typo, but since you have not, I cannot justify treating it as to the power of 0.5 &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
•	Nevery = 100 use input values every 100 timesteps&lt;br /&gt;
&lt;br /&gt;
•	Nrepeat = 1000 1000 of times to use input values for calculating averages&lt;br /&gt;
&lt;br /&gt;
•	Nfreq =10000  calculate averages every 10000 timesteps&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How often will values of the temperature, etc., be sampled for the average?     &#039;&#039;&#039;every 10000 timesteps &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How many measurements contribute to the average?   &#039;&#039;&#039;1000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Looking to the following line, how much time will you simulate?   &#039;&#039;&#039;100000 unit time&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001810.jpg|800x488px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;Lower, as ideal gas law ignores any interactions between particles apart from collisions while the L-J system takes the potential energy into account so that results in a lower density.&lt;br /&gt;
discrepancy increase with pressure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001811.jpg|800x420px]]&lt;br /&gt;
&lt;br /&gt;
Supposed to be constant for liquid but the fluctuation was within an acceptable range&lt;br /&gt;
&lt;br /&gt;
====== Scripts: ======&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY THE REQUIRED THERMODYNAMIC STATE ###&lt;br /&gt;
&lt;br /&gt;
variable D equal 0.2&lt;br /&gt;
&lt;br /&gt;
variable T equal 2.0&lt;br /&gt;
&lt;br /&gt;
variable timestep equal 0.0025&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
&lt;br /&gt;
lattice sc ${D}&lt;br /&gt;
&lt;br /&gt;
region box block 0 15 0 15 0 15&lt;br /&gt;
&lt;br /&gt;
create_box 1 box&lt;br /&gt;
&lt;br /&gt;
create_atoms 1 box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE PHYSICAL PROPERTIES OF ATOMS ###&lt;br /&gt;
&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
&lt;br /&gt;
pair_style lj/cut/opt 3.0&lt;br /&gt;
&lt;br /&gt;
pair_coeff 1 1 1.0 1.0&lt;br /&gt;
&lt;br /&gt;
neighbor 2.0 bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; ASSIGN ATOMIC VELOCITIES ###&lt;br /&gt;
&lt;br /&gt;
velocity all create ${T} 12345 dist gaussian rot yes mom yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY ENSEMBLE ###&lt;br /&gt;
&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; THERMODYNAMIC OUTPUT CONTROL ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom time etotal temp press&lt;br /&gt;
&lt;br /&gt;
thermo 10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RECORD TRAJECTORY ###&lt;br /&gt;
&lt;br /&gt;
dump traj all custom 1000 output-1 id x y z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RUN SIMULATION TO MELT CRYSTAL ###&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
unfix nve&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; BRING SYSTEM TO REQUIRED STATE ###&lt;br /&gt;
&lt;br /&gt;
variable tdamp equal ${timestep}*100&lt;br /&gt;
&lt;br /&gt;
variable pdamp equal ${timestep}*1000&lt;br /&gt;
&lt;br /&gt;
fix nvt all nvt temp ${T} ${T} ${tdamp}&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
unfix nvt&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; MEASURE SYSTEM STATE ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom step etotal temp vol density&lt;br /&gt;
&lt;br /&gt;
variable dens equal density&lt;br /&gt;
&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
&lt;br /&gt;
variable volu equal vol&lt;br /&gt;
&lt;br /&gt;
variable ener equal etotal&lt;br /&gt;
&lt;br /&gt;
variable ener2 equal etotal*etotal&lt;br /&gt;
&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_vol v_ener v_ener2 v_press2&lt;br /&gt;
&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
&lt;br /&gt;
variable avevolu equal f_aves[3]&lt;br /&gt;
&lt;br /&gt;
variable heatc equal 3375*3375*(f_aves[5]-f_aves[4]*f_aves[4])/(f_aves[2]*f_aves[2])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Averages&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Density: ${avedens}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Volume: ${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Temperature: ${avetemp}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Cv/V: ${heatc}/${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001812.jpg|800x457px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Liquid and vapour drop constantly due to the evenly distributing simple cubic structure while solid has fluctuation because of the Fcc structure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This does not really make sense, are you saying that the gas and liquid phase form a cubic lattice? - Then they would be the solid phase! We were looking for a discussion of the short range vs. long range order for each of the phases, relating this to the features of the RDF. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In the solid case, illustrate which lattice sites the first three peaks correspond to.&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039; What is the lattice spacing? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lattice spacing around 1.45 reduced unit. &lt;br /&gt;
&lt;br /&gt;
[0.5,0.5,0] corners; [1.0,0,0] centre of face; [1.0,0.5,0] centre of a different face&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Illustration? What are the coordination numbers? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate  in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001813.jpg]]&lt;br /&gt;
[[File:Zyup001814.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Yes diffusion coefficient should be higher for the gas than liquid - this data is not so good. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001815.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The minima give the location of the maximum difference for the liquid and solid system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This is not what we were looking for. Think about was the VACF actually corresponds to, and how the velocity changes after initiating the simulation. What happens when they particles begin to collide? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Because the HO model has a periodic motion while the Lennard Jones solid and liquid move randomly there for there is no pattern in this kind of motion. i.e. the dependence on previous velocity is rather low.&amp;lt;span style=color:red&amp;gt; Could be better explained - I get what you are trying to say. First of all LJ particles do not move randomly... or what would be the point of the simulation? But unlike the LJ system, the velocity of a simple HO in a closed system is exactly periodic. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Attach a copy of your plot to your writeup.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;[[File:Zyup001816.jpg|800x387]]&lt;br /&gt;
[[File:Zyup001817.jpg]]&lt;br /&gt;
[[File:Zyup001818.jpg]]&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696315</id>
		<title>Rep:ZY3915liqsimu</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696315"/>
		<updated>2018-04-19T11:13:42Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* TASK: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; fff &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Third year simulation experiment =&lt;br /&gt;
&lt;br /&gt;
=== Liquid simulation and the diffusion coefficient ===&lt;br /&gt;
Zhuohao You&lt;br /&gt;
&lt;br /&gt;
==== Abstract ====&lt;br /&gt;
Diffusion behaviour of water was modeled and investigated by molecular dynamic simulation with the assistant of high performance computing power. The connection of diffusion coefficient to the mean square displacement was exploited to calculated the diffusion coefficient base on the performed MSD for liquid, solid and vapour. A further experiment on diffusion coefficient of solid was carried to exam its relationship with temperature.&amp;lt;span style=color:red&amp;gt; The abstract of a scientific paper is meant to briefly convey what you have done and your main results and conclusions, perhaps with a very short motivation. While you have briefly touched upon what you have done, your abstract lacks specifics. What exactly were your main results and conclusions? Also spelling and grammar! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
With the development of high performance computing system, the accuracy of molecular dynamic simulation (MSD) &amp;lt;span style=color:red&amp;gt; molecular dynamics is usually represented by the acronym &amp;quot;MD&amp;quot;, &amp;quot;MDS&amp;quot; for molecular dynamics simulation(s) would be acceptable if specified. However &amp;quot;MSD&amp;quot; has the letters in the wrong order, and is a bit confusing given that MSD is also common for &amp;quot;mean squared displacement&amp;quot; &amp;lt;/span&amp;gt; was brought to a new level &amp;lt;span style=color:red&amp;gt; Arguably, yes. However, you have performed relatively small simulations using cheap and cheerful LJ potentials, so perhaps this comment is not very relevant to what you have done. &amp;lt;/span&amp;gt;.  MSD is a useful tool that gives rise to calculation of macroscopic properties from microscopic scale systems. By considering the interaction for a single particle with a limited amount of nearby particles, &#039;exact&#039; prediction of thermo and physical properties are possible depending in the scale of calculation. &amp;lt;span style=color:red&amp;gt; This point is arguable, since there a lot of technical subtleties, certainly an elaboration would be necessary after making such a bold claim with the use of &amp;quot;exact&amp;quot;. &amp;lt;/span&amp;gt;[1]   &lt;br /&gt;
&lt;br /&gt;
Using the college&#039;s high performance computing facilities &amp;lt;span style=color:red&amp;gt; simply &amp;quot;the college&#039;s&amp;quot; is not an adequate accreditation of the hpc resources you have used. &amp;lt;/span&amp;gt;, simulation of simple liquid &amp;lt;span style=color:red&amp;gt; what about the other phases you have simulated? &amp;lt;/span&amp;gt;was performed and an important property of diffusion coefficient was computed from the simulation with a method manipulating its relationship with the mean squared displacement of ensemble particles.      &lt;br /&gt;
&lt;br /&gt;
==== Aims and Objectives ====&lt;br /&gt;
In this experiment, simulation using Lennard-Jones potential was applied on a simple liquid system. (e.g. Argon) &amp;lt;span style=color:red&amp;gt; why single out argon? have you used LJ parameters for argon? &amp;lt;/span&amp;gt;And investigation of the diffusion coefficient property of the system in liquid, solid and vapour phase was carried to give comparisons between the three states. Furtherly, a variation in temperature for the solid state was investigated to exploit the relationship between temperate and diffusion coefficient.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
The input script was base on the given npt file with 8000 atoms and the molecular dynamic was calculated by the velocity Verlet algorithm with based on Lennard-Jones potential. All the simulation was completed on the college HPC system with the parallel computational pacakge LAMMPS. The diffusion coefficient was computed by the given method:&lt;br /&gt;
The easiest way to measure &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; is by exploiting its connection to the [http://en.wikipedia.org/wiki/Mean_squared_displacement mean squared displacement].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This is not sufficient information for another scientist to reproduce your results. What LJ parameters have you used, what cutoff? You mention the NPT ensemble, what pressure and temperature? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results and discussion ====&lt;br /&gt;
The mean squared displacement (MSD),  effectively measures how much the particles deviate from their equilibrium positions &amp;lt;span style=color:red&amp;gt; a more clear explanation would be valuable here &amp;lt;/span&amp;gt; . The value of MSD represents the extent of random motion in the system, and it can be calculated with the equation:&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001803.jpg]]&lt;br /&gt;
&lt;br /&gt;
In this experiment, calculation of MSD was all completed by HPC and was given in the results. &lt;br /&gt;
&lt;br /&gt;
[[File:Zyup0018701.jpg]] [[File:Zyup001802.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; No x axis label for the second graph. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As shown in two graphs, the simulation for liquid, solid and vapour gives the evolution of mean squared displacement over ti,me for both cases. (8000 atoms and a million atoms respectively) The first thing to see on the graphs was the abnormal position for liquid state and gas state in the first figure, as the liquid phase gave a larger MSD as time goes, which on the other hand, for the second figure did have the gas curve laying above the liquid curve. &lt;br /&gt;
&lt;br /&gt;
In a realistic sense, as the MSD measured the random of particles, the displacement for liquid molecules should be much smaller than the vapour counterpart, since the gas particles was supposed to be about 10 times more distant than liquid molecules in the space.  &lt;br /&gt;
&lt;br /&gt;
Therefore, it turn out that the simulation for vapour phase with this MSD method was inaccurate, or a much longer period of time was required for the system to reach the equilibrium. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;As mentioned above, the diffusion coefficient was calculated by the relationship:    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt; so one sixth of the gradient of the MSD graph was the diffusion coeffient:&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000171 cm2/s; D(sol)= 1.92x10-6 cm2/s; D(vap)= 0.000106 cm2/s  (8000atoms)&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000177cm2/s;  D(sol)= 0;                          D(vap)= 0.00627cm2/s      (a million atoms)&lt;br /&gt;
&lt;br /&gt;
The result was quite close to each other apart from the vapour case, and the data confirmed that for the 8000 atoms system, an equilibrium was not reach therefore the inaccuracy was due to a lack of simulation steps as the gradient was only valid in the diffusion region of the graph (i.e. the linear part). In the case of solid the diffusion coefficient was to low to be calculated.&lt;br /&gt;
&lt;br /&gt;
===== Extension =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; why have you included an extension in the middle of your results section? &amp;lt;/span&amp;gt;&lt;br /&gt;
As the simulation for solid was quite stable in the last section, further interest of examine the temperate-diffusion coefficient connection was developed from the literature[2]. Five additional simulation with different temperature for the solid system was carried to investigate if the MDS simulation could give a similar trend. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!T (reduced temperature)&lt;br /&gt;
!Diffusion coefficient cm2/s&lt;br /&gt;
|-&lt;br /&gt;
|0.6&lt;br /&gt;
|7.48E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.7&lt;br /&gt;
|7.85E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.8&lt;br /&gt;
|1.26E-06&lt;br /&gt;
|-&lt;br /&gt;
|0.9&lt;br /&gt;
|1.47E-06&lt;br /&gt;
|-&lt;br /&gt;
|1.0&lt;br /&gt;
|2.5E-06&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;The results of simulation was given in the table, and a clear trend of D increasing with temperature was illustrated.&lt;br /&gt;
[[File:Zyup001805.jpg]][[File:Zyup001804.jpg]]&lt;br /&gt;
&lt;br /&gt;
In general, the simulation gave the same relationship with the literature graph &amp;lt;span style=color:red&amp;gt; citation? &amp;lt;/span&amp;gt;, though the fluctuation in the computed curve was greater due to the weakness in size and timesteps. This was saying the error in the simulation can be averaged out with large scale simulation andFurther investigate of this relation could be carried with a greater size (e.g. a million atoms) and more steps to provide more reliable data for the different states.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
The MD simulation provides a powerful and relatively reliable tool for investigation of the simple systems as shown in the experiment, this provides an alternative method to gather thermo and physical data from Lab experiment. To ensure the accuracy of the simulated data,  a large size of model to mimic the interaction and long time of random motion to reach equillibrium was required.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; These are some very vague conclusions. The conclusion of a scientific paper is meant to summarise the main results and conclusions, and perhaps offer a brief outlook. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Reference hav =====&lt;br /&gt;
# Computational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes, Norbert Attig, Kurt Binder, Helmut Grubmuller ¨ , Kurt Kremer (Eds.), John von Neumann Institute for Computing, Julich, ¨ NIC Series, Vol. 23, ISBN 3-00-012641-4, pp. 1-28, 2004.&lt;br /&gt;
#Molecular and condition parameters dependent diffusion coefficient of water in poly(vinyl alcohol): a molecular dynamics simulation study,Colloid and Polymer Science, 2017, 295(5),859-868&lt;br /&gt;
&lt;br /&gt;
= TASK: =&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time , &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by  (the values of , , and  are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00181.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00182.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00183.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Error= C*t*sin( ωt + φ )     C is a constant that equals approx. 0.000417 in the case of timestep=0.1  ω=1.00 and φ=1.00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Timesteps below 0.63s would be valid in this case &amp;lt;span style=color:red&amp;gt; way too large &amp;lt;/span&amp;gt;. Ideally the total energy is conserved in a closed system, so it is better to monitor the total energy of a system to ensure the simulation was not collapsed in terms of a strong fluctuation in total energy.&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00184.jpg|800x263px]]&lt;br /&gt;
[[File:Zyup00185.jpg|714x300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; force is +ve, r_eq is 2^(1/6)*sigma. Numerical answers stated to way too many decimal places. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions.  55.5*N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/1000= 3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Estimate the volume of 10000 water molecules under standard conditions. 10000/3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;=2.99*10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00186.jpg|800x156px]]&lt;br /&gt;
[[File:Zyup00187.jpg|1000x200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Atom positions not after PBC not correct. Well depth off by factor of 1000, temperature not correct. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In case of two atoms generated on top of each other，the force between them will be very large and therefore leads to unwanted large acceleration to the system, cause a sudden blow up&#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of 0.8. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
1/(1.07722)3 = 0.800&lt;br /&gt;
4 atoms in one lattice, so 4/a3 = 1.2, a = 1.49380, side length is 1.49380.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;    4000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0              for every atom in type 1 mass = 1.0 (reduced unit)&lt;br /&gt;
pair_style lj/cut 3.0   cutoff Lennard-Jones potential with no Coulomb at 3.0 potential with no Coulomb at 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0  for all the pairs coefficient 1.0 1.0 was applied&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
velocity Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ask the demonstrator if you need help.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows easy variation of timesteps without worrying about forgetting to change the relevant steps to run. As the change in steps will be made by the codes as soon as the value of timesteps was changed. Instantaneous change of two related value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). &#039;&#039;&#039;[[File:Zyup00188.jpg|800x426px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Does the simulation reach equilibrium?   &#039;&#039;&#039;Yes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How long does this take?  &#039;&#039;&#039;0.3 reduced time&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00189.jpg|800x446px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results?     &#039;&#039;&#039;0.0025 &lt;br /&gt;
&lt;br /&gt;
Fluctuating in the region that covers the most accurate value from 0.0001&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;   0.015 it does not converge.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
  &lt;br /&gt;
γ = ( &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt; /T )0.5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; I think you meant to the power of 0.5 here, but it is typed as multiply as 0.5. Be more careful! Also, if you showed any working out, then I could safely say this was a typo, but since you have not, I cannot justify treating it as to the power of 0.5 &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
•	Nevery = 100 use input values every 100 timesteps&lt;br /&gt;
&lt;br /&gt;
•	Nrepeat = 1000 1000 of times to use input values for calculating averages&lt;br /&gt;
&lt;br /&gt;
•	Nfreq =10000  calculate averages every 10000 timesteps&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How often will values of the temperature, etc., be sampled for the average?     &#039;&#039;&#039;every 10000 timesteps &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How many measurements contribute to the average?   &#039;&#039;&#039;1000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Looking to the following line, how much time will you simulate?   &#039;&#039;&#039;100000 unit time&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001810.jpg|800x488px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;Lower, as ideal gas law ignores any interactions between particles apart from collisions while the L-J system takes the potential energy into account so that results in a lower density.&lt;br /&gt;
discrepancy increase with pressure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001811.jpg|800x420px]]&lt;br /&gt;
&lt;br /&gt;
Supposed to be constant for liquid but the fluctuation was within an acceptable range&lt;br /&gt;
&lt;br /&gt;
====== Scripts: ======&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY THE REQUIRED THERMODYNAMIC STATE ###&lt;br /&gt;
&lt;br /&gt;
variable D equal 0.2&lt;br /&gt;
&lt;br /&gt;
variable T equal 2.0&lt;br /&gt;
&lt;br /&gt;
variable timestep equal 0.0025&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
&lt;br /&gt;
lattice sc ${D}&lt;br /&gt;
&lt;br /&gt;
region box block 0 15 0 15 0 15&lt;br /&gt;
&lt;br /&gt;
create_box 1 box&lt;br /&gt;
&lt;br /&gt;
create_atoms 1 box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE PHYSICAL PROPERTIES OF ATOMS ###&lt;br /&gt;
&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
&lt;br /&gt;
pair_style lj/cut/opt 3.0&lt;br /&gt;
&lt;br /&gt;
pair_coeff 1 1 1.0 1.0&lt;br /&gt;
&lt;br /&gt;
neighbor 2.0 bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; ASSIGN ATOMIC VELOCITIES ###&lt;br /&gt;
&lt;br /&gt;
velocity all create ${T} 12345 dist gaussian rot yes mom yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY ENSEMBLE ###&lt;br /&gt;
&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; THERMODYNAMIC OUTPUT CONTROL ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom time etotal temp press&lt;br /&gt;
&lt;br /&gt;
thermo 10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RECORD TRAJECTORY ###&lt;br /&gt;
&lt;br /&gt;
dump traj all custom 1000 output-1 id x y z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RUN SIMULATION TO MELT CRYSTAL ###&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
unfix nve&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; BRING SYSTEM TO REQUIRED STATE ###&lt;br /&gt;
&lt;br /&gt;
variable tdamp equal ${timestep}*100&lt;br /&gt;
&lt;br /&gt;
variable pdamp equal ${timestep}*1000&lt;br /&gt;
&lt;br /&gt;
fix nvt all nvt temp ${T} ${T} ${tdamp}&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
unfix nvt&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; MEASURE SYSTEM STATE ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom step etotal temp vol density&lt;br /&gt;
&lt;br /&gt;
variable dens equal density&lt;br /&gt;
&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
&lt;br /&gt;
variable volu equal vol&lt;br /&gt;
&lt;br /&gt;
variable ener equal etotal&lt;br /&gt;
&lt;br /&gt;
variable ener2 equal etotal*etotal&lt;br /&gt;
&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_vol v_ener v_ener2 v_press2&lt;br /&gt;
&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
&lt;br /&gt;
variable avevolu equal f_aves[3]&lt;br /&gt;
&lt;br /&gt;
variable heatc equal 3375*3375*(f_aves[5]-f_aves[4]*f_aves[4])/(f_aves[2]*f_aves[2])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Averages&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Density: ${avedens}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Volume: ${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Temperature: ${avetemp}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Cv/V: ${heatc}/${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001812.jpg|800x457px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Liquid and vapour drop constantly due to the evenly distributing simple cubic structure while solid has fluctuation because of the Fcc structure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This does not really make sense, are you saying that the gas and liquid phase form a cubic lattice? - Then they would be the solid phase! We were looking for a discussion of the short range vs. long range order for each of the phases, relating this to the features of the RDF. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In the solid case, illustrate which lattice sites the first three peaks correspond to.&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039; What is the lattice spacing? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lattice spacing around 1.45 reduced unit. &lt;br /&gt;
&lt;br /&gt;
[0.5,0.5,0] corners; [1.0,0,0] centre of face; [1.0,0.5,0] centre of a different face&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Illustration? What are the coordination numbers? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate  in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001813.jpg]]&lt;br /&gt;
[[File:Zyup001814.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Yes diffusion coefficient should be higher for the gas than liquid - this data is not so good. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001815.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The minima give the location of the maximum difference for the liquid and solid system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This is not what we were looking for. Think about was the VACF actually corresponds to, and how the velocity changes after initiating the simulation. What happens when they particles begin to collide? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Because the HO model has a periodic motion while the Lennard Jones solid and liquid move randomly there for there is no pattern in this kind of motion. i.e. the dependence on previous velocity is rather low.&lt;br /&gt;
Attach a copy of your plot to your writeup.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;[[File:Zyup001816.jpg|800x387]]&lt;br /&gt;
[[File:Zyup001817.jpg]]&lt;br /&gt;
[[File:Zyup001818.jpg]]&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696314</id>
		<title>Rep:ZY3915liqsimu</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696314"/>
		<updated>2018-04-19T11:09:56Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* TASK: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; fff &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Third year simulation experiment =&lt;br /&gt;
&lt;br /&gt;
=== Liquid simulation and the diffusion coefficient ===&lt;br /&gt;
Zhuohao You&lt;br /&gt;
&lt;br /&gt;
==== Abstract ====&lt;br /&gt;
Diffusion behaviour of water was modeled and investigated by molecular dynamic simulation with the assistant of high performance computing power. The connection of diffusion coefficient to the mean square displacement was exploited to calculated the diffusion coefficient base on the performed MSD for liquid, solid and vapour. A further experiment on diffusion coefficient of solid was carried to exam its relationship with temperature.&amp;lt;span style=color:red&amp;gt; The abstract of a scientific paper is meant to briefly convey what you have done and your main results and conclusions, perhaps with a very short motivation. While you have briefly touched upon what you have done, your abstract lacks specifics. What exactly were your main results and conclusions? Also spelling and grammar! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
With the development of high performance computing system, the accuracy of molecular dynamic simulation (MSD) &amp;lt;span style=color:red&amp;gt; molecular dynamics is usually represented by the acronym &amp;quot;MD&amp;quot;, &amp;quot;MDS&amp;quot; for molecular dynamics simulation(s) would be acceptable if specified. However &amp;quot;MSD&amp;quot; has the letters in the wrong order, and is a bit confusing given that MSD is also common for &amp;quot;mean squared displacement&amp;quot; &amp;lt;/span&amp;gt; was brought to a new level &amp;lt;span style=color:red&amp;gt; Arguably, yes. However, you have performed relatively small simulations using cheap and cheerful LJ potentials, so perhaps this comment is not very relevant to what you have done. &amp;lt;/span&amp;gt;.  MSD is a useful tool that gives rise to calculation of macroscopic properties from microscopic scale systems. By considering the interaction for a single particle with a limited amount of nearby particles, &#039;exact&#039; prediction of thermo and physical properties are possible depending in the scale of calculation. &amp;lt;span style=color:red&amp;gt; This point is arguable, since there a lot of technical subtleties, certainly an elaboration would be necessary after making such a bold claim with the use of &amp;quot;exact&amp;quot;. &amp;lt;/span&amp;gt;[1]   &lt;br /&gt;
&lt;br /&gt;
Using the college&#039;s high performance computing facilities &amp;lt;span style=color:red&amp;gt; simply &amp;quot;the college&#039;s&amp;quot; is not an adequate accreditation of the hpc resources you have used. &amp;lt;/span&amp;gt;, simulation of simple liquid &amp;lt;span style=color:red&amp;gt; what about the other phases you have simulated? &amp;lt;/span&amp;gt;was performed and an important property of diffusion coefficient was computed from the simulation with a method manipulating its relationship with the mean squared displacement of ensemble particles.      &lt;br /&gt;
&lt;br /&gt;
==== Aims and Objectives ====&lt;br /&gt;
In this experiment, simulation using Lennard-Jones potential was applied on a simple liquid system. (e.g. Argon) &amp;lt;span style=color:red&amp;gt; why single out argon? have you used LJ parameters for argon? &amp;lt;/span&amp;gt;And investigation of the diffusion coefficient property of the system in liquid, solid and vapour phase was carried to give comparisons between the three states. Furtherly, a variation in temperature for the solid state was investigated to exploit the relationship between temperate and diffusion coefficient.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
The input script was base on the given npt file with 8000 atoms and the molecular dynamic was calculated by the velocity Verlet algorithm with based on Lennard-Jones potential. All the simulation was completed on the college HPC system with the parallel computational pacakge LAMMPS. The diffusion coefficient was computed by the given method:&lt;br /&gt;
The easiest way to measure &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; is by exploiting its connection to the [http://en.wikipedia.org/wiki/Mean_squared_displacement mean squared displacement].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This is not sufficient information for another scientist to reproduce your results. What LJ parameters have you used, what cutoff? You mention the NPT ensemble, what pressure and temperature? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results and discussion ====&lt;br /&gt;
The mean squared displacement (MSD),  effectively measures how much the particles deviate from their equilibrium positions &amp;lt;span style=color:red&amp;gt; a more clear explanation would be valuable here &amp;lt;/span&amp;gt; . The value of MSD represents the extent of random motion in the system, and it can be calculated with the equation:&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001803.jpg]]&lt;br /&gt;
&lt;br /&gt;
In this experiment, calculation of MSD was all completed by HPC and was given in the results. &lt;br /&gt;
&lt;br /&gt;
[[File:Zyup0018701.jpg]] [[File:Zyup001802.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; No x axis label for the second graph. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As shown in two graphs, the simulation for liquid, solid and vapour gives the evolution of mean squared displacement over ti,me for both cases. (8000 atoms and a million atoms respectively) The first thing to see on the graphs was the abnormal position for liquid state and gas state in the first figure, as the liquid phase gave a larger MSD as time goes, which on the other hand, for the second figure did have the gas curve laying above the liquid curve. &lt;br /&gt;
&lt;br /&gt;
In a realistic sense, as the MSD measured the random of particles, the displacement for liquid molecules should be much smaller than the vapour counterpart, since the gas particles was supposed to be about 10 times more distant than liquid molecules in the space.  &lt;br /&gt;
&lt;br /&gt;
Therefore, it turn out that the simulation for vapour phase with this MSD method was inaccurate, or a much longer period of time was required for the system to reach the equilibrium. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;As mentioned above, the diffusion coefficient was calculated by the relationship:    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt; so one sixth of the gradient of the MSD graph was the diffusion coeffient:&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000171 cm2/s; D(sol)= 1.92x10-6 cm2/s; D(vap)= 0.000106 cm2/s  (8000atoms)&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000177cm2/s;  D(sol)= 0;                          D(vap)= 0.00627cm2/s      (a million atoms)&lt;br /&gt;
&lt;br /&gt;
The result was quite close to each other apart from the vapour case, and the data confirmed that for the 8000 atoms system, an equilibrium was not reach therefore the inaccuracy was due to a lack of simulation steps as the gradient was only valid in the diffusion region of the graph (i.e. the linear part). In the case of solid the diffusion coefficient was to low to be calculated.&lt;br /&gt;
&lt;br /&gt;
===== Extension =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; why have you included an extension in the middle of your results section? &amp;lt;/span&amp;gt;&lt;br /&gt;
As the simulation for solid was quite stable in the last section, further interest of examine the temperate-diffusion coefficient connection was developed from the literature[2]. Five additional simulation with different temperature for the solid system was carried to investigate if the MDS simulation could give a similar trend. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!T (reduced temperature)&lt;br /&gt;
!Diffusion coefficient cm2/s&lt;br /&gt;
|-&lt;br /&gt;
|0.6&lt;br /&gt;
|7.48E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.7&lt;br /&gt;
|7.85E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.8&lt;br /&gt;
|1.26E-06&lt;br /&gt;
|-&lt;br /&gt;
|0.9&lt;br /&gt;
|1.47E-06&lt;br /&gt;
|-&lt;br /&gt;
|1.0&lt;br /&gt;
|2.5E-06&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;The results of simulation was given in the table, and a clear trend of D increasing with temperature was illustrated.&lt;br /&gt;
[[File:Zyup001805.jpg]][[File:Zyup001804.jpg]]&lt;br /&gt;
&lt;br /&gt;
In general, the simulation gave the same relationship with the literature graph &amp;lt;span style=color:red&amp;gt; citation? &amp;lt;/span&amp;gt;, though the fluctuation in the computed curve was greater due to the weakness in size and timesteps. This was saying the error in the simulation can be averaged out with large scale simulation andFurther investigate of this relation could be carried with a greater size (e.g. a million atoms) and more steps to provide more reliable data for the different states.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
The MD simulation provides a powerful and relatively reliable tool for investigation of the simple systems as shown in the experiment, this provides an alternative method to gather thermo and physical data from Lab experiment. To ensure the accuracy of the simulated data,  a large size of model to mimic the interaction and long time of random motion to reach equillibrium was required.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; These are some very vague conclusions. The conclusion of a scientific paper is meant to summarise the main results and conclusions, and perhaps offer a brief outlook. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Reference hav =====&lt;br /&gt;
# Computational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes, Norbert Attig, Kurt Binder, Helmut Grubmuller ¨ , Kurt Kremer (Eds.), John von Neumann Institute for Computing, Julich, ¨ NIC Series, Vol. 23, ISBN 3-00-012641-4, pp. 1-28, 2004.&lt;br /&gt;
#Molecular and condition parameters dependent diffusion coefficient of water in poly(vinyl alcohol): a molecular dynamics simulation study,Colloid and Polymer Science, 2017, 295(5),859-868&lt;br /&gt;
&lt;br /&gt;
= TASK: =&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time , &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by  (the values of , , and  are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00181.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00182.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00183.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Error= C*t*sin( ωt + φ )     C is a constant that equals approx. 0.000417 in the case of timestep=0.1  ω=1.00 and φ=1.00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Timesteps below 0.63s would be valid in this case &amp;lt;span style=color:red&amp;gt; way too large &amp;lt;/span&amp;gt;. Ideally the total energy is conserved in a closed system, so it is better to monitor the total energy of a system to ensure the simulation was not collapsed in terms of a strong fluctuation in total energy.&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00184.jpg|800x263px]]&lt;br /&gt;
[[File:Zyup00185.jpg|714x300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; force is +ve, r_eq is 2^(1/6)*sigma. Numerical answers stated to way too many decimal places. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions.  55.5*N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/1000= 3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Estimate the volume of 10000 water molecules under standard conditions. 10000/3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;=2.99*10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00186.jpg|800x156px]]&lt;br /&gt;
[[File:Zyup00187.jpg|1000x200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Atom positions not after PBC not correct. Well depth off by factor of 1000, temperature not correct. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In case of two atoms generated on top of each other，the force between them will be very large and therefore leads to unwanted large acceleration to the system, cause a sudden blow up&#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of 0.8. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
1/(1.07722)3 = 0.800&lt;br /&gt;
4 atoms in one lattice, so 4/a3 = 1.2, a = 1.49380, side length is 1.49380.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;    4000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0              for every atom in type 1 mass = 1.0 (reduced unit)&lt;br /&gt;
pair_style lj/cut 3.0   cutoff Lennard-Jones potential with no Coulomb at 3.0 potential with no Coulomb at 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0  for all the pairs coefficient 1.0 1.0 was applied&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
velocity Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ask the demonstrator if you need help.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows easy variation of timesteps without worrying about forgetting to change the relevant steps to run. As the change in steps will be made by the codes as soon as the value of timesteps was changed. Instantaneous change of two related value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). &#039;&#039;&#039;[[File:Zyup00188.jpg|800x426px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Does the simulation reach equilibrium?   &#039;&#039;&#039;Yes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How long does this take?  &#039;&#039;&#039;0.3 reduced time&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00189.jpg|800x446px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results?     &#039;&#039;&#039;0.0025 &lt;br /&gt;
&lt;br /&gt;
Fluctuating in the region that covers the most accurate value from 0.0001&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;   0.015 it does not converge.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
  &lt;br /&gt;
γ = ( &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt; /T )0.5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; I think you meant to the power of 0.5 here, but it is typed as multiply as 0.5. Be more careful! Also, if you showed any working out, then I could safely say this was a typo, but since you have not, I cannot justify treating it as to the power of 0.5 &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
•	Nevery = 100 use input values every 100 timesteps&lt;br /&gt;
&lt;br /&gt;
•	Nrepeat = 1000 1000 of times to use input values for calculating averages&lt;br /&gt;
&lt;br /&gt;
•	Nfreq =10000  calculate averages every 10000 timesteps&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How often will values of the temperature, etc., be sampled for the average?     &#039;&#039;&#039;every 10000 timesteps &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How many measurements contribute to the average?   &#039;&#039;&#039;1000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Looking to the following line, how much time will you simulate?   &#039;&#039;&#039;100000 unit time&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001810.jpg|800x488px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;Lower, as ideal gas law ignores any interactions between particles apart from collisions while the L-J system takes the potential energy into account so that results in a lower density.&lt;br /&gt;
discrepancy increase with pressure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001811.jpg|800x420px]]&lt;br /&gt;
&lt;br /&gt;
Supposed to be constant for liquid but the fluctuation was within an acceptable range&lt;br /&gt;
&lt;br /&gt;
====== Scripts: ======&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY THE REQUIRED THERMODYNAMIC STATE ###&lt;br /&gt;
&lt;br /&gt;
variable D equal 0.2&lt;br /&gt;
&lt;br /&gt;
variable T equal 2.0&lt;br /&gt;
&lt;br /&gt;
variable timestep equal 0.0025&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
&lt;br /&gt;
lattice sc ${D}&lt;br /&gt;
&lt;br /&gt;
region box block 0 15 0 15 0 15&lt;br /&gt;
&lt;br /&gt;
create_box 1 box&lt;br /&gt;
&lt;br /&gt;
create_atoms 1 box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE PHYSICAL PROPERTIES OF ATOMS ###&lt;br /&gt;
&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
&lt;br /&gt;
pair_style lj/cut/opt 3.0&lt;br /&gt;
&lt;br /&gt;
pair_coeff 1 1 1.0 1.0&lt;br /&gt;
&lt;br /&gt;
neighbor 2.0 bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; ASSIGN ATOMIC VELOCITIES ###&lt;br /&gt;
&lt;br /&gt;
velocity all create ${T} 12345 dist gaussian rot yes mom yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY ENSEMBLE ###&lt;br /&gt;
&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; THERMODYNAMIC OUTPUT CONTROL ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom time etotal temp press&lt;br /&gt;
&lt;br /&gt;
thermo 10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RECORD TRAJECTORY ###&lt;br /&gt;
&lt;br /&gt;
dump traj all custom 1000 output-1 id x y z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RUN SIMULATION TO MELT CRYSTAL ###&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
unfix nve&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; BRING SYSTEM TO REQUIRED STATE ###&lt;br /&gt;
&lt;br /&gt;
variable tdamp equal ${timestep}*100&lt;br /&gt;
&lt;br /&gt;
variable pdamp equal ${timestep}*1000&lt;br /&gt;
&lt;br /&gt;
fix nvt all nvt temp ${T} ${T} ${tdamp}&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
unfix nvt&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; MEASURE SYSTEM STATE ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom step etotal temp vol density&lt;br /&gt;
&lt;br /&gt;
variable dens equal density&lt;br /&gt;
&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
&lt;br /&gt;
variable volu equal vol&lt;br /&gt;
&lt;br /&gt;
variable ener equal etotal&lt;br /&gt;
&lt;br /&gt;
variable ener2 equal etotal*etotal&lt;br /&gt;
&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_vol v_ener v_ener2 v_press2&lt;br /&gt;
&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
&lt;br /&gt;
variable avevolu equal f_aves[3]&lt;br /&gt;
&lt;br /&gt;
variable heatc equal 3375*3375*(f_aves[5]-f_aves[4]*f_aves[4])/(f_aves[2]*f_aves[2])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Averages&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Density: ${avedens}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Volume: ${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Temperature: ${avetemp}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Cv/V: ${heatc}/${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001812.jpg|800x457px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Liquid and vapour drop constantly due to the evenly distributing simple cubic structure while solid has fluctuation because of the Fcc structure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This does not really make sense, are you saying that the gas and liquid phase form a cubic lattice? - Then they would be the solid phase! We were looking for a discussion of the short range vs. long range order for each of the phases, relating this to the features of the RDF. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In the solid case, illustrate which lattice sites the first three peaks correspond to.&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039; What is the lattice spacing? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lattice spacing around 1.45 reduced unit. &lt;br /&gt;
&lt;br /&gt;
[0.5,0.5,0] corners; [1.0,0,0] centre of face; [1.0,0.5,0] centre of a different face&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Illustration? What are the coordination numbers? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate  in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001813.jpg]]&lt;br /&gt;
[[File:Zyup001814.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Yes diffusion coefficient should be higher for the gas than liquid - this data is not so good. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001815.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The minima give the location of the maximum difference for the liquid and solid system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Because the HO model has a periodic motion while the Lennard Jones solid and liquid move randomly there for there is no pattern in this kind of motion. i.e. the dependence on previous velocity is rather low.&lt;br /&gt;
Attach a copy of your plot to your writeup.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;[[File:Zyup001816.jpg|800x387]]&lt;br /&gt;
[[File:Zyup001817.jpg]]&lt;br /&gt;
[[File:Zyup001818.jpg]]&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696313</id>
		<title>Rep:ZY3915liqsimu</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696313"/>
		<updated>2018-04-19T11:06:34Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* TASK: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; fff &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Third year simulation experiment =&lt;br /&gt;
&lt;br /&gt;
=== Liquid simulation and the diffusion coefficient ===&lt;br /&gt;
Zhuohao You&lt;br /&gt;
&lt;br /&gt;
==== Abstract ====&lt;br /&gt;
Diffusion behaviour of water was modeled and investigated by molecular dynamic simulation with the assistant of high performance computing power. The connection of diffusion coefficient to the mean square displacement was exploited to calculated the diffusion coefficient base on the performed MSD for liquid, solid and vapour. A further experiment on diffusion coefficient of solid was carried to exam its relationship with temperature.&amp;lt;span style=color:red&amp;gt; The abstract of a scientific paper is meant to briefly convey what you have done and your main results and conclusions, perhaps with a very short motivation. While you have briefly touched upon what you have done, your abstract lacks specifics. What exactly were your main results and conclusions? Also spelling and grammar! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
With the development of high performance computing system, the accuracy of molecular dynamic simulation (MSD) &amp;lt;span style=color:red&amp;gt; molecular dynamics is usually represented by the acronym &amp;quot;MD&amp;quot;, &amp;quot;MDS&amp;quot; for molecular dynamics simulation(s) would be acceptable if specified. However &amp;quot;MSD&amp;quot; has the letters in the wrong order, and is a bit confusing given that MSD is also common for &amp;quot;mean squared displacement&amp;quot; &amp;lt;/span&amp;gt; was brought to a new level &amp;lt;span style=color:red&amp;gt; Arguably, yes. However, you have performed relatively small simulations using cheap and cheerful LJ potentials, so perhaps this comment is not very relevant to what you have done. &amp;lt;/span&amp;gt;.  MSD is a useful tool that gives rise to calculation of macroscopic properties from microscopic scale systems. By considering the interaction for a single particle with a limited amount of nearby particles, &#039;exact&#039; prediction of thermo and physical properties are possible depending in the scale of calculation. &amp;lt;span style=color:red&amp;gt; This point is arguable, since there a lot of technical subtleties, certainly an elaboration would be necessary after making such a bold claim with the use of &amp;quot;exact&amp;quot;. &amp;lt;/span&amp;gt;[1]   &lt;br /&gt;
&lt;br /&gt;
Using the college&#039;s high performance computing facilities &amp;lt;span style=color:red&amp;gt; simply &amp;quot;the college&#039;s&amp;quot; is not an adequate accreditation of the hpc resources you have used. &amp;lt;/span&amp;gt;, simulation of simple liquid &amp;lt;span style=color:red&amp;gt; what about the other phases you have simulated? &amp;lt;/span&amp;gt;was performed and an important property of diffusion coefficient was computed from the simulation with a method manipulating its relationship with the mean squared displacement of ensemble particles.      &lt;br /&gt;
&lt;br /&gt;
==== Aims and Objectives ====&lt;br /&gt;
In this experiment, simulation using Lennard-Jones potential was applied on a simple liquid system. (e.g. Argon) &amp;lt;span style=color:red&amp;gt; why single out argon? have you used LJ parameters for argon? &amp;lt;/span&amp;gt;And investigation of the diffusion coefficient property of the system in liquid, solid and vapour phase was carried to give comparisons between the three states. Furtherly, a variation in temperature for the solid state was investigated to exploit the relationship between temperate and diffusion coefficient.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
The input script was base on the given npt file with 8000 atoms and the molecular dynamic was calculated by the velocity Verlet algorithm with based on Lennard-Jones potential. All the simulation was completed on the college HPC system with the parallel computational pacakge LAMMPS. The diffusion coefficient was computed by the given method:&lt;br /&gt;
The easiest way to measure &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; is by exploiting its connection to the [http://en.wikipedia.org/wiki/Mean_squared_displacement mean squared displacement].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This is not sufficient information for another scientist to reproduce your results. What LJ parameters have you used, what cutoff? You mention the NPT ensemble, what pressure and temperature? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results and discussion ====&lt;br /&gt;
The mean squared displacement (MSD),  effectively measures how much the particles deviate from their equilibrium positions &amp;lt;span style=color:red&amp;gt; a more clear explanation would be valuable here &amp;lt;/span&amp;gt; . The value of MSD represents the extent of random motion in the system, and it can be calculated with the equation:&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001803.jpg]]&lt;br /&gt;
&lt;br /&gt;
In this experiment, calculation of MSD was all completed by HPC and was given in the results. &lt;br /&gt;
&lt;br /&gt;
[[File:Zyup0018701.jpg]] [[File:Zyup001802.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; No x axis label for the second graph. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As shown in two graphs, the simulation for liquid, solid and vapour gives the evolution of mean squared displacement over ti,me for both cases. (8000 atoms and a million atoms respectively) The first thing to see on the graphs was the abnormal position for liquid state and gas state in the first figure, as the liquid phase gave a larger MSD as time goes, which on the other hand, for the second figure did have the gas curve laying above the liquid curve. &lt;br /&gt;
&lt;br /&gt;
In a realistic sense, as the MSD measured the random of particles, the displacement for liquid molecules should be much smaller than the vapour counterpart, since the gas particles was supposed to be about 10 times more distant than liquid molecules in the space.  &lt;br /&gt;
&lt;br /&gt;
Therefore, it turn out that the simulation for vapour phase with this MSD method was inaccurate, or a much longer period of time was required for the system to reach the equilibrium. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;As mentioned above, the diffusion coefficient was calculated by the relationship:    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt; so one sixth of the gradient of the MSD graph was the diffusion coeffient:&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000171 cm2/s; D(sol)= 1.92x10-6 cm2/s; D(vap)= 0.000106 cm2/s  (8000atoms)&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000177cm2/s;  D(sol)= 0;                          D(vap)= 0.00627cm2/s      (a million atoms)&lt;br /&gt;
&lt;br /&gt;
The result was quite close to each other apart from the vapour case, and the data confirmed that for the 8000 atoms system, an equilibrium was not reach therefore the inaccuracy was due to a lack of simulation steps as the gradient was only valid in the diffusion region of the graph (i.e. the linear part). In the case of solid the diffusion coefficient was to low to be calculated.&lt;br /&gt;
&lt;br /&gt;
===== Extension =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; why have you included an extension in the middle of your results section? &amp;lt;/span&amp;gt;&lt;br /&gt;
As the simulation for solid was quite stable in the last section, further interest of examine the temperate-diffusion coefficient connection was developed from the literature[2]. Five additional simulation with different temperature for the solid system was carried to investigate if the MDS simulation could give a similar trend. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!T (reduced temperature)&lt;br /&gt;
!Diffusion coefficient cm2/s&lt;br /&gt;
|-&lt;br /&gt;
|0.6&lt;br /&gt;
|7.48E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.7&lt;br /&gt;
|7.85E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.8&lt;br /&gt;
|1.26E-06&lt;br /&gt;
|-&lt;br /&gt;
|0.9&lt;br /&gt;
|1.47E-06&lt;br /&gt;
|-&lt;br /&gt;
|1.0&lt;br /&gt;
|2.5E-06&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;The results of simulation was given in the table, and a clear trend of D increasing with temperature was illustrated.&lt;br /&gt;
[[File:Zyup001805.jpg]][[File:Zyup001804.jpg]]&lt;br /&gt;
&lt;br /&gt;
In general, the simulation gave the same relationship with the literature graph &amp;lt;span style=color:red&amp;gt; citation? &amp;lt;/span&amp;gt;, though the fluctuation in the computed curve was greater due to the weakness in size and timesteps. This was saying the error in the simulation can be averaged out with large scale simulation andFurther investigate of this relation could be carried with a greater size (e.g. a million atoms) and more steps to provide more reliable data for the different states.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
The MD simulation provides a powerful and relatively reliable tool for investigation of the simple systems as shown in the experiment, this provides an alternative method to gather thermo and physical data from Lab experiment. To ensure the accuracy of the simulated data,  a large size of model to mimic the interaction and long time of random motion to reach equillibrium was required.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; These are some very vague conclusions. The conclusion of a scientific paper is meant to summarise the main results and conclusions, and perhaps offer a brief outlook. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Reference hav =====&lt;br /&gt;
# Computational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes, Norbert Attig, Kurt Binder, Helmut Grubmuller ¨ , Kurt Kremer (Eds.), John von Neumann Institute for Computing, Julich, ¨ NIC Series, Vol. 23, ISBN 3-00-012641-4, pp. 1-28, 2004.&lt;br /&gt;
#Molecular and condition parameters dependent diffusion coefficient of water in poly(vinyl alcohol): a molecular dynamics simulation study,Colloid and Polymer Science, 2017, 295(5),859-868&lt;br /&gt;
&lt;br /&gt;
= TASK: =&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time , &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by  (the values of , , and  are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00181.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00182.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00183.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Error= C*t*sin( ωt + φ )     C is a constant that equals approx. 0.000417 in the case of timestep=0.1  ω=1.00 and φ=1.00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Timesteps below 0.63s would be valid in this case &amp;lt;span style=color:red&amp;gt; way too large &amp;lt;/span&amp;gt;. Ideally the total energy is conserved in a closed system, so it is better to monitor the total energy of a system to ensure the simulation was not collapsed in terms of a strong fluctuation in total energy.&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00184.jpg|800x263px]]&lt;br /&gt;
[[File:Zyup00185.jpg|714x300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; force is +ve, r_eq is 2^(1/6)*sigma. Numerical answers stated to way too many decimal places. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions.  55.5*N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/1000= 3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Estimate the volume of 10000 water molecules under standard conditions. 10000/3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;=2.99*10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00186.jpg|800x156px]]&lt;br /&gt;
[[File:Zyup00187.jpg|1000x200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Atom positions not after PBC not correct. Well depth off by factor of 1000, temperature not correct. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In case of two atoms generated on top of each other，the force between them will be very large and therefore leads to unwanted large acceleration to the system, cause a sudden blow up&#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of 0.8. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
1/(1.07722)3 = 0.800&lt;br /&gt;
4 atoms in one lattice, so 4/a3 = 1.2, a = 1.49380, side length is 1.49380.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;    4000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0              for every atom in type 1 mass = 1.0 (reduced unit)&lt;br /&gt;
pair_style lj/cut 3.0   cutoff Lennard-Jones potential with no Coulomb at 3.0 potential with no Coulomb at 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0  for all the pairs coefficient 1.0 1.0 was applied&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
velocity Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ask the demonstrator if you need help.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows easy variation of timesteps without worrying about forgetting to change the relevant steps to run. As the change in steps will be made by the codes as soon as the value of timesteps was changed. Instantaneous change of two related value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). &#039;&#039;&#039;[[File:Zyup00188.jpg|800x426px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Does the simulation reach equilibrium?   &#039;&#039;&#039;Yes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How long does this take?  &#039;&#039;&#039;0.3 reduced time&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00189.jpg|800x446px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results?     &#039;&#039;&#039;0.0025 &lt;br /&gt;
&lt;br /&gt;
Fluctuating in the region that covers the most accurate value from 0.0001&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;   0.015 it does not converge.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
  &lt;br /&gt;
γ = ( &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt; /T )0.5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; I think you meant to the power of 0.5 here, but it is typed as multiply as 0.5. Be more careful! Also, if you showed any working out, then I could safely say this was a typo, but since you have not, I cannot justify treating it as to the power of 0.5 &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
•	Nevery = 100 use input values every 100 timesteps&lt;br /&gt;
&lt;br /&gt;
•	Nrepeat = 1000 1000 of times to use input values for calculating averages&lt;br /&gt;
&lt;br /&gt;
•	Nfreq =10000  calculate averages every 10000 timesteps&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How often will values of the temperature, etc., be sampled for the average?     &#039;&#039;&#039;every 10000 timesteps &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How many measurements contribute to the average?   &#039;&#039;&#039;1000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Looking to the following line, how much time will you simulate?   &#039;&#039;&#039;100000 unit time&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001810.jpg|800x488px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;Lower, as ideal gas law ignores any interactions between particles apart from collisions while the L-J system takes the potential energy into account so that results in a lower density.&lt;br /&gt;
discrepancy increase with pressure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001811.jpg|800x420px]]&lt;br /&gt;
&lt;br /&gt;
Supposed to be constant for liquid but the fluctuation was within an acceptable range&lt;br /&gt;
&lt;br /&gt;
====== Scripts: ======&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY THE REQUIRED THERMODYNAMIC STATE ###&lt;br /&gt;
&lt;br /&gt;
variable D equal 0.2&lt;br /&gt;
&lt;br /&gt;
variable T equal 2.0&lt;br /&gt;
&lt;br /&gt;
variable timestep equal 0.0025&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
&lt;br /&gt;
lattice sc ${D}&lt;br /&gt;
&lt;br /&gt;
region box block 0 15 0 15 0 15&lt;br /&gt;
&lt;br /&gt;
create_box 1 box&lt;br /&gt;
&lt;br /&gt;
create_atoms 1 box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE PHYSICAL PROPERTIES OF ATOMS ###&lt;br /&gt;
&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
&lt;br /&gt;
pair_style lj/cut/opt 3.0&lt;br /&gt;
&lt;br /&gt;
pair_coeff 1 1 1.0 1.0&lt;br /&gt;
&lt;br /&gt;
neighbor 2.0 bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; ASSIGN ATOMIC VELOCITIES ###&lt;br /&gt;
&lt;br /&gt;
velocity all create ${T} 12345 dist gaussian rot yes mom yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY ENSEMBLE ###&lt;br /&gt;
&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; THERMODYNAMIC OUTPUT CONTROL ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom time etotal temp press&lt;br /&gt;
&lt;br /&gt;
thermo 10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RECORD TRAJECTORY ###&lt;br /&gt;
&lt;br /&gt;
dump traj all custom 1000 output-1 id x y z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RUN SIMULATION TO MELT CRYSTAL ###&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
unfix nve&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; BRING SYSTEM TO REQUIRED STATE ###&lt;br /&gt;
&lt;br /&gt;
variable tdamp equal ${timestep}*100&lt;br /&gt;
&lt;br /&gt;
variable pdamp equal ${timestep}*1000&lt;br /&gt;
&lt;br /&gt;
fix nvt all nvt temp ${T} ${T} ${tdamp}&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
unfix nvt&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; MEASURE SYSTEM STATE ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom step etotal temp vol density&lt;br /&gt;
&lt;br /&gt;
variable dens equal density&lt;br /&gt;
&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
&lt;br /&gt;
variable volu equal vol&lt;br /&gt;
&lt;br /&gt;
variable ener equal etotal&lt;br /&gt;
&lt;br /&gt;
variable ener2 equal etotal*etotal&lt;br /&gt;
&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_vol v_ener v_ener2 v_press2&lt;br /&gt;
&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
&lt;br /&gt;
variable avevolu equal f_aves[3]&lt;br /&gt;
&lt;br /&gt;
variable heatc equal 3375*3375*(f_aves[5]-f_aves[4]*f_aves[4])/(f_aves[2]*f_aves[2])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Averages&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Density: ${avedens}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Volume: ${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Temperature: ${avetemp}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Cv/V: ${heatc}/${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001812.jpg|800x457px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Liquid and vapour drop constantly due to the evenly distributing simple cubic structure while solid has fluctuation because of the Fcc structure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This does not really make sense, are you saying that the gas and liquid phase form a cubic lattice? - Then they would be the solid phase! We were looking for a discussion of the short range vs. long range order for each of the phases, relating this to the features of the RDF. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In the solid case, illustrate which lattice sites the first three peaks correspond to.&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039; What is the lattice spacing? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lattice spacing around 1.45 reduced unit. &lt;br /&gt;
&lt;br /&gt;
[0.5,0.5,0] corners; [1.0,0,0] centre of face; [1.0,0.5,0] centre of a different face&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Illustration? What are the coordination numbers? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate  in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001813.jpg]]&lt;br /&gt;
[[File:Zyup001814.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001815.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The minima give the location of the maximum difference for the liquid and solid system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Because the HO model has a periodic motion while the Lennard Jones solid and liquid move randomly there for there is no pattern in this kind of motion. i.e. the dependence on previous velocity is rather low.&lt;br /&gt;
Attach a copy of your plot to your writeup.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;[[File:Zyup001816.jpg|800x387]]&lt;br /&gt;
[[File:Zyup001817.jpg]]&lt;br /&gt;
[[File:Zyup001818.jpg]]&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696312</id>
		<title>Rep:ZY3915liqsimu</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696312"/>
		<updated>2018-04-19T11:03:46Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* TASK: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; fff &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Third year simulation experiment =&lt;br /&gt;
&lt;br /&gt;
=== Liquid simulation and the diffusion coefficient ===&lt;br /&gt;
Zhuohao You&lt;br /&gt;
&lt;br /&gt;
==== Abstract ====&lt;br /&gt;
Diffusion behaviour of water was modeled and investigated by molecular dynamic simulation with the assistant of high performance computing power. The connection of diffusion coefficient to the mean square displacement was exploited to calculated the diffusion coefficient base on the performed MSD for liquid, solid and vapour. A further experiment on diffusion coefficient of solid was carried to exam its relationship with temperature.&amp;lt;span style=color:red&amp;gt; The abstract of a scientific paper is meant to briefly convey what you have done and your main results and conclusions, perhaps with a very short motivation. While you have briefly touched upon what you have done, your abstract lacks specifics. What exactly were your main results and conclusions? Also spelling and grammar! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
With the development of high performance computing system, the accuracy of molecular dynamic simulation (MSD) &amp;lt;span style=color:red&amp;gt; molecular dynamics is usually represented by the acronym &amp;quot;MD&amp;quot;, &amp;quot;MDS&amp;quot; for molecular dynamics simulation(s) would be acceptable if specified. However &amp;quot;MSD&amp;quot; has the letters in the wrong order, and is a bit confusing given that MSD is also common for &amp;quot;mean squared displacement&amp;quot; &amp;lt;/span&amp;gt; was brought to a new level &amp;lt;span style=color:red&amp;gt; Arguably, yes. However, you have performed relatively small simulations using cheap and cheerful LJ potentials, so perhaps this comment is not very relevant to what you have done. &amp;lt;/span&amp;gt;.  MSD is a useful tool that gives rise to calculation of macroscopic properties from microscopic scale systems. By considering the interaction for a single particle with a limited amount of nearby particles, &#039;exact&#039; prediction of thermo and physical properties are possible depending in the scale of calculation. &amp;lt;span style=color:red&amp;gt; This point is arguable, since there a lot of technical subtleties, certainly an elaboration would be necessary after making such a bold claim with the use of &amp;quot;exact&amp;quot;. &amp;lt;/span&amp;gt;[1]   &lt;br /&gt;
&lt;br /&gt;
Using the college&#039;s high performance computing facilities &amp;lt;span style=color:red&amp;gt; simply &amp;quot;the college&#039;s&amp;quot; is not an adequate accreditation of the hpc resources you have used. &amp;lt;/span&amp;gt;, simulation of simple liquid &amp;lt;span style=color:red&amp;gt; what about the other phases you have simulated? &amp;lt;/span&amp;gt;was performed and an important property of diffusion coefficient was computed from the simulation with a method manipulating its relationship with the mean squared displacement of ensemble particles.      &lt;br /&gt;
&lt;br /&gt;
==== Aims and Objectives ====&lt;br /&gt;
In this experiment, simulation using Lennard-Jones potential was applied on a simple liquid system. (e.g. Argon) &amp;lt;span style=color:red&amp;gt; why single out argon? have you used LJ parameters for argon? &amp;lt;/span&amp;gt;And investigation of the diffusion coefficient property of the system in liquid, solid and vapour phase was carried to give comparisons between the three states. Furtherly, a variation in temperature for the solid state was investigated to exploit the relationship between temperate and diffusion coefficient.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
The input script was base on the given npt file with 8000 atoms and the molecular dynamic was calculated by the velocity Verlet algorithm with based on Lennard-Jones potential. All the simulation was completed on the college HPC system with the parallel computational pacakge LAMMPS. The diffusion coefficient was computed by the given method:&lt;br /&gt;
The easiest way to measure &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; is by exploiting its connection to the [http://en.wikipedia.org/wiki/Mean_squared_displacement mean squared displacement].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This is not sufficient information for another scientist to reproduce your results. What LJ parameters have you used, what cutoff? You mention the NPT ensemble, what pressure and temperature? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results and discussion ====&lt;br /&gt;
The mean squared displacement (MSD),  effectively measures how much the particles deviate from their equilibrium positions &amp;lt;span style=color:red&amp;gt; a more clear explanation would be valuable here &amp;lt;/span&amp;gt; . The value of MSD represents the extent of random motion in the system, and it can be calculated with the equation:&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001803.jpg]]&lt;br /&gt;
&lt;br /&gt;
In this experiment, calculation of MSD was all completed by HPC and was given in the results. &lt;br /&gt;
&lt;br /&gt;
[[File:Zyup0018701.jpg]] [[File:Zyup001802.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; No x axis label for the second graph. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As shown in two graphs, the simulation for liquid, solid and vapour gives the evolution of mean squared displacement over ti,me for both cases. (8000 atoms and a million atoms respectively) The first thing to see on the graphs was the abnormal position for liquid state and gas state in the first figure, as the liquid phase gave a larger MSD as time goes, which on the other hand, for the second figure did have the gas curve laying above the liquid curve. &lt;br /&gt;
&lt;br /&gt;
In a realistic sense, as the MSD measured the random of particles, the displacement for liquid molecules should be much smaller than the vapour counterpart, since the gas particles was supposed to be about 10 times more distant than liquid molecules in the space.  &lt;br /&gt;
&lt;br /&gt;
Therefore, it turn out that the simulation for vapour phase with this MSD method was inaccurate, or a much longer period of time was required for the system to reach the equilibrium. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;As mentioned above, the diffusion coefficient was calculated by the relationship:    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt; so one sixth of the gradient of the MSD graph was the diffusion coeffient:&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000171 cm2/s; D(sol)= 1.92x10-6 cm2/s; D(vap)= 0.000106 cm2/s  (8000atoms)&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000177cm2/s;  D(sol)= 0;                          D(vap)= 0.00627cm2/s      (a million atoms)&lt;br /&gt;
&lt;br /&gt;
The result was quite close to each other apart from the vapour case, and the data confirmed that for the 8000 atoms system, an equilibrium was not reach therefore the inaccuracy was due to a lack of simulation steps as the gradient was only valid in the diffusion region of the graph (i.e. the linear part). In the case of solid the diffusion coefficient was to low to be calculated.&lt;br /&gt;
&lt;br /&gt;
===== Extension =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; why have you included an extension in the middle of your results section? &amp;lt;/span&amp;gt;&lt;br /&gt;
As the simulation for solid was quite stable in the last section, further interest of examine the temperate-diffusion coefficient connection was developed from the literature[2]. Five additional simulation with different temperature for the solid system was carried to investigate if the MDS simulation could give a similar trend. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!T (reduced temperature)&lt;br /&gt;
!Diffusion coefficient cm2/s&lt;br /&gt;
|-&lt;br /&gt;
|0.6&lt;br /&gt;
|7.48E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.7&lt;br /&gt;
|7.85E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.8&lt;br /&gt;
|1.26E-06&lt;br /&gt;
|-&lt;br /&gt;
|0.9&lt;br /&gt;
|1.47E-06&lt;br /&gt;
|-&lt;br /&gt;
|1.0&lt;br /&gt;
|2.5E-06&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;The results of simulation was given in the table, and a clear trend of D increasing with temperature was illustrated.&lt;br /&gt;
[[File:Zyup001805.jpg]][[File:Zyup001804.jpg]]&lt;br /&gt;
&lt;br /&gt;
In general, the simulation gave the same relationship with the literature graph &amp;lt;span style=color:red&amp;gt; citation? &amp;lt;/span&amp;gt;, though the fluctuation in the computed curve was greater due to the weakness in size and timesteps. This was saying the error in the simulation can be averaged out with large scale simulation andFurther investigate of this relation could be carried with a greater size (e.g. a million atoms) and more steps to provide more reliable data for the different states.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
The MD simulation provides a powerful and relatively reliable tool for investigation of the simple systems as shown in the experiment, this provides an alternative method to gather thermo and physical data from Lab experiment. To ensure the accuracy of the simulated data,  a large size of model to mimic the interaction and long time of random motion to reach equillibrium was required.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; These are some very vague conclusions. The conclusion of a scientific paper is meant to summarise the main results and conclusions, and perhaps offer a brief outlook. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Reference hav =====&lt;br /&gt;
# Computational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes, Norbert Attig, Kurt Binder, Helmut Grubmuller ¨ , Kurt Kremer (Eds.), John von Neumann Institute for Computing, Julich, ¨ NIC Series, Vol. 23, ISBN 3-00-012641-4, pp. 1-28, 2004.&lt;br /&gt;
#Molecular and condition parameters dependent diffusion coefficient of water in poly(vinyl alcohol): a molecular dynamics simulation study,Colloid and Polymer Science, 2017, 295(5),859-868&lt;br /&gt;
&lt;br /&gt;
= TASK: =&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time , &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by  (the values of , , and  are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00181.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00182.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00183.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Error= C*t*sin( ωt + φ )     C is a constant that equals approx. 0.000417 in the case of timestep=0.1  ω=1.00 and φ=1.00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Timesteps below 0.63s would be valid in this case &amp;lt;span style=color:red&amp;gt; way too large &amp;lt;/span&amp;gt;. Ideally the total energy is conserved in a closed system, so it is better to monitor the total energy of a system to ensure the simulation was not collapsed in terms of a strong fluctuation in total energy.&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00184.jpg|800x263px]]&lt;br /&gt;
[[File:Zyup00185.jpg|714x300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; force is +ve, r_eq is 2^(1/6)*sigma. Numerical answers stated to way too many decimal places. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions.  55.5*N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/1000= 3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Estimate the volume of 10000 water molecules under standard conditions. 10000/3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;=2.99*10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00186.jpg|800x156px]]&lt;br /&gt;
[[File:Zyup00187.jpg|1000x200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Atom positions not after PBC not correct. Well depth off by factor of 1000, temperature not correct. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In case of two atoms generated on top of each other，the force between them will be very large and therefore leads to unwanted large acceleration to the system, cause a sudden blow up&#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of 0.8. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
1/(1.07722)3 = 0.800&lt;br /&gt;
4 atoms in one lattice, so 4/a3 = 1.2, a = 1.49380, side length is 1.49380.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;    4000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0              for every atom in type 1 mass = 1.0 (reduced unit)&lt;br /&gt;
pair_style lj/cut 3.0   cutoff Lennard-Jones potential with no Coulomb at 3.0 potential with no Coulomb at 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0  for all the pairs coefficient 1.0 1.0 was applied&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
velocity Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ask the demonstrator if you need help.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows easy variation of timesteps without worrying about forgetting to change the relevant steps to run. As the change in steps will be made by the codes as soon as the value of timesteps was changed. Instantaneous change of two related value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). &#039;&#039;&#039;[[File:Zyup00188.jpg|800x426px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Does the simulation reach equilibrium?   &#039;&#039;&#039;Yes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How long does this take?  &#039;&#039;&#039;0.3 reduced time&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00189.jpg|800x446px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results?     &#039;&#039;&#039;0.0025 &lt;br /&gt;
&lt;br /&gt;
Fluctuating in the region that covers the most accurate value from 0.0001&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;   0.015 it does not converge.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
  &lt;br /&gt;
γ = ( &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt; /T )0.5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; I think you meant to the power of 0.5 here, but it is typed as multiply as 0.5. Be more careful! Also, if you showed any working out, then I could safely say this was a typo, but since you have not, I cannot justify treating it as to the power of 0.5 &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
•	Nevery = 100 use input values every 100 timesteps&lt;br /&gt;
&lt;br /&gt;
•	Nrepeat = 1000 1000 of times to use input values for calculating averages&lt;br /&gt;
&lt;br /&gt;
•	Nfreq =10000  calculate averages every 10000 timesteps&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How often will values of the temperature, etc., be sampled for the average?     &#039;&#039;&#039;every 10000 timesteps &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How many measurements contribute to the average?   &#039;&#039;&#039;1000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Looking to the following line, how much time will you simulate?   &#039;&#039;&#039;100000 unit time&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001810.jpg|800x488px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;Lower, as ideal gas law ignores any interactions between particles apart from collisions while the L-J system takes the potential energy into account so that results in a lower density.&lt;br /&gt;
discrepancy increase with pressure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001811.jpg|800x420px]]&lt;br /&gt;
&lt;br /&gt;
Supposed to be constant for liquid but the fluctuation was within an acceptable range&lt;br /&gt;
&lt;br /&gt;
====== Scripts: ======&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY THE REQUIRED THERMODYNAMIC STATE ###&lt;br /&gt;
&lt;br /&gt;
variable D equal 0.2&lt;br /&gt;
&lt;br /&gt;
variable T equal 2.0&lt;br /&gt;
&lt;br /&gt;
variable timestep equal 0.0025&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
&lt;br /&gt;
lattice sc ${D}&lt;br /&gt;
&lt;br /&gt;
region box block 0 15 0 15 0 15&lt;br /&gt;
&lt;br /&gt;
create_box 1 box&lt;br /&gt;
&lt;br /&gt;
create_atoms 1 box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE PHYSICAL PROPERTIES OF ATOMS ###&lt;br /&gt;
&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
&lt;br /&gt;
pair_style lj/cut/opt 3.0&lt;br /&gt;
&lt;br /&gt;
pair_coeff 1 1 1.0 1.0&lt;br /&gt;
&lt;br /&gt;
neighbor 2.0 bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; ASSIGN ATOMIC VELOCITIES ###&lt;br /&gt;
&lt;br /&gt;
velocity all create ${T} 12345 dist gaussian rot yes mom yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY ENSEMBLE ###&lt;br /&gt;
&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; THERMODYNAMIC OUTPUT CONTROL ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom time etotal temp press&lt;br /&gt;
&lt;br /&gt;
thermo 10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RECORD TRAJECTORY ###&lt;br /&gt;
&lt;br /&gt;
dump traj all custom 1000 output-1 id x y z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RUN SIMULATION TO MELT CRYSTAL ###&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
unfix nve&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; BRING SYSTEM TO REQUIRED STATE ###&lt;br /&gt;
&lt;br /&gt;
variable tdamp equal ${timestep}*100&lt;br /&gt;
&lt;br /&gt;
variable pdamp equal ${timestep}*1000&lt;br /&gt;
&lt;br /&gt;
fix nvt all nvt temp ${T} ${T} ${tdamp}&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
unfix nvt&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; MEASURE SYSTEM STATE ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom step etotal temp vol density&lt;br /&gt;
&lt;br /&gt;
variable dens equal density&lt;br /&gt;
&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
&lt;br /&gt;
variable volu equal vol&lt;br /&gt;
&lt;br /&gt;
variable ener equal etotal&lt;br /&gt;
&lt;br /&gt;
variable ener2 equal etotal*etotal&lt;br /&gt;
&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_vol v_ener v_ener2 v_press2&lt;br /&gt;
&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
&lt;br /&gt;
variable avevolu equal f_aves[3]&lt;br /&gt;
&lt;br /&gt;
variable heatc equal 3375*3375*(f_aves[5]-f_aves[4]*f_aves[4])/(f_aves[2]*f_aves[2])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Averages&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Density: ${avedens}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Volume: ${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Temperature: ${avetemp}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Cv/V: ${heatc}/${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001812.jpg|800x457px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Liquid and vapour drop constantly due to the evenly distributing simple cubic structure while solid has fluctuation because of the Fcc structure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This does not really make sense, are you saying that the gas and liquid phase form a cubic lattice? - Then they would be the solid phase! We were looking for a discussion of the short range vs. long range order for each of the phases, relating this to the features of the RDF. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In the solid case, illustrate which lattice sites the first three peaks correspond to.&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039; What is the lattice spacing? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lattice spacing around 1.45 reduced unit. &lt;br /&gt;
&lt;br /&gt;
[0.5,0.5,0] corners; [1.0,0,0] centre of face; [1.0,0.5,0] centre of a different face&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate  in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001813.jpg]]&lt;br /&gt;
[[File:Zyup001814.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001815.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The minima give the location of the maximum difference for the liquid and solid system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Because the HO model has a periodic motion while the Lennard Jones solid and liquid move randomly there for there is no pattern in this kind of motion. i.e. the dependence on previous velocity is rather low.&lt;br /&gt;
Attach a copy of your plot to your writeup.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;[[File:Zyup001816.jpg|800x387]]&lt;br /&gt;
[[File:Zyup001817.jpg]]&lt;br /&gt;
[[File:Zyup001818.jpg]]&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696311</id>
		<title>Rep:ZY3915liqsimu</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696311"/>
		<updated>2018-04-19T11:00:30Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* TASK: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; fff &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Third year simulation experiment =&lt;br /&gt;
&lt;br /&gt;
=== Liquid simulation and the diffusion coefficient ===&lt;br /&gt;
Zhuohao You&lt;br /&gt;
&lt;br /&gt;
==== Abstract ====&lt;br /&gt;
Diffusion behaviour of water was modeled and investigated by molecular dynamic simulation with the assistant of high performance computing power. The connection of diffusion coefficient to the mean square displacement was exploited to calculated the diffusion coefficient base on the performed MSD for liquid, solid and vapour. A further experiment on diffusion coefficient of solid was carried to exam its relationship with temperature.&amp;lt;span style=color:red&amp;gt; The abstract of a scientific paper is meant to briefly convey what you have done and your main results and conclusions, perhaps with a very short motivation. While you have briefly touched upon what you have done, your abstract lacks specifics. What exactly were your main results and conclusions? Also spelling and grammar! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
With the development of high performance computing system, the accuracy of molecular dynamic simulation (MSD) &amp;lt;span style=color:red&amp;gt; molecular dynamics is usually represented by the acronym &amp;quot;MD&amp;quot;, &amp;quot;MDS&amp;quot; for molecular dynamics simulation(s) would be acceptable if specified. However &amp;quot;MSD&amp;quot; has the letters in the wrong order, and is a bit confusing given that MSD is also common for &amp;quot;mean squared displacement&amp;quot; &amp;lt;/span&amp;gt; was brought to a new level &amp;lt;span style=color:red&amp;gt; Arguably, yes. However, you have performed relatively small simulations using cheap and cheerful LJ potentials, so perhaps this comment is not very relevant to what you have done. &amp;lt;/span&amp;gt;.  MSD is a useful tool that gives rise to calculation of macroscopic properties from microscopic scale systems. By considering the interaction for a single particle with a limited amount of nearby particles, &#039;exact&#039; prediction of thermo and physical properties are possible depending in the scale of calculation. &amp;lt;span style=color:red&amp;gt; This point is arguable, since there a lot of technical subtleties, certainly an elaboration would be necessary after making such a bold claim with the use of &amp;quot;exact&amp;quot;. &amp;lt;/span&amp;gt;[1]   &lt;br /&gt;
&lt;br /&gt;
Using the college&#039;s high performance computing facilities &amp;lt;span style=color:red&amp;gt; simply &amp;quot;the college&#039;s&amp;quot; is not an adequate accreditation of the hpc resources you have used. &amp;lt;/span&amp;gt;, simulation of simple liquid &amp;lt;span style=color:red&amp;gt; what about the other phases you have simulated? &amp;lt;/span&amp;gt;was performed and an important property of diffusion coefficient was computed from the simulation with a method manipulating its relationship with the mean squared displacement of ensemble particles.      &lt;br /&gt;
&lt;br /&gt;
==== Aims and Objectives ====&lt;br /&gt;
In this experiment, simulation using Lennard-Jones potential was applied on a simple liquid system. (e.g. Argon) &amp;lt;span style=color:red&amp;gt; why single out argon? have you used LJ parameters for argon? &amp;lt;/span&amp;gt;And investigation of the diffusion coefficient property of the system in liquid, solid and vapour phase was carried to give comparisons between the three states. Furtherly, a variation in temperature for the solid state was investigated to exploit the relationship between temperate and diffusion coefficient.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
The input script was base on the given npt file with 8000 atoms and the molecular dynamic was calculated by the velocity Verlet algorithm with based on Lennard-Jones potential. All the simulation was completed on the college HPC system with the parallel computational pacakge LAMMPS. The diffusion coefficient was computed by the given method:&lt;br /&gt;
The easiest way to measure &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; is by exploiting its connection to the [http://en.wikipedia.org/wiki/Mean_squared_displacement mean squared displacement].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This is not sufficient information for another scientist to reproduce your results. What LJ parameters have you used, what cutoff? You mention the NPT ensemble, what pressure and temperature? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results and discussion ====&lt;br /&gt;
The mean squared displacement (MSD),  effectively measures how much the particles deviate from their equilibrium positions &amp;lt;span style=color:red&amp;gt; a more clear explanation would be valuable here &amp;lt;/span&amp;gt; . The value of MSD represents the extent of random motion in the system, and it can be calculated with the equation:&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001803.jpg]]&lt;br /&gt;
&lt;br /&gt;
In this experiment, calculation of MSD was all completed by HPC and was given in the results. &lt;br /&gt;
&lt;br /&gt;
[[File:Zyup0018701.jpg]] [[File:Zyup001802.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; No x axis label for the second graph. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As shown in two graphs, the simulation for liquid, solid and vapour gives the evolution of mean squared displacement over ti,me for both cases. (8000 atoms and a million atoms respectively) The first thing to see on the graphs was the abnormal position for liquid state and gas state in the first figure, as the liquid phase gave a larger MSD as time goes, which on the other hand, for the second figure did have the gas curve laying above the liquid curve. &lt;br /&gt;
&lt;br /&gt;
In a realistic sense, as the MSD measured the random of particles, the displacement for liquid molecules should be much smaller than the vapour counterpart, since the gas particles was supposed to be about 10 times more distant than liquid molecules in the space.  &lt;br /&gt;
&lt;br /&gt;
Therefore, it turn out that the simulation for vapour phase with this MSD method was inaccurate, or a much longer period of time was required for the system to reach the equilibrium. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;As mentioned above, the diffusion coefficient was calculated by the relationship:    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt; so one sixth of the gradient of the MSD graph was the diffusion coeffient:&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000171 cm2/s; D(sol)= 1.92x10-6 cm2/s; D(vap)= 0.000106 cm2/s  (8000atoms)&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000177cm2/s;  D(sol)= 0;                          D(vap)= 0.00627cm2/s      (a million atoms)&lt;br /&gt;
&lt;br /&gt;
The result was quite close to each other apart from the vapour case, and the data confirmed that for the 8000 atoms system, an equilibrium was not reach therefore the inaccuracy was due to a lack of simulation steps as the gradient was only valid in the diffusion region of the graph (i.e. the linear part). In the case of solid the diffusion coefficient was to low to be calculated.&lt;br /&gt;
&lt;br /&gt;
===== Extension =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; why have you included an extension in the middle of your results section? &amp;lt;/span&amp;gt;&lt;br /&gt;
As the simulation for solid was quite stable in the last section, further interest of examine the temperate-diffusion coefficient connection was developed from the literature[2]. Five additional simulation with different temperature for the solid system was carried to investigate if the MDS simulation could give a similar trend. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!T (reduced temperature)&lt;br /&gt;
!Diffusion coefficient cm2/s&lt;br /&gt;
|-&lt;br /&gt;
|0.6&lt;br /&gt;
|7.48E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.7&lt;br /&gt;
|7.85E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.8&lt;br /&gt;
|1.26E-06&lt;br /&gt;
|-&lt;br /&gt;
|0.9&lt;br /&gt;
|1.47E-06&lt;br /&gt;
|-&lt;br /&gt;
|1.0&lt;br /&gt;
|2.5E-06&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;The results of simulation was given in the table, and a clear trend of D increasing with temperature was illustrated.&lt;br /&gt;
[[File:Zyup001805.jpg]][[File:Zyup001804.jpg]]&lt;br /&gt;
&lt;br /&gt;
In general, the simulation gave the same relationship with the literature graph &amp;lt;span style=color:red&amp;gt; citation? &amp;lt;/span&amp;gt;, though the fluctuation in the computed curve was greater due to the weakness in size and timesteps. This was saying the error in the simulation can be averaged out with large scale simulation andFurther investigate of this relation could be carried with a greater size (e.g. a million atoms) and more steps to provide more reliable data for the different states.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
The MD simulation provides a powerful and relatively reliable tool for investigation of the simple systems as shown in the experiment, this provides an alternative method to gather thermo and physical data from Lab experiment. To ensure the accuracy of the simulated data,  a large size of model to mimic the interaction and long time of random motion to reach equillibrium was required.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; These are some very vague conclusions. The conclusion of a scientific paper is meant to summarise the main results and conclusions, and perhaps offer a brief outlook. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Reference hav =====&lt;br /&gt;
# Computational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes, Norbert Attig, Kurt Binder, Helmut Grubmuller ¨ , Kurt Kremer (Eds.), John von Neumann Institute for Computing, Julich, ¨ NIC Series, Vol. 23, ISBN 3-00-012641-4, pp. 1-28, 2004.&lt;br /&gt;
#Molecular and condition parameters dependent diffusion coefficient of water in poly(vinyl alcohol): a molecular dynamics simulation study,Colloid and Polymer Science, 2017, 295(5),859-868&lt;br /&gt;
&lt;br /&gt;
= TASK: =&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time , &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by  (the values of , , and  are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00181.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00182.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00183.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Error= C*t*sin( ωt + φ )     C is a constant that equals approx. 0.000417 in the case of timestep=0.1  ω=1.00 and φ=1.00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Timesteps below 0.63s would be valid in this case &amp;lt;span style=color:red&amp;gt; way too large &amp;lt;/span&amp;gt;. Ideally the total energy is conserved in a closed system, so it is better to monitor the total energy of a system to ensure the simulation was not collapsed in terms of a strong fluctuation in total energy.&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00184.jpg|800x263px]]&lt;br /&gt;
[[File:Zyup00185.jpg|714x300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; force is +ve, r_eq is 2^(1/6)*sigma. Numerical answers stated to way too many decimal places. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions.  55.5*N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/1000= 3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Estimate the volume of 10000 water molecules under standard conditions. 10000/3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;=2.99*10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00186.jpg|800x156px]]&lt;br /&gt;
[[File:Zyup00187.jpg|1000x200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Atom positions not after PBC not correct. Well depth off by factor of 1000, temperature not correct. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In case of two atoms generated on top of each other，the force between them will be very large and therefore leads to unwanted large acceleration to the system, cause a sudden blow up&#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of 0.8. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
1/(1.07722)3 = 0.800&lt;br /&gt;
4 atoms in one lattice, so 4/a3 = 1.2, a = 1.49380, side length is 1.49380.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;    4000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0              for every atom in type 1 mass = 1.0 (reduced unit)&lt;br /&gt;
pair_style lj/cut 3.0   cutoff Lennard-Jones potential with no Coulomb at 3.0 potential with no Coulomb at 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0  for all the pairs coefficient 1.0 1.0 was applied&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
velocity Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ask the demonstrator if you need help.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows easy variation of timesteps without worrying about forgetting to change the relevant steps to run. As the change in steps will be made by the codes as soon as the value of timesteps was changed. Instantaneous change of two related value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). &#039;&#039;&#039;[[File:Zyup00188.jpg|800x426px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Does the simulation reach equilibrium?   &#039;&#039;&#039;Yes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How long does this take?  &#039;&#039;&#039;0.3 reduced time&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00189.jpg|800x446px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results?     &#039;&#039;&#039;0.0025 &lt;br /&gt;
&lt;br /&gt;
Fluctuating in the region that covers the most accurate value from 0.0001&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;   0.015 it does not converge.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
  &lt;br /&gt;
γ = ( &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt; /T )0.5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; I think you meant to the power of 0.5 here, but it is typed as multiply as 0.5. Be more careful! Also, if you showed any working out, then I could safely say this was a typo, but since you have not, I cannot justify treating it as to the power of 0.5 &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
•	Nevery = 100 use input values every 100 timesteps&lt;br /&gt;
&lt;br /&gt;
•	Nrepeat = 1000 1000 of times to use input values for calculating averages&lt;br /&gt;
&lt;br /&gt;
•	Nfreq =10000  calculate averages every 10000 timesteps&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How often will values of the temperature, etc., be sampled for the average?     &#039;&#039;&#039;every 10000 timesteps &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How many measurements contribute to the average?   &#039;&#039;&#039;1000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Looking to the following line, how much time will you simulate?   &#039;&#039;&#039;100000 unit time&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001810.jpg|800x488px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;Lower, as ideal gas law ignores any interactions between particles apart from collisions while the L-J system takes the potential energy into account so that results in a lower density.&lt;br /&gt;
discrepancy increase with pressure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001811.jpg|800x420px]]&lt;br /&gt;
&lt;br /&gt;
Supposed to be constant for liquid but the fluctuation was within an acceptable range&lt;br /&gt;
&lt;br /&gt;
====== Scripts: ======&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY THE REQUIRED THERMODYNAMIC STATE ###&lt;br /&gt;
&lt;br /&gt;
variable D equal 0.2&lt;br /&gt;
&lt;br /&gt;
variable T equal 2.0&lt;br /&gt;
&lt;br /&gt;
variable timestep equal 0.0025&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
&lt;br /&gt;
lattice sc ${D}&lt;br /&gt;
&lt;br /&gt;
region box block 0 15 0 15 0 15&lt;br /&gt;
&lt;br /&gt;
create_box 1 box&lt;br /&gt;
&lt;br /&gt;
create_atoms 1 box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE PHYSICAL PROPERTIES OF ATOMS ###&lt;br /&gt;
&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
&lt;br /&gt;
pair_style lj/cut/opt 3.0&lt;br /&gt;
&lt;br /&gt;
pair_coeff 1 1 1.0 1.0&lt;br /&gt;
&lt;br /&gt;
neighbor 2.0 bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; ASSIGN ATOMIC VELOCITIES ###&lt;br /&gt;
&lt;br /&gt;
velocity all create ${T} 12345 dist gaussian rot yes mom yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY ENSEMBLE ###&lt;br /&gt;
&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; THERMODYNAMIC OUTPUT CONTROL ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom time etotal temp press&lt;br /&gt;
&lt;br /&gt;
thermo 10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RECORD TRAJECTORY ###&lt;br /&gt;
&lt;br /&gt;
dump traj all custom 1000 output-1 id x y z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RUN SIMULATION TO MELT CRYSTAL ###&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
unfix nve&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; BRING SYSTEM TO REQUIRED STATE ###&lt;br /&gt;
&lt;br /&gt;
variable tdamp equal ${timestep}*100&lt;br /&gt;
&lt;br /&gt;
variable pdamp equal ${timestep}*1000&lt;br /&gt;
&lt;br /&gt;
fix nvt all nvt temp ${T} ${T} ${tdamp}&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
unfix nvt&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; MEASURE SYSTEM STATE ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom step etotal temp vol density&lt;br /&gt;
&lt;br /&gt;
variable dens equal density&lt;br /&gt;
&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
&lt;br /&gt;
variable volu equal vol&lt;br /&gt;
&lt;br /&gt;
variable ener equal etotal&lt;br /&gt;
&lt;br /&gt;
variable ener2 equal etotal*etotal&lt;br /&gt;
&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_vol v_ener v_ener2 v_press2&lt;br /&gt;
&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
&lt;br /&gt;
variable avevolu equal f_aves[3]&lt;br /&gt;
&lt;br /&gt;
variable heatc equal 3375*3375*(f_aves[5]-f_aves[4]*f_aves[4])/(f_aves[2]*f_aves[2])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Averages&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Density: ${avedens}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Volume: ${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Temperature: ${avetemp}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Cv/V: ${heatc}/${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001812.jpg|800x457px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Liquid and vapour drop constantly due to the evenly distributing simple cubic structure while solid has fluctuation because of the Fcc structure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In the solid case, illustrate which lattice sites the first three peaks correspond to.&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039; What is the lattice spacing? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lattice spacing around 1.45 reduced unit. &lt;br /&gt;
&lt;br /&gt;
[0.5,0.5,0] corners; [1.0,0,0] centre of face; [1.0,0.5,0] centre of a different face&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate  in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001813.jpg]]&lt;br /&gt;
[[File:Zyup001814.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001815.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The minima give the location of the maximum difference for the liquid and solid system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Because the HO model has a periodic motion while the Lennard Jones solid and liquid move randomly there for there is no pattern in this kind of motion. i.e. the dependence on previous velocity is rather low.&lt;br /&gt;
Attach a copy of your plot to your writeup.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;[[File:Zyup001816.jpg|800x387]]&lt;br /&gt;
[[File:Zyup001817.jpg]]&lt;br /&gt;
[[File:Zyup001818.jpg]]&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696310</id>
		<title>Rep:ZY3915liqsimu</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696310"/>
		<updated>2018-04-19T10:59:03Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* TASK: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; fff &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Third year simulation experiment =&lt;br /&gt;
&lt;br /&gt;
=== Liquid simulation and the diffusion coefficient ===&lt;br /&gt;
Zhuohao You&lt;br /&gt;
&lt;br /&gt;
==== Abstract ====&lt;br /&gt;
Diffusion behaviour of water was modeled and investigated by molecular dynamic simulation with the assistant of high performance computing power. The connection of diffusion coefficient to the mean square displacement was exploited to calculated the diffusion coefficient base on the performed MSD for liquid, solid and vapour. A further experiment on diffusion coefficient of solid was carried to exam its relationship with temperature.&amp;lt;span style=color:red&amp;gt; The abstract of a scientific paper is meant to briefly convey what you have done and your main results and conclusions, perhaps with a very short motivation. While you have briefly touched upon what you have done, your abstract lacks specifics. What exactly were your main results and conclusions? Also spelling and grammar! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
With the development of high performance computing system, the accuracy of molecular dynamic simulation (MSD) &amp;lt;span style=color:red&amp;gt; molecular dynamics is usually represented by the acronym &amp;quot;MD&amp;quot;, &amp;quot;MDS&amp;quot; for molecular dynamics simulation(s) would be acceptable if specified. However &amp;quot;MSD&amp;quot; has the letters in the wrong order, and is a bit confusing given that MSD is also common for &amp;quot;mean squared displacement&amp;quot; &amp;lt;/span&amp;gt; was brought to a new level &amp;lt;span style=color:red&amp;gt; Arguably, yes. However, you have performed relatively small simulations using cheap and cheerful LJ potentials, so perhaps this comment is not very relevant to what you have done. &amp;lt;/span&amp;gt;.  MSD is a useful tool that gives rise to calculation of macroscopic properties from microscopic scale systems. By considering the interaction for a single particle with a limited amount of nearby particles, &#039;exact&#039; prediction of thermo and physical properties are possible depending in the scale of calculation. &amp;lt;span style=color:red&amp;gt; This point is arguable, since there a lot of technical subtleties, certainly an elaboration would be necessary after making such a bold claim with the use of &amp;quot;exact&amp;quot;. &amp;lt;/span&amp;gt;[1]   &lt;br /&gt;
&lt;br /&gt;
Using the college&#039;s high performance computing facilities &amp;lt;span style=color:red&amp;gt; simply &amp;quot;the college&#039;s&amp;quot; is not an adequate accreditation of the hpc resources you have used. &amp;lt;/span&amp;gt;, simulation of simple liquid &amp;lt;span style=color:red&amp;gt; what about the other phases you have simulated? &amp;lt;/span&amp;gt;was performed and an important property of diffusion coefficient was computed from the simulation with a method manipulating its relationship with the mean squared displacement of ensemble particles.      &lt;br /&gt;
&lt;br /&gt;
==== Aims and Objectives ====&lt;br /&gt;
In this experiment, simulation using Lennard-Jones potential was applied on a simple liquid system. (e.g. Argon) &amp;lt;span style=color:red&amp;gt; why single out argon? have you used LJ parameters for argon? &amp;lt;/span&amp;gt;And investigation of the diffusion coefficient property of the system in liquid, solid and vapour phase was carried to give comparisons between the three states. Furtherly, a variation in temperature for the solid state was investigated to exploit the relationship between temperate and diffusion coefficient.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
The input script was base on the given npt file with 8000 atoms and the molecular dynamic was calculated by the velocity Verlet algorithm with based on Lennard-Jones potential. All the simulation was completed on the college HPC system with the parallel computational pacakge LAMMPS. The diffusion coefficient was computed by the given method:&lt;br /&gt;
The easiest way to measure &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; is by exploiting its connection to the [http://en.wikipedia.org/wiki/Mean_squared_displacement mean squared displacement].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This is not sufficient information for another scientist to reproduce your results. What LJ parameters have you used, what cutoff? You mention the NPT ensemble, what pressure and temperature? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results and discussion ====&lt;br /&gt;
The mean squared displacement (MSD),  effectively measures how much the particles deviate from their equilibrium positions &amp;lt;span style=color:red&amp;gt; a more clear explanation would be valuable here &amp;lt;/span&amp;gt; . The value of MSD represents the extent of random motion in the system, and it can be calculated with the equation:&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001803.jpg]]&lt;br /&gt;
&lt;br /&gt;
In this experiment, calculation of MSD was all completed by HPC and was given in the results. &lt;br /&gt;
&lt;br /&gt;
[[File:Zyup0018701.jpg]] [[File:Zyup001802.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; No x axis label for the second graph. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As shown in two graphs, the simulation for liquid, solid and vapour gives the evolution of mean squared displacement over ti,me for both cases. (8000 atoms and a million atoms respectively) The first thing to see on the graphs was the abnormal position for liquid state and gas state in the first figure, as the liquid phase gave a larger MSD as time goes, which on the other hand, for the second figure did have the gas curve laying above the liquid curve. &lt;br /&gt;
&lt;br /&gt;
In a realistic sense, as the MSD measured the random of particles, the displacement for liquid molecules should be much smaller than the vapour counterpart, since the gas particles was supposed to be about 10 times more distant than liquid molecules in the space.  &lt;br /&gt;
&lt;br /&gt;
Therefore, it turn out that the simulation for vapour phase with this MSD method was inaccurate, or a much longer period of time was required for the system to reach the equilibrium. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;As mentioned above, the diffusion coefficient was calculated by the relationship:    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt; so one sixth of the gradient of the MSD graph was the diffusion coeffient:&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000171 cm2/s; D(sol)= 1.92x10-6 cm2/s; D(vap)= 0.000106 cm2/s  (8000atoms)&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000177cm2/s;  D(sol)= 0;                          D(vap)= 0.00627cm2/s      (a million atoms)&lt;br /&gt;
&lt;br /&gt;
The result was quite close to each other apart from the vapour case, and the data confirmed that for the 8000 atoms system, an equilibrium was not reach therefore the inaccuracy was due to a lack of simulation steps as the gradient was only valid in the diffusion region of the graph (i.e. the linear part). In the case of solid the diffusion coefficient was to low to be calculated.&lt;br /&gt;
&lt;br /&gt;
===== Extension =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; why have you included an extension in the middle of your results section? &amp;lt;/span&amp;gt;&lt;br /&gt;
As the simulation for solid was quite stable in the last section, further interest of examine the temperate-diffusion coefficient connection was developed from the literature[2]. Five additional simulation with different temperature for the solid system was carried to investigate if the MDS simulation could give a similar trend. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!T (reduced temperature)&lt;br /&gt;
!Diffusion coefficient cm2/s&lt;br /&gt;
|-&lt;br /&gt;
|0.6&lt;br /&gt;
|7.48E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.7&lt;br /&gt;
|7.85E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.8&lt;br /&gt;
|1.26E-06&lt;br /&gt;
|-&lt;br /&gt;
|0.9&lt;br /&gt;
|1.47E-06&lt;br /&gt;
|-&lt;br /&gt;
|1.0&lt;br /&gt;
|2.5E-06&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;The results of simulation was given in the table, and a clear trend of D increasing with temperature was illustrated.&lt;br /&gt;
[[File:Zyup001805.jpg]][[File:Zyup001804.jpg]]&lt;br /&gt;
&lt;br /&gt;
In general, the simulation gave the same relationship with the literature graph &amp;lt;span style=color:red&amp;gt; citation? &amp;lt;/span&amp;gt;, though the fluctuation in the computed curve was greater due to the weakness in size and timesteps. This was saying the error in the simulation can be averaged out with large scale simulation andFurther investigate of this relation could be carried with a greater size (e.g. a million atoms) and more steps to provide more reliable data for the different states.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
The MD simulation provides a powerful and relatively reliable tool for investigation of the simple systems as shown in the experiment, this provides an alternative method to gather thermo and physical data from Lab experiment. To ensure the accuracy of the simulated data,  a large size of model to mimic the interaction and long time of random motion to reach equillibrium was required.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; These are some very vague conclusions. The conclusion of a scientific paper is meant to summarise the main results and conclusions, and perhaps offer a brief outlook. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Reference hav =====&lt;br /&gt;
# Computational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes, Norbert Attig, Kurt Binder, Helmut Grubmuller ¨ , Kurt Kremer (Eds.), John von Neumann Institute for Computing, Julich, ¨ NIC Series, Vol. 23, ISBN 3-00-012641-4, pp. 1-28, 2004.&lt;br /&gt;
#Molecular and condition parameters dependent diffusion coefficient of water in poly(vinyl alcohol): a molecular dynamics simulation study,Colloid and Polymer Science, 2017, 295(5),859-868&lt;br /&gt;
&lt;br /&gt;
= TASK: =&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time , &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by  (the values of , , and  are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00181.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00182.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00183.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Error= C*t*sin( ωt + φ )     C is a constant that equals approx. 0.000417 in the case of timestep=0.1  ω=1.00 and φ=1.00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Timesteps below 0.63s would be valid in this case &amp;lt;span style=color:red&amp;gt; way too large &amp;lt;/span&amp;gt;. Ideally the total energy is conserved in a closed system, so it is better to monitor the total energy of a system to ensure the simulation was not collapsed in terms of a strong fluctuation in total energy.&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00184.jpg|800x263px]]&lt;br /&gt;
[[File:Zyup00185.jpg|714x300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; force is +ve, r_eq is 2^(1/6)*sigma. Numerical answers stated to way too many decimal places. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions.  55.5*N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/1000= 3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Estimate the volume of 10000 water molecules under standard conditions. 10000/3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;=2.99*10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00186.jpg|800x156px]]&lt;br /&gt;
[[File:Zyup00187.jpg|1000x200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Atom positions not after PBC not correct. Well depth off by factor of 1000, temperature not correct. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In case of two atoms generated on top of each other，the force between them will be very large and therefore leads to unwanted large acceleration to the system, cause a sudden blow up&#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of 0.8. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
1/(1.07722)3 = 0.800&lt;br /&gt;
4 atoms in one lattice, so 4/a3 = 1.2, a = 1.49380, side length is 1.49380.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;    4000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0              for every atom in type 1 mass = 1.0 (reduced unit)&lt;br /&gt;
pair_style lj/cut 3.0   cutoff Lennard-Jones potential with no Coulomb at 3.0 potential with no Coulomb at 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0  for all the pairs coefficient 1.0 1.0 was applied&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
velocity Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ask the demonstrator if you need help.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows easy variation of timesteps without worrying about forgetting to change the relevant steps to run. As the change in steps will be made by the codes as soon as the value of timesteps was changed. Instantaneous change of two related value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). &#039;&#039;&#039;[[File:Zyup00188.jpg|800x426px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Does the simulation reach equilibrium?   &#039;&#039;&#039;Yes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How long does this take?  &#039;&#039;&#039;0.3 reduced time&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00189.jpg|800x446px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results?     &#039;&#039;&#039;0.0025 &lt;br /&gt;
&lt;br /&gt;
Fluctuating in the region that covers the most accurate value from 0.0001&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;   0.015 it does not converge.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
  &lt;br /&gt;
γ = ( &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt; /T )0.5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; I know you meant to the power of 0.5 here, but it is typed as multiply as 0.5. Be more careful! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
•	Nevery = 100 use input values every 100 timesteps&lt;br /&gt;
&lt;br /&gt;
•	Nrepeat = 1000 1000 of times to use input values for calculating averages&lt;br /&gt;
&lt;br /&gt;
•	Nfreq =10000  calculate averages every 10000 timesteps&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How often will values of the temperature, etc., be sampled for the average?     &#039;&#039;&#039;every 10000 timesteps &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How many measurements contribute to the average?   &#039;&#039;&#039;1000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Looking to the following line, how much time will you simulate?   &#039;&#039;&#039;100000 unit time&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001810.jpg|800x488px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;Lower, as ideal gas law ignores any interactions between particles apart from collisions while the L-J system takes the potential energy into account so that results in a lower density.&lt;br /&gt;
discrepancy increase with pressure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001811.jpg|800x420px]]&lt;br /&gt;
&lt;br /&gt;
Supposed to be constant for liquid but the fluctuation was within an acceptable range&lt;br /&gt;
&lt;br /&gt;
====== Scripts: ======&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY THE REQUIRED THERMODYNAMIC STATE ###&lt;br /&gt;
&lt;br /&gt;
variable D equal 0.2&lt;br /&gt;
&lt;br /&gt;
variable T equal 2.0&lt;br /&gt;
&lt;br /&gt;
variable timestep equal 0.0025&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
&lt;br /&gt;
lattice sc ${D}&lt;br /&gt;
&lt;br /&gt;
region box block 0 15 0 15 0 15&lt;br /&gt;
&lt;br /&gt;
create_box 1 box&lt;br /&gt;
&lt;br /&gt;
create_atoms 1 box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE PHYSICAL PROPERTIES OF ATOMS ###&lt;br /&gt;
&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
&lt;br /&gt;
pair_style lj/cut/opt 3.0&lt;br /&gt;
&lt;br /&gt;
pair_coeff 1 1 1.0 1.0&lt;br /&gt;
&lt;br /&gt;
neighbor 2.0 bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; ASSIGN ATOMIC VELOCITIES ###&lt;br /&gt;
&lt;br /&gt;
velocity all create ${T} 12345 dist gaussian rot yes mom yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY ENSEMBLE ###&lt;br /&gt;
&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; THERMODYNAMIC OUTPUT CONTROL ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom time etotal temp press&lt;br /&gt;
&lt;br /&gt;
thermo 10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RECORD TRAJECTORY ###&lt;br /&gt;
&lt;br /&gt;
dump traj all custom 1000 output-1 id x y z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RUN SIMULATION TO MELT CRYSTAL ###&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
unfix nve&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; BRING SYSTEM TO REQUIRED STATE ###&lt;br /&gt;
&lt;br /&gt;
variable tdamp equal ${timestep}*100&lt;br /&gt;
&lt;br /&gt;
variable pdamp equal ${timestep}*1000&lt;br /&gt;
&lt;br /&gt;
fix nvt all nvt temp ${T} ${T} ${tdamp}&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
unfix nvt&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; MEASURE SYSTEM STATE ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom step etotal temp vol density&lt;br /&gt;
&lt;br /&gt;
variable dens equal density&lt;br /&gt;
&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
&lt;br /&gt;
variable volu equal vol&lt;br /&gt;
&lt;br /&gt;
variable ener equal etotal&lt;br /&gt;
&lt;br /&gt;
variable ener2 equal etotal*etotal&lt;br /&gt;
&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_vol v_ener v_ener2 v_press2&lt;br /&gt;
&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
&lt;br /&gt;
variable avevolu equal f_aves[3]&lt;br /&gt;
&lt;br /&gt;
variable heatc equal 3375*3375*(f_aves[5]-f_aves[4]*f_aves[4])/(f_aves[2]*f_aves[2])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Averages&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Density: ${avedens}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Volume: ${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Temperature: ${avetemp}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Cv/V: ${heatc}/${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001812.jpg|800x457px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Liquid and vapour drop constantly due to the evenly distributing simple cubic structure while solid has fluctuation because of the Fcc structure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In the solid case, illustrate which lattice sites the first three peaks correspond to.&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039; What is the lattice spacing? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lattice spacing around 1.45 reduced unit. &lt;br /&gt;
&lt;br /&gt;
[0.5,0.5,0] corners; [1.0,0,0] centre of face; [1.0,0.5,0] centre of a different face&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate  in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001813.jpg]]&lt;br /&gt;
[[File:Zyup001814.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001815.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The minima give the location of the maximum difference for the liquid and solid system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Because the HO model has a periodic motion while the Lennard Jones solid and liquid move randomly there for there is no pattern in this kind of motion. i.e. the dependence on previous velocity is rather low.&lt;br /&gt;
Attach a copy of your plot to your writeup.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;[[File:Zyup001816.jpg|800x387]]&lt;br /&gt;
[[File:Zyup001817.jpg]]&lt;br /&gt;
[[File:Zyup001818.jpg]]&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696309</id>
		<title>Rep:ZY3915liqsimu</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696309"/>
		<updated>2018-04-18T16:07:48Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* TASK: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; fff &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Third year simulation experiment =&lt;br /&gt;
&lt;br /&gt;
=== Liquid simulation and the diffusion coefficient ===&lt;br /&gt;
Zhuohao You&lt;br /&gt;
&lt;br /&gt;
==== Abstract ====&lt;br /&gt;
Diffusion behaviour of water was modeled and investigated by molecular dynamic simulation with the assistant of high performance computing power. The connection of diffusion coefficient to the mean square displacement was exploited to calculated the diffusion coefficient base on the performed MSD for liquid, solid and vapour. A further experiment on diffusion coefficient of solid was carried to exam its relationship with temperature.&amp;lt;span style=color:red&amp;gt; The abstract of a scientific paper is meant to briefly convey what you have done and your main results and conclusions, perhaps with a very short motivation. While you have briefly touched upon what you have done, your abstract lacks specifics. What exactly were your main results and conclusions? Also spelling and grammar! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
With the development of high performance computing system, the accuracy of molecular dynamic simulation (MSD) &amp;lt;span style=color:red&amp;gt; molecular dynamics is usually represented by the acronym &amp;quot;MD&amp;quot;, &amp;quot;MDS&amp;quot; for molecular dynamics simulation(s) would be acceptable if specified. However &amp;quot;MSD&amp;quot; has the letters in the wrong order, and is a bit confusing given that MSD is also common for &amp;quot;mean squared displacement&amp;quot; &amp;lt;/span&amp;gt; was brought to a new level &amp;lt;span style=color:red&amp;gt; Arguably, yes. However, you have performed relatively small simulations using cheap and cheerful LJ potentials, so perhaps this comment is not very relevant to what you have done. &amp;lt;/span&amp;gt;.  MSD is a useful tool that gives rise to calculation of macroscopic properties from microscopic scale systems. By considering the interaction for a single particle with a limited amount of nearby particles, &#039;exact&#039; prediction of thermo and physical properties are possible depending in the scale of calculation. &amp;lt;span style=color:red&amp;gt; This point is arguable, since there a lot of technical subtleties, certainly an elaboration would be necessary after making such a bold claim with the use of &amp;quot;exact&amp;quot;. &amp;lt;/span&amp;gt;[1]   &lt;br /&gt;
&lt;br /&gt;
Using the college&#039;s high performance computing facilities &amp;lt;span style=color:red&amp;gt; simply &amp;quot;the college&#039;s&amp;quot; is not an adequate accreditation of the hpc resources you have used. &amp;lt;/span&amp;gt;, simulation of simple liquid &amp;lt;span style=color:red&amp;gt; what about the other phases you have simulated? &amp;lt;/span&amp;gt;was performed and an important property of diffusion coefficient was computed from the simulation with a method manipulating its relationship with the mean squared displacement of ensemble particles.      &lt;br /&gt;
&lt;br /&gt;
==== Aims and Objectives ====&lt;br /&gt;
In this experiment, simulation using Lennard-Jones potential was applied on a simple liquid system. (e.g. Argon) &amp;lt;span style=color:red&amp;gt; why single out argon? have you used LJ parameters for argon? &amp;lt;/span&amp;gt;And investigation of the diffusion coefficient property of the system in liquid, solid and vapour phase was carried to give comparisons between the three states. Furtherly, a variation in temperature for the solid state was investigated to exploit the relationship between temperate and diffusion coefficient.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
The input script was base on the given npt file with 8000 atoms and the molecular dynamic was calculated by the velocity Verlet algorithm with based on Lennard-Jones potential. All the simulation was completed on the college HPC system with the parallel computational pacakge LAMMPS. The diffusion coefficient was computed by the given method:&lt;br /&gt;
The easiest way to measure &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; is by exploiting its connection to the [http://en.wikipedia.org/wiki/Mean_squared_displacement mean squared displacement].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This is not sufficient information for another scientist to reproduce your results. What LJ parameters have you used, what cutoff? You mention the NPT ensemble, what pressure and temperature? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results and discussion ====&lt;br /&gt;
The mean squared displacement (MSD),  effectively measures how much the particles deviate from their equilibrium positions &amp;lt;span style=color:red&amp;gt; a more clear explanation would be valuable here &amp;lt;/span&amp;gt; . The value of MSD represents the extent of random motion in the system, and it can be calculated with the equation:&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001803.jpg]]&lt;br /&gt;
&lt;br /&gt;
In this experiment, calculation of MSD was all completed by HPC and was given in the results. &lt;br /&gt;
&lt;br /&gt;
[[File:Zyup0018701.jpg]] [[File:Zyup001802.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; No x axis label for the second graph. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As shown in two graphs, the simulation for liquid, solid and vapour gives the evolution of mean squared displacement over ti,me for both cases. (8000 atoms and a million atoms respectively) The first thing to see on the graphs was the abnormal position for liquid state and gas state in the first figure, as the liquid phase gave a larger MSD as time goes, which on the other hand, for the second figure did have the gas curve laying above the liquid curve. &lt;br /&gt;
&lt;br /&gt;
In a realistic sense, as the MSD measured the random of particles, the displacement for liquid molecules should be much smaller than the vapour counterpart, since the gas particles was supposed to be about 10 times more distant than liquid molecules in the space.  &lt;br /&gt;
&lt;br /&gt;
Therefore, it turn out that the simulation for vapour phase with this MSD method was inaccurate, or a much longer period of time was required for the system to reach the equilibrium. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;As mentioned above, the diffusion coefficient was calculated by the relationship:    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt; so one sixth of the gradient of the MSD graph was the diffusion coeffient:&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000171 cm2/s; D(sol)= 1.92x10-6 cm2/s; D(vap)= 0.000106 cm2/s  (8000atoms)&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000177cm2/s;  D(sol)= 0;                          D(vap)= 0.00627cm2/s      (a million atoms)&lt;br /&gt;
&lt;br /&gt;
The result was quite close to each other apart from the vapour case, and the data confirmed that for the 8000 atoms system, an equilibrium was not reach therefore the inaccuracy was due to a lack of simulation steps as the gradient was only valid in the diffusion region of the graph (i.e. the linear part). In the case of solid the diffusion coefficient was to low to be calculated.&lt;br /&gt;
&lt;br /&gt;
===== Extension =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; why have you included an extension in the middle of your results section? &amp;lt;/span&amp;gt;&lt;br /&gt;
As the simulation for solid was quite stable in the last section, further interest of examine the temperate-diffusion coefficient connection was developed from the literature[2]. Five additional simulation with different temperature for the solid system was carried to investigate if the MDS simulation could give a similar trend. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!T (reduced temperature)&lt;br /&gt;
!Diffusion coefficient cm2/s&lt;br /&gt;
|-&lt;br /&gt;
|0.6&lt;br /&gt;
|7.48E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.7&lt;br /&gt;
|7.85E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.8&lt;br /&gt;
|1.26E-06&lt;br /&gt;
|-&lt;br /&gt;
|0.9&lt;br /&gt;
|1.47E-06&lt;br /&gt;
|-&lt;br /&gt;
|1.0&lt;br /&gt;
|2.5E-06&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;The results of simulation was given in the table, and a clear trend of D increasing with temperature was illustrated.&lt;br /&gt;
[[File:Zyup001805.jpg]][[File:Zyup001804.jpg]]&lt;br /&gt;
&lt;br /&gt;
In general, the simulation gave the same relationship with the literature graph &amp;lt;span style=color:red&amp;gt; citation? &amp;lt;/span&amp;gt;, though the fluctuation in the computed curve was greater due to the weakness in size and timesteps. This was saying the error in the simulation can be averaged out with large scale simulation andFurther investigate of this relation could be carried with a greater size (e.g. a million atoms) and more steps to provide more reliable data for the different states.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
The MD simulation provides a powerful and relatively reliable tool for investigation of the simple systems as shown in the experiment, this provides an alternative method to gather thermo and physical data from Lab experiment. To ensure the accuracy of the simulated data,  a large size of model to mimic the interaction and long time of random motion to reach equillibrium was required.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; These are some very vague conclusions. The conclusion of a scientific paper is meant to summarise the main results and conclusions, and perhaps offer a brief outlook. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Reference hav =====&lt;br /&gt;
# Computational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes, Norbert Attig, Kurt Binder, Helmut Grubmuller ¨ , Kurt Kremer (Eds.), John von Neumann Institute for Computing, Julich, ¨ NIC Series, Vol. 23, ISBN 3-00-012641-4, pp. 1-28, 2004.&lt;br /&gt;
#Molecular and condition parameters dependent diffusion coefficient of water in poly(vinyl alcohol): a molecular dynamics simulation study,Colloid and Polymer Science, 2017, 295(5),859-868&lt;br /&gt;
&lt;br /&gt;
= TASK: =&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time , &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by  (the values of , , and  are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00181.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00182.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00183.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Error= C*t*sin( ωt + φ )     C is a constant that equals approx. 0.000417 in the case of timestep=0.1  ω=1.00 and φ=1.00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Timesteps below 0.63s would be valid in this case &amp;lt;span style=color:red&amp;gt; way too large &amp;lt;/span&amp;gt;. Ideally the total energy is conserved in a closed system, so it is better to monitor the total energy of a system to ensure the simulation was not collapsed in terms of a strong fluctuation in total energy.&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00184.jpg|800x263px]]&lt;br /&gt;
[[File:Zyup00185.jpg|714x300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; force is +ve, r_eq is 2^(1/6)*sigma. Numerical answers stated to way too many decimal places. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions.  55.5*N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/1000= 3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Estimate the volume of 10000 water molecules under standard conditions. 10000/3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;=2.99*10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00186.jpg|800x156px]]&lt;br /&gt;
[[File:Zyup00187.jpg|1000x200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Atom positions not after PBC not correct. Well depth off by factor of 1000, temperature not correct. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In case of two atoms generated on top of each other，the force between them will be very large and therefore leads to unwanted large acceleration to the system, cause a sudden blow up&#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of 0.8. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
1/(1.07722)3 = 0.800&lt;br /&gt;
4 atoms in one lattice, so 4/a3 = 1.2, a = 1.49380, side length is 1.49380.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;    4000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0              for every atom in type 1 mass = 1.0 (reduced unit)&lt;br /&gt;
pair_style lj/cut 3.0   cutoff Lennard-Jones potential with no Coulomb at 3.0 potential with no Coulomb at 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0  for all the pairs coefficient 1.0 1.0 was applied&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
velocity Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ask the demonstrator if you need help.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows easy variation of timesteps without worrying about forgetting to change the relevant steps to run. As the change in steps will be made by the codes as soon as the value of timesteps was changed. Instantaneous change of two related value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). &#039;&#039;&#039;[[File:Zyup00188.jpg|800x426px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Does the simulation reach equilibrium?   &#039;&#039;&#039;Yes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How long does this take?  &#039;&#039;&#039;0.3 reduced time&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00189.jpg|800x446px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results?     &#039;&#039;&#039;0.0025 &lt;br /&gt;
&lt;br /&gt;
Fluctuating in the region that covers the most accurate value from 0.0001&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;   0.015 it does not converge.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
  &lt;br /&gt;
γ = ( &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt; /T )0.5&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
•	Nevery = 100 use input values every 100 timesteps&lt;br /&gt;
&lt;br /&gt;
•	Nrepeat = 1000 1000 of times to use input values for calculating averages&lt;br /&gt;
&lt;br /&gt;
•	Nfreq =10000  calculate averages every 10000 timesteps&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How often will values of the temperature, etc., be sampled for the average?     &#039;&#039;&#039;every 10000 timesteps &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How many measurements contribute to the average?   &#039;&#039;&#039;1000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Looking to the following line, how much time will you simulate?   &#039;&#039;&#039;100000 unit time&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001810.jpg|800x488px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;Lower, as ideal gas law ignores any interactions between particles apart from collisions while the L-J system takes the potential energy into account so that results in a lower density.&lt;br /&gt;
discrepancy increase with pressure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001811.jpg|800x420px]]&lt;br /&gt;
&lt;br /&gt;
Supposed to be constant for liquid but the fluctuation was within an acceptable range&lt;br /&gt;
&lt;br /&gt;
====== Scripts: ======&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY THE REQUIRED THERMODYNAMIC STATE ###&lt;br /&gt;
&lt;br /&gt;
variable D equal 0.2&lt;br /&gt;
&lt;br /&gt;
variable T equal 2.0&lt;br /&gt;
&lt;br /&gt;
variable timestep equal 0.0025&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
&lt;br /&gt;
lattice sc ${D}&lt;br /&gt;
&lt;br /&gt;
region box block 0 15 0 15 0 15&lt;br /&gt;
&lt;br /&gt;
create_box 1 box&lt;br /&gt;
&lt;br /&gt;
create_atoms 1 box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE PHYSICAL PROPERTIES OF ATOMS ###&lt;br /&gt;
&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
&lt;br /&gt;
pair_style lj/cut/opt 3.0&lt;br /&gt;
&lt;br /&gt;
pair_coeff 1 1 1.0 1.0&lt;br /&gt;
&lt;br /&gt;
neighbor 2.0 bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; ASSIGN ATOMIC VELOCITIES ###&lt;br /&gt;
&lt;br /&gt;
velocity all create ${T} 12345 dist gaussian rot yes mom yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY ENSEMBLE ###&lt;br /&gt;
&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; THERMODYNAMIC OUTPUT CONTROL ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom time etotal temp press&lt;br /&gt;
&lt;br /&gt;
thermo 10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RECORD TRAJECTORY ###&lt;br /&gt;
&lt;br /&gt;
dump traj all custom 1000 output-1 id x y z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RUN SIMULATION TO MELT CRYSTAL ###&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
unfix nve&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; BRING SYSTEM TO REQUIRED STATE ###&lt;br /&gt;
&lt;br /&gt;
variable tdamp equal ${timestep}*100&lt;br /&gt;
&lt;br /&gt;
variable pdamp equal ${timestep}*1000&lt;br /&gt;
&lt;br /&gt;
fix nvt all nvt temp ${T} ${T} ${tdamp}&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
unfix nvt&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; MEASURE SYSTEM STATE ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom step etotal temp vol density&lt;br /&gt;
&lt;br /&gt;
variable dens equal density&lt;br /&gt;
&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
&lt;br /&gt;
variable volu equal vol&lt;br /&gt;
&lt;br /&gt;
variable ener equal etotal&lt;br /&gt;
&lt;br /&gt;
variable ener2 equal etotal*etotal&lt;br /&gt;
&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_vol v_ener v_ener2 v_press2&lt;br /&gt;
&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
&lt;br /&gt;
variable avevolu equal f_aves[3]&lt;br /&gt;
&lt;br /&gt;
variable heatc equal 3375*3375*(f_aves[5]-f_aves[4]*f_aves[4])/(f_aves[2]*f_aves[2])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Averages&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Density: ${avedens}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Volume: ${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Temperature: ${avetemp}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Cv/V: ${heatc}/${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001812.jpg|800x457px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Liquid and vapour drop constantly due to the evenly distributing simple cubic structure while solid has fluctuation because of the Fcc structure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In the solid case, illustrate which lattice sites the first three peaks correspond to.&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039; What is the lattice spacing? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lattice spacing around 1.45 reduced unit. &lt;br /&gt;
&lt;br /&gt;
[0.5,0.5,0] corners; [1.0,0,0] centre of face; [1.0,0.5,0] centre of a different face&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate  in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001813.jpg]]&lt;br /&gt;
[[File:Zyup001814.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001815.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The minima give the location of the maximum difference for the liquid and solid system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Because the HO model has a periodic motion while the Lennard Jones solid and liquid move randomly there for there is no pattern in this kind of motion. i.e. the dependence on previous velocity is rather low.&lt;br /&gt;
Attach a copy of your plot to your writeup.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;[[File:Zyup001816.jpg|800x387]]&lt;br /&gt;
[[File:Zyup001817.jpg]]&lt;br /&gt;
[[File:Zyup001818.jpg]]&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696307</id>
		<title>Rep:ZY3915liqsimu</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696307"/>
		<updated>2018-04-18T16:05:42Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* TASK: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; fff &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Third year simulation experiment =&lt;br /&gt;
&lt;br /&gt;
=== Liquid simulation and the diffusion coefficient ===&lt;br /&gt;
Zhuohao You&lt;br /&gt;
&lt;br /&gt;
==== Abstract ====&lt;br /&gt;
Diffusion behaviour of water was modeled and investigated by molecular dynamic simulation with the assistant of high performance computing power. The connection of diffusion coefficient to the mean square displacement was exploited to calculated the diffusion coefficient base on the performed MSD for liquid, solid and vapour. A further experiment on diffusion coefficient of solid was carried to exam its relationship with temperature.&amp;lt;span style=color:red&amp;gt; The abstract of a scientific paper is meant to briefly convey what you have done and your main results and conclusions, perhaps with a very short motivation. While you have briefly touched upon what you have done, your abstract lacks specifics. What exactly were your main results and conclusions? Also spelling and grammar! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
With the development of high performance computing system, the accuracy of molecular dynamic simulation (MSD) &amp;lt;span style=color:red&amp;gt; molecular dynamics is usually represented by the acronym &amp;quot;MD&amp;quot;, &amp;quot;MDS&amp;quot; for molecular dynamics simulation(s) would be acceptable if specified. However &amp;quot;MSD&amp;quot; has the letters in the wrong order, and is a bit confusing given that MSD is also common for &amp;quot;mean squared displacement&amp;quot; &amp;lt;/span&amp;gt; was brought to a new level &amp;lt;span style=color:red&amp;gt; Arguably, yes. However, you have performed relatively small simulations using cheap and cheerful LJ potentials, so perhaps this comment is not very relevant to what you have done. &amp;lt;/span&amp;gt;.  MSD is a useful tool that gives rise to calculation of macroscopic properties from microscopic scale systems. By considering the interaction for a single particle with a limited amount of nearby particles, &#039;exact&#039; prediction of thermo and physical properties are possible depending in the scale of calculation. &amp;lt;span style=color:red&amp;gt; This point is arguable, since there a lot of technical subtleties, certainly an elaboration would be necessary after making such a bold claim with the use of &amp;quot;exact&amp;quot;. &amp;lt;/span&amp;gt;[1]   &lt;br /&gt;
&lt;br /&gt;
Using the college&#039;s high performance computing facilities &amp;lt;span style=color:red&amp;gt; simply &amp;quot;the college&#039;s&amp;quot; is not an adequate accreditation of the hpc resources you have used. &amp;lt;/span&amp;gt;, simulation of simple liquid &amp;lt;span style=color:red&amp;gt; what about the other phases you have simulated? &amp;lt;/span&amp;gt;was performed and an important property of diffusion coefficient was computed from the simulation with a method manipulating its relationship with the mean squared displacement of ensemble particles.      &lt;br /&gt;
&lt;br /&gt;
==== Aims and Objectives ====&lt;br /&gt;
In this experiment, simulation using Lennard-Jones potential was applied on a simple liquid system. (e.g. Argon) &amp;lt;span style=color:red&amp;gt; why single out argon? have you used LJ parameters for argon? &amp;lt;/span&amp;gt;And investigation of the diffusion coefficient property of the system in liquid, solid and vapour phase was carried to give comparisons between the three states. Furtherly, a variation in temperature for the solid state was investigated to exploit the relationship between temperate and diffusion coefficient.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
The input script was base on the given npt file with 8000 atoms and the molecular dynamic was calculated by the velocity Verlet algorithm with based on Lennard-Jones potential. All the simulation was completed on the college HPC system with the parallel computational pacakge LAMMPS. The diffusion coefficient was computed by the given method:&lt;br /&gt;
The easiest way to measure &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; is by exploiting its connection to the [http://en.wikipedia.org/wiki/Mean_squared_displacement mean squared displacement].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This is not sufficient information for another scientist to reproduce your results. What LJ parameters have you used, what cutoff? You mention the NPT ensemble, what pressure and temperature? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results and discussion ====&lt;br /&gt;
The mean squared displacement (MSD),  effectively measures how much the particles deviate from their equilibrium positions &amp;lt;span style=color:red&amp;gt; a more clear explanation would be valuable here &amp;lt;/span&amp;gt; . The value of MSD represents the extent of random motion in the system, and it can be calculated with the equation:&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001803.jpg]]&lt;br /&gt;
&lt;br /&gt;
In this experiment, calculation of MSD was all completed by HPC and was given in the results. &lt;br /&gt;
&lt;br /&gt;
[[File:Zyup0018701.jpg]] [[File:Zyup001802.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; No x axis label for the second graph. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As shown in two graphs, the simulation for liquid, solid and vapour gives the evolution of mean squared displacement over ti,me for both cases. (8000 atoms and a million atoms respectively) The first thing to see on the graphs was the abnormal position for liquid state and gas state in the first figure, as the liquid phase gave a larger MSD as time goes, which on the other hand, for the second figure did have the gas curve laying above the liquid curve. &lt;br /&gt;
&lt;br /&gt;
In a realistic sense, as the MSD measured the random of particles, the displacement for liquid molecules should be much smaller than the vapour counterpart, since the gas particles was supposed to be about 10 times more distant than liquid molecules in the space.  &lt;br /&gt;
&lt;br /&gt;
Therefore, it turn out that the simulation for vapour phase with this MSD method was inaccurate, or a much longer period of time was required for the system to reach the equilibrium. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;As mentioned above, the diffusion coefficient was calculated by the relationship:    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt; so one sixth of the gradient of the MSD graph was the diffusion coeffient:&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000171 cm2/s; D(sol)= 1.92x10-6 cm2/s; D(vap)= 0.000106 cm2/s  (8000atoms)&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000177cm2/s;  D(sol)= 0;                          D(vap)= 0.00627cm2/s      (a million atoms)&lt;br /&gt;
&lt;br /&gt;
The result was quite close to each other apart from the vapour case, and the data confirmed that for the 8000 atoms system, an equilibrium was not reach therefore the inaccuracy was due to a lack of simulation steps as the gradient was only valid in the diffusion region of the graph (i.e. the linear part). In the case of solid the diffusion coefficient was to low to be calculated.&lt;br /&gt;
&lt;br /&gt;
===== Extension =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; why have you included an extension in the middle of your results section? &amp;lt;/span&amp;gt;&lt;br /&gt;
As the simulation for solid was quite stable in the last section, further interest of examine the temperate-diffusion coefficient connection was developed from the literature[2]. Five additional simulation with different temperature for the solid system was carried to investigate if the MDS simulation could give a similar trend. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!T (reduced temperature)&lt;br /&gt;
!Diffusion coefficient cm2/s&lt;br /&gt;
|-&lt;br /&gt;
|0.6&lt;br /&gt;
|7.48E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.7&lt;br /&gt;
|7.85E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.8&lt;br /&gt;
|1.26E-06&lt;br /&gt;
|-&lt;br /&gt;
|0.9&lt;br /&gt;
|1.47E-06&lt;br /&gt;
|-&lt;br /&gt;
|1.0&lt;br /&gt;
|2.5E-06&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;The results of simulation was given in the table, and a clear trend of D increasing with temperature was illustrated.&lt;br /&gt;
[[File:Zyup001805.jpg]][[File:Zyup001804.jpg]]&lt;br /&gt;
&lt;br /&gt;
In general, the simulation gave the same relationship with the literature graph &amp;lt;span style=color:red&amp;gt; citation? &amp;lt;/span&amp;gt;, though the fluctuation in the computed curve was greater due to the weakness in size and timesteps. This was saying the error in the simulation can be averaged out with large scale simulation andFurther investigate of this relation could be carried with a greater size (e.g. a million atoms) and more steps to provide more reliable data for the different states.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
The MD simulation provides a powerful and relatively reliable tool for investigation of the simple systems as shown in the experiment, this provides an alternative method to gather thermo and physical data from Lab experiment. To ensure the accuracy of the simulated data,  a large size of model to mimic the interaction and long time of random motion to reach equillibrium was required.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; These are some very vague conclusions. The conclusion of a scientific paper is meant to summarise the main results and conclusions, and perhaps offer a brief outlook. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Reference hav =====&lt;br /&gt;
# Computational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes, Norbert Attig, Kurt Binder, Helmut Grubmuller ¨ , Kurt Kremer (Eds.), John von Neumann Institute for Computing, Julich, ¨ NIC Series, Vol. 23, ISBN 3-00-012641-4, pp. 1-28, 2004.&lt;br /&gt;
#Molecular and condition parameters dependent diffusion coefficient of water in poly(vinyl alcohol): a molecular dynamics simulation study,Colloid and Polymer Science, 2017, 295(5),859-868&lt;br /&gt;
&lt;br /&gt;
= TASK: =&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time , &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by  (the values of , , and  are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00181.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00182.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00183.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Error= C*t*sin( ωt + φ )     C is a constant that equals approx. 0.000417 in the case of timestep=0.1  ω=1.00 and φ=1.00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Timesteps below 0.63s would be valid in this case &amp;lt;span style=color:red&amp;gt; way too large &amp;lt;/span&amp;gt;. Ideally the total energy is conserved in a closed system, so it is better to monitor the total energy of a system to ensure the simulation was not collapsed in terms of a strong fluctuation in total energy.&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00184.jpg|800x263px]]&lt;br /&gt;
[[File:Zyup00185.jpg|714x300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; force is +ve, r_eq is 2^(1/6)*sigma. Numerical answers stated to way too many decimal places. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions.  55.5*N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/1000= 3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Estimate the volume of 10000 water molecules under standard conditions. 10000/3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;=2.99*10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00186.jpg|800x156px]]&lt;br /&gt;
[[File:Zyup00187.jpg|1000x200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Atom positions not after PBC not correct. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In case of two atoms generated on top of each other，the force between them will be very large and therefore leads to unwanted large acceleration to the system, cause a sudden blow up&#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of 0.8. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
1/(1.07722)3 = 0.800&lt;br /&gt;
4 atoms in one lattice, so 4/a3 = 1.2, a = 1.49380, side length is 1.49380.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;    4000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0              for every atom in type 1 mass = 1.0 (reduced unit)&lt;br /&gt;
pair_style lj/cut 3.0   cutoff Lennard-Jones potential with no Coulomb at 3.0 potential with no Coulomb at 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0  for all the pairs coefficient 1.0 1.0 was applied&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
velocity Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ask the demonstrator if you need help.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows easy variation of timesteps without worrying about forgetting to change the relevant steps to run. As the change in steps will be made by the codes as soon as the value of timesteps was changed. Instantaneous change of two related value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). &#039;&#039;&#039;[[File:Zyup00188.jpg|800x426px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Does the simulation reach equilibrium?   &#039;&#039;&#039;Yes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How long does this take?  &#039;&#039;&#039;0.3 reduced time&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00189.jpg|800x446px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results?     &#039;&#039;&#039;0.0025 &lt;br /&gt;
&lt;br /&gt;
Fluctuating in the region that covers the most accurate value from 0.0001&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;   0.015 it does not converge.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
  &lt;br /&gt;
γ = ( &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt; /T )0.5&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
•	Nevery = 100 use input values every 100 timesteps&lt;br /&gt;
&lt;br /&gt;
•	Nrepeat = 1000 1000 of times to use input values for calculating averages&lt;br /&gt;
&lt;br /&gt;
•	Nfreq =10000  calculate averages every 10000 timesteps&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How often will values of the temperature, etc., be sampled for the average?     &#039;&#039;&#039;every 10000 timesteps &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How many measurements contribute to the average?   &#039;&#039;&#039;1000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Looking to the following line, how much time will you simulate?   &#039;&#039;&#039;100000 unit time&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001810.jpg|800x488px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;Lower, as ideal gas law ignores any interactions between particles apart from collisions while the L-J system takes the potential energy into account so that results in a lower density.&lt;br /&gt;
discrepancy increase with pressure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001811.jpg|800x420px]]&lt;br /&gt;
&lt;br /&gt;
Supposed to be constant for liquid but the fluctuation was within an acceptable range&lt;br /&gt;
&lt;br /&gt;
====== Scripts: ======&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY THE REQUIRED THERMODYNAMIC STATE ###&lt;br /&gt;
&lt;br /&gt;
variable D equal 0.2&lt;br /&gt;
&lt;br /&gt;
variable T equal 2.0&lt;br /&gt;
&lt;br /&gt;
variable timestep equal 0.0025&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
&lt;br /&gt;
lattice sc ${D}&lt;br /&gt;
&lt;br /&gt;
region box block 0 15 0 15 0 15&lt;br /&gt;
&lt;br /&gt;
create_box 1 box&lt;br /&gt;
&lt;br /&gt;
create_atoms 1 box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE PHYSICAL PROPERTIES OF ATOMS ###&lt;br /&gt;
&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
&lt;br /&gt;
pair_style lj/cut/opt 3.0&lt;br /&gt;
&lt;br /&gt;
pair_coeff 1 1 1.0 1.0&lt;br /&gt;
&lt;br /&gt;
neighbor 2.0 bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; ASSIGN ATOMIC VELOCITIES ###&lt;br /&gt;
&lt;br /&gt;
velocity all create ${T} 12345 dist gaussian rot yes mom yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY ENSEMBLE ###&lt;br /&gt;
&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; THERMODYNAMIC OUTPUT CONTROL ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom time etotal temp press&lt;br /&gt;
&lt;br /&gt;
thermo 10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RECORD TRAJECTORY ###&lt;br /&gt;
&lt;br /&gt;
dump traj all custom 1000 output-1 id x y z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RUN SIMULATION TO MELT CRYSTAL ###&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
unfix nve&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; BRING SYSTEM TO REQUIRED STATE ###&lt;br /&gt;
&lt;br /&gt;
variable tdamp equal ${timestep}*100&lt;br /&gt;
&lt;br /&gt;
variable pdamp equal ${timestep}*1000&lt;br /&gt;
&lt;br /&gt;
fix nvt all nvt temp ${T} ${T} ${tdamp}&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
unfix nvt&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; MEASURE SYSTEM STATE ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom step etotal temp vol density&lt;br /&gt;
&lt;br /&gt;
variable dens equal density&lt;br /&gt;
&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
&lt;br /&gt;
variable volu equal vol&lt;br /&gt;
&lt;br /&gt;
variable ener equal etotal&lt;br /&gt;
&lt;br /&gt;
variable ener2 equal etotal*etotal&lt;br /&gt;
&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_vol v_ener v_ener2 v_press2&lt;br /&gt;
&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
&lt;br /&gt;
variable avevolu equal f_aves[3]&lt;br /&gt;
&lt;br /&gt;
variable heatc equal 3375*3375*(f_aves[5]-f_aves[4]*f_aves[4])/(f_aves[2]*f_aves[2])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Averages&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Density: ${avedens}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Volume: ${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Temperature: ${avetemp}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Cv/V: ${heatc}/${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001812.jpg|800x457px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Liquid and vapour drop constantly due to the evenly distributing simple cubic structure while solid has fluctuation because of the Fcc structure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In the solid case, illustrate which lattice sites the first three peaks correspond to.&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039; What is the lattice spacing? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lattice spacing around 1.45 reduced unit. &lt;br /&gt;
&lt;br /&gt;
[0.5,0.5,0] corners; [1.0,0,0] centre of face; [1.0,0.5,0] centre of a different face&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate  in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001813.jpg]]&lt;br /&gt;
[[File:Zyup001814.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001815.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The minima give the location of the maximum difference for the liquid and solid system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Because the HO model has a periodic motion while the Lennard Jones solid and liquid move randomly there for there is no pattern in this kind of motion. i.e. the dependence on previous velocity is rather low.&lt;br /&gt;
Attach a copy of your plot to your writeup.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;[[File:Zyup001816.jpg|800x387]]&lt;br /&gt;
[[File:Zyup001817.jpg]]&lt;br /&gt;
[[File:Zyup001818.jpg]]&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696306</id>
		<title>Rep:ZY3915liqsimu</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696306"/>
		<updated>2018-04-18T16:03:09Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* TASK: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; fff &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Third year simulation experiment =&lt;br /&gt;
&lt;br /&gt;
=== Liquid simulation and the diffusion coefficient ===&lt;br /&gt;
Zhuohao You&lt;br /&gt;
&lt;br /&gt;
==== Abstract ====&lt;br /&gt;
Diffusion behaviour of water was modeled and investigated by molecular dynamic simulation with the assistant of high performance computing power. The connection of diffusion coefficient to the mean square displacement was exploited to calculated the diffusion coefficient base on the performed MSD for liquid, solid and vapour. A further experiment on diffusion coefficient of solid was carried to exam its relationship with temperature.&amp;lt;span style=color:red&amp;gt; The abstract of a scientific paper is meant to briefly convey what you have done and your main results and conclusions, perhaps with a very short motivation. While you have briefly touched upon what you have done, your abstract lacks specifics. What exactly were your main results and conclusions? Also spelling and grammar! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
With the development of high performance computing system, the accuracy of molecular dynamic simulation (MSD) &amp;lt;span style=color:red&amp;gt; molecular dynamics is usually represented by the acronym &amp;quot;MD&amp;quot;, &amp;quot;MDS&amp;quot; for molecular dynamics simulation(s) would be acceptable if specified. However &amp;quot;MSD&amp;quot; has the letters in the wrong order, and is a bit confusing given that MSD is also common for &amp;quot;mean squared displacement&amp;quot; &amp;lt;/span&amp;gt; was brought to a new level &amp;lt;span style=color:red&amp;gt; Arguably, yes. However, you have performed relatively small simulations using cheap and cheerful LJ potentials, so perhaps this comment is not very relevant to what you have done. &amp;lt;/span&amp;gt;.  MSD is a useful tool that gives rise to calculation of macroscopic properties from microscopic scale systems. By considering the interaction for a single particle with a limited amount of nearby particles, &#039;exact&#039; prediction of thermo and physical properties are possible depending in the scale of calculation. &amp;lt;span style=color:red&amp;gt; This point is arguable, since there a lot of technical subtleties, certainly an elaboration would be necessary after making such a bold claim with the use of &amp;quot;exact&amp;quot;. &amp;lt;/span&amp;gt;[1]   &lt;br /&gt;
&lt;br /&gt;
Using the college&#039;s high performance computing facilities &amp;lt;span style=color:red&amp;gt; simply &amp;quot;the college&#039;s&amp;quot; is not an adequate accreditation of the hpc resources you have used. &amp;lt;/span&amp;gt;, simulation of simple liquid &amp;lt;span style=color:red&amp;gt; what about the other phases you have simulated? &amp;lt;/span&amp;gt;was performed and an important property of diffusion coefficient was computed from the simulation with a method manipulating its relationship with the mean squared displacement of ensemble particles.      &lt;br /&gt;
&lt;br /&gt;
==== Aims and Objectives ====&lt;br /&gt;
In this experiment, simulation using Lennard-Jones potential was applied on a simple liquid system. (e.g. Argon) &amp;lt;span style=color:red&amp;gt; why single out argon? have you used LJ parameters for argon? &amp;lt;/span&amp;gt;And investigation of the diffusion coefficient property of the system in liquid, solid and vapour phase was carried to give comparisons between the three states. Furtherly, a variation in temperature for the solid state was investigated to exploit the relationship between temperate and diffusion coefficient.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
The input script was base on the given npt file with 8000 atoms and the molecular dynamic was calculated by the velocity Verlet algorithm with based on Lennard-Jones potential. All the simulation was completed on the college HPC system with the parallel computational pacakge LAMMPS. The diffusion coefficient was computed by the given method:&lt;br /&gt;
The easiest way to measure &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; is by exploiting its connection to the [http://en.wikipedia.org/wiki/Mean_squared_displacement mean squared displacement].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This is not sufficient information for another scientist to reproduce your results. What LJ parameters have you used, what cutoff? You mention the NPT ensemble, what pressure and temperature? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results and discussion ====&lt;br /&gt;
The mean squared displacement (MSD),  effectively measures how much the particles deviate from their equilibrium positions &amp;lt;span style=color:red&amp;gt; a more clear explanation would be valuable here &amp;lt;/span&amp;gt; . The value of MSD represents the extent of random motion in the system, and it can be calculated with the equation:&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001803.jpg]]&lt;br /&gt;
&lt;br /&gt;
In this experiment, calculation of MSD was all completed by HPC and was given in the results. &lt;br /&gt;
&lt;br /&gt;
[[File:Zyup0018701.jpg]] [[File:Zyup001802.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; No x axis label for the second graph. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As shown in two graphs, the simulation for liquid, solid and vapour gives the evolution of mean squared displacement over ti,me for both cases. (8000 atoms and a million atoms respectively) The first thing to see on the graphs was the abnormal position for liquid state and gas state in the first figure, as the liquid phase gave a larger MSD as time goes, which on the other hand, for the second figure did have the gas curve laying above the liquid curve. &lt;br /&gt;
&lt;br /&gt;
In a realistic sense, as the MSD measured the random of particles, the displacement for liquid molecules should be much smaller than the vapour counterpart, since the gas particles was supposed to be about 10 times more distant than liquid molecules in the space.  &lt;br /&gt;
&lt;br /&gt;
Therefore, it turn out that the simulation for vapour phase with this MSD method was inaccurate, or a much longer period of time was required for the system to reach the equilibrium. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;As mentioned above, the diffusion coefficient was calculated by the relationship:    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt; so one sixth of the gradient of the MSD graph was the diffusion coeffient:&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000171 cm2/s; D(sol)= 1.92x10-6 cm2/s; D(vap)= 0.000106 cm2/s  (8000atoms)&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000177cm2/s;  D(sol)= 0;                          D(vap)= 0.00627cm2/s      (a million atoms)&lt;br /&gt;
&lt;br /&gt;
The result was quite close to each other apart from the vapour case, and the data confirmed that for the 8000 atoms system, an equilibrium was not reach therefore the inaccuracy was due to a lack of simulation steps as the gradient was only valid in the diffusion region of the graph (i.e. the linear part). In the case of solid the diffusion coefficient was to low to be calculated.&lt;br /&gt;
&lt;br /&gt;
===== Extension =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; why have you included an extension in the middle of your results section? &amp;lt;/span&amp;gt;&lt;br /&gt;
As the simulation for solid was quite stable in the last section, further interest of examine the temperate-diffusion coefficient connection was developed from the literature[2]. Five additional simulation with different temperature for the solid system was carried to investigate if the MDS simulation could give a similar trend. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!T (reduced temperature)&lt;br /&gt;
!Diffusion coefficient cm2/s&lt;br /&gt;
|-&lt;br /&gt;
|0.6&lt;br /&gt;
|7.48E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.7&lt;br /&gt;
|7.85E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.8&lt;br /&gt;
|1.26E-06&lt;br /&gt;
|-&lt;br /&gt;
|0.9&lt;br /&gt;
|1.47E-06&lt;br /&gt;
|-&lt;br /&gt;
|1.0&lt;br /&gt;
|2.5E-06&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;The results of simulation was given in the table, and a clear trend of D increasing with temperature was illustrated.&lt;br /&gt;
[[File:Zyup001805.jpg]][[File:Zyup001804.jpg]]&lt;br /&gt;
&lt;br /&gt;
In general, the simulation gave the same relationship with the literature graph &amp;lt;span style=color:red&amp;gt; citation? &amp;lt;/span&amp;gt;, though the fluctuation in the computed curve was greater due to the weakness in size and timesteps. This was saying the error in the simulation can be averaged out with large scale simulation andFurther investigate of this relation could be carried with a greater size (e.g. a million atoms) and more steps to provide more reliable data for the different states.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
The MD simulation provides a powerful and relatively reliable tool for investigation of the simple systems as shown in the experiment, this provides an alternative method to gather thermo and physical data from Lab experiment. To ensure the accuracy of the simulated data,  a large size of model to mimic the interaction and long time of random motion to reach equillibrium was required.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; These are some very vague conclusions. The conclusion of a scientific paper is meant to summarise the main results and conclusions, and perhaps offer a brief outlook. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Reference hav =====&lt;br /&gt;
# Computational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes, Norbert Attig, Kurt Binder, Helmut Grubmuller ¨ , Kurt Kremer (Eds.), John von Neumann Institute for Computing, Julich, ¨ NIC Series, Vol. 23, ISBN 3-00-012641-4, pp. 1-28, 2004.&lt;br /&gt;
#Molecular and condition parameters dependent diffusion coefficient of water in poly(vinyl alcohol): a molecular dynamics simulation study,Colloid and Polymer Science, 2017, 295(5),859-868&lt;br /&gt;
&lt;br /&gt;
= TASK: =&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time , &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by  (the values of , , and  are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00181.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00182.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00183.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Error= C*t*sin( ωt + φ )     C is a constant that equals approx. 0.000417 in the case of timestep=0.1  ω=1.00 and φ=1.00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Timesteps below 0.63s would be valid in this case &amp;lt;span style=color:red&amp;gt; way too large &amp;lt;/span&amp;gt;. Ideally the total energy is conserved in a closed system, so it is better to monitor the total energy of a system to ensure the simulation was not collapsed in terms of a strong fluctuation in total energy.&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00184.jpg|800x263px]]&lt;br /&gt;
[[File:Zyup00185.jpg|714x300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; force is +ve, r_eq is 2^(1/6)*sigma. Numerical answers stated to way too many decimal places. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions.  55.5*N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/1000= 3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Estimate the volume of 10000 water molecules under standard conditions. 10000/3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;=2.99*10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00186.jpg|800x156px]]&lt;br /&gt;
[[File:Zyup00187.jpg|1000x200px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In case of two atoms generated on top of each other，the force between them will be very large and therefore leads to unwanted large acceleration to the system, cause a sudden blow up&#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of 0.8. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
1/(1.07722)3 = 0.800&lt;br /&gt;
4 atoms in one lattice, so 4/a3 = 1.2, a = 1.49380, side length is 1.49380.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;    4000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0              for every atom in type 1 mass = 1.0 (reduced unit)&lt;br /&gt;
pair_style lj/cut 3.0   cutoff Lennard-Jones potential with no Coulomb at 3.0 potential with no Coulomb at 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0  for all the pairs coefficient 1.0 1.0 was applied&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
velocity Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ask the demonstrator if you need help.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows easy variation of timesteps without worrying about forgetting to change the relevant steps to run. As the change in steps will be made by the codes as soon as the value of timesteps was changed. Instantaneous change of two related value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). &#039;&#039;&#039;[[File:Zyup00188.jpg|800x426px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Does the simulation reach equilibrium?   &#039;&#039;&#039;Yes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How long does this take?  &#039;&#039;&#039;0.3 reduced time&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00189.jpg|800x446px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results?     &#039;&#039;&#039;0.0025 &lt;br /&gt;
&lt;br /&gt;
Fluctuating in the region that covers the most accurate value from 0.0001&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;   0.015 it does not converge.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
  &lt;br /&gt;
γ = ( &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt; /T )0.5&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
•	Nevery = 100 use input values every 100 timesteps&lt;br /&gt;
&lt;br /&gt;
•	Nrepeat = 1000 1000 of times to use input values for calculating averages&lt;br /&gt;
&lt;br /&gt;
•	Nfreq =10000  calculate averages every 10000 timesteps&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How often will values of the temperature, etc., be sampled for the average?     &#039;&#039;&#039;every 10000 timesteps &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How many measurements contribute to the average?   &#039;&#039;&#039;1000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Looking to the following line, how much time will you simulate?   &#039;&#039;&#039;100000 unit time&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001810.jpg|800x488px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;Lower, as ideal gas law ignores any interactions between particles apart from collisions while the L-J system takes the potential energy into account so that results in a lower density.&lt;br /&gt;
discrepancy increase with pressure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001811.jpg|800x420px]]&lt;br /&gt;
&lt;br /&gt;
Supposed to be constant for liquid but the fluctuation was within an acceptable range&lt;br /&gt;
&lt;br /&gt;
====== Scripts: ======&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY THE REQUIRED THERMODYNAMIC STATE ###&lt;br /&gt;
&lt;br /&gt;
variable D equal 0.2&lt;br /&gt;
&lt;br /&gt;
variable T equal 2.0&lt;br /&gt;
&lt;br /&gt;
variable timestep equal 0.0025&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
&lt;br /&gt;
lattice sc ${D}&lt;br /&gt;
&lt;br /&gt;
region box block 0 15 0 15 0 15&lt;br /&gt;
&lt;br /&gt;
create_box 1 box&lt;br /&gt;
&lt;br /&gt;
create_atoms 1 box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE PHYSICAL PROPERTIES OF ATOMS ###&lt;br /&gt;
&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
&lt;br /&gt;
pair_style lj/cut/opt 3.0&lt;br /&gt;
&lt;br /&gt;
pair_coeff 1 1 1.0 1.0&lt;br /&gt;
&lt;br /&gt;
neighbor 2.0 bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; ASSIGN ATOMIC VELOCITIES ###&lt;br /&gt;
&lt;br /&gt;
velocity all create ${T} 12345 dist gaussian rot yes mom yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY ENSEMBLE ###&lt;br /&gt;
&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; THERMODYNAMIC OUTPUT CONTROL ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom time etotal temp press&lt;br /&gt;
&lt;br /&gt;
thermo 10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RECORD TRAJECTORY ###&lt;br /&gt;
&lt;br /&gt;
dump traj all custom 1000 output-1 id x y z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RUN SIMULATION TO MELT CRYSTAL ###&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
unfix nve&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; BRING SYSTEM TO REQUIRED STATE ###&lt;br /&gt;
&lt;br /&gt;
variable tdamp equal ${timestep}*100&lt;br /&gt;
&lt;br /&gt;
variable pdamp equal ${timestep}*1000&lt;br /&gt;
&lt;br /&gt;
fix nvt all nvt temp ${T} ${T} ${tdamp}&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
unfix nvt&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; MEASURE SYSTEM STATE ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom step etotal temp vol density&lt;br /&gt;
&lt;br /&gt;
variable dens equal density&lt;br /&gt;
&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
&lt;br /&gt;
variable volu equal vol&lt;br /&gt;
&lt;br /&gt;
variable ener equal etotal&lt;br /&gt;
&lt;br /&gt;
variable ener2 equal etotal*etotal&lt;br /&gt;
&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_vol v_ener v_ener2 v_press2&lt;br /&gt;
&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
&lt;br /&gt;
variable avevolu equal f_aves[3]&lt;br /&gt;
&lt;br /&gt;
variable heatc equal 3375*3375*(f_aves[5]-f_aves[4]*f_aves[4])/(f_aves[2]*f_aves[2])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Averages&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Density: ${avedens}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Volume: ${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Temperature: ${avetemp}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Cv/V: ${heatc}/${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001812.jpg|800x457px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Liquid and vapour drop constantly due to the evenly distributing simple cubic structure while solid has fluctuation because of the Fcc structure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In the solid case, illustrate which lattice sites the first three peaks correspond to.&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039; What is the lattice spacing? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lattice spacing around 1.45 reduced unit. &lt;br /&gt;
&lt;br /&gt;
[0.5,0.5,0] corners; [1.0,0,0] centre of face; [1.0,0.5,0] centre of a different face&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate  in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001813.jpg]]&lt;br /&gt;
[[File:Zyup001814.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001815.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The minima give the location of the maximum difference for the liquid and solid system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Because the HO model has a periodic motion while the Lennard Jones solid and liquid move randomly there for there is no pattern in this kind of motion. i.e. the dependence on previous velocity is rather low.&lt;br /&gt;
Attach a copy of your plot to your writeup.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;[[File:Zyup001816.jpg|800x387]]&lt;br /&gt;
[[File:Zyup001817.jpg]]&lt;br /&gt;
[[File:Zyup001818.jpg]]&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696305</id>
		<title>Rep:ZY3915liqsimu</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696305"/>
		<updated>2018-04-18T16:02:18Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* TASK: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; fff &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Third year simulation experiment =&lt;br /&gt;
&lt;br /&gt;
=== Liquid simulation and the diffusion coefficient ===&lt;br /&gt;
Zhuohao You&lt;br /&gt;
&lt;br /&gt;
==== Abstract ====&lt;br /&gt;
Diffusion behaviour of water was modeled and investigated by molecular dynamic simulation with the assistant of high performance computing power. The connection of diffusion coefficient to the mean square displacement was exploited to calculated the diffusion coefficient base on the performed MSD for liquid, solid and vapour. A further experiment on diffusion coefficient of solid was carried to exam its relationship with temperature.&amp;lt;span style=color:red&amp;gt; The abstract of a scientific paper is meant to briefly convey what you have done and your main results and conclusions, perhaps with a very short motivation. While you have briefly touched upon what you have done, your abstract lacks specifics. What exactly were your main results and conclusions? Also spelling and grammar! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
With the development of high performance computing system, the accuracy of molecular dynamic simulation (MSD) &amp;lt;span style=color:red&amp;gt; molecular dynamics is usually represented by the acronym &amp;quot;MD&amp;quot;, &amp;quot;MDS&amp;quot; for molecular dynamics simulation(s) would be acceptable if specified. However &amp;quot;MSD&amp;quot; has the letters in the wrong order, and is a bit confusing given that MSD is also common for &amp;quot;mean squared displacement&amp;quot; &amp;lt;/span&amp;gt; was brought to a new level &amp;lt;span style=color:red&amp;gt; Arguably, yes. However, you have performed relatively small simulations using cheap and cheerful LJ potentials, so perhaps this comment is not very relevant to what you have done. &amp;lt;/span&amp;gt;.  MSD is a useful tool that gives rise to calculation of macroscopic properties from microscopic scale systems. By considering the interaction for a single particle with a limited amount of nearby particles, &#039;exact&#039; prediction of thermo and physical properties are possible depending in the scale of calculation. &amp;lt;span style=color:red&amp;gt; This point is arguable, since there a lot of technical subtleties, certainly an elaboration would be necessary after making such a bold claim with the use of &amp;quot;exact&amp;quot;. &amp;lt;/span&amp;gt;[1]   &lt;br /&gt;
&lt;br /&gt;
Using the college&#039;s high performance computing facilities &amp;lt;span style=color:red&amp;gt; simply &amp;quot;the college&#039;s&amp;quot; is not an adequate accreditation of the hpc resources you have used. &amp;lt;/span&amp;gt;, simulation of simple liquid &amp;lt;span style=color:red&amp;gt; what about the other phases you have simulated? &amp;lt;/span&amp;gt;was performed and an important property of diffusion coefficient was computed from the simulation with a method manipulating its relationship with the mean squared displacement of ensemble particles.      &lt;br /&gt;
&lt;br /&gt;
==== Aims and Objectives ====&lt;br /&gt;
In this experiment, simulation using Lennard-Jones potential was applied on a simple liquid system. (e.g. Argon) &amp;lt;span style=color:red&amp;gt; why single out argon? have you used LJ parameters for argon? &amp;lt;/span&amp;gt;And investigation of the diffusion coefficient property of the system in liquid, solid and vapour phase was carried to give comparisons between the three states. Furtherly, a variation in temperature for the solid state was investigated to exploit the relationship between temperate and diffusion coefficient.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
The input script was base on the given npt file with 8000 atoms and the molecular dynamic was calculated by the velocity Verlet algorithm with based on Lennard-Jones potential. All the simulation was completed on the college HPC system with the parallel computational pacakge LAMMPS. The diffusion coefficient was computed by the given method:&lt;br /&gt;
The easiest way to measure &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; is by exploiting its connection to the [http://en.wikipedia.org/wiki/Mean_squared_displacement mean squared displacement].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This is not sufficient information for another scientist to reproduce your results. What LJ parameters have you used, what cutoff? You mention the NPT ensemble, what pressure and temperature? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results and discussion ====&lt;br /&gt;
The mean squared displacement (MSD),  effectively measures how much the particles deviate from their equilibrium positions &amp;lt;span style=color:red&amp;gt; a more clear explanation would be valuable here &amp;lt;/span&amp;gt; . The value of MSD represents the extent of random motion in the system, and it can be calculated with the equation:&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001803.jpg]]&lt;br /&gt;
&lt;br /&gt;
In this experiment, calculation of MSD was all completed by HPC and was given in the results. &lt;br /&gt;
&lt;br /&gt;
[[File:Zyup0018701.jpg]] [[File:Zyup001802.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; No x axis label for the second graph. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As shown in two graphs, the simulation for liquid, solid and vapour gives the evolution of mean squared displacement over ti,me for both cases. (8000 atoms and a million atoms respectively) The first thing to see on the graphs was the abnormal position for liquid state and gas state in the first figure, as the liquid phase gave a larger MSD as time goes, which on the other hand, for the second figure did have the gas curve laying above the liquid curve. &lt;br /&gt;
&lt;br /&gt;
In a realistic sense, as the MSD measured the random of particles, the displacement for liquid molecules should be much smaller than the vapour counterpart, since the gas particles was supposed to be about 10 times more distant than liquid molecules in the space.  &lt;br /&gt;
&lt;br /&gt;
Therefore, it turn out that the simulation for vapour phase with this MSD method was inaccurate, or a much longer period of time was required for the system to reach the equilibrium. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;As mentioned above, the diffusion coefficient was calculated by the relationship:    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt; so one sixth of the gradient of the MSD graph was the diffusion coeffient:&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000171 cm2/s; D(sol)= 1.92x10-6 cm2/s; D(vap)= 0.000106 cm2/s  (8000atoms)&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000177cm2/s;  D(sol)= 0;                          D(vap)= 0.00627cm2/s      (a million atoms)&lt;br /&gt;
&lt;br /&gt;
The result was quite close to each other apart from the vapour case, and the data confirmed that for the 8000 atoms system, an equilibrium was not reach therefore the inaccuracy was due to a lack of simulation steps as the gradient was only valid in the diffusion region of the graph (i.e. the linear part). In the case of solid the diffusion coefficient was to low to be calculated.&lt;br /&gt;
&lt;br /&gt;
===== Extension =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; why have you included an extension in the middle of your results section? &amp;lt;/span&amp;gt;&lt;br /&gt;
As the simulation for solid was quite stable in the last section, further interest of examine the temperate-diffusion coefficient connection was developed from the literature[2]. Five additional simulation with different temperature for the solid system was carried to investigate if the MDS simulation could give a similar trend. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!T (reduced temperature)&lt;br /&gt;
!Diffusion coefficient cm2/s&lt;br /&gt;
|-&lt;br /&gt;
|0.6&lt;br /&gt;
|7.48E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.7&lt;br /&gt;
|7.85E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.8&lt;br /&gt;
|1.26E-06&lt;br /&gt;
|-&lt;br /&gt;
|0.9&lt;br /&gt;
|1.47E-06&lt;br /&gt;
|-&lt;br /&gt;
|1.0&lt;br /&gt;
|2.5E-06&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;The results of simulation was given in the table, and a clear trend of D increasing with temperature was illustrated.&lt;br /&gt;
[[File:Zyup001805.jpg]][[File:Zyup001804.jpg]]&lt;br /&gt;
&lt;br /&gt;
In general, the simulation gave the same relationship with the literature graph &amp;lt;span style=color:red&amp;gt; citation? &amp;lt;/span&amp;gt;, though the fluctuation in the computed curve was greater due to the weakness in size and timesteps. This was saying the error in the simulation can be averaged out with large scale simulation andFurther investigate of this relation could be carried with a greater size (e.g. a million atoms) and more steps to provide more reliable data for the different states.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
The MD simulation provides a powerful and relatively reliable tool for investigation of the simple systems as shown in the experiment, this provides an alternative method to gather thermo and physical data from Lab experiment. To ensure the accuracy of the simulated data,  a large size of model to mimic the interaction and long time of random motion to reach equillibrium was required.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; These are some very vague conclusions. The conclusion of a scientific paper is meant to summarise the main results and conclusions, and perhaps offer a brief outlook. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Reference hav =====&lt;br /&gt;
# Computational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes, Norbert Attig, Kurt Binder, Helmut Grubmuller ¨ , Kurt Kremer (Eds.), John von Neumann Institute for Computing, Julich, ¨ NIC Series, Vol. 23, ISBN 3-00-012641-4, pp. 1-28, 2004.&lt;br /&gt;
#Molecular and condition parameters dependent diffusion coefficient of water in poly(vinyl alcohol): a molecular dynamics simulation study,Colloid and Polymer Science, 2017, 295(5),859-868&lt;br /&gt;
&lt;br /&gt;
= TASK: =&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time , &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by  (the values of , , and  are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00181.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00182.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00183.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Error= C*t*sin( ωt + φ )     C is a constant that equals approx. 0.000417 in the case of timestep=0.1  ω=1.00 and φ=1.00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Timesteps below 0.63s would be valid in this case &amp;lt;span style=color:red&amp;gt; way too large &amp;lt;/span&amp;gt;. Ideally the total energy is conserved in a closed system, so it is better to monitor the total energy of a system to ensure the simulation was not collapsed in terms of a strong fluctuation in total energy.&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00184.jpg|800x263px]]&lt;br /&gt;
[[File:Zyup00185.jpg|714x300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; force is +ve, r_eq is 2^(1/6)*sigma &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions.  55.5*N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/1000= 3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Estimate the volume of 10000 water molecules under standard conditions. 10000/3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;=2.99*10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00186.jpg|800x156px]]&lt;br /&gt;
[[File:Zyup00187.jpg|1000x200px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In case of two atoms generated on top of each other，the force between them will be very large and therefore leads to unwanted large acceleration to the system, cause a sudden blow up&#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of 0.8. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
1/(1.07722)3 = 0.800&lt;br /&gt;
4 atoms in one lattice, so 4/a3 = 1.2, a = 1.49380, side length is 1.49380.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;    4000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0              for every atom in type 1 mass = 1.0 (reduced unit)&lt;br /&gt;
pair_style lj/cut 3.0   cutoff Lennard-Jones potential with no Coulomb at 3.0 potential with no Coulomb at 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0  for all the pairs coefficient 1.0 1.0 was applied&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
velocity Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ask the demonstrator if you need help.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows easy variation of timesteps without worrying about forgetting to change the relevant steps to run. As the change in steps will be made by the codes as soon as the value of timesteps was changed. Instantaneous change of two related value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). &#039;&#039;&#039;[[File:Zyup00188.jpg|800x426px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Does the simulation reach equilibrium?   &#039;&#039;&#039;Yes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How long does this take?  &#039;&#039;&#039;0.3 reduced time&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00189.jpg|800x446px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results?     &#039;&#039;&#039;0.0025 &lt;br /&gt;
&lt;br /&gt;
Fluctuating in the region that covers the most accurate value from 0.0001&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;   0.015 it does not converge.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
  &lt;br /&gt;
γ = ( &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt; /T )0.5&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
•	Nevery = 100 use input values every 100 timesteps&lt;br /&gt;
&lt;br /&gt;
•	Nrepeat = 1000 1000 of times to use input values for calculating averages&lt;br /&gt;
&lt;br /&gt;
•	Nfreq =10000  calculate averages every 10000 timesteps&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How often will values of the temperature, etc., be sampled for the average?     &#039;&#039;&#039;every 10000 timesteps &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How many measurements contribute to the average?   &#039;&#039;&#039;1000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Looking to the following line, how much time will you simulate?   &#039;&#039;&#039;100000 unit time&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001810.jpg|800x488px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;Lower, as ideal gas law ignores any interactions between particles apart from collisions while the L-J system takes the potential energy into account so that results in a lower density.&lt;br /&gt;
discrepancy increase with pressure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001811.jpg|800x420px]]&lt;br /&gt;
&lt;br /&gt;
Supposed to be constant for liquid but the fluctuation was within an acceptable range&lt;br /&gt;
&lt;br /&gt;
====== Scripts: ======&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY THE REQUIRED THERMODYNAMIC STATE ###&lt;br /&gt;
&lt;br /&gt;
variable D equal 0.2&lt;br /&gt;
&lt;br /&gt;
variable T equal 2.0&lt;br /&gt;
&lt;br /&gt;
variable timestep equal 0.0025&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
&lt;br /&gt;
lattice sc ${D}&lt;br /&gt;
&lt;br /&gt;
region box block 0 15 0 15 0 15&lt;br /&gt;
&lt;br /&gt;
create_box 1 box&lt;br /&gt;
&lt;br /&gt;
create_atoms 1 box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE PHYSICAL PROPERTIES OF ATOMS ###&lt;br /&gt;
&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
&lt;br /&gt;
pair_style lj/cut/opt 3.0&lt;br /&gt;
&lt;br /&gt;
pair_coeff 1 1 1.0 1.0&lt;br /&gt;
&lt;br /&gt;
neighbor 2.0 bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; ASSIGN ATOMIC VELOCITIES ###&lt;br /&gt;
&lt;br /&gt;
velocity all create ${T} 12345 dist gaussian rot yes mom yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY ENSEMBLE ###&lt;br /&gt;
&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; THERMODYNAMIC OUTPUT CONTROL ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom time etotal temp press&lt;br /&gt;
&lt;br /&gt;
thermo 10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RECORD TRAJECTORY ###&lt;br /&gt;
&lt;br /&gt;
dump traj all custom 1000 output-1 id x y z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RUN SIMULATION TO MELT CRYSTAL ###&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
unfix nve&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; BRING SYSTEM TO REQUIRED STATE ###&lt;br /&gt;
&lt;br /&gt;
variable tdamp equal ${timestep}*100&lt;br /&gt;
&lt;br /&gt;
variable pdamp equal ${timestep}*1000&lt;br /&gt;
&lt;br /&gt;
fix nvt all nvt temp ${T} ${T} ${tdamp}&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
unfix nvt&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; MEASURE SYSTEM STATE ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom step etotal temp vol density&lt;br /&gt;
&lt;br /&gt;
variable dens equal density&lt;br /&gt;
&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
&lt;br /&gt;
variable volu equal vol&lt;br /&gt;
&lt;br /&gt;
variable ener equal etotal&lt;br /&gt;
&lt;br /&gt;
variable ener2 equal etotal*etotal&lt;br /&gt;
&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_vol v_ener v_ener2 v_press2&lt;br /&gt;
&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
&lt;br /&gt;
variable avevolu equal f_aves[3]&lt;br /&gt;
&lt;br /&gt;
variable heatc equal 3375*3375*(f_aves[5]-f_aves[4]*f_aves[4])/(f_aves[2]*f_aves[2])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Averages&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Density: ${avedens}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Volume: ${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Temperature: ${avetemp}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Cv/V: ${heatc}/${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001812.jpg|800x457px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Liquid and vapour drop constantly due to the evenly distributing simple cubic structure while solid has fluctuation because of the Fcc structure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In the solid case, illustrate which lattice sites the first three peaks correspond to.&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039; What is the lattice spacing? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lattice spacing around 1.45 reduced unit. &lt;br /&gt;
&lt;br /&gt;
[0.5,0.5,0] corners; [1.0,0,0] centre of face; [1.0,0.5,0] centre of a different face&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate  in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001813.jpg]]&lt;br /&gt;
[[File:Zyup001814.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001815.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The minima give the location of the maximum difference for the liquid and solid system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Because the HO model has a periodic motion while the Lennard Jones solid and liquid move randomly there for there is no pattern in this kind of motion. i.e. the dependence on previous velocity is rather low.&lt;br /&gt;
Attach a copy of your plot to your writeup.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;[[File:Zyup001816.jpg|800x387]]&lt;br /&gt;
[[File:Zyup001817.jpg]]&lt;br /&gt;
[[File:Zyup001818.jpg]]&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696304</id>
		<title>Rep:ZY3915liqsimu</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696304"/>
		<updated>2018-04-18T15:57:31Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* TASK: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; fff &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Third year simulation experiment =&lt;br /&gt;
&lt;br /&gt;
=== Liquid simulation and the diffusion coefficient ===&lt;br /&gt;
Zhuohao You&lt;br /&gt;
&lt;br /&gt;
==== Abstract ====&lt;br /&gt;
Diffusion behaviour of water was modeled and investigated by molecular dynamic simulation with the assistant of high performance computing power. The connection of diffusion coefficient to the mean square displacement was exploited to calculated the diffusion coefficient base on the performed MSD for liquid, solid and vapour. A further experiment on diffusion coefficient of solid was carried to exam its relationship with temperature.&amp;lt;span style=color:red&amp;gt; The abstract of a scientific paper is meant to briefly convey what you have done and your main results and conclusions, perhaps with a very short motivation. While you have briefly touched upon what you have done, your abstract lacks specifics. What exactly were your main results and conclusions? Also spelling and grammar! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
With the development of high performance computing system, the accuracy of molecular dynamic simulation (MSD) &amp;lt;span style=color:red&amp;gt; molecular dynamics is usually represented by the acronym &amp;quot;MD&amp;quot;, &amp;quot;MDS&amp;quot; for molecular dynamics simulation(s) would be acceptable if specified. However &amp;quot;MSD&amp;quot; has the letters in the wrong order, and is a bit confusing given that MSD is also common for &amp;quot;mean squared displacement&amp;quot; &amp;lt;/span&amp;gt; was brought to a new level &amp;lt;span style=color:red&amp;gt; Arguably, yes. However, you have performed relatively small simulations using cheap and cheerful LJ potentials, so perhaps this comment is not very relevant to what you have done. &amp;lt;/span&amp;gt;.  MSD is a useful tool that gives rise to calculation of macroscopic properties from microscopic scale systems. By considering the interaction for a single particle with a limited amount of nearby particles, &#039;exact&#039; prediction of thermo and physical properties are possible depending in the scale of calculation. &amp;lt;span style=color:red&amp;gt; This point is arguable, since there a lot of technical subtleties, certainly an elaboration would be necessary after making such a bold claim with the use of &amp;quot;exact&amp;quot;. &amp;lt;/span&amp;gt;[1]   &lt;br /&gt;
&lt;br /&gt;
Using the college&#039;s high performance computing facilities &amp;lt;span style=color:red&amp;gt; simply &amp;quot;the college&#039;s&amp;quot; is not an adequate accreditation of the hpc resources you have used. &amp;lt;/span&amp;gt;, simulation of simple liquid &amp;lt;span style=color:red&amp;gt; what about the other phases you have simulated? &amp;lt;/span&amp;gt;was performed and an important property of diffusion coefficient was computed from the simulation with a method manipulating its relationship with the mean squared displacement of ensemble particles.      &lt;br /&gt;
&lt;br /&gt;
==== Aims and Objectives ====&lt;br /&gt;
In this experiment, simulation using Lennard-Jones potential was applied on a simple liquid system. (e.g. Argon) &amp;lt;span style=color:red&amp;gt; why single out argon? have you used LJ parameters for argon? &amp;lt;/span&amp;gt;And investigation of the diffusion coefficient property of the system in liquid, solid and vapour phase was carried to give comparisons between the three states. Furtherly, a variation in temperature for the solid state was investigated to exploit the relationship between temperate and diffusion coefficient.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
The input script was base on the given npt file with 8000 atoms and the molecular dynamic was calculated by the velocity Verlet algorithm with based on Lennard-Jones potential. All the simulation was completed on the college HPC system with the parallel computational pacakge LAMMPS. The diffusion coefficient was computed by the given method:&lt;br /&gt;
The easiest way to measure &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; is by exploiting its connection to the [http://en.wikipedia.org/wiki/Mean_squared_displacement mean squared displacement].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This is not sufficient information for another scientist to reproduce your results. What LJ parameters have you used, what cutoff? You mention the NPT ensemble, what pressure and temperature? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results and discussion ====&lt;br /&gt;
The mean squared displacement (MSD),  effectively measures how much the particles deviate from their equilibrium positions &amp;lt;span style=color:red&amp;gt; a more clear explanation would be valuable here &amp;lt;/span&amp;gt; . The value of MSD represents the extent of random motion in the system, and it can be calculated with the equation:&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001803.jpg]]&lt;br /&gt;
&lt;br /&gt;
In this experiment, calculation of MSD was all completed by HPC and was given in the results. &lt;br /&gt;
&lt;br /&gt;
[[File:Zyup0018701.jpg]] [[File:Zyup001802.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; No x axis label for the second graph. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As shown in two graphs, the simulation for liquid, solid and vapour gives the evolution of mean squared displacement over ti,me for both cases. (8000 atoms and a million atoms respectively) The first thing to see on the graphs was the abnormal position for liquid state and gas state in the first figure, as the liquid phase gave a larger MSD as time goes, which on the other hand, for the second figure did have the gas curve laying above the liquid curve. &lt;br /&gt;
&lt;br /&gt;
In a realistic sense, as the MSD measured the random of particles, the displacement for liquid molecules should be much smaller than the vapour counterpart, since the gas particles was supposed to be about 10 times more distant than liquid molecules in the space.  &lt;br /&gt;
&lt;br /&gt;
Therefore, it turn out that the simulation for vapour phase with this MSD method was inaccurate, or a much longer period of time was required for the system to reach the equilibrium. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;As mentioned above, the diffusion coefficient was calculated by the relationship:    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt; so one sixth of the gradient of the MSD graph was the diffusion coeffient:&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000171 cm2/s; D(sol)= 1.92x10-6 cm2/s; D(vap)= 0.000106 cm2/s  (8000atoms)&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000177cm2/s;  D(sol)= 0;                          D(vap)= 0.00627cm2/s      (a million atoms)&lt;br /&gt;
&lt;br /&gt;
The result was quite close to each other apart from the vapour case, and the data confirmed that for the 8000 atoms system, an equilibrium was not reach therefore the inaccuracy was due to a lack of simulation steps as the gradient was only valid in the diffusion region of the graph (i.e. the linear part). In the case of solid the diffusion coefficient was to low to be calculated.&lt;br /&gt;
&lt;br /&gt;
===== Extension =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; why have you included an extension in the middle of your results section? &amp;lt;/span&amp;gt;&lt;br /&gt;
As the simulation for solid was quite stable in the last section, further interest of examine the temperate-diffusion coefficient connection was developed from the literature[2]. Five additional simulation with different temperature for the solid system was carried to investigate if the MDS simulation could give a similar trend. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!T (reduced temperature)&lt;br /&gt;
!Diffusion coefficient cm2/s&lt;br /&gt;
|-&lt;br /&gt;
|0.6&lt;br /&gt;
|7.48E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.7&lt;br /&gt;
|7.85E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.8&lt;br /&gt;
|1.26E-06&lt;br /&gt;
|-&lt;br /&gt;
|0.9&lt;br /&gt;
|1.47E-06&lt;br /&gt;
|-&lt;br /&gt;
|1.0&lt;br /&gt;
|2.5E-06&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;The results of simulation was given in the table, and a clear trend of D increasing with temperature was illustrated.&lt;br /&gt;
[[File:Zyup001805.jpg]][[File:Zyup001804.jpg]]&lt;br /&gt;
&lt;br /&gt;
In general, the simulation gave the same relationship with the literature graph &amp;lt;span style=color:red&amp;gt; citation? &amp;lt;/span&amp;gt;, though the fluctuation in the computed curve was greater due to the weakness in size and timesteps. This was saying the error in the simulation can be averaged out with large scale simulation andFurther investigate of this relation could be carried with a greater size (e.g. a million atoms) and more steps to provide more reliable data for the different states.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
The MD simulation provides a powerful and relatively reliable tool for investigation of the simple systems as shown in the experiment, this provides an alternative method to gather thermo and physical data from Lab experiment. To ensure the accuracy of the simulated data,  a large size of model to mimic the interaction and long time of random motion to reach equillibrium was required.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; These are some very vague conclusions. The conclusion of a scientific paper is meant to summarise the main results and conclusions, and perhaps offer a brief outlook. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Reference hav =====&lt;br /&gt;
# Computational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes, Norbert Attig, Kurt Binder, Helmut Grubmuller ¨ , Kurt Kremer (Eds.), John von Neumann Institute for Computing, Julich, ¨ NIC Series, Vol. 23, ISBN 3-00-012641-4, pp. 1-28, 2004.&lt;br /&gt;
#Molecular and condition parameters dependent diffusion coefficient of water in poly(vinyl alcohol): a molecular dynamics simulation study,Colloid and Polymer Science, 2017, 295(5),859-868&lt;br /&gt;
&lt;br /&gt;
= TASK: =&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time , &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by  (the values of , , and  are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00181.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00182.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00183.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Error= C*t*sin( ωt + φ )     C is a constant that equals approx. 0.000417 in the case of timestep=0.1  ω=1.00 and φ=1.00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Timesteps below 0.63s would be valid in this case &amp;lt;span style=color:red&amp;gt; way too large &amp;lt;/span&amp;gt;. Ideally the total energy is conserved in a closed system, so it is better to monitor the total energy of a system to ensure the simulation was not collapsed in terms of a strong fluctuation in total energy.&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00184.jpg|800x263px]]&lt;br /&gt;
[[File:Zyup00185.jpg|714x300px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions.  55.5*N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/1000= 3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Estimate the volume of 10000 water molecules under standard conditions. 10000/3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;=2.99*10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00186.jpg|800x156px]]&lt;br /&gt;
[[File:Zyup00187.jpg|1000x200px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In case of two atoms generated on top of each other，the force between them will be very large and therefore leads to unwanted large acceleration to the system, cause a sudden blow up&#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of 0.8. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
1/(1.07722)3 = 0.800&lt;br /&gt;
4 atoms in one lattice, so 4/a3 = 1.2, a = 1.49380, side length is 1.49380.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;    4000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0              for every atom in type 1 mass = 1.0 (reduced unit)&lt;br /&gt;
pair_style lj/cut 3.0   cutoff Lennard-Jones potential with no Coulomb at 3.0 potential with no Coulomb at 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0  for all the pairs coefficient 1.0 1.0 was applied&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
velocity Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ask the demonstrator if you need help.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows easy variation of timesteps without worrying about forgetting to change the relevant steps to run. As the change in steps will be made by the codes as soon as the value of timesteps was changed. Instantaneous change of two related value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). &#039;&#039;&#039;[[File:Zyup00188.jpg|800x426px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Does the simulation reach equilibrium?   &#039;&#039;&#039;Yes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How long does this take?  &#039;&#039;&#039;0.3 reduced time&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00189.jpg|800x446px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results?     &#039;&#039;&#039;0.0025 &lt;br /&gt;
&lt;br /&gt;
Fluctuating in the region that covers the most accurate value from 0.0001&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;   0.015 it does not converge.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
  &lt;br /&gt;
γ = ( &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt; /T )0.5&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
•	Nevery = 100 use input values every 100 timesteps&lt;br /&gt;
&lt;br /&gt;
•	Nrepeat = 1000 1000 of times to use input values for calculating averages&lt;br /&gt;
&lt;br /&gt;
•	Nfreq =10000  calculate averages every 10000 timesteps&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How often will values of the temperature, etc., be sampled for the average?     &#039;&#039;&#039;every 10000 timesteps &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How many measurements contribute to the average?   &#039;&#039;&#039;1000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Looking to the following line, how much time will you simulate?   &#039;&#039;&#039;100000 unit time&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001810.jpg|800x488px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;Lower, as ideal gas law ignores any interactions between particles apart from collisions while the L-J system takes the potential energy into account so that results in a lower density.&lt;br /&gt;
discrepancy increase with pressure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001811.jpg|800x420px]]&lt;br /&gt;
&lt;br /&gt;
Supposed to be constant for liquid but the fluctuation was within an acceptable range&lt;br /&gt;
&lt;br /&gt;
====== Scripts: ======&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY THE REQUIRED THERMODYNAMIC STATE ###&lt;br /&gt;
&lt;br /&gt;
variable D equal 0.2&lt;br /&gt;
&lt;br /&gt;
variable T equal 2.0&lt;br /&gt;
&lt;br /&gt;
variable timestep equal 0.0025&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
&lt;br /&gt;
lattice sc ${D}&lt;br /&gt;
&lt;br /&gt;
region box block 0 15 0 15 0 15&lt;br /&gt;
&lt;br /&gt;
create_box 1 box&lt;br /&gt;
&lt;br /&gt;
create_atoms 1 box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE PHYSICAL PROPERTIES OF ATOMS ###&lt;br /&gt;
&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
&lt;br /&gt;
pair_style lj/cut/opt 3.0&lt;br /&gt;
&lt;br /&gt;
pair_coeff 1 1 1.0 1.0&lt;br /&gt;
&lt;br /&gt;
neighbor 2.0 bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; ASSIGN ATOMIC VELOCITIES ###&lt;br /&gt;
&lt;br /&gt;
velocity all create ${T} 12345 dist gaussian rot yes mom yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY ENSEMBLE ###&lt;br /&gt;
&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; THERMODYNAMIC OUTPUT CONTROL ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom time etotal temp press&lt;br /&gt;
&lt;br /&gt;
thermo 10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RECORD TRAJECTORY ###&lt;br /&gt;
&lt;br /&gt;
dump traj all custom 1000 output-1 id x y z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RUN SIMULATION TO MELT CRYSTAL ###&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
unfix nve&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; BRING SYSTEM TO REQUIRED STATE ###&lt;br /&gt;
&lt;br /&gt;
variable tdamp equal ${timestep}*100&lt;br /&gt;
&lt;br /&gt;
variable pdamp equal ${timestep}*1000&lt;br /&gt;
&lt;br /&gt;
fix nvt all nvt temp ${T} ${T} ${tdamp}&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
unfix nvt&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; MEASURE SYSTEM STATE ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom step etotal temp vol density&lt;br /&gt;
&lt;br /&gt;
variable dens equal density&lt;br /&gt;
&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
&lt;br /&gt;
variable volu equal vol&lt;br /&gt;
&lt;br /&gt;
variable ener equal etotal&lt;br /&gt;
&lt;br /&gt;
variable ener2 equal etotal*etotal&lt;br /&gt;
&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_vol v_ener v_ener2 v_press2&lt;br /&gt;
&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
&lt;br /&gt;
variable avevolu equal f_aves[3]&lt;br /&gt;
&lt;br /&gt;
variable heatc equal 3375*3375*(f_aves[5]-f_aves[4]*f_aves[4])/(f_aves[2]*f_aves[2])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Averages&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Density: ${avedens}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Volume: ${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Temperature: ${avetemp}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Cv/V: ${heatc}/${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001812.jpg|800x457px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Liquid and vapour drop constantly due to the evenly distributing simple cubic structure while solid has fluctuation because of the Fcc structure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In the solid case, illustrate which lattice sites the first three peaks correspond to.&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039; What is the lattice spacing? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lattice spacing around 1.45 reduced unit. &lt;br /&gt;
&lt;br /&gt;
[0.5,0.5,0] corners; [1.0,0,0] centre of face; [1.0,0.5,0] centre of a different face&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate  in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001813.jpg]]&lt;br /&gt;
[[File:Zyup001814.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001815.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The minima give the location of the maximum difference for the liquid and solid system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Because the HO model has a periodic motion while the Lennard Jones solid and liquid move randomly there for there is no pattern in this kind of motion. i.e. the dependence on previous velocity is rather low.&lt;br /&gt;
Attach a copy of your plot to your writeup.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;[[File:Zyup001816.jpg|800x387]]&lt;br /&gt;
[[File:Zyup001817.jpg]]&lt;br /&gt;
[[File:Zyup001818.jpg]]&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696303</id>
		<title>Rep:ZY3915liqsimu</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696303"/>
		<updated>2018-04-18T15:53:54Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; fff &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Third year simulation experiment =&lt;br /&gt;
&lt;br /&gt;
=== Liquid simulation and the diffusion coefficient ===&lt;br /&gt;
Zhuohao You&lt;br /&gt;
&lt;br /&gt;
==== Abstract ====&lt;br /&gt;
Diffusion behaviour of water was modeled and investigated by molecular dynamic simulation with the assistant of high performance computing power. The connection of diffusion coefficient to the mean square displacement was exploited to calculated the diffusion coefficient base on the performed MSD for liquid, solid and vapour. A further experiment on diffusion coefficient of solid was carried to exam its relationship with temperature.&amp;lt;span style=color:red&amp;gt; The abstract of a scientific paper is meant to briefly convey what you have done and your main results and conclusions, perhaps with a very short motivation. While you have briefly touched upon what you have done, your abstract lacks specifics. What exactly were your main results and conclusions? Also spelling and grammar! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
With the development of high performance computing system, the accuracy of molecular dynamic simulation (MSD) &amp;lt;span style=color:red&amp;gt; molecular dynamics is usually represented by the acronym &amp;quot;MD&amp;quot;, &amp;quot;MDS&amp;quot; for molecular dynamics simulation(s) would be acceptable if specified. However &amp;quot;MSD&amp;quot; has the letters in the wrong order, and is a bit confusing given that MSD is also common for &amp;quot;mean squared displacement&amp;quot; &amp;lt;/span&amp;gt; was brought to a new level &amp;lt;span style=color:red&amp;gt; Arguably, yes. However, you have performed relatively small simulations using cheap and cheerful LJ potentials, so perhaps this comment is not very relevant to what you have done. &amp;lt;/span&amp;gt;.  MSD is a useful tool that gives rise to calculation of macroscopic properties from microscopic scale systems. By considering the interaction for a single particle with a limited amount of nearby particles, &#039;exact&#039; prediction of thermo and physical properties are possible depending in the scale of calculation. &amp;lt;span style=color:red&amp;gt; This point is arguable, since there a lot of technical subtleties, certainly an elaboration would be necessary after making such a bold claim with the use of &amp;quot;exact&amp;quot;. &amp;lt;/span&amp;gt;[1]   &lt;br /&gt;
&lt;br /&gt;
Using the college&#039;s high performance computing facilities &amp;lt;span style=color:red&amp;gt; simply &amp;quot;the college&#039;s&amp;quot; is not an adequate accreditation of the hpc resources you have used. &amp;lt;/span&amp;gt;, simulation of simple liquid &amp;lt;span style=color:red&amp;gt; what about the other phases you have simulated? &amp;lt;/span&amp;gt;was performed and an important property of diffusion coefficient was computed from the simulation with a method manipulating its relationship with the mean squared displacement of ensemble particles.      &lt;br /&gt;
&lt;br /&gt;
==== Aims and Objectives ====&lt;br /&gt;
In this experiment, simulation using Lennard-Jones potential was applied on a simple liquid system. (e.g. Argon) &amp;lt;span style=color:red&amp;gt; why single out argon? have you used LJ parameters for argon? &amp;lt;/span&amp;gt;And investigation of the diffusion coefficient property of the system in liquid, solid and vapour phase was carried to give comparisons between the three states. Furtherly, a variation in temperature for the solid state was investigated to exploit the relationship between temperate and diffusion coefficient.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
The input script was base on the given npt file with 8000 atoms and the molecular dynamic was calculated by the velocity Verlet algorithm with based on Lennard-Jones potential. All the simulation was completed on the college HPC system with the parallel computational pacakge LAMMPS. The diffusion coefficient was computed by the given method:&lt;br /&gt;
The easiest way to measure &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; is by exploiting its connection to the [http://en.wikipedia.org/wiki/Mean_squared_displacement mean squared displacement].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This is not sufficient information for another scientist to reproduce your results. What LJ parameters have you used, what cutoff? You mention the NPT ensemble, what pressure and temperature? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results and discussion ====&lt;br /&gt;
The mean squared displacement (MSD),  effectively measures how much the particles deviate from their equilibrium positions &amp;lt;span style=color:red&amp;gt; a more clear explanation would be valuable here &amp;lt;/span&amp;gt; . The value of MSD represents the extent of random motion in the system, and it can be calculated with the equation:&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001803.jpg]]&lt;br /&gt;
&lt;br /&gt;
In this experiment, calculation of MSD was all completed by HPC and was given in the results. &lt;br /&gt;
&lt;br /&gt;
[[File:Zyup0018701.jpg]] [[File:Zyup001802.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; No x axis label for the second graph. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As shown in two graphs, the simulation for liquid, solid and vapour gives the evolution of mean squared displacement over ti,me for both cases. (8000 atoms and a million atoms respectively) The first thing to see on the graphs was the abnormal position for liquid state and gas state in the first figure, as the liquid phase gave a larger MSD as time goes, which on the other hand, for the second figure did have the gas curve laying above the liquid curve. &lt;br /&gt;
&lt;br /&gt;
In a realistic sense, as the MSD measured the random of particles, the displacement for liquid molecules should be much smaller than the vapour counterpart, since the gas particles was supposed to be about 10 times more distant than liquid molecules in the space.  &lt;br /&gt;
&lt;br /&gt;
Therefore, it turn out that the simulation for vapour phase with this MSD method was inaccurate, or a much longer period of time was required for the system to reach the equilibrium. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;As mentioned above, the diffusion coefficient was calculated by the relationship:    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt; so one sixth of the gradient of the MSD graph was the diffusion coeffient:&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000171 cm2/s; D(sol)= 1.92x10-6 cm2/s; D(vap)= 0.000106 cm2/s  (8000atoms)&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000177cm2/s;  D(sol)= 0;                          D(vap)= 0.00627cm2/s      (a million atoms)&lt;br /&gt;
&lt;br /&gt;
The result was quite close to each other apart from the vapour case, and the data confirmed that for the 8000 atoms system, an equilibrium was not reach therefore the inaccuracy was due to a lack of simulation steps as the gradient was only valid in the diffusion region of the graph (i.e. the linear part). In the case of solid the diffusion coefficient was to low to be calculated.&lt;br /&gt;
&lt;br /&gt;
===== Extension =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; why have you included an extension in the middle of your results section? &amp;lt;/span&amp;gt;&lt;br /&gt;
As the simulation for solid was quite stable in the last section, further interest of examine the temperate-diffusion coefficient connection was developed from the literature[2]. Five additional simulation with different temperature for the solid system was carried to investigate if the MDS simulation could give a similar trend. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!T (reduced temperature)&lt;br /&gt;
!Diffusion coefficient cm2/s&lt;br /&gt;
|-&lt;br /&gt;
|0.6&lt;br /&gt;
|7.48E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.7&lt;br /&gt;
|7.85E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.8&lt;br /&gt;
|1.26E-06&lt;br /&gt;
|-&lt;br /&gt;
|0.9&lt;br /&gt;
|1.47E-06&lt;br /&gt;
|-&lt;br /&gt;
|1.0&lt;br /&gt;
|2.5E-06&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;The results of simulation was given in the table, and a clear trend of D increasing with temperature was illustrated.&lt;br /&gt;
[[File:Zyup001805.jpg]][[File:Zyup001804.jpg]]&lt;br /&gt;
&lt;br /&gt;
In general, the simulation gave the same relationship with the literature graph &amp;lt;span style=color:red&amp;gt; citation? &amp;lt;/span&amp;gt;, though the fluctuation in the computed curve was greater due to the weakness in size and timesteps. This was saying the error in the simulation can be averaged out with large scale simulation andFurther investigate of this relation could be carried with a greater size (e.g. a million atoms) and more steps to provide more reliable data for the different states.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
The MD simulation provides a powerful and relatively reliable tool for investigation of the simple systems as shown in the experiment, this provides an alternative method to gather thermo and physical data from Lab experiment. To ensure the accuracy of the simulated data,  a large size of model to mimic the interaction and long time of random motion to reach equillibrium was required.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; These are some very vague conclusions. The conclusion of a scientific paper is meant to summarise the main results and conclusions, and perhaps offer a brief outlook. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Reference hav =====&lt;br /&gt;
# Computational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes, Norbert Attig, Kurt Binder, Helmut Grubmuller ¨ , Kurt Kremer (Eds.), John von Neumann Institute for Computing, Julich, ¨ NIC Series, Vol. 23, ISBN 3-00-012641-4, pp. 1-28, 2004.&lt;br /&gt;
#Molecular and condition parameters dependent diffusion coefficient of water in poly(vinyl alcohol): a molecular dynamics simulation study,Colloid and Polymer Science, 2017, 295(5),859-868&lt;br /&gt;
&lt;br /&gt;
= TASK: =&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time , &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by  (the values of , , and  are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00181.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00182.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00183.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Error= C*t*sin( ωt + φ )     C is a constant that equals approx. 0.000417 in the case of timestep=0.1  ω=1.00 and φ=1.00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Timesteps below 0.63s would be valid in this case. Ideally the total energy is conserved in a closed system, so it is better to monitor the total energy of a system to ensure the simulation was not collapsed in terms of a strong fluctuation in total energy.&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00184.jpg|800x263px]]&lt;br /&gt;
[[File:Zyup00185.jpg|714x300px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions.  55.5*N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/1000= 3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Estimate the volume of 10000 water molecules under standard conditions. 10000/3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;=2.99*10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00186.jpg|800x156px]]&lt;br /&gt;
[[File:Zyup00187.jpg|1000x200px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In case of two atoms generated on top of each other，the force between them will be very large and therefore leads to unwanted large acceleration to the system, cause a sudden blow up&#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of 0.8. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
1/(1.07722)3 = 0.800&lt;br /&gt;
4 atoms in one lattice, so 4/a3 = 1.2, a = 1.49380, side length is 1.49380.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;    4000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0              for every atom in type 1 mass = 1.0 (reduced unit)&lt;br /&gt;
pair_style lj/cut 3.0   cutoff Lennard-Jones potential with no Coulomb at 3.0 potential with no Coulomb at 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0  for all the pairs coefficient 1.0 1.0 was applied&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
velocity Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ask the demonstrator if you need help.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows easy variation of timesteps without worrying about forgetting to change the relevant steps to run. As the change in steps will be made by the codes as soon as the value of timesteps was changed. Instantaneous change of two related value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). &#039;&#039;&#039;[[File:Zyup00188.jpg|800x426px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Does the simulation reach equilibrium?   &#039;&#039;&#039;Yes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How long does this take?  &#039;&#039;&#039;0.3 reduced time&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00189.jpg|800x446px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results?     &#039;&#039;&#039;0.0025 &lt;br /&gt;
&lt;br /&gt;
Fluctuating in the region that covers the most accurate value from 0.0001&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;   0.015 it does not converge.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
  &lt;br /&gt;
γ = ( &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt; /T )0.5&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
•	Nevery = 100 use input values every 100 timesteps&lt;br /&gt;
&lt;br /&gt;
•	Nrepeat = 1000 1000 of times to use input values for calculating averages&lt;br /&gt;
&lt;br /&gt;
•	Nfreq =10000  calculate averages every 10000 timesteps&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How often will values of the temperature, etc., be sampled for the average?     &#039;&#039;&#039;every 10000 timesteps &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How many measurements contribute to the average?   &#039;&#039;&#039;1000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Looking to the following line, how much time will you simulate?   &#039;&#039;&#039;100000 unit time&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001810.jpg|800x488px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;Lower, as ideal gas law ignores any interactions between particles apart from collisions while the L-J system takes the potential energy into account so that results in a lower density.&lt;br /&gt;
discrepancy increase with pressure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001811.jpg|800x420px]]&lt;br /&gt;
&lt;br /&gt;
Supposed to be constant for liquid but the fluctuation was within an acceptable range&lt;br /&gt;
&lt;br /&gt;
====== Scripts: ======&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY THE REQUIRED THERMODYNAMIC STATE ###&lt;br /&gt;
&lt;br /&gt;
variable D equal 0.2&lt;br /&gt;
&lt;br /&gt;
variable T equal 2.0&lt;br /&gt;
&lt;br /&gt;
variable timestep equal 0.0025&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
&lt;br /&gt;
lattice sc ${D}&lt;br /&gt;
&lt;br /&gt;
region box block 0 15 0 15 0 15&lt;br /&gt;
&lt;br /&gt;
create_box 1 box&lt;br /&gt;
&lt;br /&gt;
create_atoms 1 box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE PHYSICAL PROPERTIES OF ATOMS ###&lt;br /&gt;
&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
&lt;br /&gt;
pair_style lj/cut/opt 3.0&lt;br /&gt;
&lt;br /&gt;
pair_coeff 1 1 1.0 1.0&lt;br /&gt;
&lt;br /&gt;
neighbor 2.0 bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; ASSIGN ATOMIC VELOCITIES ###&lt;br /&gt;
&lt;br /&gt;
velocity all create ${T} 12345 dist gaussian rot yes mom yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY ENSEMBLE ###&lt;br /&gt;
&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; THERMODYNAMIC OUTPUT CONTROL ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom time etotal temp press&lt;br /&gt;
&lt;br /&gt;
thermo 10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RECORD TRAJECTORY ###&lt;br /&gt;
&lt;br /&gt;
dump traj all custom 1000 output-1 id x y z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RUN SIMULATION TO MELT CRYSTAL ###&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
unfix nve&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; BRING SYSTEM TO REQUIRED STATE ###&lt;br /&gt;
&lt;br /&gt;
variable tdamp equal ${timestep}*100&lt;br /&gt;
&lt;br /&gt;
variable pdamp equal ${timestep}*1000&lt;br /&gt;
&lt;br /&gt;
fix nvt all nvt temp ${T} ${T} ${tdamp}&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
unfix nvt&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; MEASURE SYSTEM STATE ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom step etotal temp vol density&lt;br /&gt;
&lt;br /&gt;
variable dens equal density&lt;br /&gt;
&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
&lt;br /&gt;
variable volu equal vol&lt;br /&gt;
&lt;br /&gt;
variable ener equal etotal&lt;br /&gt;
&lt;br /&gt;
variable ener2 equal etotal*etotal&lt;br /&gt;
&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_vol v_ener v_ener2 v_press2&lt;br /&gt;
&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
&lt;br /&gt;
variable avevolu equal f_aves[3]&lt;br /&gt;
&lt;br /&gt;
variable heatc equal 3375*3375*(f_aves[5]-f_aves[4]*f_aves[4])/(f_aves[2]*f_aves[2])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Averages&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Density: ${avedens}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Volume: ${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Temperature: ${avetemp}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Cv/V: ${heatc}/${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001812.jpg|800x457px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Liquid and vapour drop constantly due to the evenly distributing simple cubic structure while solid has fluctuation because of the Fcc structure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In the solid case, illustrate which lattice sites the first three peaks correspond to.&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039; What is the lattice spacing? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lattice spacing around 1.45 reduced unit. &lt;br /&gt;
&lt;br /&gt;
[0.5,0.5,0] corners; [1.0,0,0] centre of face; [1.0,0.5,0] centre of a different face&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate  in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001813.jpg]]&lt;br /&gt;
[[File:Zyup001814.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001815.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The minima give the location of the maximum difference for the liquid and solid system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Because the HO model has a periodic motion while the Lennard Jones solid and liquid move randomly there for there is no pattern in this kind of motion. i.e. the dependence on previous velocity is rather low.&lt;br /&gt;
Attach a copy of your plot to your writeup.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;[[File:Zyup001816.jpg|800x387]]&lt;br /&gt;
[[File:Zyup001817.jpg]]&lt;br /&gt;
[[File:Zyup001818.jpg]]&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696302</id>
		<title>Rep:ZY3915liqsimu</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696302"/>
		<updated>2018-04-18T15:52:41Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Extension */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; fff &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Third year simulation experiment =&lt;br /&gt;
&lt;br /&gt;
=== Liquid simulation and the diffusion coefficient ===&lt;br /&gt;
Zhuohao You&lt;br /&gt;
&lt;br /&gt;
==== Abstract ====&lt;br /&gt;
Diffusion behaviour of water was modeled and investigated by molecular dynamic simulation with the assistant of high performance computing power. The connection of diffusion coefficient to the mean square displacement was exploited to calculated the diffusion coefficient base on the performed MSD for liquid, solid and vapour. A further experiment on diffusion coefficient of solid was carried to exam its relationship with temperature.&amp;lt;span style=color:red&amp;gt; The abstract of a scientific paper is meant to briefly convey what you have done and your main results and conclusions, perhaps with a very short motivation. While you have briefly touched upon what you have done, your abstract lacks specifics. What exactly were your main results and conclusions? Also spelling and grammar! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
With the development of high performance computing system, the accuracy of molecular dynamic simulation (MSD) &amp;lt;span style=color:red&amp;gt; molecular dynamics is usually represented by the acronym &amp;quot;MD&amp;quot;, &amp;quot;MDS&amp;quot; for molecular dynamics simulation(s) would be acceptable if specified. However &amp;quot;MSD&amp;quot; has the letters in the wrong order, and is a bit confusing given that MSD is also common for &amp;quot;mean squared displacement&amp;quot; &amp;lt;/span&amp;gt; was brought to a new level &amp;lt;span style=color:red&amp;gt; Arguably, yes. However, you have performed relatively small simulations using cheap and cheerful LJ potentials, so perhaps this comment is not very relevant to what you have done. &amp;lt;/span&amp;gt;.  MSD is a useful tool that gives rise to calculation of macroscopic properties from microscopic scale systems. By considering the interaction for a single particle with a limited amount of nearby particles, &#039;exact&#039; prediction of thermo and physical properties are possible depending in the scale of calculation. &amp;lt;span style=color:red&amp;gt; This point is arguable, since there a lot of technical subtleties, certainly an elaboration would be necessary after making such a bold claim with the use of &amp;quot;exact&amp;quot;. &amp;lt;/span&amp;gt;[1]   &lt;br /&gt;
&lt;br /&gt;
Using the college&#039;s high performance computing facilities &amp;lt;span style=color:red&amp;gt; simply &amp;quot;the college&#039;s&amp;quot; is not an adequate accreditation of the hpc resources you have used. &amp;lt;/span&amp;gt;, simulation of simple liquid &amp;lt;span style=color:red&amp;gt; what about the other phases you have simulated? &amp;lt;/span&amp;gt;was performed and an important property of diffusion coefficient was computed from the simulation with a method manipulating its relationship with the mean squared displacement of ensemble particles.      &lt;br /&gt;
&lt;br /&gt;
==== Aims and Objectives ====&lt;br /&gt;
In this experiment, simulation using Lennard-Jones potential was applied on a simple liquid system. (e.g. Argon) &amp;lt;span style=color:red&amp;gt; why single out argon? have you used LJ parameters for argon? &amp;lt;/span&amp;gt;And investigation of the diffusion coefficient property of the system in liquid, solid and vapour phase was carried to give comparisons between the three states. Furtherly, a variation in temperature for the solid state was investigated to exploit the relationship between temperate and diffusion coefficient.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
The input script was base on the given npt file with 8000 atoms and the molecular dynamic was calculated by the velocity Verlet algorithm with based on Lennard-Jones potential. All the simulation was completed on the college HPC system with the parallel computational pacakge LAMMPS. The diffusion coefficient was computed by the given method:&lt;br /&gt;
The easiest way to measure &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; is by exploiting its connection to the [http://en.wikipedia.org/wiki/Mean_squared_displacement mean squared displacement].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This is not sufficient information for another scientist to reproduce your results. What LJ parameters have you used, what cutoff? You mention the NPT ensemble, what pressure and temperature? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results and discussion ====&lt;br /&gt;
The mean squared displacement (MSD),  effectively measures how much the particles deviate from their equilibrium positions &amp;lt;span style=color:red&amp;gt; a more clear explanation would be valuable here &amp;lt;/span&amp;gt; . The value of MSD represents the extent of random motion in the system, and it can be calculated with the equation:&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001803.jpg]]&lt;br /&gt;
&lt;br /&gt;
In this experiment, calculation of MSD was all completed by HPC and was given in the results. &lt;br /&gt;
&lt;br /&gt;
[[File:Zyup0018701.jpg]] [[File:Zyup001802.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; No x axis label for the second graph. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As shown in two graphs, the simulation for liquid, solid and vapour gives the evolution of mean squared displacement over ti,me for both cases. (8000 atoms and a million atoms respectively) The first thing to see on the graphs was the abnormal position for liquid state and gas state in the first figure, as the liquid phase gave a larger MSD as time goes, which on the other hand, for the second figure did have the gas curve laying above the liquid curve. &lt;br /&gt;
&lt;br /&gt;
In a realistic sense, as the MSD measured the random of particles, the displacement for liquid molecules should be much smaller than the vapour counterpart, since the gas particles was supposed to be about 10 times more distant than liquid molecules in the space.  &lt;br /&gt;
&lt;br /&gt;
Therefore, it turn out that the simulation for vapour phase with this MSD method was inaccurate, or a much longer period of time was required for the system to reach the equilibrium. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;As mentioned above, the diffusion coefficient was calculated by the relationship:    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt; so one sixth of the gradient of the MSD graph was the diffusion coeffient:&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000171 cm2/s; D(sol)= 1.92x10-6 cm2/s; D(vap)= 0.000106 cm2/s  (8000atoms)&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000177cm2/s;  D(sol)= 0;                          D(vap)= 0.00627cm2/s      (a million atoms)&lt;br /&gt;
&lt;br /&gt;
The result was quite close to each other apart from the vapour case, and the data confirmed that for the 8000 atoms system, an equilibrium was not reach therefore the inaccuracy was due to a lack of simulation steps as the gradient was only valid in the diffusion region of the graph (i.e. the linear part). In the case of solid the diffusion coefficient was to low to be calculated.&lt;br /&gt;
&lt;br /&gt;
===== Extension =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; why have you included an extension in the middle of your results section? &amp;lt;/span&amp;gt;&lt;br /&gt;
As the simulation for solid was quite stable in the last section, further interest of examine the temperate-diffusion coefficient connection was developed from the literature[2]. Five additional simulation with different temperature for the solid system was carried to investigate if the MDS simulation could give a similar trend. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!T (reduced temperature)&lt;br /&gt;
!Diffusion coefficient cm2/s&lt;br /&gt;
|-&lt;br /&gt;
|0.6&lt;br /&gt;
|7.48E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.7&lt;br /&gt;
|7.85E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.8&lt;br /&gt;
|1.26E-06&lt;br /&gt;
|-&lt;br /&gt;
|0.9&lt;br /&gt;
|1.47E-06&lt;br /&gt;
|-&lt;br /&gt;
|1.0&lt;br /&gt;
|2.5E-06&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;The results of simulation was given in the table, and a clear trend of D increasing with temperature was illustrated.&lt;br /&gt;
[[File:Zyup001805.jpg]][[File:Zyup001804.jpg]]&lt;br /&gt;
&lt;br /&gt;
In general, the simulation gave the same relationship with the literature graph &amp;lt;span style=color:red&amp;gt; citation? &amp;lt;/span&amp;gt;, though the fluctuation in the computed curve was greater due to the weakness in size and timesteps. This was saying the error in the simulation can be averaged out with large scale simulation andFurther investigate of this relation could be carried with a greater size (e.g. a million atoms) and more steps to provide more reliable data for the different states.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
The MD simulation provides a powerful and relatively reliable tool for investigation of the simple systems as shown in the experiment, this provides an alternative method to gather thermo and physical data from Lab experiment. To ensure the accuracy of the simulated data,  a large size of model to mimic the interaction and long time of random motion to reach equillibrium was required.&lt;br /&gt;
&lt;br /&gt;
===== Reference hav =====&lt;br /&gt;
# Computational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes, Norbert Attig, Kurt Binder, Helmut Grubmuller ¨ , Kurt Kremer (Eds.), John von Neumann Institute for Computing, Julich, ¨ NIC Series, Vol. 23, ISBN 3-00-012641-4, pp. 1-28, 2004.&lt;br /&gt;
#Molecular and condition parameters dependent diffusion coefficient of water in poly(vinyl alcohol): a molecular dynamics simulation study,Colloid and Polymer Science, 2017, 295(5),859-868&lt;br /&gt;
&lt;br /&gt;
= TASK: =&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time , &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by  (the values of , , and  are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00181.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00182.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00183.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Error= C*t*sin( ωt + φ )     C is a constant that equals approx. 0.000417 in the case of timestep=0.1  ω=1.00 and φ=1.00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Timesteps below 0.63s would be valid in this case. Ideally the total energy is conserved in a closed system, so it is better to monitor the total energy of a system to ensure the simulation was not collapsed in terms of a strong fluctuation in total energy.&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00184.jpg|800x263px]]&lt;br /&gt;
[[File:Zyup00185.jpg|714x300px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions.  55.5*N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/1000= 3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Estimate the volume of 10000 water molecules under standard conditions. 10000/3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;=2.99*10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00186.jpg|800x156px]]&lt;br /&gt;
[[File:Zyup00187.jpg|1000x200px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In case of two atoms generated on top of each other，the force between them will be very large and therefore leads to unwanted large acceleration to the system, cause a sudden blow up&#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of 0.8. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
1/(1.07722)3 = 0.800&lt;br /&gt;
4 atoms in one lattice, so 4/a3 = 1.2, a = 1.49380, side length is 1.49380.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;    4000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0              for every atom in type 1 mass = 1.0 (reduced unit)&lt;br /&gt;
pair_style lj/cut 3.0   cutoff Lennard-Jones potential with no Coulomb at 3.0 potential with no Coulomb at 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0  for all the pairs coefficient 1.0 1.0 was applied&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
velocity Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ask the demonstrator if you need help.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows easy variation of timesteps without worrying about forgetting to change the relevant steps to run. As the change in steps will be made by the codes as soon as the value of timesteps was changed. Instantaneous change of two related value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). &#039;&#039;&#039;[[File:Zyup00188.jpg|800x426px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Does the simulation reach equilibrium?   &#039;&#039;&#039;Yes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How long does this take?  &#039;&#039;&#039;0.3 reduced time&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00189.jpg|800x446px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results?     &#039;&#039;&#039;0.0025 &lt;br /&gt;
&lt;br /&gt;
Fluctuating in the region that covers the most accurate value from 0.0001&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;   0.015 it does not converge.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
  &lt;br /&gt;
γ = ( &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt; /T )0.5&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
•	Nevery = 100 use input values every 100 timesteps&lt;br /&gt;
&lt;br /&gt;
•	Nrepeat = 1000 1000 of times to use input values for calculating averages&lt;br /&gt;
&lt;br /&gt;
•	Nfreq =10000  calculate averages every 10000 timesteps&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How often will values of the temperature, etc., be sampled for the average?     &#039;&#039;&#039;every 10000 timesteps &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How many measurements contribute to the average?   &#039;&#039;&#039;1000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Looking to the following line, how much time will you simulate?   &#039;&#039;&#039;100000 unit time&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001810.jpg|800x488px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;Lower, as ideal gas law ignores any interactions between particles apart from collisions while the L-J system takes the potential energy into account so that results in a lower density.&lt;br /&gt;
discrepancy increase with pressure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001811.jpg|800x420px]]&lt;br /&gt;
&lt;br /&gt;
Supposed to be constant for liquid but the fluctuation was within an acceptable range&lt;br /&gt;
&lt;br /&gt;
====== Scripts: ======&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY THE REQUIRED THERMODYNAMIC STATE ###&lt;br /&gt;
&lt;br /&gt;
variable D equal 0.2&lt;br /&gt;
&lt;br /&gt;
variable T equal 2.0&lt;br /&gt;
&lt;br /&gt;
variable timestep equal 0.0025&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
&lt;br /&gt;
lattice sc ${D}&lt;br /&gt;
&lt;br /&gt;
region box block 0 15 0 15 0 15&lt;br /&gt;
&lt;br /&gt;
create_box 1 box&lt;br /&gt;
&lt;br /&gt;
create_atoms 1 box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE PHYSICAL PROPERTIES OF ATOMS ###&lt;br /&gt;
&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
&lt;br /&gt;
pair_style lj/cut/opt 3.0&lt;br /&gt;
&lt;br /&gt;
pair_coeff 1 1 1.0 1.0&lt;br /&gt;
&lt;br /&gt;
neighbor 2.0 bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; ASSIGN ATOMIC VELOCITIES ###&lt;br /&gt;
&lt;br /&gt;
velocity all create ${T} 12345 dist gaussian rot yes mom yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY ENSEMBLE ###&lt;br /&gt;
&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; THERMODYNAMIC OUTPUT CONTROL ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom time etotal temp press&lt;br /&gt;
&lt;br /&gt;
thermo 10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RECORD TRAJECTORY ###&lt;br /&gt;
&lt;br /&gt;
dump traj all custom 1000 output-1 id x y z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RUN SIMULATION TO MELT CRYSTAL ###&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
unfix nve&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; BRING SYSTEM TO REQUIRED STATE ###&lt;br /&gt;
&lt;br /&gt;
variable tdamp equal ${timestep}*100&lt;br /&gt;
&lt;br /&gt;
variable pdamp equal ${timestep}*1000&lt;br /&gt;
&lt;br /&gt;
fix nvt all nvt temp ${T} ${T} ${tdamp}&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
unfix nvt&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; MEASURE SYSTEM STATE ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom step etotal temp vol density&lt;br /&gt;
&lt;br /&gt;
variable dens equal density&lt;br /&gt;
&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
&lt;br /&gt;
variable volu equal vol&lt;br /&gt;
&lt;br /&gt;
variable ener equal etotal&lt;br /&gt;
&lt;br /&gt;
variable ener2 equal etotal*etotal&lt;br /&gt;
&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_vol v_ener v_ener2 v_press2&lt;br /&gt;
&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
&lt;br /&gt;
variable avevolu equal f_aves[3]&lt;br /&gt;
&lt;br /&gt;
variable heatc equal 3375*3375*(f_aves[5]-f_aves[4]*f_aves[4])/(f_aves[2]*f_aves[2])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Averages&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Density: ${avedens}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Volume: ${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Temperature: ${avetemp}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Cv/V: ${heatc}/${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001812.jpg|800x457px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Liquid and vapour drop constantly due to the evenly distributing simple cubic structure while solid has fluctuation because of the Fcc structure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In the solid case, illustrate which lattice sites the first three peaks correspond to.&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039; What is the lattice spacing? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lattice spacing around 1.45 reduced unit. &lt;br /&gt;
&lt;br /&gt;
[0.5,0.5,0] corners; [1.0,0,0] centre of face; [1.0,0.5,0] centre of a different face&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate  in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001813.jpg]]&lt;br /&gt;
[[File:Zyup001814.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001815.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The minima give the location of the maximum difference for the liquid and solid system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Because the HO model has a periodic motion while the Lennard Jones solid and liquid move randomly there for there is no pattern in this kind of motion. i.e. the dependence on previous velocity is rather low.&lt;br /&gt;
Attach a copy of your plot to your writeup.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;[[File:Zyup001816.jpg|800x387]]&lt;br /&gt;
[[File:Zyup001817.jpg]]&lt;br /&gt;
[[File:Zyup001818.jpg]]&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696301</id>
		<title>Rep:ZY3915liqsimu</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696301"/>
		<updated>2018-04-18T15:48:30Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Extension */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; fff &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Third year simulation experiment =&lt;br /&gt;
&lt;br /&gt;
=== Liquid simulation and the diffusion coefficient ===&lt;br /&gt;
Zhuohao You&lt;br /&gt;
&lt;br /&gt;
==== Abstract ====&lt;br /&gt;
Diffusion behaviour of water was modeled and investigated by molecular dynamic simulation with the assistant of high performance computing power. The connection of diffusion coefficient to the mean square displacement was exploited to calculated the diffusion coefficient base on the performed MSD for liquid, solid and vapour. A further experiment on diffusion coefficient of solid was carried to exam its relationship with temperature.&amp;lt;span style=color:red&amp;gt; The abstract of a scientific paper is meant to briefly convey what you have done and your main results and conclusions, perhaps with a very short motivation. While you have briefly touched upon what you have done, your abstract lacks specifics. What exactly were your main results and conclusions? Also spelling and grammar! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
With the development of high performance computing system, the accuracy of molecular dynamic simulation (MSD) &amp;lt;span style=color:red&amp;gt; molecular dynamics is usually represented by the acronym &amp;quot;MD&amp;quot;, &amp;quot;MDS&amp;quot; for molecular dynamics simulation(s) would be acceptable if specified. However &amp;quot;MSD&amp;quot; has the letters in the wrong order, and is a bit confusing given that MSD is also common for &amp;quot;mean squared displacement&amp;quot; &amp;lt;/span&amp;gt; was brought to a new level &amp;lt;span style=color:red&amp;gt; Arguably, yes. However, you have performed relatively small simulations using cheap and cheerful LJ potentials, so perhaps this comment is not very relevant to what you have done. &amp;lt;/span&amp;gt;.  MSD is a useful tool that gives rise to calculation of macroscopic properties from microscopic scale systems. By considering the interaction for a single particle with a limited amount of nearby particles, &#039;exact&#039; prediction of thermo and physical properties are possible depending in the scale of calculation. &amp;lt;span style=color:red&amp;gt; This point is arguable, since there a lot of technical subtleties, certainly an elaboration would be necessary after making such a bold claim with the use of &amp;quot;exact&amp;quot;. &amp;lt;/span&amp;gt;[1]   &lt;br /&gt;
&lt;br /&gt;
Using the college&#039;s high performance computing facilities &amp;lt;span style=color:red&amp;gt; simply &amp;quot;the college&#039;s&amp;quot; is not an adequate accreditation of the hpc resources you have used. &amp;lt;/span&amp;gt;, simulation of simple liquid &amp;lt;span style=color:red&amp;gt; what about the other phases you have simulated? &amp;lt;/span&amp;gt;was performed and an important property of diffusion coefficient was computed from the simulation with a method manipulating its relationship with the mean squared displacement of ensemble particles.      &lt;br /&gt;
&lt;br /&gt;
==== Aims and Objectives ====&lt;br /&gt;
In this experiment, simulation using Lennard-Jones potential was applied on a simple liquid system. (e.g. Argon) &amp;lt;span style=color:red&amp;gt; why single out argon? have you used LJ parameters for argon? &amp;lt;/span&amp;gt;And investigation of the diffusion coefficient property of the system in liquid, solid and vapour phase was carried to give comparisons between the three states. Furtherly, a variation in temperature for the solid state was investigated to exploit the relationship between temperate and diffusion coefficient.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
The input script was base on the given npt file with 8000 atoms and the molecular dynamic was calculated by the velocity Verlet algorithm with based on Lennard-Jones potential. All the simulation was completed on the college HPC system with the parallel computational pacakge LAMMPS. The diffusion coefficient was computed by the given method:&lt;br /&gt;
The easiest way to measure &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; is by exploiting its connection to the [http://en.wikipedia.org/wiki/Mean_squared_displacement mean squared displacement].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This is not sufficient information for another scientist to reproduce your results. What LJ parameters have you used, what cutoff? You mention the NPT ensemble, what pressure and temperature? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results and discussion ====&lt;br /&gt;
The mean squared displacement (MSD),  effectively measures how much the particles deviate from their equilibrium positions &amp;lt;span style=color:red&amp;gt; a more clear explanation would be valuable here &amp;lt;/span&amp;gt; . The value of MSD represents the extent of random motion in the system, and it can be calculated with the equation:&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001803.jpg]]&lt;br /&gt;
&lt;br /&gt;
In this experiment, calculation of MSD was all completed by HPC and was given in the results. &lt;br /&gt;
&lt;br /&gt;
[[File:Zyup0018701.jpg]] [[File:Zyup001802.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; No x axis label for the second graph. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As shown in two graphs, the simulation for liquid, solid and vapour gives the evolution of mean squared displacement over ti,me for both cases. (8000 atoms and a million atoms respectively) The first thing to see on the graphs was the abnormal position for liquid state and gas state in the first figure, as the liquid phase gave a larger MSD as time goes, which on the other hand, for the second figure did have the gas curve laying above the liquid curve. &lt;br /&gt;
&lt;br /&gt;
In a realistic sense, as the MSD measured the random of particles, the displacement for liquid molecules should be much smaller than the vapour counterpart, since the gas particles was supposed to be about 10 times more distant than liquid molecules in the space.  &lt;br /&gt;
&lt;br /&gt;
Therefore, it turn out that the simulation for vapour phase with this MSD method was inaccurate, or a much longer period of time was required for the system to reach the equilibrium. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;As mentioned above, the diffusion coefficient was calculated by the relationship:    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt; so one sixth of the gradient of the MSD graph was the diffusion coeffient:&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000171 cm2/s; D(sol)= 1.92x10-6 cm2/s; D(vap)= 0.000106 cm2/s  (8000atoms)&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000177cm2/s;  D(sol)= 0;                          D(vap)= 0.00627cm2/s      (a million atoms)&lt;br /&gt;
&lt;br /&gt;
The result was quite close to each other apart from the vapour case, and the data confirmed that for the 8000 atoms system, an equilibrium was not reach therefore the inaccuracy was due to a lack of simulation steps as the gradient was only valid in the diffusion region of the graph (i.e. the linear part). In the case of solid the diffusion coefficient was to low to be calculated.&lt;br /&gt;
&lt;br /&gt;
===== Extension =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; why have you included an extension in the middle of your results section? &amp;lt;/span&amp;gt;&lt;br /&gt;
As the simulation for solid was quite stable in the last section, further interest of examine the temperate-diffusion coefficient connection was developed from the literature[2]. Five additional simulation with different temperature for the solid system was carried to investigate if the MDS simulation could give a similar trend. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!T (reduced temperature)&lt;br /&gt;
!Diffusion coefficient cm2/s&lt;br /&gt;
|-&lt;br /&gt;
|0.6&lt;br /&gt;
|7.48E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.7&lt;br /&gt;
|7.85E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.8&lt;br /&gt;
|1.26E-06&lt;br /&gt;
|-&lt;br /&gt;
|0.9&lt;br /&gt;
|1.47E-06&lt;br /&gt;
|-&lt;br /&gt;
|1.0&lt;br /&gt;
|2.5E-06&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;The results of simulation was given in the table, and a clear trend of D increasing with temperature was illustrated.&lt;br /&gt;
[[File:Zyup001805.jpg]][[File:Zyup001804.jpg]]&lt;br /&gt;
&lt;br /&gt;
In general, the simulation gave the same relationship with the literature graph, though the fluctuation in the computed curve was greater due to the weakness in size and timesteps. This was saying the error in the simulation can be averaged out with large scale simulation andFurther investigate of this relation could be carried with a greater size (e.g. a million atoms) and more steps to provide more reliable data for the different states.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
The MD simulation provides a powerful and relatively reliable tool for investigation of the simple systems as shown in the experiment, this provides an alternative method to gather thermo and physical data from Lab experiment. To ensure the accuracy of the simulated data,  a large size of model to mimic the interaction and long time of random motion to reach equillibrium was required.&lt;br /&gt;
&lt;br /&gt;
===== Reference hav =====&lt;br /&gt;
# Computational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes, Norbert Attig, Kurt Binder, Helmut Grubmuller ¨ , Kurt Kremer (Eds.), John von Neumann Institute for Computing, Julich, ¨ NIC Series, Vol. 23, ISBN 3-00-012641-4, pp. 1-28, 2004.&lt;br /&gt;
#Molecular and condition parameters dependent diffusion coefficient of water in poly(vinyl alcohol): a molecular dynamics simulation study,Colloid and Polymer Science, 2017, 295(5),859-868&lt;br /&gt;
&lt;br /&gt;
= TASK: =&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time , &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by  (the values of , , and  are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00181.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00182.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00183.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Error= C*t*sin( ωt + φ )     C is a constant that equals approx. 0.000417 in the case of timestep=0.1  ω=1.00 and φ=1.00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Timesteps below 0.63s would be valid in this case. Ideally the total energy is conserved in a closed system, so it is better to monitor the total energy of a system to ensure the simulation was not collapsed in terms of a strong fluctuation in total energy.&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00184.jpg|800x263px]]&lt;br /&gt;
[[File:Zyup00185.jpg|714x300px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions.  55.5*N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/1000= 3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Estimate the volume of 10000 water molecules under standard conditions. 10000/3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;=2.99*10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00186.jpg|800x156px]]&lt;br /&gt;
[[File:Zyup00187.jpg|1000x200px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In case of two atoms generated on top of each other，the force between them will be very large and therefore leads to unwanted large acceleration to the system, cause a sudden blow up&#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of 0.8. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
1/(1.07722)3 = 0.800&lt;br /&gt;
4 atoms in one lattice, so 4/a3 = 1.2, a = 1.49380, side length is 1.49380.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;    4000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0              for every atom in type 1 mass = 1.0 (reduced unit)&lt;br /&gt;
pair_style lj/cut 3.0   cutoff Lennard-Jones potential with no Coulomb at 3.0 potential with no Coulomb at 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0  for all the pairs coefficient 1.0 1.0 was applied&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
velocity Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ask the demonstrator if you need help.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows easy variation of timesteps without worrying about forgetting to change the relevant steps to run. As the change in steps will be made by the codes as soon as the value of timesteps was changed. Instantaneous change of two related value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). &#039;&#039;&#039;[[File:Zyup00188.jpg|800x426px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Does the simulation reach equilibrium?   &#039;&#039;&#039;Yes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How long does this take?  &#039;&#039;&#039;0.3 reduced time&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00189.jpg|800x446px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results?     &#039;&#039;&#039;0.0025 &lt;br /&gt;
&lt;br /&gt;
Fluctuating in the region that covers the most accurate value from 0.0001&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;   0.015 it does not converge.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
  &lt;br /&gt;
γ = ( &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt; /T )0.5&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
•	Nevery = 100 use input values every 100 timesteps&lt;br /&gt;
&lt;br /&gt;
•	Nrepeat = 1000 1000 of times to use input values for calculating averages&lt;br /&gt;
&lt;br /&gt;
•	Nfreq =10000  calculate averages every 10000 timesteps&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How often will values of the temperature, etc., be sampled for the average?     &#039;&#039;&#039;every 10000 timesteps &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How many measurements contribute to the average?   &#039;&#039;&#039;1000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Looking to the following line, how much time will you simulate?   &#039;&#039;&#039;100000 unit time&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001810.jpg|800x488px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;Lower, as ideal gas law ignores any interactions between particles apart from collisions while the L-J system takes the potential energy into account so that results in a lower density.&lt;br /&gt;
discrepancy increase with pressure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001811.jpg|800x420px]]&lt;br /&gt;
&lt;br /&gt;
Supposed to be constant for liquid but the fluctuation was within an acceptable range&lt;br /&gt;
&lt;br /&gt;
====== Scripts: ======&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY THE REQUIRED THERMODYNAMIC STATE ###&lt;br /&gt;
&lt;br /&gt;
variable D equal 0.2&lt;br /&gt;
&lt;br /&gt;
variable T equal 2.0&lt;br /&gt;
&lt;br /&gt;
variable timestep equal 0.0025&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
&lt;br /&gt;
lattice sc ${D}&lt;br /&gt;
&lt;br /&gt;
region box block 0 15 0 15 0 15&lt;br /&gt;
&lt;br /&gt;
create_box 1 box&lt;br /&gt;
&lt;br /&gt;
create_atoms 1 box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE PHYSICAL PROPERTIES OF ATOMS ###&lt;br /&gt;
&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
&lt;br /&gt;
pair_style lj/cut/opt 3.0&lt;br /&gt;
&lt;br /&gt;
pair_coeff 1 1 1.0 1.0&lt;br /&gt;
&lt;br /&gt;
neighbor 2.0 bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; ASSIGN ATOMIC VELOCITIES ###&lt;br /&gt;
&lt;br /&gt;
velocity all create ${T} 12345 dist gaussian rot yes mom yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY ENSEMBLE ###&lt;br /&gt;
&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; THERMODYNAMIC OUTPUT CONTROL ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom time etotal temp press&lt;br /&gt;
&lt;br /&gt;
thermo 10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RECORD TRAJECTORY ###&lt;br /&gt;
&lt;br /&gt;
dump traj all custom 1000 output-1 id x y z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RUN SIMULATION TO MELT CRYSTAL ###&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
unfix nve&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; BRING SYSTEM TO REQUIRED STATE ###&lt;br /&gt;
&lt;br /&gt;
variable tdamp equal ${timestep}*100&lt;br /&gt;
&lt;br /&gt;
variable pdamp equal ${timestep}*1000&lt;br /&gt;
&lt;br /&gt;
fix nvt all nvt temp ${T} ${T} ${tdamp}&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
unfix nvt&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; MEASURE SYSTEM STATE ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom step etotal temp vol density&lt;br /&gt;
&lt;br /&gt;
variable dens equal density&lt;br /&gt;
&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
&lt;br /&gt;
variable volu equal vol&lt;br /&gt;
&lt;br /&gt;
variable ener equal etotal&lt;br /&gt;
&lt;br /&gt;
variable ener2 equal etotal*etotal&lt;br /&gt;
&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_vol v_ener v_ener2 v_press2&lt;br /&gt;
&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
&lt;br /&gt;
variable avevolu equal f_aves[3]&lt;br /&gt;
&lt;br /&gt;
variable heatc equal 3375*3375*(f_aves[5]-f_aves[4]*f_aves[4])/(f_aves[2]*f_aves[2])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Averages&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Density: ${avedens}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Volume: ${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Temperature: ${avetemp}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Cv/V: ${heatc}/${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001812.jpg|800x457px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Liquid and vapour drop constantly due to the evenly distributing simple cubic structure while solid has fluctuation because of the Fcc structure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In the solid case, illustrate which lattice sites the first three peaks correspond to.&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039; What is the lattice spacing? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lattice spacing around 1.45 reduced unit. &lt;br /&gt;
&lt;br /&gt;
[0.5,0.5,0] corners; [1.0,0,0] centre of face; [1.0,0.5,0] centre of a different face&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate  in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001813.jpg]]&lt;br /&gt;
[[File:Zyup001814.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001815.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The minima give the location of the maximum difference for the liquid and solid system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Because the HO model has a periodic motion while the Lennard Jones solid and liquid move randomly there for there is no pattern in this kind of motion. i.e. the dependence on previous velocity is rather low.&lt;br /&gt;
Attach a copy of your plot to your writeup.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;[[File:Zyup001816.jpg|800x387]]&lt;br /&gt;
[[File:Zyup001817.jpg]]&lt;br /&gt;
[[File:Zyup001818.jpg]]&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696300</id>
		<title>Rep:ZY3915liqsimu</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696300"/>
		<updated>2018-04-18T15:48:02Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Results and discussion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; fff &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Third year simulation experiment =&lt;br /&gt;
&lt;br /&gt;
=== Liquid simulation and the diffusion coefficient ===&lt;br /&gt;
Zhuohao You&lt;br /&gt;
&lt;br /&gt;
==== Abstract ====&lt;br /&gt;
Diffusion behaviour of water was modeled and investigated by molecular dynamic simulation with the assistant of high performance computing power. The connection of diffusion coefficient to the mean square displacement was exploited to calculated the diffusion coefficient base on the performed MSD for liquid, solid and vapour. A further experiment on diffusion coefficient of solid was carried to exam its relationship with temperature.&amp;lt;span style=color:red&amp;gt; The abstract of a scientific paper is meant to briefly convey what you have done and your main results and conclusions, perhaps with a very short motivation. While you have briefly touched upon what you have done, your abstract lacks specifics. What exactly were your main results and conclusions? Also spelling and grammar! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
With the development of high performance computing system, the accuracy of molecular dynamic simulation (MSD) &amp;lt;span style=color:red&amp;gt; molecular dynamics is usually represented by the acronym &amp;quot;MD&amp;quot;, &amp;quot;MDS&amp;quot; for molecular dynamics simulation(s) would be acceptable if specified. However &amp;quot;MSD&amp;quot; has the letters in the wrong order, and is a bit confusing given that MSD is also common for &amp;quot;mean squared displacement&amp;quot; &amp;lt;/span&amp;gt; was brought to a new level &amp;lt;span style=color:red&amp;gt; Arguably, yes. However, you have performed relatively small simulations using cheap and cheerful LJ potentials, so perhaps this comment is not very relevant to what you have done. &amp;lt;/span&amp;gt;.  MSD is a useful tool that gives rise to calculation of macroscopic properties from microscopic scale systems. By considering the interaction for a single particle with a limited amount of nearby particles, &#039;exact&#039; prediction of thermo and physical properties are possible depending in the scale of calculation. &amp;lt;span style=color:red&amp;gt; This point is arguable, since there a lot of technical subtleties, certainly an elaboration would be necessary after making such a bold claim with the use of &amp;quot;exact&amp;quot;. &amp;lt;/span&amp;gt;[1]   &lt;br /&gt;
&lt;br /&gt;
Using the college&#039;s high performance computing facilities &amp;lt;span style=color:red&amp;gt; simply &amp;quot;the college&#039;s&amp;quot; is not an adequate accreditation of the hpc resources you have used. &amp;lt;/span&amp;gt;, simulation of simple liquid &amp;lt;span style=color:red&amp;gt; what about the other phases you have simulated? &amp;lt;/span&amp;gt;was performed and an important property of diffusion coefficient was computed from the simulation with a method manipulating its relationship with the mean squared displacement of ensemble particles.      &lt;br /&gt;
&lt;br /&gt;
==== Aims and Objectives ====&lt;br /&gt;
In this experiment, simulation using Lennard-Jones potential was applied on a simple liquid system. (e.g. Argon) &amp;lt;span style=color:red&amp;gt; why single out argon? have you used LJ parameters for argon? &amp;lt;/span&amp;gt;And investigation of the diffusion coefficient property of the system in liquid, solid and vapour phase was carried to give comparisons between the three states. Furtherly, a variation in temperature for the solid state was investigated to exploit the relationship between temperate and diffusion coefficient.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
The input script was base on the given npt file with 8000 atoms and the molecular dynamic was calculated by the velocity Verlet algorithm with based on Lennard-Jones potential. All the simulation was completed on the college HPC system with the parallel computational pacakge LAMMPS. The diffusion coefficient was computed by the given method:&lt;br /&gt;
The easiest way to measure &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; is by exploiting its connection to the [http://en.wikipedia.org/wiki/Mean_squared_displacement mean squared displacement].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This is not sufficient information for another scientist to reproduce your results. What LJ parameters have you used, what cutoff? You mention the NPT ensemble, what pressure and temperature? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results and discussion ====&lt;br /&gt;
The mean squared displacement (MSD),  effectively measures how much the particles deviate from their equilibrium positions &amp;lt;span style=color:red&amp;gt; a more clear explanation would be valuable here &amp;lt;/span&amp;gt; . The value of MSD represents the extent of random motion in the system, and it can be calculated with the equation:&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001803.jpg]]&lt;br /&gt;
&lt;br /&gt;
In this experiment, calculation of MSD was all completed by HPC and was given in the results. &lt;br /&gt;
&lt;br /&gt;
[[File:Zyup0018701.jpg]] [[File:Zyup001802.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; No x axis label for the second graph. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As shown in two graphs, the simulation for liquid, solid and vapour gives the evolution of mean squared displacement over ti,me for both cases. (8000 atoms and a million atoms respectively) The first thing to see on the graphs was the abnormal position for liquid state and gas state in the first figure, as the liquid phase gave a larger MSD as time goes, which on the other hand, for the second figure did have the gas curve laying above the liquid curve. &lt;br /&gt;
&lt;br /&gt;
In a realistic sense, as the MSD measured the random of particles, the displacement for liquid molecules should be much smaller than the vapour counterpart, since the gas particles was supposed to be about 10 times more distant than liquid molecules in the space.  &lt;br /&gt;
&lt;br /&gt;
Therefore, it turn out that the simulation for vapour phase with this MSD method was inaccurate, or a much longer period of time was required for the system to reach the equilibrium. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;As mentioned above, the diffusion coefficient was calculated by the relationship:    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt; so one sixth of the gradient of the MSD graph was the diffusion coeffient:&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000171 cm2/s; D(sol)= 1.92x10-6 cm2/s; D(vap)= 0.000106 cm2/s  (8000atoms)&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000177cm2/s;  D(sol)= 0;                          D(vap)= 0.00627cm2/s      (a million atoms)&lt;br /&gt;
&lt;br /&gt;
The result was quite close to each other apart from the vapour case, and the data confirmed that for the 8000 atoms system, an equilibrium was not reach therefore the inaccuracy was due to a lack of simulation steps as the gradient was only valid in the diffusion region of the graph (i.e. the linear part). In the case of solid the diffusion coefficient was to low to be calculated.&lt;br /&gt;
&lt;br /&gt;
===== Extension =====&lt;br /&gt;
As the simulation for solid was quite stable in the last section, further interest of examine the temperate-diffusion coefficient connection was developed from the literature[2]. Five additional simulation with different temperature for the solid system was carried to investigate if the MDS simulation could give a similar trend. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!T (reduced temperature)&lt;br /&gt;
!Diffusion coefficient cm2/s&lt;br /&gt;
|-&lt;br /&gt;
|0.6&lt;br /&gt;
|7.48E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.7&lt;br /&gt;
|7.85E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.8&lt;br /&gt;
|1.26E-06&lt;br /&gt;
|-&lt;br /&gt;
|0.9&lt;br /&gt;
|1.47E-06&lt;br /&gt;
|-&lt;br /&gt;
|1.0&lt;br /&gt;
|2.5E-06&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;The results of simulation was given in the table, and a clear trend of D increasing with temperature was illustrated.&lt;br /&gt;
[[File:Zyup001805.jpg]][[File:Zyup001804.jpg]]&lt;br /&gt;
&lt;br /&gt;
In general, the simulation gave the same relationship with the literature graph, though the fluctuation in the computed curve was greater due to the weakness in size and timesteps. This was saying the error in the simulation can be averaged out with large scale simulation andFurther investigate of this relation could be carried with a greater size (e.g. a million atoms) and more steps to provide more reliable data for the different states.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
The MD simulation provides a powerful and relatively reliable tool for investigation of the simple systems as shown in the experiment, this provides an alternative method to gather thermo and physical data from Lab experiment. To ensure the accuracy of the simulated data,  a large size of model to mimic the interaction and long time of random motion to reach equillibrium was required.&lt;br /&gt;
&lt;br /&gt;
===== Reference hav =====&lt;br /&gt;
# Computational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes, Norbert Attig, Kurt Binder, Helmut Grubmuller ¨ , Kurt Kremer (Eds.), John von Neumann Institute for Computing, Julich, ¨ NIC Series, Vol. 23, ISBN 3-00-012641-4, pp. 1-28, 2004.&lt;br /&gt;
#Molecular and condition parameters dependent diffusion coefficient of water in poly(vinyl alcohol): a molecular dynamics simulation study,Colloid and Polymer Science, 2017, 295(5),859-868&lt;br /&gt;
&lt;br /&gt;
= TASK: =&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time , &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by  (the values of , , and  are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00181.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00182.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00183.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Error= C*t*sin( ωt + φ )     C is a constant that equals approx. 0.000417 in the case of timestep=0.1  ω=1.00 and φ=1.00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Timesteps below 0.63s would be valid in this case. Ideally the total energy is conserved in a closed system, so it is better to monitor the total energy of a system to ensure the simulation was not collapsed in terms of a strong fluctuation in total energy.&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00184.jpg|800x263px]]&lt;br /&gt;
[[File:Zyup00185.jpg|714x300px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions.  55.5*N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/1000= 3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Estimate the volume of 10000 water molecules under standard conditions. 10000/3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;=2.99*10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00186.jpg|800x156px]]&lt;br /&gt;
[[File:Zyup00187.jpg|1000x200px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In case of two atoms generated on top of each other，the force between them will be very large and therefore leads to unwanted large acceleration to the system, cause a sudden blow up&#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of 0.8. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
1/(1.07722)3 = 0.800&lt;br /&gt;
4 atoms in one lattice, so 4/a3 = 1.2, a = 1.49380, side length is 1.49380.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;    4000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0              for every atom in type 1 mass = 1.0 (reduced unit)&lt;br /&gt;
pair_style lj/cut 3.0   cutoff Lennard-Jones potential with no Coulomb at 3.0 potential with no Coulomb at 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0  for all the pairs coefficient 1.0 1.0 was applied&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
velocity Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ask the demonstrator if you need help.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows easy variation of timesteps without worrying about forgetting to change the relevant steps to run. As the change in steps will be made by the codes as soon as the value of timesteps was changed. Instantaneous change of two related value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). &#039;&#039;&#039;[[File:Zyup00188.jpg|800x426px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Does the simulation reach equilibrium?   &#039;&#039;&#039;Yes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How long does this take?  &#039;&#039;&#039;0.3 reduced time&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00189.jpg|800x446px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results?     &#039;&#039;&#039;0.0025 &lt;br /&gt;
&lt;br /&gt;
Fluctuating in the region that covers the most accurate value from 0.0001&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;   0.015 it does not converge.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
  &lt;br /&gt;
γ = ( &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt; /T )0.5&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
•	Nevery = 100 use input values every 100 timesteps&lt;br /&gt;
&lt;br /&gt;
•	Nrepeat = 1000 1000 of times to use input values for calculating averages&lt;br /&gt;
&lt;br /&gt;
•	Nfreq =10000  calculate averages every 10000 timesteps&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How often will values of the temperature, etc., be sampled for the average?     &#039;&#039;&#039;every 10000 timesteps &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How many measurements contribute to the average?   &#039;&#039;&#039;1000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Looking to the following line, how much time will you simulate?   &#039;&#039;&#039;100000 unit time&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001810.jpg|800x488px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;Lower, as ideal gas law ignores any interactions between particles apart from collisions while the L-J system takes the potential energy into account so that results in a lower density.&lt;br /&gt;
discrepancy increase with pressure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001811.jpg|800x420px]]&lt;br /&gt;
&lt;br /&gt;
Supposed to be constant for liquid but the fluctuation was within an acceptable range&lt;br /&gt;
&lt;br /&gt;
====== Scripts: ======&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY THE REQUIRED THERMODYNAMIC STATE ###&lt;br /&gt;
&lt;br /&gt;
variable D equal 0.2&lt;br /&gt;
&lt;br /&gt;
variable T equal 2.0&lt;br /&gt;
&lt;br /&gt;
variable timestep equal 0.0025&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
&lt;br /&gt;
lattice sc ${D}&lt;br /&gt;
&lt;br /&gt;
region box block 0 15 0 15 0 15&lt;br /&gt;
&lt;br /&gt;
create_box 1 box&lt;br /&gt;
&lt;br /&gt;
create_atoms 1 box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE PHYSICAL PROPERTIES OF ATOMS ###&lt;br /&gt;
&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
&lt;br /&gt;
pair_style lj/cut/opt 3.0&lt;br /&gt;
&lt;br /&gt;
pair_coeff 1 1 1.0 1.0&lt;br /&gt;
&lt;br /&gt;
neighbor 2.0 bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; ASSIGN ATOMIC VELOCITIES ###&lt;br /&gt;
&lt;br /&gt;
velocity all create ${T} 12345 dist gaussian rot yes mom yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY ENSEMBLE ###&lt;br /&gt;
&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; THERMODYNAMIC OUTPUT CONTROL ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom time etotal temp press&lt;br /&gt;
&lt;br /&gt;
thermo 10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RECORD TRAJECTORY ###&lt;br /&gt;
&lt;br /&gt;
dump traj all custom 1000 output-1 id x y z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RUN SIMULATION TO MELT CRYSTAL ###&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
unfix nve&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; BRING SYSTEM TO REQUIRED STATE ###&lt;br /&gt;
&lt;br /&gt;
variable tdamp equal ${timestep}*100&lt;br /&gt;
&lt;br /&gt;
variable pdamp equal ${timestep}*1000&lt;br /&gt;
&lt;br /&gt;
fix nvt all nvt temp ${T} ${T} ${tdamp}&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
unfix nvt&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; MEASURE SYSTEM STATE ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom step etotal temp vol density&lt;br /&gt;
&lt;br /&gt;
variable dens equal density&lt;br /&gt;
&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
&lt;br /&gt;
variable volu equal vol&lt;br /&gt;
&lt;br /&gt;
variable ener equal etotal&lt;br /&gt;
&lt;br /&gt;
variable ener2 equal etotal*etotal&lt;br /&gt;
&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_vol v_ener v_ener2 v_press2&lt;br /&gt;
&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
&lt;br /&gt;
variable avevolu equal f_aves[3]&lt;br /&gt;
&lt;br /&gt;
variable heatc equal 3375*3375*(f_aves[5]-f_aves[4]*f_aves[4])/(f_aves[2]*f_aves[2])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Averages&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Density: ${avedens}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Volume: ${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Temperature: ${avetemp}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Cv/V: ${heatc}/${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001812.jpg|800x457px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Liquid and vapour drop constantly due to the evenly distributing simple cubic structure while solid has fluctuation because of the Fcc structure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In the solid case, illustrate which lattice sites the first three peaks correspond to.&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039; What is the lattice spacing? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lattice spacing around 1.45 reduced unit. &lt;br /&gt;
&lt;br /&gt;
[0.5,0.5,0] corners; [1.0,0,0] centre of face; [1.0,0.5,0] centre of a different face&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate  in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001813.jpg]]&lt;br /&gt;
[[File:Zyup001814.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001815.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The minima give the location of the maximum difference for the liquid and solid system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Because the HO model has a periodic motion while the Lennard Jones solid and liquid move randomly there for there is no pattern in this kind of motion. i.e. the dependence on previous velocity is rather low.&lt;br /&gt;
Attach a copy of your plot to your writeup.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;[[File:Zyup001816.jpg|800x387]]&lt;br /&gt;
[[File:Zyup001817.jpg]]&lt;br /&gt;
[[File:Zyup001818.jpg]]&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696299</id>
		<title>Rep:ZY3915liqsimu</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696299"/>
		<updated>2018-04-18T15:45:27Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Methods */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; fff &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Third year simulation experiment =&lt;br /&gt;
&lt;br /&gt;
=== Liquid simulation and the diffusion coefficient ===&lt;br /&gt;
Zhuohao You&lt;br /&gt;
&lt;br /&gt;
==== Abstract ====&lt;br /&gt;
Diffusion behaviour of water was modeled and investigated by molecular dynamic simulation with the assistant of high performance computing power. The connection of diffusion coefficient to the mean square displacement was exploited to calculated the diffusion coefficient base on the performed MSD for liquid, solid and vapour. A further experiment on diffusion coefficient of solid was carried to exam its relationship with temperature.&amp;lt;span style=color:red&amp;gt; The abstract of a scientific paper is meant to briefly convey what you have done and your main results and conclusions, perhaps with a very short motivation. While you have briefly touched upon what you have done, your abstract lacks specifics. What exactly were your main results and conclusions? Also spelling and grammar! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
With the development of high performance computing system, the accuracy of molecular dynamic simulation (MSD) &amp;lt;span style=color:red&amp;gt; molecular dynamics is usually represented by the acronym &amp;quot;MD&amp;quot;, &amp;quot;MDS&amp;quot; for molecular dynamics simulation(s) would be acceptable if specified. However &amp;quot;MSD&amp;quot; has the letters in the wrong order, and is a bit confusing given that MSD is also common for &amp;quot;mean squared displacement&amp;quot; &amp;lt;/span&amp;gt; was brought to a new level &amp;lt;span style=color:red&amp;gt; Arguably, yes. However, you have performed relatively small simulations using cheap and cheerful LJ potentials, so perhaps this comment is not very relevant to what you have done. &amp;lt;/span&amp;gt;.  MSD is a useful tool that gives rise to calculation of macroscopic properties from microscopic scale systems. By considering the interaction for a single particle with a limited amount of nearby particles, &#039;exact&#039; prediction of thermo and physical properties are possible depending in the scale of calculation. &amp;lt;span style=color:red&amp;gt; This point is arguable, since there a lot of technical subtleties, certainly an elaboration would be necessary after making such a bold claim with the use of &amp;quot;exact&amp;quot;. &amp;lt;/span&amp;gt;[1]   &lt;br /&gt;
&lt;br /&gt;
Using the college&#039;s high performance computing facilities &amp;lt;span style=color:red&amp;gt; simply &amp;quot;the college&#039;s&amp;quot; is not an adequate accreditation of the hpc resources you have used. &amp;lt;/span&amp;gt;, simulation of simple liquid &amp;lt;span style=color:red&amp;gt; what about the other phases you have simulated? &amp;lt;/span&amp;gt;was performed and an important property of diffusion coefficient was computed from the simulation with a method manipulating its relationship with the mean squared displacement of ensemble particles.      &lt;br /&gt;
&lt;br /&gt;
==== Aims and Objectives ====&lt;br /&gt;
In this experiment, simulation using Lennard-Jones potential was applied on a simple liquid system. (e.g. Argon) &amp;lt;span style=color:red&amp;gt; why single out argon? have you used LJ parameters for argon? &amp;lt;/span&amp;gt;And investigation of the diffusion coefficient property of the system in liquid, solid and vapour phase was carried to give comparisons between the three states. Furtherly, a variation in temperature for the solid state was investigated to exploit the relationship between temperate and diffusion coefficient.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
The input script was base on the given npt file with 8000 atoms and the molecular dynamic was calculated by the velocity Verlet algorithm with based on Lennard-Jones potential. All the simulation was completed on the college HPC system with the parallel computational pacakge LAMMPS. The diffusion coefficient was computed by the given method:&lt;br /&gt;
The easiest way to measure &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; is by exploiting its connection to the [http://en.wikipedia.org/wiki/Mean_squared_displacement mean squared displacement].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This is not sufficient information for another scientist to reproduce your results. What LJ parameters have you used, what cutoff? You mention the NPT ensemble, what pressure and temperature? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results and discussion ====&lt;br /&gt;
The mean squared displacement (MSD),  effectively measures how much the particles deviate from their equilibrium positions. The value of MSD represents the extent of random motion in the system, and it can be calculated with the equation:&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001803.jpg]]&lt;br /&gt;
&lt;br /&gt;
In this experiment, calculation of MSD was all completed by HPC and was given in the results. &lt;br /&gt;
&lt;br /&gt;
[[File:Zyup0018701.jpg]] [[File:Zyup001802.jpg]]&lt;br /&gt;
&lt;br /&gt;
As shown in two graphs, the simulation for liquid, solid and vapour gives the evolution of mean squared displacement over ti,me for both cases. (8000 atoms and a million atoms respectively) The first thing to see on the graphs was the abnormal position for liquid state and gas state in the first figure, as the liquid phase gave a larger MSD as time goes, which on the other hand, for the second figure did have the gas curve laying above the liquid curve. &lt;br /&gt;
&lt;br /&gt;
In a realistic sense, as the MSD measured the random of particles, the displacement for liquid molecules should be much smaller than the vapour counterpart, since the gas particles was supposed to be about 10 times more distant than liquid molecules in the space.  &lt;br /&gt;
&lt;br /&gt;
Therefore, it turn out that the simulation for vapour phase with this MSD method was inaccurate, or a much longer period of time was required for the system to reach the equilibrium. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;As mentioned above, the diffusion coefficient was calculated by the relationship:    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt; so one sixth of the gradient of the MSD graph was the diffusion coeffient:&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000171 cm2/s; D(sol)= 1.92x10-6 cm2/s; D(vap)= 0.000106 cm2/s  (8000atoms)&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000177cm2/s;  D(sol)= 0;                          D(vap)= 0.00627cm2/s      (a million atoms)&lt;br /&gt;
&lt;br /&gt;
The result was quite close to each other apart from the vapour case, and the data confirmed that for the 8000 atoms system, an equilibrium was not reach therefore the inaccuracy was due to a lack of simulation steps as the gradient was only valid in the diffusion region of the graph (i.e. the linear part). In the case of solid the diffusion coefficient was to low to be calculated.&lt;br /&gt;
&lt;br /&gt;
===== Extension =====&lt;br /&gt;
As the simulation for solid was quite stable in the last section, further interest of examine the temperate-diffusion coefficient connection was developed from the literature[2]. Five additional simulation with different temperature for the solid system was carried to investigate if the MDS simulation could give a similar trend. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!T (reduced temperature)&lt;br /&gt;
!Diffusion coefficient cm2/s&lt;br /&gt;
|-&lt;br /&gt;
|0.6&lt;br /&gt;
|7.48E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.7&lt;br /&gt;
|7.85E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.8&lt;br /&gt;
|1.26E-06&lt;br /&gt;
|-&lt;br /&gt;
|0.9&lt;br /&gt;
|1.47E-06&lt;br /&gt;
|-&lt;br /&gt;
|1.0&lt;br /&gt;
|2.5E-06&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;The results of simulation was given in the table, and a clear trend of D increasing with temperature was illustrated.&lt;br /&gt;
[[File:Zyup001805.jpg]][[File:Zyup001804.jpg]]&lt;br /&gt;
&lt;br /&gt;
In general, the simulation gave the same relationship with the literature graph, though the fluctuation in the computed curve was greater due to the weakness in size and timesteps. This was saying the error in the simulation can be averaged out with large scale simulation andFurther investigate of this relation could be carried with a greater size (e.g. a million atoms) and more steps to provide more reliable data for the different states.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
The MD simulation provides a powerful and relatively reliable tool for investigation of the simple systems as shown in the experiment, this provides an alternative method to gather thermo and physical data from Lab experiment. To ensure the accuracy of the simulated data,  a large size of model to mimic the interaction and long time of random motion to reach equillibrium was required.&lt;br /&gt;
&lt;br /&gt;
===== Reference hav =====&lt;br /&gt;
# Computational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes, Norbert Attig, Kurt Binder, Helmut Grubmuller ¨ , Kurt Kremer (Eds.), John von Neumann Institute for Computing, Julich, ¨ NIC Series, Vol. 23, ISBN 3-00-012641-4, pp. 1-28, 2004.&lt;br /&gt;
#Molecular and condition parameters dependent diffusion coefficient of water in poly(vinyl alcohol): a molecular dynamics simulation study,Colloid and Polymer Science, 2017, 295(5),859-868&lt;br /&gt;
&lt;br /&gt;
= TASK: =&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time , &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by  (the values of , , and  are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00181.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00182.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00183.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Error= C*t*sin( ωt + φ )     C is a constant that equals approx. 0.000417 in the case of timestep=0.1  ω=1.00 and φ=1.00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Timesteps below 0.63s would be valid in this case. Ideally the total energy is conserved in a closed system, so it is better to monitor the total energy of a system to ensure the simulation was not collapsed in terms of a strong fluctuation in total energy.&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00184.jpg|800x263px]]&lt;br /&gt;
[[File:Zyup00185.jpg|714x300px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions.  55.5*N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/1000= 3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Estimate the volume of 10000 water molecules under standard conditions. 10000/3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;=2.99*10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00186.jpg|800x156px]]&lt;br /&gt;
[[File:Zyup00187.jpg|1000x200px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In case of two atoms generated on top of each other，the force between them will be very large and therefore leads to unwanted large acceleration to the system, cause a sudden blow up&#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of 0.8. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
1/(1.07722)3 = 0.800&lt;br /&gt;
4 atoms in one lattice, so 4/a3 = 1.2, a = 1.49380, side length is 1.49380.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;    4000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0              for every atom in type 1 mass = 1.0 (reduced unit)&lt;br /&gt;
pair_style lj/cut 3.0   cutoff Lennard-Jones potential with no Coulomb at 3.0 potential with no Coulomb at 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0  for all the pairs coefficient 1.0 1.0 was applied&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
velocity Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ask the demonstrator if you need help.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows easy variation of timesteps without worrying about forgetting to change the relevant steps to run. As the change in steps will be made by the codes as soon as the value of timesteps was changed. Instantaneous change of two related value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). &#039;&#039;&#039;[[File:Zyup00188.jpg|800x426px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Does the simulation reach equilibrium?   &#039;&#039;&#039;Yes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How long does this take?  &#039;&#039;&#039;0.3 reduced time&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00189.jpg|800x446px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results?     &#039;&#039;&#039;0.0025 &lt;br /&gt;
&lt;br /&gt;
Fluctuating in the region that covers the most accurate value from 0.0001&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;   0.015 it does not converge.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
  &lt;br /&gt;
γ = ( &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt; /T )0.5&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
•	Nevery = 100 use input values every 100 timesteps&lt;br /&gt;
&lt;br /&gt;
•	Nrepeat = 1000 1000 of times to use input values for calculating averages&lt;br /&gt;
&lt;br /&gt;
•	Nfreq =10000  calculate averages every 10000 timesteps&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How often will values of the temperature, etc., be sampled for the average?     &#039;&#039;&#039;every 10000 timesteps &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How many measurements contribute to the average?   &#039;&#039;&#039;1000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Looking to the following line, how much time will you simulate?   &#039;&#039;&#039;100000 unit time&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001810.jpg|800x488px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;Lower, as ideal gas law ignores any interactions between particles apart from collisions while the L-J system takes the potential energy into account so that results in a lower density.&lt;br /&gt;
discrepancy increase with pressure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001811.jpg|800x420px]]&lt;br /&gt;
&lt;br /&gt;
Supposed to be constant for liquid but the fluctuation was within an acceptable range&lt;br /&gt;
&lt;br /&gt;
====== Scripts: ======&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY THE REQUIRED THERMODYNAMIC STATE ###&lt;br /&gt;
&lt;br /&gt;
variable D equal 0.2&lt;br /&gt;
&lt;br /&gt;
variable T equal 2.0&lt;br /&gt;
&lt;br /&gt;
variable timestep equal 0.0025&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
&lt;br /&gt;
lattice sc ${D}&lt;br /&gt;
&lt;br /&gt;
region box block 0 15 0 15 0 15&lt;br /&gt;
&lt;br /&gt;
create_box 1 box&lt;br /&gt;
&lt;br /&gt;
create_atoms 1 box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE PHYSICAL PROPERTIES OF ATOMS ###&lt;br /&gt;
&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
&lt;br /&gt;
pair_style lj/cut/opt 3.0&lt;br /&gt;
&lt;br /&gt;
pair_coeff 1 1 1.0 1.0&lt;br /&gt;
&lt;br /&gt;
neighbor 2.0 bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; ASSIGN ATOMIC VELOCITIES ###&lt;br /&gt;
&lt;br /&gt;
velocity all create ${T} 12345 dist gaussian rot yes mom yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY ENSEMBLE ###&lt;br /&gt;
&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; THERMODYNAMIC OUTPUT CONTROL ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom time etotal temp press&lt;br /&gt;
&lt;br /&gt;
thermo 10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RECORD TRAJECTORY ###&lt;br /&gt;
&lt;br /&gt;
dump traj all custom 1000 output-1 id x y z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RUN SIMULATION TO MELT CRYSTAL ###&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
unfix nve&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; BRING SYSTEM TO REQUIRED STATE ###&lt;br /&gt;
&lt;br /&gt;
variable tdamp equal ${timestep}*100&lt;br /&gt;
&lt;br /&gt;
variable pdamp equal ${timestep}*1000&lt;br /&gt;
&lt;br /&gt;
fix nvt all nvt temp ${T} ${T} ${tdamp}&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
unfix nvt&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; MEASURE SYSTEM STATE ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom step etotal temp vol density&lt;br /&gt;
&lt;br /&gt;
variable dens equal density&lt;br /&gt;
&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
&lt;br /&gt;
variable volu equal vol&lt;br /&gt;
&lt;br /&gt;
variable ener equal etotal&lt;br /&gt;
&lt;br /&gt;
variable ener2 equal etotal*etotal&lt;br /&gt;
&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_vol v_ener v_ener2 v_press2&lt;br /&gt;
&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
&lt;br /&gt;
variable avevolu equal f_aves[3]&lt;br /&gt;
&lt;br /&gt;
variable heatc equal 3375*3375*(f_aves[5]-f_aves[4]*f_aves[4])/(f_aves[2]*f_aves[2])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Averages&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Density: ${avedens}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Volume: ${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Temperature: ${avetemp}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Cv/V: ${heatc}/${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001812.jpg|800x457px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Liquid and vapour drop constantly due to the evenly distributing simple cubic structure while solid has fluctuation because of the Fcc structure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In the solid case, illustrate which lattice sites the first three peaks correspond to.&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039; What is the lattice spacing? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lattice spacing around 1.45 reduced unit. &lt;br /&gt;
&lt;br /&gt;
[0.5,0.5,0] corners; [1.0,0,0] centre of face; [1.0,0.5,0] centre of a different face&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate  in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001813.jpg]]&lt;br /&gt;
[[File:Zyup001814.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001815.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The minima give the location of the maximum difference for the liquid and solid system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Because the HO model has a periodic motion while the Lennard Jones solid and liquid move randomly there for there is no pattern in this kind of motion. i.e. the dependence on previous velocity is rather low.&lt;br /&gt;
Attach a copy of your plot to your writeup.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;[[File:Zyup001816.jpg|800x387]]&lt;br /&gt;
[[File:Zyup001817.jpg]]&lt;br /&gt;
[[File:Zyup001818.jpg]]&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696297</id>
		<title>Rep:ZY3915liqsimu</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696297"/>
		<updated>2018-04-18T15:42:27Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; fff &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Third year simulation experiment =&lt;br /&gt;
&lt;br /&gt;
=== Liquid simulation and the diffusion coefficient ===&lt;br /&gt;
Zhuohao You&lt;br /&gt;
&lt;br /&gt;
==== Abstract ====&lt;br /&gt;
Diffusion behaviour of water was modeled and investigated by molecular dynamic simulation with the assistant of high performance computing power. The connection of diffusion coefficient to the mean square displacement was exploited to calculated the diffusion coefficient base on the performed MSD for liquid, solid and vapour. A further experiment on diffusion coefficient of solid was carried to exam its relationship with temperature.&amp;lt;span style=color:red&amp;gt; The abstract of a scientific paper is meant to briefly convey what you have done and your main results and conclusions, perhaps with a very short motivation. While you have briefly touched upon what you have done, your abstract lacks specifics. What exactly were your main results and conclusions? Also spelling and grammar! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
With the development of high performance computing system, the accuracy of molecular dynamic simulation (MSD) &amp;lt;span style=color:red&amp;gt; molecular dynamics is usually represented by the acronym &amp;quot;MD&amp;quot;, &amp;quot;MDS&amp;quot; for molecular dynamics simulation(s) would be acceptable if specified. However &amp;quot;MSD&amp;quot; has the letters in the wrong order, and is a bit confusing given that MSD is also common for &amp;quot;mean squared displacement&amp;quot; &amp;lt;/span&amp;gt; was brought to a new level &amp;lt;span style=color:red&amp;gt; Arguably, yes. However, you have performed relatively small simulations using cheap and cheerful LJ potentials, so perhaps this comment is not very relevant to what you have done. &amp;lt;/span&amp;gt;.  MSD is a useful tool that gives rise to calculation of macroscopic properties from microscopic scale systems. By considering the interaction for a single particle with a limited amount of nearby particles, &#039;exact&#039; prediction of thermo and physical properties are possible depending in the scale of calculation. &amp;lt;span style=color:red&amp;gt; This point is arguable, since there a lot of technical subtleties, certainly an elaboration would be necessary after making such a bold claim with the use of &amp;quot;exact&amp;quot;. &amp;lt;/span&amp;gt;[1]   &lt;br /&gt;
&lt;br /&gt;
Using the college&#039;s high performance computing facilities &amp;lt;span style=color:red&amp;gt; simply &amp;quot;the college&#039;s&amp;quot; is not an adequate accreditation of the hpc resources you have used. &amp;lt;/span&amp;gt;, simulation of simple liquid &amp;lt;span style=color:red&amp;gt; what about the other phases you have simulated? &amp;lt;/span&amp;gt;was performed and an important property of diffusion coefficient was computed from the simulation with a method manipulating its relationship with the mean squared displacement of ensemble particles.      &lt;br /&gt;
&lt;br /&gt;
==== Aims and Objectives ====&lt;br /&gt;
In this experiment, simulation using Lennard-Jones potential was applied on a simple liquid system. (e.g. Argon) &amp;lt;span style=color:red&amp;gt; why single out argon? have you used LJ parameters for argon? &amp;lt;/span&amp;gt;And investigation of the diffusion coefficient property of the system in liquid, solid and vapour phase was carried to give comparisons between the three states. Furtherly, a variation in temperature for the solid state was investigated to exploit the relationship between temperate and diffusion coefficient.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
The input script was base on the given npt file with 8000 atoms and the molecular dynamic was calculated by the velocity Verlet algorithm with based on Lennard-Jones potential. All the simulation was completed on the college HPC system with the parallel computational pacakge LAMMPS. The diffusion coefficient was computed by the given method:&lt;br /&gt;
The easiest way to measure &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; is by exploiting its connection to the [http://en.wikipedia.org/wiki/Mean_squared_displacement mean squared displacement].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results and discussion ====&lt;br /&gt;
The mean squared displacement (MSD),  effectively measures how much the particles deviate from their equilibrium positions. The value of MSD represents the extent of random motion in the system, and it can be calculated with the equation:&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001803.jpg]]&lt;br /&gt;
&lt;br /&gt;
In this experiment, calculation of MSD was all completed by HPC and was given in the results. &lt;br /&gt;
&lt;br /&gt;
[[File:Zyup0018701.jpg]] [[File:Zyup001802.jpg]]&lt;br /&gt;
&lt;br /&gt;
As shown in two graphs, the simulation for liquid, solid and vapour gives the evolution of mean squared displacement over ti,me for both cases. (8000 atoms and a million atoms respectively) The first thing to see on the graphs was the abnormal position for liquid state and gas state in the first figure, as the liquid phase gave a larger MSD as time goes, which on the other hand, for the second figure did have the gas curve laying above the liquid curve. &lt;br /&gt;
&lt;br /&gt;
In a realistic sense, as the MSD measured the random of particles, the displacement for liquid molecules should be much smaller than the vapour counterpart, since the gas particles was supposed to be about 10 times more distant than liquid molecules in the space.  &lt;br /&gt;
&lt;br /&gt;
Therefore, it turn out that the simulation for vapour phase with this MSD method was inaccurate, or a much longer period of time was required for the system to reach the equilibrium. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;As mentioned above, the diffusion coefficient was calculated by the relationship:    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt; so one sixth of the gradient of the MSD graph was the diffusion coeffient:&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000171 cm2/s; D(sol)= 1.92x10-6 cm2/s; D(vap)= 0.000106 cm2/s  (8000atoms)&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000177cm2/s;  D(sol)= 0;                          D(vap)= 0.00627cm2/s      (a million atoms)&lt;br /&gt;
&lt;br /&gt;
The result was quite close to each other apart from the vapour case, and the data confirmed that for the 8000 atoms system, an equilibrium was not reach therefore the inaccuracy was due to a lack of simulation steps as the gradient was only valid in the diffusion region of the graph (i.e. the linear part). In the case of solid the diffusion coefficient was to low to be calculated.&lt;br /&gt;
&lt;br /&gt;
===== Extension =====&lt;br /&gt;
As the simulation for solid was quite stable in the last section, further interest of examine the temperate-diffusion coefficient connection was developed from the literature[2]. Five additional simulation with different temperature for the solid system was carried to investigate if the MDS simulation could give a similar trend. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!T (reduced temperature)&lt;br /&gt;
!Diffusion coefficient cm2/s&lt;br /&gt;
|-&lt;br /&gt;
|0.6&lt;br /&gt;
|7.48E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.7&lt;br /&gt;
|7.85E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.8&lt;br /&gt;
|1.26E-06&lt;br /&gt;
|-&lt;br /&gt;
|0.9&lt;br /&gt;
|1.47E-06&lt;br /&gt;
|-&lt;br /&gt;
|1.0&lt;br /&gt;
|2.5E-06&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;The results of simulation was given in the table, and a clear trend of D increasing with temperature was illustrated.&lt;br /&gt;
[[File:Zyup001805.jpg]][[File:Zyup001804.jpg]]&lt;br /&gt;
&lt;br /&gt;
In general, the simulation gave the same relationship with the literature graph, though the fluctuation in the computed curve was greater due to the weakness in size and timesteps. This was saying the error in the simulation can be averaged out with large scale simulation andFurther investigate of this relation could be carried with a greater size (e.g. a million atoms) and more steps to provide more reliable data for the different states.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
The MD simulation provides a powerful and relatively reliable tool for investigation of the simple systems as shown in the experiment, this provides an alternative method to gather thermo and physical data from Lab experiment. To ensure the accuracy of the simulated data,  a large size of model to mimic the interaction and long time of random motion to reach equillibrium was required.&lt;br /&gt;
&lt;br /&gt;
===== Reference hav =====&lt;br /&gt;
# Computational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes, Norbert Attig, Kurt Binder, Helmut Grubmuller ¨ , Kurt Kremer (Eds.), John von Neumann Institute for Computing, Julich, ¨ NIC Series, Vol. 23, ISBN 3-00-012641-4, pp. 1-28, 2004.&lt;br /&gt;
#Molecular and condition parameters dependent diffusion coefficient of water in poly(vinyl alcohol): a molecular dynamics simulation study,Colloid and Polymer Science, 2017, 295(5),859-868&lt;br /&gt;
&lt;br /&gt;
= TASK: =&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time , &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by  (the values of , , and  are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00181.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00182.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00183.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Error= C*t*sin( ωt + φ )     C is a constant that equals approx. 0.000417 in the case of timestep=0.1  ω=1.00 and φ=1.00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Timesteps below 0.63s would be valid in this case. Ideally the total energy is conserved in a closed system, so it is better to monitor the total energy of a system to ensure the simulation was not collapsed in terms of a strong fluctuation in total energy.&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00184.jpg|800x263px]]&lt;br /&gt;
[[File:Zyup00185.jpg|714x300px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions.  55.5*N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/1000= 3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Estimate the volume of 10000 water molecules under standard conditions. 10000/3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;=2.99*10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00186.jpg|800x156px]]&lt;br /&gt;
[[File:Zyup00187.jpg|1000x200px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In case of two atoms generated on top of each other，the force between them will be very large and therefore leads to unwanted large acceleration to the system, cause a sudden blow up&#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of 0.8. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
1/(1.07722)3 = 0.800&lt;br /&gt;
4 atoms in one lattice, so 4/a3 = 1.2, a = 1.49380, side length is 1.49380.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;    4000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0              for every atom in type 1 mass = 1.0 (reduced unit)&lt;br /&gt;
pair_style lj/cut 3.0   cutoff Lennard-Jones potential with no Coulomb at 3.0 potential with no Coulomb at 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0  for all the pairs coefficient 1.0 1.0 was applied&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
velocity Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ask the demonstrator if you need help.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows easy variation of timesteps without worrying about forgetting to change the relevant steps to run. As the change in steps will be made by the codes as soon as the value of timesteps was changed. Instantaneous change of two related value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). &#039;&#039;&#039;[[File:Zyup00188.jpg|800x426px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Does the simulation reach equilibrium?   &#039;&#039;&#039;Yes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How long does this take?  &#039;&#039;&#039;0.3 reduced time&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00189.jpg|800x446px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results?     &#039;&#039;&#039;0.0025 &lt;br /&gt;
&lt;br /&gt;
Fluctuating in the region that covers the most accurate value from 0.0001&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;   0.015 it does not converge.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
  &lt;br /&gt;
γ = ( &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt; /T )0.5&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
•	Nevery = 100 use input values every 100 timesteps&lt;br /&gt;
&lt;br /&gt;
•	Nrepeat = 1000 1000 of times to use input values for calculating averages&lt;br /&gt;
&lt;br /&gt;
•	Nfreq =10000  calculate averages every 10000 timesteps&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How often will values of the temperature, etc., be sampled for the average?     &#039;&#039;&#039;every 10000 timesteps &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How many measurements contribute to the average?   &#039;&#039;&#039;1000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Looking to the following line, how much time will you simulate?   &#039;&#039;&#039;100000 unit time&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001810.jpg|800x488px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;Lower, as ideal gas law ignores any interactions between particles apart from collisions while the L-J system takes the potential energy into account so that results in a lower density.&lt;br /&gt;
discrepancy increase with pressure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001811.jpg|800x420px]]&lt;br /&gt;
&lt;br /&gt;
Supposed to be constant for liquid but the fluctuation was within an acceptable range&lt;br /&gt;
&lt;br /&gt;
====== Scripts: ======&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY THE REQUIRED THERMODYNAMIC STATE ###&lt;br /&gt;
&lt;br /&gt;
variable D equal 0.2&lt;br /&gt;
&lt;br /&gt;
variable T equal 2.0&lt;br /&gt;
&lt;br /&gt;
variable timestep equal 0.0025&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
&lt;br /&gt;
lattice sc ${D}&lt;br /&gt;
&lt;br /&gt;
region box block 0 15 0 15 0 15&lt;br /&gt;
&lt;br /&gt;
create_box 1 box&lt;br /&gt;
&lt;br /&gt;
create_atoms 1 box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE PHYSICAL PROPERTIES OF ATOMS ###&lt;br /&gt;
&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
&lt;br /&gt;
pair_style lj/cut/opt 3.0&lt;br /&gt;
&lt;br /&gt;
pair_coeff 1 1 1.0 1.0&lt;br /&gt;
&lt;br /&gt;
neighbor 2.0 bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; ASSIGN ATOMIC VELOCITIES ###&lt;br /&gt;
&lt;br /&gt;
velocity all create ${T} 12345 dist gaussian rot yes mom yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY ENSEMBLE ###&lt;br /&gt;
&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; THERMODYNAMIC OUTPUT CONTROL ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom time etotal temp press&lt;br /&gt;
&lt;br /&gt;
thermo 10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RECORD TRAJECTORY ###&lt;br /&gt;
&lt;br /&gt;
dump traj all custom 1000 output-1 id x y z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RUN SIMULATION TO MELT CRYSTAL ###&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
unfix nve&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; BRING SYSTEM TO REQUIRED STATE ###&lt;br /&gt;
&lt;br /&gt;
variable tdamp equal ${timestep}*100&lt;br /&gt;
&lt;br /&gt;
variable pdamp equal ${timestep}*1000&lt;br /&gt;
&lt;br /&gt;
fix nvt all nvt temp ${T} ${T} ${tdamp}&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
unfix nvt&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; MEASURE SYSTEM STATE ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom step etotal temp vol density&lt;br /&gt;
&lt;br /&gt;
variable dens equal density&lt;br /&gt;
&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
&lt;br /&gt;
variable volu equal vol&lt;br /&gt;
&lt;br /&gt;
variable ener equal etotal&lt;br /&gt;
&lt;br /&gt;
variable ener2 equal etotal*etotal&lt;br /&gt;
&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_vol v_ener v_ener2 v_press2&lt;br /&gt;
&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
&lt;br /&gt;
variable avevolu equal f_aves[3]&lt;br /&gt;
&lt;br /&gt;
variable heatc equal 3375*3375*(f_aves[5]-f_aves[4]*f_aves[4])/(f_aves[2]*f_aves[2])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Averages&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Density: ${avedens}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Volume: ${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Temperature: ${avetemp}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Cv/V: ${heatc}/${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001812.jpg|800x457px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Liquid and vapour drop constantly due to the evenly distributing simple cubic structure while solid has fluctuation because of the Fcc structure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In the solid case, illustrate which lattice sites the first three peaks correspond to.&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039; What is the lattice spacing? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lattice spacing around 1.45 reduced unit. &lt;br /&gt;
&lt;br /&gt;
[0.5,0.5,0] corners; [1.0,0,0] centre of face; [1.0,0.5,0] centre of a different face&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate  in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001813.jpg]]&lt;br /&gt;
[[File:Zyup001814.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001815.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The minima give the location of the maximum difference for the liquid and solid system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Because the HO model has a periodic motion while the Lennard Jones solid and liquid move randomly there for there is no pattern in this kind of motion. i.e. the dependence on previous velocity is rather low.&lt;br /&gt;
Attach a copy of your plot to your writeup.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;[[File:Zyup001816.jpg|800x387]]&lt;br /&gt;
[[File:Zyup001817.jpg]]&lt;br /&gt;
[[File:Zyup001818.jpg]]&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696295</id>
		<title>Rep:ZY3915liqsimu</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:ZY3915liqsimu&amp;diff=696295"/>
		<updated>2018-04-18T15:31:32Z</updated>

		<summary type="html">&lt;p&gt;Org12: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; fff &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Third year simulation experiment =&lt;br /&gt;
&lt;br /&gt;
=== Liquid simulation and the diffusion coefficient ===&lt;br /&gt;
Zhuohao You&lt;br /&gt;
&lt;br /&gt;
==== Abstract ====&lt;br /&gt;
Diffusion behaviour of water was modeled and investigated by molecular dynamic simulation with the assistant of high performance computing power. The connection of diffusion coefficient to the mean square displacement was exploited to calculated the diffusion coefficient base on the performed MSD for liquid, solid and vapour. A further experiment on diffusion coefficient of solid was carried to exam its relationship with temperature.&amp;lt;span style=color:red&amp;gt; The abstract of a scientific paper is meant to briefly convey what you have done and your main results and conclusions, perhaps with a very short motivation. While you have briefly touched upon what you have done, your abstract lacks specifics. What exactly were your main results and conclusions? Also spelling and grammar! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
With the development of high performance computing system, the accuracy of molecular dynamic simulation (MSD) was brought to a new level.  MSD is a useful tool that gives rise to calculation of macroscopic properties from microscopic scale systems. By considering the interaction for a single particle with a limited amount of nearby particles, &#039;exact&#039; prediction of thermo and physical properties are possible depending in the scale of calculation. [1]   &lt;br /&gt;
&lt;br /&gt;
Using the college&#039;s high performance computing facilities, simulation of simple liquid was performed and an important property of diffusion coefficient was computed from the simulation with a method manipulating its relationship with the mean squared displacement of ensemble particles.      &lt;br /&gt;
&lt;br /&gt;
==== Aims and Objectives ====&lt;br /&gt;
In this experiment, simulation using Lennard-Jones potential was applied on a simple liquid system. (e.g. Argon) And investigation of the diffusion coefficient property of the system in liquid, solid and vapour phase was carried to give comparisons between the three states. Furtherly, a variation in temperature for the solid state was investigated to exploit the relationship between temperate and diffusion coefficient.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
The input script was base on the given npt file with 8000 atoms and the molecular dynamic was calculated by the velocity Verlet algorithm with based on Lennard-Jones potential. All the simulation was completed on the college HPC system with the parallel computational pacakge LAMMPS. The diffusion coefficient was computed by the given method:&lt;br /&gt;
The easiest way to measure &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; is by exploiting its connection to the [http://en.wikipedia.org/wiki/Mean_squared_displacement mean squared displacement].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results and discussion ====&lt;br /&gt;
The mean squared displacement (MSD),  effectively measures how much the particles deviate from their equilibrium positions. The value of MSD represents the extent of random motion in the system, and it can be calculated with the equation:&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001803.jpg]]&lt;br /&gt;
&lt;br /&gt;
In this experiment, calculation of MSD was all completed by HPC and was given in the results. &lt;br /&gt;
&lt;br /&gt;
[[File:Zyup0018701.jpg]] [[File:Zyup001802.jpg]]&lt;br /&gt;
&lt;br /&gt;
As shown in two graphs, the simulation for liquid, solid and vapour gives the evolution of mean squared displacement over ti,me for both cases. (8000 atoms and a million atoms respectively) The first thing to see on the graphs was the abnormal position for liquid state and gas state in the first figure, as the liquid phase gave a larger MSD as time goes, which on the other hand, for the second figure did have the gas curve laying above the liquid curve. &lt;br /&gt;
&lt;br /&gt;
In a realistic sense, as the MSD measured the random of particles, the displacement for liquid molecules should be much smaller than the vapour counterpart, since the gas particles was supposed to be about 10 times more distant than liquid molecules in the space.  &lt;br /&gt;
&lt;br /&gt;
Therefore, it turn out that the simulation for vapour phase with this MSD method was inaccurate, or a much longer period of time was required for the system to reach the equilibrium. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;As mentioned above, the diffusion coefficient was calculated by the relationship:    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt; so one sixth of the gradient of the MSD graph was the diffusion coeffient:&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000171 cm2/s; D(sol)= 1.92x10-6 cm2/s; D(vap)= 0.000106 cm2/s  (8000atoms)&lt;br /&gt;
&lt;br /&gt;
D(liq)= 0.000177cm2/s;  D(sol)= 0;                          D(vap)= 0.00627cm2/s      (a million atoms)&lt;br /&gt;
&lt;br /&gt;
The result was quite close to each other apart from the vapour case, and the data confirmed that for the 8000 atoms system, an equilibrium was not reach therefore the inaccuracy was due to a lack of simulation steps as the gradient was only valid in the diffusion region of the graph (i.e. the linear part). In the case of solid the diffusion coefficient was to low to be calculated.&lt;br /&gt;
&lt;br /&gt;
===== Extension =====&lt;br /&gt;
As the simulation for solid was quite stable in the last section, further interest of examine the temperate-diffusion coefficient connection was developed from the literature[2]. Five additional simulation with different temperature for the solid system was carried to investigate if the MDS simulation could give a similar trend. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!T (reduced temperature)&lt;br /&gt;
!Diffusion coefficient cm2/s&lt;br /&gt;
|-&lt;br /&gt;
|0.6&lt;br /&gt;
|7.48E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.7&lt;br /&gt;
|7.85E-07&lt;br /&gt;
|-&lt;br /&gt;
|0.8&lt;br /&gt;
|1.26E-06&lt;br /&gt;
|-&lt;br /&gt;
|0.9&lt;br /&gt;
|1.47E-06&lt;br /&gt;
|-&lt;br /&gt;
|1.0&lt;br /&gt;
|2.5E-06&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;The results of simulation was given in the table, and a clear trend of D increasing with temperature was illustrated.&lt;br /&gt;
[[File:Zyup001805.jpg]][[File:Zyup001804.jpg]]&lt;br /&gt;
&lt;br /&gt;
In general, the simulation gave the same relationship with the literature graph, though the fluctuation in the computed curve was greater due to the weakness in size and timesteps. This was saying the error in the simulation can be averaged out with large scale simulation andFurther investigate of this relation could be carried with a greater size (e.g. a million atoms) and more steps to provide more reliable data for the different states.  &lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
The MD simulation provides a powerful and relatively reliable tool for investigation of the simple systems as shown in the experiment, this provides an alternative method to gather thermo and physical data from Lab experiment. To ensure the accuracy of the simulated data,  a large size of model to mimic the interaction and long time of random motion to reach equillibrium was required.&lt;br /&gt;
&lt;br /&gt;
===== Reference hav =====&lt;br /&gt;
# Computational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes, Norbert Attig, Kurt Binder, Helmut Grubmuller ¨ , Kurt Kremer (Eds.), John von Neumann Institute for Computing, Julich, ¨ NIC Series, Vol. 23, ISBN 3-00-012641-4, pp. 1-28, 2004.&lt;br /&gt;
#Molecular and condition parameters dependent diffusion coefficient of water in poly(vinyl alcohol): a molecular dynamics simulation study,Colloid and Polymer Science, 2017, 295(5),859-868&lt;br /&gt;
&lt;br /&gt;
= TASK: =&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time , &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by  (the values of , , and  are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00181.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00182.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00183.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Error= C*t*sin( ωt + φ )     C is a constant that equals approx. 0.000417 in the case of timestep=0.1  ω=1.00 and φ=1.00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Timesteps below 0.63s would be valid in this case. Ideally the total energy is conserved in a closed system, so it is better to monitor the total energy of a system to ensure the simulation was not collapsed in terms of a strong fluctuation in total energy.&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup00184.jpg|800x263px]]&lt;br /&gt;
[[File:Zyup00185.jpg|714x300px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions.  55.5*N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/1000= 3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Estimate the volume of 10000 water molecules under standard conditions. 10000/3.34*10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;=2.99*10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt;mL&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00186.jpg|800x156px]]&lt;br /&gt;
[[File:Zyup00187.jpg|1000x200px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In case of two atoms generated on top of each other，the force between them will be very large and therefore leads to unwanted large acceleration to the system, cause a sudden blow up&#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of 0.8. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
1/(1.07722)3 = 0.800&lt;br /&gt;
4 atoms in one lattice, so 4/a3 = 1.2, a = 1.49380, side length is 1.49380.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;    4000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0              for every atom in type 1 mass = 1.0 (reduced unit)&lt;br /&gt;
pair_style lj/cut 3.0   cutoff Lennard-Jones potential with no Coulomb at 3.0 potential with no Coulomb at 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0  for all the pairs coefficient 1.0 1.0 was applied&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
velocity Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ask the demonstrator if you need help.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows easy variation of timesteps without worrying about forgetting to change the relevant steps to run. As the change in steps will be made by the codes as soon as the value of timesteps was changed. Instantaneous change of two related value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). &#039;&#039;&#039;[[File:Zyup00188.jpg|800x426px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Does the simulation reach equilibrium?   &#039;&#039;&#039;Yes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How long does this take?  &#039;&#039;&#039;0.3 reduced time&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup00189.jpg|800x446px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results?     &#039;&#039;&#039;0.0025 &lt;br /&gt;
&lt;br /&gt;
Fluctuating in the region that covers the most accurate value from 0.0001&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Which one of the five is a &#039;&#039;particularly&#039;&#039; bad choice? Why?&#039;&#039;&#039;   0.015 it does not converge.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
  &lt;br /&gt;
γ = ( &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt; /T )0.5&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
•	Nevery = 100 use input values every 100 timesteps&lt;br /&gt;
&lt;br /&gt;
•	Nrepeat = 1000 1000 of times to use input values for calculating averages&lt;br /&gt;
&lt;br /&gt;
•	Nfreq =10000  calculate averages every 10000 timesteps&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How often will values of the temperature, etc., be sampled for the average?     &#039;&#039;&#039;every 10000 timesteps &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How many measurements contribute to the average?   &#039;&#039;&#039;1000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Looking to the following line, how much time will you simulate?   &#039;&#039;&#039;100000 unit time&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density &amp;lt;math&amp;gt;\left(\frac{N}{V}\right)&amp;lt;/math&amp;gt;. Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001810.jpg|800x488px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;Lower, as ideal gas law ignores any interactions between particles apart from collisions while the L-J system takes the potential energy into account so that results in a lower density.&lt;br /&gt;
discrepancy increase with pressure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature &amp;lt;math&amp;gt;\left(\rho^*, T^*\right)&amp;lt;/math&amp;gt; phase space, rather than pressure-temperature phase space. The two densities required at &amp;lt;math&amp;gt;0.2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;, and the temperature range is &amp;lt;math&amp;gt;2.0, 2.2, 2.4, 2.6, 2.8&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; as a function of temperature, where &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001811.jpg|800x420px]]&lt;br /&gt;
&lt;br /&gt;
Supposed to be constant for liquid but the fluctuation was within an acceptable range&lt;br /&gt;
&lt;br /&gt;
====== Scripts: ======&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY THE REQUIRED THERMODYNAMIC STATE ###&lt;br /&gt;
&lt;br /&gt;
variable D equal 0.2&lt;br /&gt;
&lt;br /&gt;
variable T equal 2.0&lt;br /&gt;
&lt;br /&gt;
variable timestep equal 0.0025&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
&lt;br /&gt;
lattice sc ${D}&lt;br /&gt;
&lt;br /&gt;
region box block 0 15 0 15 0 15&lt;br /&gt;
&lt;br /&gt;
create_box 1 box&lt;br /&gt;
&lt;br /&gt;
create_atoms 1 box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; DEFINE PHYSICAL PROPERTIES OF ATOMS ###&lt;br /&gt;
&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
&lt;br /&gt;
pair_style lj/cut/opt 3.0&lt;br /&gt;
&lt;br /&gt;
pair_coeff 1 1 1.0 1.0&lt;br /&gt;
&lt;br /&gt;
neighbor 2.0 bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; ASSIGN ATOMIC VELOCITIES ###&lt;br /&gt;
&lt;br /&gt;
velocity all create ${T} 12345 dist gaussian rot yes mom yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; SPECIFY ENSEMBLE ###&lt;br /&gt;
&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; THERMODYNAMIC OUTPUT CONTROL ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom time etotal temp press&lt;br /&gt;
&lt;br /&gt;
thermo 10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RECORD TRAJECTORY ###&lt;br /&gt;
&lt;br /&gt;
dump traj all custom 1000 output-1 id x y z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; RUN SIMULATION TO MELT CRYSTAL ###&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
unfix nve&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; BRING SYSTEM TO REQUIRED STATE ###&lt;br /&gt;
&lt;br /&gt;
variable tdamp equal ${timestep}*100&lt;br /&gt;
&lt;br /&gt;
variable pdamp equal ${timestep}*1000&lt;br /&gt;
&lt;br /&gt;
fix nvt all nvt temp ${T} ${T} ${tdamp}&lt;br /&gt;
&lt;br /&gt;
run 10000&lt;br /&gt;
&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
unfix nvt&lt;br /&gt;
&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;###&amp;lt;/nowiki&amp;gt; MEASURE SYSTEM STATE ###&lt;br /&gt;
&lt;br /&gt;
thermo_style custom step etotal temp vol density&lt;br /&gt;
&lt;br /&gt;
variable dens equal density&lt;br /&gt;
&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
&lt;br /&gt;
variable volu equal vol&lt;br /&gt;
&lt;br /&gt;
variable ener equal etotal&lt;br /&gt;
&lt;br /&gt;
variable ener2 equal etotal*etotal&lt;br /&gt;
&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_vol v_ener v_ener2 v_press2&lt;br /&gt;
&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
&lt;br /&gt;
variable avevolu equal f_aves[3]&lt;br /&gt;
&lt;br /&gt;
variable heatc equal 3375*3375*(f_aves[5]-f_aves[4]*f_aves[4])/(f_aves[2]*f_aves[2])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Averages&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Density: ${avedens}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Volume: ${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Temperature: ${avetemp}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Cv/V: ${heatc}/${avevolu}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate &amp;lt;math&amp;gt;g(r)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\int g(r)\mathrm{d}r&amp;lt;/math&amp;gt;. Plot the RDFs for the three systems on the same axes, and attach a copy to your report. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Zyup001812.jpg|800x457px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Liquid and vapour drop constantly due to the evenly distributing simple cubic structure while solid has fluctuation because of the Fcc structure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In the solid case, illustrate which lattice sites the first three peaks correspond to.&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039; What is the lattice spacing? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What is the coordination number for each of the first three peaks?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lattice spacing around 1.45 reduced unit. &lt;br /&gt;
&lt;br /&gt;
[0.5,0.5,0] corners; [1.0,0,0] centre of face; [1.0,0.5,0] centre of a different face&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the &amp;quot;total&amp;quot; MSD) as a function of timestep. Are these as you would expect? Estimate  in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.&#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001813.jpg]]&lt;br /&gt;
[[File:Zyup001814.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to show your working in your writeup. &#039;&#039;&#039;&lt;br /&gt;
[[File:Zyup001815.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;On the same graph, with x range 0 to 500, plot &amp;lt;math&amp;gt;C\left(\tau\right)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\omega = 1/2\pi&amp;lt;/math&amp;gt; and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The minima give the location of the maximum difference for the liquid and solid system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Because the HO model has a periodic motion while the Lennard Jones solid and liquid move randomly there for there is no pattern in this kind of motion. i.e. the dependence on previous velocity is rather low.&lt;br /&gt;
Attach a copy of your plot to your writeup.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;[[File:Zyup001816.jpg|800x387]]&lt;br /&gt;
[[File:Zyup001817.jpg]]&lt;br /&gt;
[[File:Zyup001818.jpg]]&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:AD5215LS&amp;diff=696263</id>
		<title>Rep:AD5215LS</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:AD5215LS&amp;diff=696263"/>
		<updated>2018-04-16T13:29:59Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Tasks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=color:red&amp;gt; Overall feedback: the tasks were completed well and conveyed a good level of understanding. The scientific report was well written and had an interesting motivation. However, it greater attention could have been placed on where certain information should go: for example, background theory is usually in the introduction. Some explanations would have benefited from a more precise use of scientific language and concepts. The motivation of molecular gastronomy was never related to the specific results/conclusions. The conclusion was a bit sparse. Overall good level of knowledge and understanding was conveyed.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Tasks=&lt;br /&gt;
==Section 2: Introduction==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by &amp;lt;math&amp;gt; x\left(t\right) = A\cos\left(\omega t + \phi\right)&amp;lt;/math&amp;gt; (the values of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Excel file attached [[:File:AD5215_HO.xls|here]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 error vs time.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The change in energy goes down as the timestep value becomes smaller. For a timestep of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 0.25 &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; the change in energy is &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 1.58% &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; while for a timestep of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 0.05 &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; the change in energy is &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 0.06% &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;. The energy change is &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 1.01% &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; for a timestep of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 0.2 &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;. A timestep that is too large could lead to the simulation effectively &amp;quot;missing&amp;quot; any changes in the system that happen on a shorter timescale than that of the timestep. Therefore, it is important to monitor the energy to ensure that the change is not too drastic and we are observing the behaviour of the system closely. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK:&amp;lt;/big&amp;gt; For a single Lennard-Jones interaction, &amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;, find the separation, &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt;, at which the potential energy is zero. What is the force at this separation? Find the equilibrium separation, &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, and work out the well depth (&amp;lt;math&amp;gt;\phi\left(r_{eq}\right)&amp;lt;/math&amp;gt;). Evaluate the integrals &amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\int_{2.5\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\int_{3\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;\sigma = \epsilon = 1.0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;&#039;&#039;Find the separation at which the potential energy is zero&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 lj zero pot.JPG]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;&#039;&#039;FInd the force at &amp;lt;math&amp;gt;r=\sigma&amp;lt;/math&amp;gt;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The force is the derivative of potential wrt to distance:&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 lj Force.JPG]]&lt;br /&gt;
&lt;br /&gt;
At separation &amp;lt;math&amp;gt;r=\sigma&amp;lt;/math&amp;gt; this will be&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 force(R).JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;&#039;&#039;Equilibrium separation and well depth&#039;&#039;&amp;lt;\span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The equilibrium separation is the separation when &amp;lt;math&amp;gt; \frac{d \phi}{dr} = 0.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 lj equilibrium req.JPG]]&lt;br /&gt;
&lt;br /&gt;
The well depth at this separation is&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 ls lj epsilon.JPG]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; negative epsilon &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;&#039;&#039;Integrals&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 lj int1.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 int2.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 int3.JPG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions. Estimate the volume of &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; water molecules under standard conditions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; V = 1\ mL, \ \rho = 1\ g/mL, \ M = 18\ g/mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
m = V \rho = 1\ g&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
N = nN_a = \frac{m}{M} \times N_a = \frac{6.022 \times 10^{23}}{18} = 3.35 \times 10{22}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
N molecules occupy 1 mL. Therefore, the volume of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;1 molecule&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; of water will be &amp;lt;math&amp;gt;V_0 = \frac{1}{N} = \frac{1}{3.35 \times 10{22}} = 2.99 \times10^{-23}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The volume of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;1000 molecules&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; will be &amp;lt;math&amp;gt;1000 \times V_0 = 2.99 \times10^{-20} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, &#039;&#039;after the periodic boundary conditions have been applied&#039;&#039;?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It ends up at position &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;(0.2, 0.1, 0.7)&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: The Lennard-Jones parameters for argon are &amp;lt;math&amp;gt;\sigma = 0.34\mathrm{nm}, \epsilon\ /\ k_B= 120 \mathrm{K}&amp;lt;/math&amp;gt;. If the LJ cutoff is &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;, what is it in real units? What is the well depth in &amp;lt;math&amp;gt;\mathrm{kJ\ mol}^{-1}&amp;lt;/math&amp;gt;? What is the reduced temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt; in real units?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r = \sigma \times r^*&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r = 0.34 \times 3.2 = 1.088\ nm &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\ K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\epsilon = 120 \times k_B &amp;lt;/math&amp;gt; for 1 particle&lt;br /&gt;
&lt;br /&gt;
For a mole of particles: &amp;lt;math&amp;gt;\epsilon = 120 \times k_B \times N_A &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \epsilon = 0.997\, kJ mol^{-1} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T = T^* \times \frac{\epsilon}{k_BT}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T = 1.5 \times 120 &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;
==Section 3: Equilibration==&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Randomly generated positions can lead to two atoms being very close together, which would result in a large repulsive potential. This would then affect any propagation in time of the system, which would lead to undesirable behaviour, especially when using larger timesteps. The system would most likely behave &amp;quot;appropriately&amp;quot; for small enough timesteps, but this would require running longer simulations. This would be less effective; a larger timestep that still results in an accurate simulation is ideal. &amp;lt;span style=color:red&amp;gt; good! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Density: &amp;lt;math&amp;gt; \rho = \frac{N}{V} = \frac{N}{l^3} &amp;lt;/math&amp;gt; ---&amp;gt; Length: &amp;lt;math&amp;gt; l=\sqrt[3]{\frac{N}{\rho}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;simple cubic lattice&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; with &amp;lt;math&amp;gt; \rho = 0.8 &amp;lt;/math&amp;gt;, the length, l, is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \sqrt[3]{\frac{1}{0.8}}=1.07722 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;face-centered cubic lattice&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; with &amp;lt;math&amp;gt; \rho = 1.2 &amp;lt;/math&amp;gt;, the length, l, is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \sqrt[3]{\frac{4}{1.2}}=1.4938 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The box would still contain &amp;lt;math&amp;gt; 10 \times 10 \times 10 = 1000 &amp;lt;/math&amp;gt; lattice units. For an FCC there are 4 atoms per lattice unit. Therefore the total number of atoms would be &amp;lt;math&amp;gt; 4 \times 1000 = 4000 &amp;lt;/math&amp;gt; atoms.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Mass&amp;quot; sets the mass of a particular type of atom (in this case, the mass of type 1 atoms is 1). &amp;quot;Pair&amp;quot; refers to pair potentials. The lj/cut command computes the 12/6 Lennard-Jones potential, cut sets the cut-off for r. Pair_coeff sets the values for the 2 parameters, sigma and epsilon. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; Velocity Verlet. &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; A simple Verlet algorithm wouldn&#039;t require the initial velocity, but would instead require &amp;lt;math&amp;gt;\mathbf{x}_i\left(-\delta t\right)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The line &amp;quot;variable timestep equal 0.001&amp;quot; defines a variable timestep which is the assigned a value. This allows for the variable to be called later on if needed. This is convenient for the user as it means that if the same variable is required multiple times (in this case, the variable timestep is called twice) changing its value is easier, as this only needs to be done once (in the line defining the variable).&lt;br /&gt;
&lt;br /&gt;
==Section 4: Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 ljls gamma.JPG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. How often will values of the temperature, etc., be sampled for the average? How many measurements contribute to the average? Looking to the following line, how much time will you simulate?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From the manual, the structure of the command is &amp;quot;ave/time Nevery Nrepeat Nfreq&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*Nevery (100) = use input values every this many timesteps (total no. of data points is 100,000 so this will give 1000 values to be averaged in the next step; records an average of 100 values)&lt;br /&gt;
&lt;br /&gt;
*Nrepeat (1000) = no. of times to use input values for calculating averages (i.e. average over 1000 values)&lt;br /&gt;
&lt;br /&gt;
*Nfreq (100,000) = calculate averages every this many timesteps (same no. specified in the &amp;quot;run&amp;quot; command)&lt;br /&gt;
&lt;br /&gt;
The timestep is 0.0025 and the simulation runs for 100,000 steps. Therefore we are simulating a total time of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;250 seconds &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Section 7: Dynamical properties and the diffusion coefficient==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a HO model:&lt;br /&gt;
[[File:Ad5215 Vacf HO model.JPG]]&lt;br /&gt;
&lt;br /&gt;
The VACF is given by&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 VACF deriv.JPG]]&lt;br /&gt;
&lt;br /&gt;
We evaluate the two integrals separately. Integral 2 is&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i2.JPG]]&lt;br /&gt;
&lt;br /&gt;
Using [[File:Ad5215 Vacf cos(2x).JPG]] we can write&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i2 2.JPG]]&lt;br /&gt;
&lt;br /&gt;
Integral 1 is&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i1 1.JPG]]&lt;br /&gt;
&lt;br /&gt;
Using [[File:Ad5215 Vacf sin(A+B).JPG]] we can write&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i1 2.JPG]]&lt;br /&gt;
&lt;br /&gt;
We evaluate the last integral separately.&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i3.JPG]]&lt;br /&gt;
&lt;br /&gt;
Substituting this back we obtain:&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i1 3.JPG]]&lt;br /&gt;
&lt;br /&gt;
Substituting I1 and I2 into the formula for C we obtain&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf c1.JPG]]&lt;br /&gt;
&lt;br /&gt;
Sin is an odd function, i.e. [[File:Ad5215 Vacf sinodd.JPG]]. Thus&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf c2.JPG]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; There is definitely a shorter way of doing this, but yes. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Report=&lt;br /&gt;
&lt;br /&gt;
==Abstract==&lt;br /&gt;
&lt;br /&gt;
Solid, liquid and gaseous systems were modeled using LAMMPS and a 12-6 Lennard-Jones forcefield. A suitable timestep of 0.0025 was determined. Simulations were run to obtain thermodynamic data (temperatures, pressures, densities, heat capacities). Calculated densities were found to be lower than those predicted by the ideal gas law. The simulated heat capacities showed a trend, decreasing with increasing temperature. The RDF was calculated for systems in all three phases. As expected, the RDF for a solid showed peaks decaying in amplitude. Lattice spacings and coordination numbers for the solid FCC lattice were calculated. The MSD and the VACF were plotted for the same three systems and the diffusion coefficient was calculated for both measurements. The two methods did not result in identical values; still, the difference was only 0.67% for the diffusion coefficients in the gas phase.&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good, concise abstract that summaries main results. Perhaps 1 sentence of motivation would have been nice. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Food constitutes a huge part of our lives, whether we actively think about it or not. Cooking, in some form or other, has been around ever since the first human realised that fire makes raw meat tastier and more convenient to eat. Nowadays, the food industry is enormous and cooking has become a successful blend of art and science. Perhaps the most pertinent example of this is molecular gastronomy, a subdiscipline of food science that seeks to investigate the physical and chemical transformations of ingredients during the cooking process. In their review, Balham et al refer to molecular gastronomy as an &amp;quot;emerging scientific discipline&amp;quot;.&amp;lt;ref&amp;gt;P. Barham, L. H. Skibsted, W. L. P. Bredie and J. Risbo, &#039;&#039;Symp.&lt;br /&gt;
A Q. J. Mod. Foreign Lit.&#039;&#039;, 2010, 2313–2365.&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In fact, molecular gastronomy relies heavily on processes such as gelification and infusion and on materials such as gels, foams and powders. It also uses equipment that is heavily reminiscent of a laboratory - some kitchens are fitted with butane burners, syringes and dehydrators.  &lt;br /&gt;
&lt;br /&gt;
Clever presentations and unusual sensations and are piquing the interest of many people; in some places, molecular gastronomy restaurants have become tourist attractions.&amp;lt;ref&amp;gt;D. Tüzünkan and A. Albayrak, &#039;&#039;Procedia&lt;br /&gt;
- Soc. Behav. Sci.&#039;&#039;, 2015, &#039;&#039;&#039;195&#039;&#039;&#039;, 446–452.&amp;lt;/ref&amp;gt; Simulating the thermodynamic properties of systems can provide a better understanding of physical systems and can lead to the growth and development of this industry.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; An interesting topic and motivation! An explicit connection between gastronomy and the results you intend to present/discuss would be nice. For example how is the diffusion coefficient relevant? The introduction of a scientific paper usually includes the background theory, such as in your case, the equations for diffusion coefficient. You have included this in the methodology, which while logical, is not standard practice for most papers/journals. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Aims and Objectives==&lt;br /&gt;
&lt;br /&gt;
* become familiar with LAMMPS and how simulating a physical system works&lt;br /&gt;
* model the behaviour of systems under the 12-6 Lennard-Jones potential&lt;br /&gt;
* calculate the physical properties (temperature, pressure, density, etc) of a system using such simulations&lt;br /&gt;
* comparing the results of the simulations to theory (e.g. simulated density vs density given by the ideal gas law)&lt;br /&gt;
* calculating the diffusion coefficient for systems in different phases (gas, liquid, solid) by two different methods (from the MSD and from the VACF)&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
&#039;&#039;&#039;General methods&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A 12-6 Lennard-Jones system was modeled usings LAMMPS and all simulations were run using Imperial&#039;s High Performance Computer. &lt;br /&gt;
The potential for such a system is given by&amp;lt;ref name=&amp;quot;:0&amp;quot;&amp;gt;P. Atkins, J. De Paula, &#039;&#039;Physical&lt;br /&gt;
Chemistry&#039;&#039;, OUP Oxford, 9th edn., 2009.&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All calculations used reduced units:&amp;lt;math&amp;gt;r^* = r/{\sigma}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;E^* = E/{\epsilon}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;T^* = {k_BT}/{\epsilon}.&amp;lt;/math&amp;gt;&lt;br /&gt;
The Lennard-Jones parameters &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\epsilon&amp;lt;/math&amp;gt; were set to 1.0 for all simulations. The cutoff for Lennard-Jones interactions was set at r*=3 unless otherwise stated. The mass of the atoms was set to 1.0. The temperature, pressure, lattice density and timestep values were varied. For all calculations the velocity Verlet algorithm was employed. The atoms were assigned random velocities within the simulation, while ensuring that the Boltzmann distribution of states is followed. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Determining a suitable timestep&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A simple cubic lattice with a density of 0.8 was defined and the simulation was populated with 1000 atoms (10 x 10 x 10 dimensions). The ensemble was defined as the microcanonical (NVE) ensemble. Five values for the timestep were tested: 0.015, 0.01, 0.0075, 0.0025, 0.001 and each simulation was run for a total time of 100 seconds. Values for the energy, temperature and pressure of the system were recorded at each step. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Variation of density with temperature and pressure&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A simple cubic lattice with a density of 0.8 was defined and the simulation was populated with 3375 atoms (15 x 15 x 15 dimensions). The timestep for all simulations was set to 0.0025. The ensemble was defined as NPT and 10 different thermodynamic states were simulated (two pressures, 2.5 and 3.5, each associated with five temperatures: 3.0, 6.0, 9.0, 12.0 and 15.0). Values for the energy, temperature and pressure of the system were recorded at each step, as well as average values for the density, temperature and pressure of the system at the end of the simulation. Plots of density vs time were obtained, both for the simulated data and for densities predicted by the ideal gas law&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;, &amp;lt;math&amp;gt; PM = \rho RT.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Heat capacity calculations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A simple cubic lattice with a density of 0.2 was defined and populated with 3375 atoms. The timestep for all simulations was set to 0.0025. An NVT ensemble was simulated for five temperatures: 2.0, 2.2, 2.4, 2.6 and 2.8. Then, a subsequent simulation was run to establish an NVE ensemble and measure the properties of the system. Average values for temperature, energy, volume and heat capacity were calculated. This procedure was repeated for a simple cubic lattice with a density of 0.8. An example input script can be found [[:File: Example_script_heatcap_ad5215.in|here]].&lt;br /&gt;
&lt;br /&gt;
The heat capacity of a system is given by&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = \frac{\partial E}{\partial T} = \frac{\mathrm{Var}\left[E\right]}{k_B T^2} = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where E is the internal energy and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;{\mathrm{Var}\left[E\right]}={\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
is the variance in internal energy. The &amp;lt;math&amp;gt;N^2&amp;lt;/math&amp;gt; term is required because LAMMPS automatically outputs the energy &#039;&#039;&#039;per atom&#039;&#039;&#039;, not the &#039;&#039;&#039;total&#039;&#039;&#039; energy. &lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 LJfluid phase diag.JPG|thumb|Fig. 1: Phase diagram for the Lennard-Jones fluid]]&lt;br /&gt;
&#039;&#039;&#039;RDF calculations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Three systems (a liquid, a solid and a gas) were modeled and populated with 3375 atoms each. Temperature and density values were taken from the Lennard-Jones fluid phase diagram&amp;lt;ref&amp;gt;J. P. Hansen and L.&lt;br /&gt;
Verlet, &#039;&#039;Phys. Rev.&#039;&#039;, 1969, &#039;&#039;&#039;184&#039;&#039;&#039;, 151–161.&amp;lt;/ref&amp;gt; reproduced in Fig. 1. These were defined as:&lt;br /&gt;
&lt;br /&gt;
*solid: fcc lattice, temperature 1.2, density 1.2;&lt;br /&gt;
*liquid: sc lattice, temperature 1.2 , density 0.8;&lt;br /&gt;
*vapour: sc lattice, temperature 1.2, density 0.05.&lt;br /&gt;
&lt;br /&gt;
The ensemble was defined as NVT. The timestep for all simulations was set to 0.002. The trajectories of the atoms were recorded and VMD was used to calculate the radial distribution function and its integral from these trajectories. The data was then analysed using Python. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Diffusion coefficient calculations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The same three systems as above were modeled, this time with 8000 atoms each. The timestep was set to 0.002 and each simulation was run for 5000 steps. The Lennard-Jones cutoff was set to 3.2. The ensemble was defined as NVT. The mean squared displacement (MSD) and the velocity autocorrelation function (VACF) at each step were calculated for all systems. The data was analysed using Python. The MSD plots were fitted to a straight line and the gradient was used to calculate the diffusion coefficient. The VACF integrals were plotted as a function of time and, again, used to calculate the diffusion coefficient. The same data analysis was conducted using supplied data which modeled larger systems.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;MSD&#039;&#039;&#039; is a measure of the deviation of the position of a particle with respect to a reference position over time. It can be thought of as a measure of how much the system moves over time. The MSD is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;{\rm MSD}\equiv\langle (r-r_0)^2\rangle=\frac{1}{N}\sum_{n=1}^N (r_n(t) - r_n(0))^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient (D) can be calculated from the MSD, using&amp;lt;ref name=&amp;quot;:1&amp;quot;&amp;gt;O. J. Eder, &#039;&#039;J. Chem. Phys.&#039;&#039;, 1977, &#039;&#039;&#039;66&#039;&#039;&#039;, 3866–3870.&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;VACF&#039;&#039;&#039; is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\delta t\right) = \left\langle \mathbf{v}\left(t\right) \cdot \mathbf{v}\left(t+\delta t\right)\right\rangle&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and is effectively a measure of how closely related the velocity of a particle is (at time t) to its initial velocity (at time t=0). This correlation is &amp;quot;perturbed&amp;quot; by collisions; at very long times (i.e. when t tends to infinity) we expect the VACF to be zero, as all particles will have collided at least once and their velocities will be uncorrelated.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient is proportional to the integral of the VACF&amp;lt;ref name=&amp;quot;:1&amp;quot; /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{3}\int_0^\infty \mathrm{d}\delta t \left\langle\mathbf{v}\left(0\right)\cdot\mathbf{v}\left(\delta t\right)\right\rangle=\frac{1}{3}\int_0^\infty C\left(\delta t\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good, I could reproduce your results with this information. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Results &amp;amp; Discussion==&lt;br /&gt;
===Equilibration===&lt;br /&gt;
&lt;br /&gt;
Plots of energy, temperature and pressure vs time were obtained for a timestep value of 0.001. These are reproduced in Fig. 2-4. It can be seen that all three plots reach a &amp;quot;plateau&amp;quot; very quickly; equilibration is almost instantaneous. The values oscillate slightly, as a result of the approximations required by the simulation. These oscillations are however very small (note the scale of the y-axis). &lt;br /&gt;
{|&lt;br /&gt;
&lt;br /&gt;
|[[File:Ad5215 Ts001 Eng.png|thumb|left|Fig. 2: Energy vs time (ts 0.001)]]&lt;br /&gt;
|[[File:Ad5215 Ts001 Temp.png|thumb|left|Fig. 3: Temperature vs time (ts 0.001)]]&lt;br /&gt;
|[[File:Ad5215 Ts001 Press.png|thumb|right|Fig. 4: Pressure vs time (ts 0.001)]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An important feature of these simulations is the timestep. The shorter the timestep the more &amp;quot;accurate&amp;quot; the simulation, but the more computational power this will require. In this case, plots of the total energy vs time were obtained for all five timestep values (Fig. 5).&lt;br /&gt;
&lt;br /&gt;
[[File:Ad515 Allts energy.png|frame|center|Fig. 5: Energy vs time for all timesteps]]&lt;br /&gt;
&lt;br /&gt;
The lowest energy is given by timestep values of 0.001 and 0.0025. These energies are almost identical; the 0.001 energy is lower, but the difference in energies is only 0.005%. In addition to this, for simulating a total time of e.g. 100s, ts = 0.0025 requires 40,000 steps, while ts = 0.001 requires 100,000 steps. Therefore, the 0.0025 timestep is the better choice, as the difference in energies is not large enough to warrant the use of more computational power (as required by the 0.001 timestep). The 0.015 timestep is a poor choice. Not only is the energy the highest of the five, but, unlike in the other four cases, the system does not reach equilibrium and the energy keeps increasing. &lt;br /&gt;
&lt;br /&gt;
Based on this data, further simulations were run using a 0.0025 timestep (unless a different value was required by the lab script).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Equilibration is not typically discussed in the results section of a scientific paper. Simply &amp;quot;systems were equilibrium for X timesteps/unit with a timestep of Y&amp;quot; would be sufficient. You get the marks for the task however. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Densities and the ideal gas law===&lt;br /&gt;
&lt;br /&gt;
Plots of density vs temperature for two different pressures are reproduced in Fig. 6. The density given by the ideal gas law was also calculated and plotted on the same graph. &lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 densvstemp.png|frame|center|Fig. 6: Plots of density vs temperature comparing experimental and theoretical data]]&lt;br /&gt;
&lt;br /&gt;
It can be seen that the results of the simulation do not match those given by the theoretical approach. This is because the ideal gas law does not take into account any interaction between particles, i.e. it assumes that the gas behaves ideally. In the Lennard-Jones model the particles experience attractive and repulsive forces; the repulsive forces dominate &amp;lt;span style=color:red&amp;gt; be careful to convey precise meaning: when do repulsive forces dominate? &amp;lt;/span&amp;gt;and cause the system to be more diffuse and thus have a lower simulated density. &lt;br /&gt;
&lt;br /&gt;
The discrepancy between theory and simulation increases with increasing pressure because this &amp;quot;pushes&amp;quot; the particles closer together and increases the effect of Lennard-Jones forces. It also increases with decreasing temperature; at low temperatures, the Lennard-Jones forces dominate, while at high temperatures thermal motion is more significant.&amp;lt;span style=color:red&amp;gt; I understand what you are trying to say here, however a more precise/succinct explanation would have been helpful. For example, rationalising your results in terms of the potential energy surface and available thermal energy ... &amp;quot;at the high temperature limit, LJ particles have enough kinetic energy to easily surmount all kinetic energy barriers in the PES&amp;quot;, or something more elegantly worded.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Heat capacities===&lt;br /&gt;
&lt;br /&gt;
The variation in heat capacity with temperature is shown in Fig. 7. The system is under the NVE ensemble so we are dealing with the isochoric heat capacity, C&amp;lt;sub&amp;gt;V&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Heatcaps.png|frame|center|Fig. 7: Heat capacity variation with temperature]]&lt;br /&gt;
&lt;br /&gt;
The heat capacity decreases with increasing temperature. This agrees with the formula for heat capacity, which shows inverse proportionality to temperature. However, this is not the full extent of the explanation.&lt;br /&gt;
&lt;br /&gt;
Heat capacity is a measure of how much energy (heat) is required to increase the temperature of a system. At higher temperatures more energetic states become available and the spacing between them decreases - this makes populating higher states easier, leading to a decrease in heat capacity. &lt;br /&gt;
&lt;br /&gt;
In addition to this, increasing the temperature can lead to a phase change and thus to an increase in the degrees of freedom available to the system (e.g. melting causes a solid - rigid, fewer degrees of freedom - to change into a liquid).&lt;br /&gt;
&lt;br /&gt;
===The Radial Distribution Function (RDF)===&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 RDFs 3phase.png|frame|right|Fig. 8: RDFs for systems in different phases]]&lt;br /&gt;
&lt;br /&gt;
The radial distribution function for a solid, liquid and gas is reproduced in Fig. 8. The RDF shows how a system is arranged, relative to the position of one particle in the system; effectively, it is a measure of long-range order. A peak corresponds to a shell of atoms around the central particle. The intensity of the peak (effectively its integral) is proportional to the number of atoms within this shell. &lt;br /&gt;
&lt;br /&gt;
All three RDFs (vapour, liquid, solid) show an initial peak, but differ in their behaviour at longer distances. The RDF for a system in the gas phase rapidly reaches a value of 1 and plateaus. This is because a gas is, by its very nature, disordered. Atoms are free to move and they tend to disperse, not arrange themselves in shells. The RDF for a liquid oscillates slightly after the initial peak but also plateaus at 1 after a short distance. The initial peak corresponds to a solvation shell around the central particle. The subsequent smaller peaks show that a liquid has some degree of order - the forces between the particles are strong enough to restrict their movement to a degree. &lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 small lat.png|thumb|FCC lattice showing first three neighbouring lattice sites for a central atom (light pink)]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the solid system is different to the other two, as it shows long-range order. It does not plateau but instead shows peaks of decreasing intensity. This can be explained by looking at the structure of the solid crystal. This was defined in the simulation as a face-centred cubic (FCC) lattice, shown in Figure 9. The particles are arranged in shells, at distances which depend on the lattice spacing of the crystal. This can be calculated from the lattice density (1.2).&lt;br /&gt;
&lt;br /&gt;
The first three peaks in the RDF plot correspond to the first three neighbouring sites of the central particle, coloured in blue, purple and green respectively. The lattice spacing and the coordination number of each site can be calculated by considering the geometry of the crystal:&lt;br /&gt;
&lt;br /&gt;
*Shell 1 is found at &amp;lt;math&amp;gt; r_1 = \frac{\sqrt{2}}{2}a = 1.056&amp;lt;/math&amp;gt; and holds &amp;lt;math&amp;gt;12&amp;lt;/math&amp;gt; atoms. &lt;br /&gt;
*Shell 2 is found at &amp;lt;math&amp;gt; r_2 = a = 1.494&amp;lt;/math&amp;gt; and holds &amp;lt;math&amp;gt;6&amp;lt;/math&amp;gt;atoms.&lt;br /&gt;
*Shell 3 is found at &amp;lt;math&amp;gt; r_3 = \frac{\sqrt{6}}{2}a = 1.830&amp;lt;/math&amp;gt; and holds &amp;lt;math&amp;gt;24&amp;lt;/math&amp;gt; atoms.&lt;br /&gt;
&lt;br /&gt;
These values agree with those found by the RDF. The coordination numbers match those calculated from the running integral, which has values of 12.15, 17.98 and 42.3 respectively.&lt;br /&gt;
&lt;br /&gt;
===The diffusion coefficient, D===&lt;br /&gt;
&lt;br /&gt;
Plots of the total mean squared displacement vs time are reproduced in Appendix A. Plots of the VACF vs time are reproduced in Appendix B. Plots of the VACF running integral vs time are reproduced in Appendix B.&lt;br /&gt;
&lt;br /&gt;
Figure 10 below shows the time evolution of the VACF for a solid, a liquid and a gas, as well as for an ideal harmonic oscillator. &lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Velocity Autocorrelation Functions small.png|frame|center|Fig. 10: VACF plots for small scale simulations]]&lt;br /&gt;
&lt;br /&gt;
The VACF is effectively a measure of how closely related the velocity of a particle is (at time t) to its initial velocity (at time t=0). This correlation is &amp;quot;perturbed&amp;quot; by collisions or by interactions with other particles; at very long times (i.e. when t tends to infinity) we expect the VACF to be zero and the velocities to be uncorrelated. &amp;lt;span style=color:red&amp;gt; What does the first minimum indicate? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The harmonic oscillator shows perfectly oscillatory behaviour, with constant amplitude in time: the velocity goes from an initial state to an uncorrelated one and then back to the initial state. The solid shows similar behaviour: the VACF oscillates about 0 but dampens with time. This is because in a solid the atoms have fixed positions in a lattice; the forces between the particles are strong and these will oscillate in place for a while. The VACF takes much longer to reach zero than in the case of a liquid or a gas. The gas VACF tends slowly to zero; the interactions between particles in a gas are minimal, which means that the velocity at time is not very different from an initial velocity. A liquid is somewhere in-between these two phases: the particles have more freedom of movement than they do in a solid, but the attractive forces are strong enough to cause a perturbation in the velocities; the VACF shows a very slight oscillation, but then quickly dampens to zero. &lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients can be calculated in two different ways, either from the gradient of an MSD plot or from the integral of the VACF. These calculations were performed and the D values are given in Table 1.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Table 1: Diffusion coefficients &amp;lt;math&amp;gt; D / m^2 s^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; | Phase&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | MSD data&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | VACF data&lt;br /&gt;
|- &lt;br /&gt;
! Small simulation &lt;br /&gt;
! Large simulation &lt;br /&gt;
! Small simulation&lt;br /&gt;
! Large simulation&lt;br /&gt;
|- &lt;br /&gt;
! Gas &lt;br /&gt;
| 2.536&lt;br /&gt;
| 2.542&lt;br /&gt;
| 3.294&lt;br /&gt;
| 3.268 &lt;br /&gt;
|- &lt;br /&gt;
! Gas, linear region &lt;br /&gt;
| 3.317&lt;br /&gt;
| 3.217&lt;br /&gt;
| ---&lt;br /&gt;
| ---&lt;br /&gt;
|- &lt;br /&gt;
! Liquid&lt;br /&gt;
| 0.085 &lt;br /&gt;
| 0.087 &lt;br /&gt;
| 0.098&lt;br /&gt;
| 0.090&lt;br /&gt;
|-  &lt;br /&gt;
! Solid&lt;br /&gt;
| 5.825 x 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
| 4.391 x 10&amp;lt;sup&amp;gt;-4&amp;lt;/sup&amp;gt;&lt;br /&gt;
| -1.845 x 10^&amp;lt;sup&amp;gt;-4&amp;lt;/sup&amp;gt;&lt;br /&gt;
| 4.558 x 10^&amp;lt;sup&amp;gt;-5&amp;lt;/sup&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The largest error in the case of the MSD measurements comes from the fact that the gas phase gives rise to a curved plot, which cannot be feasibly fitted to a straight line. This is because particles in a gas will diffuse readily and thus the system will take longer to reach equilibrium (the linear region) than, say, a liquid. A longer simulation that would allow the system to reach equilibrium and then collect a larger amount of data would provide a more accurate result, as in this case the linear region that was used only comprised about 20% of the total data. In the case of a liquid, the MSD function is linear and provides the best fit and thus the most accurate result. The MSD for a solid establishes linear behaviour quickly, as the particles are &amp;quot;fixed&amp;quot;. The diffusion coefficient values are very small; this shows that in a solid no diffusion (or almost none) takes place.&lt;br /&gt;
&lt;br /&gt;
In the case of the VACF measurements the largest error comes from using the trapezium rule to compute the integral. The smaller the timestep, the more accurate the measurement - in this case the timestep is relatively small but some error still remains. &lt;br /&gt;
&lt;br /&gt;
The errors in both of these measurements cause the diffusion coefficients to differ slightly. The difference between the MSD- and VACF-calculated diffusion coefficients are 0.67%, 15.3% and 31780% for the gas, liquid and solid phases respectively. The difference in the case of the solid phase is incredibly large but not significant as we have established diffusion is not a significant process for solids. The difference for the liquid phase is quite small and likely comes from the poor fit of the MSD plot and the short duration of the simulation.&lt;br /&gt;
&lt;br /&gt;
===Appendix A: MSD plots===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Ad5215 Gas phase MSD, large atom count.png|Gas phase MSD (large scale)&lt;br /&gt;
File:Ad5215 Gas phase MSD, large atom count - linear region.png|Gas phase MSD, linear region (large scale)&lt;br /&gt;
File:Ad5215 Gas phase MSD, small atom count.png|Gas phase MSD (small scale)&lt;br /&gt;
File:Ad5215 as phase MSD, small atom count - linear region.png|Gas phase MSD, linear region (small scale)&lt;br /&gt;
File:Ad5215 Liquid phase MSD, large atom count.png|Liquid phase MSD (large scale)&lt;br /&gt;
File:Ad5215 Liquid phase MSD, small atom count.png|Liquid phase MSD (small scale&lt;br /&gt;
File:Ad5215 Solid phase MSD, large atom count.png|Solid phase MSD (large scale)&lt;br /&gt;
File:Ad5215 Solid phase MSD, small atom count.png|Solid phase MSD (small scale)&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Appendix B: VACF running integral plots===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Ad5215 Gas phase VACF Integral, large scale.png|Gas phase (large scale)&lt;br /&gt;
File:Ad5215 Gas phase VACF Integral, small scale.png|Gas phase (small scale)&lt;br /&gt;
File:Ad5215 Liquid phase VACF Integral, large scale.png|Liquid phase (large scale)&lt;br /&gt;
File:Ad5215 Liquid phase VACF Integral, small scale.png|Liquid phase (small scale)&lt;br /&gt;
File:AD5215 Solid phase VACF Integral, large scale.png|Solid phase (large scale)&lt;br /&gt;
File:Ad5215 Solid phase VACF Integral, small scale.png|Solid phase (small scale)&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
This lab provided insight into the thermodynamic properties of systems and how these change with phase, temperature, pressure. Of course, the systems investigated were small, but modeling larger, more complicated systems is possible and could prove useful. A particular domain where this kind of research would be invaluable is, as previously mentioned, molecular gastronomy: understanding phase changes and the properties of liquids, solids and gels can lead to the advancement of this (pseudo)-scientific discipline.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This conclusion is a bit short: it should include a summary of the results, and perhaps a short outlook. It would also be nice to convey the importance/meaning of your results and conclusions in the context of molecular gastronomy, which you motivated your study with, but have not mentioned since the introduction. &amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:AD5215LS&amp;diff=696262</id>
		<title>Rep:AD5215LS</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:AD5215LS&amp;diff=696262"/>
		<updated>2018-04-16T13:25:11Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Tasks=&lt;br /&gt;
==Section 2: Introduction==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by &amp;lt;math&amp;gt; x\left(t\right) = A\cos\left(\omega t + \phi\right)&amp;lt;/math&amp;gt; (the values of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Excel file attached [[:File:AD5215_HO.xls|here]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 error vs time.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The change in energy goes down as the timestep value becomes smaller. For a timestep of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 0.25 &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; the change in energy is &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 1.58% &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; while for a timestep of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 0.05 &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; the change in energy is &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 0.06% &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;. The energy change is &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 1.01% &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; for a timestep of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 0.2 &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;. A timestep that is too large could lead to the simulation effectively &amp;quot;missing&amp;quot; any changes in the system that happen on a shorter timescale than that of the timestep. Therefore, it is important to monitor the energy to ensure that the change is not too drastic and we are observing the behaviour of the system closely. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK:&amp;lt;/big&amp;gt; For a single Lennard-Jones interaction, &amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;, find the separation, &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt;, at which the potential energy is zero. What is the force at this separation? Find the equilibrium separation, &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, and work out the well depth (&amp;lt;math&amp;gt;\phi\left(r_{eq}\right)&amp;lt;/math&amp;gt;). Evaluate the integrals &amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\int_{2.5\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\int_{3\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;\sigma = \epsilon = 1.0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;&#039;&#039;Find the separation at which the potential energy is zero&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 lj zero pot.JPG]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;&#039;&#039;FInd the force at &amp;lt;math&amp;gt;r=\sigma&amp;lt;/math&amp;gt;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The force is the derivative of potential wrt to distance:&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 lj Force.JPG]]&lt;br /&gt;
&lt;br /&gt;
At separation &amp;lt;math&amp;gt;r=\sigma&amp;lt;/math&amp;gt; this will be&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 force(R).JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;&#039;&#039;Equilibrium separation and well depth&#039;&#039;&amp;lt;\span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The equilibrium separation is the separation when &amp;lt;math&amp;gt; \frac{d \phi}{dr} = 0.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 lj equilibrium req.JPG]]&lt;br /&gt;
&lt;br /&gt;
The well depth at this separation is&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 ls lj epsilon.JPG]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; negative epsilon &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;&#039;&#039;Integrals&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 lj int1.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 int2.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 int3.JPG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions. Estimate the volume of &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; water molecules under standard conditions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; V = 1\ mL, \ \rho = 1\ g/mL, \ M = 18\ g/mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
m = V \rho = 1\ g&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
N = nN_a = \frac{m}{M} \times N_a = \frac{6.022 \times 10^{23}}{18} = 3.35 \times 10{22}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
N molecules occupy 1 mL. Therefore, the volume of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;1 molecule&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; of water will be &amp;lt;math&amp;gt;V_0 = \frac{1}{N} = \frac{1}{3.35 \times 10{22}} = 2.99 \times10^{-23}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The volume of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;1000 molecules&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; will be &amp;lt;math&amp;gt;1000 \times V_0 = 2.99 \times10^{-20} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, &#039;&#039;after the periodic boundary conditions have been applied&#039;&#039;?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It ends up at position &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;(0.2, 0.1, 0.7)&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: The Lennard-Jones parameters for argon are &amp;lt;math&amp;gt;\sigma = 0.34\mathrm{nm}, \epsilon\ /\ k_B= 120 \mathrm{K}&amp;lt;/math&amp;gt;. If the LJ cutoff is &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;, what is it in real units? What is the well depth in &amp;lt;math&amp;gt;\mathrm{kJ\ mol}^{-1}&amp;lt;/math&amp;gt;? What is the reduced temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt; in real units?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r = \sigma \times r^*&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r = 0.34 \times 3.2 = 1.088\ nm &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\ K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\epsilon = 120 \times k_B &amp;lt;/math&amp;gt; for 1 particle&lt;br /&gt;
&lt;br /&gt;
For a mole of particles: &amp;lt;math&amp;gt;\epsilon = 120 \times k_B \times N_A &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \epsilon = 0.997\, kJ mol^{-1} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T = T^* \times \frac{\epsilon}{k_BT}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T = 1.5 \times 120 &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;
==Section 3: Equilibration==&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Randomly generated positions can lead to two atoms being very close together, which would result in a large repulsive potential. This would then affect any propagation in time of the system, which would lead to undesirable behaviour, especially when using larger timesteps. The system would most likely behave &amp;quot;appropriately&amp;quot; for small enough timesteps, but this would require running longer simulations. This would be less effective; a larger timestep that still results in an accurate simulation is ideal. &amp;lt;span style=color:red&amp;gt; good! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Density: &amp;lt;math&amp;gt; \rho = \frac{N}{V} = \frac{N}{l^3} &amp;lt;/math&amp;gt; ---&amp;gt; Length: &amp;lt;math&amp;gt; l=\sqrt[3]{\frac{N}{\rho}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;simple cubic lattice&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; with &amp;lt;math&amp;gt; \rho = 0.8 &amp;lt;/math&amp;gt;, the length, l, is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \sqrt[3]{\frac{1}{0.8}}=1.07722 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;face-centered cubic lattice&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; with &amp;lt;math&amp;gt; \rho = 1.2 &amp;lt;/math&amp;gt;, the length, l, is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \sqrt[3]{\frac{4}{1.2}}=1.4938 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The box would still contain &amp;lt;math&amp;gt; 10 \times 10 \times 10 = 1000 &amp;lt;/math&amp;gt; lattice units. For an FCC there are 4 atoms per lattice unit. Therefore the total number of atoms would be &amp;lt;math&amp;gt; 4 \times 1000 = 4000 &amp;lt;/math&amp;gt; atoms.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Mass&amp;quot; sets the mass of a particular type of atom (in this case, the mass of type 1 atoms is 1). &amp;quot;Pair&amp;quot; refers to pair potentials. The lj/cut command computes the 12/6 Lennard-Jones potential, cut sets the cut-off for r. Pair_coeff sets the values for the 2 parameters, sigma and epsilon. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; Velocity Verlet. &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; A simple Verlet algorithm wouldn&#039;t require the initial velocity, but would instead require &amp;lt;math&amp;gt;\mathbf{x}_i\left(-\delta t\right)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The line &amp;quot;variable timestep equal 0.001&amp;quot; defines a variable timestep which is the assigned a value. This allows for the variable to be called later on if needed. This is convenient for the user as it means that if the same variable is required multiple times (in this case, the variable timestep is called twice) changing its value is easier, as this only needs to be done once (in the line defining the variable).&lt;br /&gt;
&lt;br /&gt;
==Section 4: Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 ljls gamma.JPG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. How often will values of the temperature, etc., be sampled for the average? How many measurements contribute to the average? Looking to the following line, how much time will you simulate?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From the manual, the structure of the command is &amp;quot;ave/time Nevery Nrepeat Nfreq&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*Nevery (100) = use input values every this many timesteps (total no. of data points is 100,000 so this will give 1000 values to be averaged in the next step; records an average of 100 values)&lt;br /&gt;
&lt;br /&gt;
*Nrepeat (1000) = no. of times to use input values for calculating averages (i.e. average over 1000 values)&lt;br /&gt;
&lt;br /&gt;
*Nfreq (100,000) = calculate averages every this many timesteps (same no. specified in the &amp;quot;run&amp;quot; command)&lt;br /&gt;
&lt;br /&gt;
The timestep is 0.0025 and the simulation runs for 100,000 steps. Therefore we are simulating a total time of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;250 seconds &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Section 7: Dynamical properties and the diffusion coefficient==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a HO model:&lt;br /&gt;
[[File:Ad5215 Vacf HO model.JPG]]&lt;br /&gt;
&lt;br /&gt;
The VACF is given by&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 VACF deriv.JPG]]&lt;br /&gt;
&lt;br /&gt;
We evaluate the two integrals separately. Integral 2 is&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i2.JPG]]&lt;br /&gt;
&lt;br /&gt;
Using [[File:Ad5215 Vacf cos(2x).JPG]] we can write&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i2 2.JPG]]&lt;br /&gt;
&lt;br /&gt;
Integral 1 is&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i1 1.JPG]]&lt;br /&gt;
&lt;br /&gt;
Using [[File:Ad5215 Vacf sin(A+B).JPG]] we can write&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i1 2.JPG]]&lt;br /&gt;
&lt;br /&gt;
We evaluate the last integral separately.&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i3.JPG]]&lt;br /&gt;
&lt;br /&gt;
Substituting this back we obtain:&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i1 3.JPG]]&lt;br /&gt;
&lt;br /&gt;
Substituting I1 and I2 into the formula for C we obtain&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf c1.JPG]]&lt;br /&gt;
&lt;br /&gt;
Sin is an odd function, i.e. [[File:Ad5215 Vacf sinodd.JPG]]. Thus&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf c2.JPG]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; There is definitely a shorter way of doing this, but yes. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Report=&lt;br /&gt;
&lt;br /&gt;
==Abstract==&lt;br /&gt;
&lt;br /&gt;
Solid, liquid and gaseous systems were modeled using LAMMPS and a 12-6 Lennard-Jones forcefield. A suitable timestep of 0.0025 was determined. Simulations were run to obtain thermodynamic data (temperatures, pressures, densities, heat capacities). Calculated densities were found to be lower than those predicted by the ideal gas law. The simulated heat capacities showed a trend, decreasing with increasing temperature. The RDF was calculated for systems in all three phases. As expected, the RDF for a solid showed peaks decaying in amplitude. Lattice spacings and coordination numbers for the solid FCC lattice were calculated. The MSD and the VACF were plotted for the same three systems and the diffusion coefficient was calculated for both measurements. The two methods did not result in identical values; still, the difference was only 0.67% for the diffusion coefficients in the gas phase.&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good, concise abstract that summaries main results. Perhaps 1 sentence of motivation would have been nice. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Food constitutes a huge part of our lives, whether we actively think about it or not. Cooking, in some form or other, has been around ever since the first human realised that fire makes raw meat tastier and more convenient to eat. Nowadays, the food industry is enormous and cooking has become a successful blend of art and science. Perhaps the most pertinent example of this is molecular gastronomy, a subdiscipline of food science that seeks to investigate the physical and chemical transformations of ingredients during the cooking process. In their review, Balham et al refer to molecular gastronomy as an &amp;quot;emerging scientific discipline&amp;quot;.&amp;lt;ref&amp;gt;P. Barham, L. H. Skibsted, W. L. P. Bredie and J. Risbo, &#039;&#039;Symp.&lt;br /&gt;
A Q. J. Mod. Foreign Lit.&#039;&#039;, 2010, 2313–2365.&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In fact, molecular gastronomy relies heavily on processes such as gelification and infusion and on materials such as gels, foams and powders. It also uses equipment that is heavily reminiscent of a laboratory - some kitchens are fitted with butane burners, syringes and dehydrators.  &lt;br /&gt;
&lt;br /&gt;
Clever presentations and unusual sensations and are piquing the interest of many people; in some places, molecular gastronomy restaurants have become tourist attractions.&amp;lt;ref&amp;gt;D. Tüzünkan and A. Albayrak, &#039;&#039;Procedia&lt;br /&gt;
- Soc. Behav. Sci.&#039;&#039;, 2015, &#039;&#039;&#039;195&#039;&#039;&#039;, 446–452.&amp;lt;/ref&amp;gt; Simulating the thermodynamic properties of systems can provide a better understanding of physical systems and can lead to the growth and development of this industry.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; An interesting topic and motivation! An explicit connection between gastronomy and the results you intend to present/discuss would be nice. For example how is the diffusion coefficient relevant? The introduction of a scientific paper usually includes the background theory, such as in your case, the equations for diffusion coefficient. You have included this in the methodology, which while logical, is not standard practice for most papers/journals. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Aims and Objectives==&lt;br /&gt;
&lt;br /&gt;
* become familiar with LAMMPS and how simulating a physical system works&lt;br /&gt;
* model the behaviour of systems under the 12-6 Lennard-Jones potential&lt;br /&gt;
* calculate the physical properties (temperature, pressure, density, etc) of a system using such simulations&lt;br /&gt;
* comparing the results of the simulations to theory (e.g. simulated density vs density given by the ideal gas law)&lt;br /&gt;
* calculating the diffusion coefficient for systems in different phases (gas, liquid, solid) by two different methods (from the MSD and from the VACF)&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
&#039;&#039;&#039;General methods&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A 12-6 Lennard-Jones system was modeled usings LAMMPS and all simulations were run using Imperial&#039;s High Performance Computer. &lt;br /&gt;
The potential for such a system is given by&amp;lt;ref name=&amp;quot;:0&amp;quot;&amp;gt;P. Atkins, J. De Paula, &#039;&#039;Physical&lt;br /&gt;
Chemistry&#039;&#039;, OUP Oxford, 9th edn., 2009.&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All calculations used reduced units:&amp;lt;math&amp;gt;r^* = r/{\sigma}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;E^* = E/{\epsilon}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;T^* = {k_BT}/{\epsilon}.&amp;lt;/math&amp;gt;&lt;br /&gt;
The Lennard-Jones parameters &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\epsilon&amp;lt;/math&amp;gt; were set to 1.0 for all simulations. The cutoff for Lennard-Jones interactions was set at r*=3 unless otherwise stated. The mass of the atoms was set to 1.0. The temperature, pressure, lattice density and timestep values were varied. For all calculations the velocity Verlet algorithm was employed. The atoms were assigned random velocities within the simulation, while ensuring that the Boltzmann distribution of states is followed. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Determining a suitable timestep&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A simple cubic lattice with a density of 0.8 was defined and the simulation was populated with 1000 atoms (10 x 10 x 10 dimensions). The ensemble was defined as the microcanonical (NVE) ensemble. Five values for the timestep were tested: 0.015, 0.01, 0.0075, 0.0025, 0.001 and each simulation was run for a total time of 100 seconds. Values for the energy, temperature and pressure of the system were recorded at each step. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Variation of density with temperature and pressure&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A simple cubic lattice with a density of 0.8 was defined and the simulation was populated with 3375 atoms (15 x 15 x 15 dimensions). The timestep for all simulations was set to 0.0025. The ensemble was defined as NPT and 10 different thermodynamic states were simulated (two pressures, 2.5 and 3.5, each associated with five temperatures: 3.0, 6.0, 9.0, 12.0 and 15.0). Values for the energy, temperature and pressure of the system were recorded at each step, as well as average values for the density, temperature and pressure of the system at the end of the simulation. Plots of density vs time were obtained, both for the simulated data and for densities predicted by the ideal gas law&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;, &amp;lt;math&amp;gt; PM = \rho RT.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Heat capacity calculations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A simple cubic lattice with a density of 0.2 was defined and populated with 3375 atoms. The timestep for all simulations was set to 0.0025. An NVT ensemble was simulated for five temperatures: 2.0, 2.2, 2.4, 2.6 and 2.8. Then, a subsequent simulation was run to establish an NVE ensemble and measure the properties of the system. Average values for temperature, energy, volume and heat capacity were calculated. This procedure was repeated for a simple cubic lattice with a density of 0.8. An example input script can be found [[:File: Example_script_heatcap_ad5215.in|here]].&lt;br /&gt;
&lt;br /&gt;
The heat capacity of a system is given by&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = \frac{\partial E}{\partial T} = \frac{\mathrm{Var}\left[E\right]}{k_B T^2} = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where E is the internal energy and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;{\mathrm{Var}\left[E\right]}={\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
is the variance in internal energy. The &amp;lt;math&amp;gt;N^2&amp;lt;/math&amp;gt; term is required because LAMMPS automatically outputs the energy &#039;&#039;&#039;per atom&#039;&#039;&#039;, not the &#039;&#039;&#039;total&#039;&#039;&#039; energy. &lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 LJfluid phase diag.JPG|thumb|Fig. 1: Phase diagram for the Lennard-Jones fluid]]&lt;br /&gt;
&#039;&#039;&#039;RDF calculations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Three systems (a liquid, a solid and a gas) were modeled and populated with 3375 atoms each. Temperature and density values were taken from the Lennard-Jones fluid phase diagram&amp;lt;ref&amp;gt;J. P. Hansen and L.&lt;br /&gt;
Verlet, &#039;&#039;Phys. Rev.&#039;&#039;, 1969, &#039;&#039;&#039;184&#039;&#039;&#039;, 151–161.&amp;lt;/ref&amp;gt; reproduced in Fig. 1. These were defined as:&lt;br /&gt;
&lt;br /&gt;
*solid: fcc lattice, temperature 1.2, density 1.2;&lt;br /&gt;
*liquid: sc lattice, temperature 1.2 , density 0.8;&lt;br /&gt;
*vapour: sc lattice, temperature 1.2, density 0.05.&lt;br /&gt;
&lt;br /&gt;
The ensemble was defined as NVT. The timestep for all simulations was set to 0.002. The trajectories of the atoms were recorded and VMD was used to calculate the radial distribution function and its integral from these trajectories. The data was then analysed using Python. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Diffusion coefficient calculations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The same three systems as above were modeled, this time with 8000 atoms each. The timestep was set to 0.002 and each simulation was run for 5000 steps. The Lennard-Jones cutoff was set to 3.2. The ensemble was defined as NVT. The mean squared displacement (MSD) and the velocity autocorrelation function (VACF) at each step were calculated for all systems. The data was analysed using Python. The MSD plots were fitted to a straight line and the gradient was used to calculate the diffusion coefficient. The VACF integrals were plotted as a function of time and, again, used to calculate the diffusion coefficient. The same data analysis was conducted using supplied data which modeled larger systems.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;MSD&#039;&#039;&#039; is a measure of the deviation of the position of a particle with respect to a reference position over time. It can be thought of as a measure of how much the system moves over time. The MSD is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;{\rm MSD}\equiv\langle (r-r_0)^2\rangle=\frac{1}{N}\sum_{n=1}^N (r_n(t) - r_n(0))^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient (D) can be calculated from the MSD, using&amp;lt;ref name=&amp;quot;:1&amp;quot;&amp;gt;O. J. Eder, &#039;&#039;J. Chem. Phys.&#039;&#039;, 1977, &#039;&#039;&#039;66&#039;&#039;&#039;, 3866–3870.&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;VACF&#039;&#039;&#039; is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\delta t\right) = \left\langle \mathbf{v}\left(t\right) \cdot \mathbf{v}\left(t+\delta t\right)\right\rangle&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and is effectively a measure of how closely related the velocity of a particle is (at time t) to its initial velocity (at time t=0). This correlation is &amp;quot;perturbed&amp;quot; by collisions; at very long times (i.e. when t tends to infinity) we expect the VACF to be zero, as all particles will have collided at least once and their velocities will be uncorrelated.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient is proportional to the integral of the VACF&amp;lt;ref name=&amp;quot;:1&amp;quot; /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{3}\int_0^\infty \mathrm{d}\delta t \left\langle\mathbf{v}\left(0\right)\cdot\mathbf{v}\left(\delta t\right)\right\rangle=\frac{1}{3}\int_0^\infty C\left(\delta t\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good, I could reproduce your results with this information. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Results &amp;amp; Discussion==&lt;br /&gt;
===Equilibration===&lt;br /&gt;
&lt;br /&gt;
Plots of energy, temperature and pressure vs time were obtained for a timestep value of 0.001. These are reproduced in Fig. 2-4. It can be seen that all three plots reach a &amp;quot;plateau&amp;quot; very quickly; equilibration is almost instantaneous. The values oscillate slightly, as a result of the approximations required by the simulation. These oscillations are however very small (note the scale of the y-axis). &lt;br /&gt;
{|&lt;br /&gt;
&lt;br /&gt;
|[[File:Ad5215 Ts001 Eng.png|thumb|left|Fig. 2: Energy vs time (ts 0.001)]]&lt;br /&gt;
|[[File:Ad5215 Ts001 Temp.png|thumb|left|Fig. 3: Temperature vs time (ts 0.001)]]&lt;br /&gt;
|[[File:Ad5215 Ts001 Press.png|thumb|right|Fig. 4: Pressure vs time (ts 0.001)]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An important feature of these simulations is the timestep. The shorter the timestep the more &amp;quot;accurate&amp;quot; the simulation, but the more computational power this will require. In this case, plots of the total energy vs time were obtained for all five timestep values (Fig. 5).&lt;br /&gt;
&lt;br /&gt;
[[File:Ad515 Allts energy.png|frame|center|Fig. 5: Energy vs time for all timesteps]]&lt;br /&gt;
&lt;br /&gt;
The lowest energy is given by timestep values of 0.001 and 0.0025. These energies are almost identical; the 0.001 energy is lower, but the difference in energies is only 0.005%. In addition to this, for simulating a total time of e.g. 100s, ts = 0.0025 requires 40,000 steps, while ts = 0.001 requires 100,000 steps. Therefore, the 0.0025 timestep is the better choice, as the difference in energies is not large enough to warrant the use of more computational power (as required by the 0.001 timestep). The 0.015 timestep is a poor choice. Not only is the energy the highest of the five, but, unlike in the other four cases, the system does not reach equilibrium and the energy keeps increasing. &lt;br /&gt;
&lt;br /&gt;
Based on this data, further simulations were run using a 0.0025 timestep (unless a different value was required by the lab script).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Equilibration is not typically discussed in the results section of a scientific paper. Simply &amp;quot;systems were equilibrium for X timesteps/unit with a timestep of Y&amp;quot; would be sufficient. You get the marks for the task however. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Densities and the ideal gas law===&lt;br /&gt;
&lt;br /&gt;
Plots of density vs temperature for two different pressures are reproduced in Fig. 6. The density given by the ideal gas law was also calculated and plotted on the same graph. &lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 densvstemp.png|frame|center|Fig. 6: Plots of density vs temperature comparing experimental and theoretical data]]&lt;br /&gt;
&lt;br /&gt;
It can be seen that the results of the simulation do not match those given by the theoretical approach. This is because the ideal gas law does not take into account any interaction between particles, i.e. it assumes that the gas behaves ideally. In the Lennard-Jones model the particles experience attractive and repulsive forces; the repulsive forces dominate &amp;lt;span style=color:red&amp;gt; be careful to convey precise meaning: when do repulsive forces dominate? &amp;lt;/span&amp;gt;and cause the system to be more diffuse and thus have a lower simulated density. &lt;br /&gt;
&lt;br /&gt;
The discrepancy between theory and simulation increases with increasing pressure because this &amp;quot;pushes&amp;quot; the particles closer together and increases the effect of Lennard-Jones forces. It also increases with decreasing temperature; at low temperatures, the Lennard-Jones forces dominate, while at high temperatures thermal motion is more significant.&amp;lt;span style=color:red&amp;gt; I understand what you are trying to say here, however a more precise/succinct explanation would have been helpful. For example, rationalising your results in terms of the potential energy surface and available thermal energy ... &amp;quot;at the high temperature limit, LJ particles have enough kinetic energy to easily surmount all kinetic energy barriers in the PES&amp;quot;, or something more elegantly worded.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Heat capacities===&lt;br /&gt;
&lt;br /&gt;
The variation in heat capacity with temperature is shown in Fig. 7. The system is under the NVE ensemble so we are dealing with the isochoric heat capacity, C&amp;lt;sub&amp;gt;V&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Heatcaps.png|frame|center|Fig. 7: Heat capacity variation with temperature]]&lt;br /&gt;
&lt;br /&gt;
The heat capacity decreases with increasing temperature. This agrees with the formula for heat capacity, which shows inverse proportionality to temperature. However, this is not the full extent of the explanation.&lt;br /&gt;
&lt;br /&gt;
Heat capacity is a measure of how much energy (heat) is required to increase the temperature of a system. At higher temperatures more energetic states become available and the spacing between them decreases - this makes populating higher states easier, leading to a decrease in heat capacity. &lt;br /&gt;
&lt;br /&gt;
In addition to this, increasing the temperature can lead to a phase change and thus to an increase in the degrees of freedom available to the system (e.g. melting causes a solid - rigid, fewer degrees of freedom - to change into a liquid).&lt;br /&gt;
&lt;br /&gt;
===The Radial Distribution Function (RDF)===&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 RDFs 3phase.png|frame|right|Fig. 8: RDFs for systems in different phases]]&lt;br /&gt;
&lt;br /&gt;
The radial distribution function for a solid, liquid and gas is reproduced in Fig. 8. The RDF shows how a system is arranged, relative to the position of one particle in the system; effectively, it is a measure of long-range order. A peak corresponds to a shell of atoms around the central particle. The intensity of the peak (effectively its integral) is proportional to the number of atoms within this shell. &lt;br /&gt;
&lt;br /&gt;
All three RDFs (vapour, liquid, solid) show an initial peak, but differ in their behaviour at longer distances. The RDF for a system in the gas phase rapidly reaches a value of 1 and plateaus. This is because a gas is, by its very nature, disordered. Atoms are free to move and they tend to disperse, not arrange themselves in shells. The RDF for a liquid oscillates slightly after the initial peak but also plateaus at 1 after a short distance. The initial peak corresponds to a solvation shell around the central particle. The subsequent smaller peaks show that a liquid has some degree of order - the forces between the particles are strong enough to restrict their movement to a degree. &lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 small lat.png|thumb|FCC lattice showing first three neighbouring lattice sites for a central atom (light pink)]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the solid system is different to the other two, as it shows long-range order. It does not plateau but instead shows peaks of decreasing intensity. This can be explained by looking at the structure of the solid crystal. This was defined in the simulation as a face-centred cubic (FCC) lattice, shown in Figure 9. The particles are arranged in shells, at distances which depend on the lattice spacing of the crystal. This can be calculated from the lattice density (1.2).&lt;br /&gt;
&lt;br /&gt;
The first three peaks in the RDF plot correspond to the first three neighbouring sites of the central particle, coloured in blue, purple and green respectively. The lattice spacing and the coordination number of each site can be calculated by considering the geometry of the crystal:&lt;br /&gt;
&lt;br /&gt;
*Shell 1 is found at &amp;lt;math&amp;gt; r_1 = \frac{\sqrt{2}}{2}a = 1.056&amp;lt;/math&amp;gt; and holds &amp;lt;math&amp;gt;12&amp;lt;/math&amp;gt; atoms. &lt;br /&gt;
*Shell 2 is found at &amp;lt;math&amp;gt; r_2 = a = 1.494&amp;lt;/math&amp;gt; and holds &amp;lt;math&amp;gt;6&amp;lt;/math&amp;gt;atoms.&lt;br /&gt;
*Shell 3 is found at &amp;lt;math&amp;gt; r_3 = \frac{\sqrt{6}}{2}a = 1.830&amp;lt;/math&amp;gt; and holds &amp;lt;math&amp;gt;24&amp;lt;/math&amp;gt; atoms.&lt;br /&gt;
&lt;br /&gt;
These values agree with those found by the RDF. The coordination numbers match those calculated from the running integral, which has values of 12.15, 17.98 and 42.3 respectively.&lt;br /&gt;
&lt;br /&gt;
===The diffusion coefficient, D===&lt;br /&gt;
&lt;br /&gt;
Plots of the total mean squared displacement vs time are reproduced in Appendix A. Plots of the VACF vs time are reproduced in Appendix B. Plots of the VACF running integral vs time are reproduced in Appendix B.&lt;br /&gt;
&lt;br /&gt;
Figure 10 below shows the time evolution of the VACF for a solid, a liquid and a gas, as well as for an ideal harmonic oscillator. &lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Velocity Autocorrelation Functions small.png|frame|center|Fig. 10: VACF plots for small scale simulations]]&lt;br /&gt;
&lt;br /&gt;
The VACF is effectively a measure of how closely related the velocity of a particle is (at time t) to its initial velocity (at time t=0). This correlation is &amp;quot;perturbed&amp;quot; by collisions or by interactions with other particles; at very long times (i.e. when t tends to infinity) we expect the VACF to be zero and the velocities to be uncorrelated. &amp;lt;span style=color:red&amp;gt; What does the first minimum indicate? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The harmonic oscillator shows perfectly oscillatory behaviour, with constant amplitude in time: the velocity goes from an initial state to an uncorrelated one and then back to the initial state. The solid shows similar behaviour: the VACF oscillates about 0 but dampens with time. This is because in a solid the atoms have fixed positions in a lattice; the forces between the particles are strong and these will oscillate in place for a while. The VACF takes much longer to reach zero than in the case of a liquid or a gas. The gas VACF tends slowly to zero; the interactions between particles in a gas are minimal, which means that the velocity at time is not very different from an initial velocity. A liquid is somewhere in-between these two phases: the particles have more freedom of movement than they do in a solid, but the attractive forces are strong enough to cause a perturbation in the velocities; the VACF shows a very slight oscillation, but then quickly dampens to zero. &lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients can be calculated in two different ways, either from the gradient of an MSD plot or from the integral of the VACF. These calculations were performed and the D values are given in Table 1.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Table 1: Diffusion coefficients &amp;lt;math&amp;gt; D / m^2 s^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; | Phase&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | MSD data&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | VACF data&lt;br /&gt;
|- &lt;br /&gt;
! Small simulation &lt;br /&gt;
! Large simulation &lt;br /&gt;
! Small simulation&lt;br /&gt;
! Large simulation&lt;br /&gt;
|- &lt;br /&gt;
! Gas &lt;br /&gt;
| 2.536&lt;br /&gt;
| 2.542&lt;br /&gt;
| 3.294&lt;br /&gt;
| 3.268 &lt;br /&gt;
|- &lt;br /&gt;
! Gas, linear region &lt;br /&gt;
| 3.317&lt;br /&gt;
| 3.217&lt;br /&gt;
| ---&lt;br /&gt;
| ---&lt;br /&gt;
|- &lt;br /&gt;
! Liquid&lt;br /&gt;
| 0.085 &lt;br /&gt;
| 0.087 &lt;br /&gt;
| 0.098&lt;br /&gt;
| 0.090&lt;br /&gt;
|-  &lt;br /&gt;
! Solid&lt;br /&gt;
| 5.825 x 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
| 4.391 x 10&amp;lt;sup&amp;gt;-4&amp;lt;/sup&amp;gt;&lt;br /&gt;
| -1.845 x 10^&amp;lt;sup&amp;gt;-4&amp;lt;/sup&amp;gt;&lt;br /&gt;
| 4.558 x 10^&amp;lt;sup&amp;gt;-5&amp;lt;/sup&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The largest error in the case of the MSD measurements comes from the fact that the gas phase gives rise to a curved plot, which cannot be feasibly fitted to a straight line. This is because particles in a gas will diffuse readily and thus the system will take longer to reach equilibrium (the linear region) than, say, a liquid. A longer simulation that would allow the system to reach equilibrium and then collect a larger amount of data would provide a more accurate result, as in this case the linear region that was used only comprised about 20% of the total data. In the case of a liquid, the MSD function is linear and provides the best fit and thus the most accurate result. The MSD for a solid establishes linear behaviour quickly, as the particles are &amp;quot;fixed&amp;quot;. The diffusion coefficient values are very small; this shows that in a solid no diffusion (or almost none) takes place.&lt;br /&gt;
&lt;br /&gt;
In the case of the VACF measurements the largest error comes from using the trapezium rule to compute the integral. The smaller the timestep, the more accurate the measurement - in this case the timestep is relatively small but some error still remains. &lt;br /&gt;
&lt;br /&gt;
The errors in both of these measurements cause the diffusion coefficients to differ slightly. The difference between the MSD- and VACF-calculated diffusion coefficients are 0.67%, 15.3% and 31780% for the gas, liquid and solid phases respectively. The difference in the case of the solid phase is incredibly large but not significant as we have established diffusion is not a significant process for solids. The difference for the liquid phase is quite small and likely comes from the poor fit of the MSD plot and the short duration of the simulation.&lt;br /&gt;
&lt;br /&gt;
===Appendix A: MSD plots===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Ad5215 Gas phase MSD, large atom count.png|Gas phase MSD (large scale)&lt;br /&gt;
File:Ad5215 Gas phase MSD, large atom count - linear region.png|Gas phase MSD, linear region (large scale)&lt;br /&gt;
File:Ad5215 Gas phase MSD, small atom count.png|Gas phase MSD (small scale)&lt;br /&gt;
File:Ad5215 as phase MSD, small atom count - linear region.png|Gas phase MSD, linear region (small scale)&lt;br /&gt;
File:Ad5215 Liquid phase MSD, large atom count.png|Liquid phase MSD (large scale)&lt;br /&gt;
File:Ad5215 Liquid phase MSD, small atom count.png|Liquid phase MSD (small scale&lt;br /&gt;
File:Ad5215 Solid phase MSD, large atom count.png|Solid phase MSD (large scale)&lt;br /&gt;
File:Ad5215 Solid phase MSD, small atom count.png|Solid phase MSD (small scale)&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Appendix B: VACF running integral plots===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Ad5215 Gas phase VACF Integral, large scale.png|Gas phase (large scale)&lt;br /&gt;
File:Ad5215 Gas phase VACF Integral, small scale.png|Gas phase (small scale)&lt;br /&gt;
File:Ad5215 Liquid phase VACF Integral, large scale.png|Liquid phase (large scale)&lt;br /&gt;
File:Ad5215 Liquid phase VACF Integral, small scale.png|Liquid phase (small scale)&lt;br /&gt;
File:AD5215 Solid phase VACF Integral, large scale.png|Solid phase (large scale)&lt;br /&gt;
File:Ad5215 Solid phase VACF Integral, small scale.png|Solid phase (small scale)&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
This lab provided insight into the thermodynamic properties of systems and how these change with phase, temperature, pressure. Of course, the systems investigated were small, but modeling larger, more complicated systems is possible and could prove useful. A particular domain where this kind of research would be invaluable is, as previously mentioned, molecular gastronomy: understanding phase changes and the properties of liquids, solids and gels can lead to the advancement of this (pseudo)-scientific discipline.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; This conclusion is a bit short: it should include a summary of the results, and perhaps a short outlook. It would also be nice to convey the importance/meaning of your results and conclusions in the context of molecular gastronomy, which you motivated your study with, but have not mentioned since the introduction. &amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:AD5215LS&amp;diff=696261</id>
		<title>Rep:AD5215LS</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:AD5215LS&amp;diff=696261"/>
		<updated>2018-04-16T13:22:55Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* The diffusion coefficient, D */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Tasks=&lt;br /&gt;
==Section 2: Introduction==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by &amp;lt;math&amp;gt; x\left(t\right) = A\cos\left(\omega t + \phi\right)&amp;lt;/math&amp;gt; (the values of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Excel file attached [[:File:AD5215_HO.xls|here]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 error vs time.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The change in energy goes down as the timestep value becomes smaller. For a timestep of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 0.25 &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; the change in energy is &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 1.58% &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; while for a timestep of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 0.05 &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; the change in energy is &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 0.06% &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;. The energy change is &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 1.01% &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; for a timestep of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 0.2 &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;. A timestep that is too large could lead to the simulation effectively &amp;quot;missing&amp;quot; any changes in the system that happen on a shorter timescale than that of the timestep. Therefore, it is important to monitor the energy to ensure that the change is not too drastic and we are observing the behaviour of the system closely. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK:&amp;lt;/big&amp;gt; For a single Lennard-Jones interaction, &amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;, find the separation, &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt;, at which the potential energy is zero. What is the force at this separation? Find the equilibrium separation, &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, and work out the well depth (&amp;lt;math&amp;gt;\phi\left(r_{eq}\right)&amp;lt;/math&amp;gt;). Evaluate the integrals &amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\int_{2.5\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\int_{3\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;\sigma = \epsilon = 1.0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;&#039;&#039;Find the separation at which the potential energy is zero&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 lj zero pot.JPG]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;&#039;&#039;FInd the force at &amp;lt;math&amp;gt;r=\sigma&amp;lt;/math&amp;gt;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The force is the derivative of potential wrt to distance:&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 lj Force.JPG]]&lt;br /&gt;
&lt;br /&gt;
At separation &amp;lt;math&amp;gt;r=\sigma&amp;lt;/math&amp;gt; this will be&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 force(R).JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;&#039;&#039;Equilibrium separation and well depth&#039;&#039;&amp;lt;\span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The equilibrium separation is the separation when &amp;lt;math&amp;gt; \frac{d \phi}{dr} = 0.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 lj equilibrium req.JPG]]&lt;br /&gt;
&lt;br /&gt;
The well depth at this separation is&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 ls lj epsilon.JPG]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; negative epsilon &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;&#039;&#039;Integrals&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 lj int1.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 int2.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 int3.JPG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions. Estimate the volume of &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; water molecules under standard conditions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; V = 1\ mL, \ \rho = 1\ g/mL, \ M = 18\ g/mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
m = V \rho = 1\ g&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
N = nN_a = \frac{m}{M} \times N_a = \frac{6.022 \times 10^{23}}{18} = 3.35 \times 10{22}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
N molecules occupy 1 mL. Therefore, the volume of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;1 molecule&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; of water will be &amp;lt;math&amp;gt;V_0 = \frac{1}{N} = \frac{1}{3.35 \times 10{22}} = 2.99 \times10^{-23}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The volume of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;1000 molecules&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; will be &amp;lt;math&amp;gt;1000 \times V_0 = 2.99 \times10^{-20} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, &#039;&#039;after the periodic boundary conditions have been applied&#039;&#039;?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It ends up at position &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;(0.2, 0.1, 0.7)&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: The Lennard-Jones parameters for argon are &amp;lt;math&amp;gt;\sigma = 0.34\mathrm{nm}, \epsilon\ /\ k_B= 120 \mathrm{K}&amp;lt;/math&amp;gt;. If the LJ cutoff is &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;, what is it in real units? What is the well depth in &amp;lt;math&amp;gt;\mathrm{kJ\ mol}^{-1}&amp;lt;/math&amp;gt;? What is the reduced temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt; in real units?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r = \sigma \times r^*&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r = 0.34 \times 3.2 = 1.088\ nm &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\ K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\epsilon = 120 \times k_B &amp;lt;/math&amp;gt; for 1 particle&lt;br /&gt;
&lt;br /&gt;
For a mole of particles: &amp;lt;math&amp;gt;\epsilon = 120 \times k_B \times N_A &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \epsilon = 0.997\, kJ mol^{-1} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T = T^* \times \frac{\epsilon}{k_BT}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T = 1.5 \times 120 &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;
==Section 3: Equilibration==&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Randomly generated positions can lead to two atoms being very close together, which would result in a large repulsive potential. This would then affect any propagation in time of the system, which would lead to undesirable behaviour, especially when using larger timesteps. The system would most likely behave &amp;quot;appropriately&amp;quot; for small enough timesteps, but this would require running longer simulations. This would be less effective; a larger timestep that still results in an accurate simulation is ideal. &amp;lt;span style=color:red&amp;gt; good! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Density: &amp;lt;math&amp;gt; \rho = \frac{N}{V} = \frac{N}{l^3} &amp;lt;/math&amp;gt; ---&amp;gt; Length: &amp;lt;math&amp;gt; l=\sqrt[3]{\frac{N}{\rho}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;simple cubic lattice&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; with &amp;lt;math&amp;gt; \rho = 0.8 &amp;lt;/math&amp;gt;, the length, l, is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \sqrt[3]{\frac{1}{0.8}}=1.07722 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;face-centered cubic lattice&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; with &amp;lt;math&amp;gt; \rho = 1.2 &amp;lt;/math&amp;gt;, the length, l, is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \sqrt[3]{\frac{4}{1.2}}=1.4938 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The box would still contain &amp;lt;math&amp;gt; 10 \times 10 \times 10 = 1000 &amp;lt;/math&amp;gt; lattice units. For an FCC there are 4 atoms per lattice unit. Therefore the total number of atoms would be &amp;lt;math&amp;gt; 4 \times 1000 = 4000 &amp;lt;/math&amp;gt; atoms.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Mass&amp;quot; sets the mass of a particular type of atom (in this case, the mass of type 1 atoms is 1). &amp;quot;Pair&amp;quot; refers to pair potentials. The lj/cut command computes the 12/6 Lennard-Jones potential, cut sets the cut-off for r. Pair_coeff sets the values for the 2 parameters, sigma and epsilon. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; Velocity Verlet. &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; A simple Verlet algorithm wouldn&#039;t require the initial velocity, but would instead require &amp;lt;math&amp;gt;\mathbf{x}_i\left(-\delta t\right)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The line &amp;quot;variable timestep equal 0.001&amp;quot; defines a variable timestep which is the assigned a value. This allows for the variable to be called later on if needed. This is convenient for the user as it means that if the same variable is required multiple times (in this case, the variable timestep is called twice) changing its value is easier, as this only needs to be done once (in the line defining the variable).&lt;br /&gt;
&lt;br /&gt;
==Section 4: Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 ljls gamma.JPG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. How often will values of the temperature, etc., be sampled for the average? How many measurements contribute to the average? Looking to the following line, how much time will you simulate?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From the manual, the structure of the command is &amp;quot;ave/time Nevery Nrepeat Nfreq&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*Nevery (100) = use input values every this many timesteps (total no. of data points is 100,000 so this will give 1000 values to be averaged in the next step; records an average of 100 values)&lt;br /&gt;
&lt;br /&gt;
*Nrepeat (1000) = no. of times to use input values for calculating averages (i.e. average over 1000 values)&lt;br /&gt;
&lt;br /&gt;
*Nfreq (100,000) = calculate averages every this many timesteps (same no. specified in the &amp;quot;run&amp;quot; command)&lt;br /&gt;
&lt;br /&gt;
The timestep is 0.0025 and the simulation runs for 100,000 steps. Therefore we are simulating a total time of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;250 seconds &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Section 7: Dynamical properties and the diffusion coefficient==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a HO model:&lt;br /&gt;
[[File:Ad5215 Vacf HO model.JPG]]&lt;br /&gt;
&lt;br /&gt;
The VACF is given by&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 VACF deriv.JPG]]&lt;br /&gt;
&lt;br /&gt;
We evaluate the two integrals separately. Integral 2 is&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i2.JPG]]&lt;br /&gt;
&lt;br /&gt;
Using [[File:Ad5215 Vacf cos(2x).JPG]] we can write&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i2 2.JPG]]&lt;br /&gt;
&lt;br /&gt;
Integral 1 is&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i1 1.JPG]]&lt;br /&gt;
&lt;br /&gt;
Using [[File:Ad5215 Vacf sin(A+B).JPG]] we can write&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i1 2.JPG]]&lt;br /&gt;
&lt;br /&gt;
We evaluate the last integral separately.&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i3.JPG]]&lt;br /&gt;
&lt;br /&gt;
Substituting this back we obtain:&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i1 3.JPG]]&lt;br /&gt;
&lt;br /&gt;
Substituting I1 and I2 into the formula for C we obtain&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf c1.JPG]]&lt;br /&gt;
&lt;br /&gt;
Sin is an odd function, i.e. [[File:Ad5215 Vacf sinodd.JPG]]. Thus&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf c2.JPG]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; There is definitely a shorter way of doing this, but yes. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Report=&lt;br /&gt;
&lt;br /&gt;
==Abstract==&lt;br /&gt;
&lt;br /&gt;
Solid, liquid and gaseous systems were modeled using LAMMPS and a 12-6 Lennard-Jones forcefield. A suitable timestep of 0.0025 was determined. Simulations were run to obtain thermodynamic data (temperatures, pressures, densities, heat capacities). Calculated densities were found to be lower than those predicted by the ideal gas law. The simulated heat capacities showed a trend, decreasing with increasing temperature. The RDF was calculated for systems in all three phases. As expected, the RDF for a solid showed peaks decaying in amplitude. Lattice spacings and coordination numbers for the solid FCC lattice were calculated. The MSD and the VACF were plotted for the same three systems and the diffusion coefficient was calculated for both measurements. The two methods did not result in identical values; still, the difference was only 0.67% for the diffusion coefficients in the gas phase.&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good, concise abstract that summaries main results. Perhaps 1 sentence of motivation would have been nice. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Food constitutes a huge part of our lives, whether we actively think about it or not. Cooking, in some form or other, has been around ever since the first human realised that fire makes raw meat tastier and more convenient to eat. Nowadays, the food industry is enormous and cooking has become a successful blend of art and science. Perhaps the most pertinent example of this is molecular gastronomy, a subdiscipline of food science that seeks to investigate the physical and chemical transformations of ingredients during the cooking process. In their review, Balham et al refer to molecular gastronomy as an &amp;quot;emerging scientific discipline&amp;quot;.&amp;lt;ref&amp;gt;P. Barham, L. H. Skibsted, W. L. P. Bredie and J. Risbo, &#039;&#039;Symp.&lt;br /&gt;
A Q. J. Mod. Foreign Lit.&#039;&#039;, 2010, 2313–2365.&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In fact, molecular gastronomy relies heavily on processes such as gelification and infusion and on materials such as gels, foams and powders. It also uses equipment that is heavily reminiscent of a laboratory - some kitchens are fitted with butane burners, syringes and dehydrators.  &lt;br /&gt;
&lt;br /&gt;
Clever presentations and unusual sensations and are piquing the interest of many people; in some places, molecular gastronomy restaurants have become tourist attractions.&amp;lt;ref&amp;gt;D. Tüzünkan and A. Albayrak, &#039;&#039;Procedia&lt;br /&gt;
- Soc. Behav. Sci.&#039;&#039;, 2015, &#039;&#039;&#039;195&#039;&#039;&#039;, 446–452.&amp;lt;/ref&amp;gt; Simulating the thermodynamic properties of systems can provide a better understanding of physical systems and can lead to the growth and development of this industry.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; An interesting topic and motivation! An explicit connection between gastronomy and the results you intend to present/discuss would be nice. For example how is the diffusion coefficient relevant? The introduction of a scientific paper usually includes the background theory, such as in your case, the equations for diffusion coefficient. You have included this in the methodology, which while logical, is not standard practice for most papers/journals. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Aims and Objectives==&lt;br /&gt;
&lt;br /&gt;
* become familiar with LAMMPS and how simulating a physical system works&lt;br /&gt;
* model the behaviour of systems under the 12-6 Lennard-Jones potential&lt;br /&gt;
* calculate the physical properties (temperature, pressure, density, etc) of a system using such simulations&lt;br /&gt;
* comparing the results of the simulations to theory (e.g. simulated density vs density given by the ideal gas law)&lt;br /&gt;
* calculating the diffusion coefficient for systems in different phases (gas, liquid, solid) by two different methods (from the MSD and from the VACF)&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
&#039;&#039;&#039;General methods&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A 12-6 Lennard-Jones system was modeled usings LAMMPS and all simulations were run using Imperial&#039;s High Performance Computer. &lt;br /&gt;
The potential for such a system is given by&amp;lt;ref name=&amp;quot;:0&amp;quot;&amp;gt;P. Atkins, J. De Paula, &#039;&#039;Physical&lt;br /&gt;
Chemistry&#039;&#039;, OUP Oxford, 9th edn., 2009.&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All calculations used reduced units:&amp;lt;math&amp;gt;r^* = r/{\sigma}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;E^* = E/{\epsilon}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;T^* = {k_BT}/{\epsilon}.&amp;lt;/math&amp;gt;&lt;br /&gt;
The Lennard-Jones parameters &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\epsilon&amp;lt;/math&amp;gt; were set to 1.0 for all simulations. The cutoff for Lennard-Jones interactions was set at r*=3 unless otherwise stated. The mass of the atoms was set to 1.0. The temperature, pressure, lattice density and timestep values were varied. For all calculations the velocity Verlet algorithm was employed. The atoms were assigned random velocities within the simulation, while ensuring that the Boltzmann distribution of states is followed. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Determining a suitable timestep&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A simple cubic lattice with a density of 0.8 was defined and the simulation was populated with 1000 atoms (10 x 10 x 10 dimensions). The ensemble was defined as the microcanonical (NVE) ensemble. Five values for the timestep were tested: 0.015, 0.01, 0.0075, 0.0025, 0.001 and each simulation was run for a total time of 100 seconds. Values for the energy, temperature and pressure of the system were recorded at each step. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Variation of density with temperature and pressure&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A simple cubic lattice with a density of 0.8 was defined and the simulation was populated with 3375 atoms (15 x 15 x 15 dimensions). The timestep for all simulations was set to 0.0025. The ensemble was defined as NPT and 10 different thermodynamic states were simulated (two pressures, 2.5 and 3.5, each associated with five temperatures: 3.0, 6.0, 9.0, 12.0 and 15.0). Values for the energy, temperature and pressure of the system were recorded at each step, as well as average values for the density, temperature and pressure of the system at the end of the simulation. Plots of density vs time were obtained, both for the simulated data and for densities predicted by the ideal gas law&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;, &amp;lt;math&amp;gt; PM = \rho RT.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Heat capacity calculations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A simple cubic lattice with a density of 0.2 was defined and populated with 3375 atoms. The timestep for all simulations was set to 0.0025. An NVT ensemble was simulated for five temperatures: 2.0, 2.2, 2.4, 2.6 and 2.8. Then, a subsequent simulation was run to establish an NVE ensemble and measure the properties of the system. Average values for temperature, energy, volume and heat capacity were calculated. This procedure was repeated for a simple cubic lattice with a density of 0.8. An example input script can be found [[:File: Example_script_heatcap_ad5215.in|here]].&lt;br /&gt;
&lt;br /&gt;
The heat capacity of a system is given by&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = \frac{\partial E}{\partial T} = \frac{\mathrm{Var}\left[E\right]}{k_B T^2} = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where E is the internal energy and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;{\mathrm{Var}\left[E\right]}={\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
is the variance in internal energy. The &amp;lt;math&amp;gt;N^2&amp;lt;/math&amp;gt; term is required because LAMMPS automatically outputs the energy &#039;&#039;&#039;per atom&#039;&#039;&#039;, not the &#039;&#039;&#039;total&#039;&#039;&#039; energy. &lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 LJfluid phase diag.JPG|thumb|Fig. 1: Phase diagram for the Lennard-Jones fluid]]&lt;br /&gt;
&#039;&#039;&#039;RDF calculations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Three systems (a liquid, a solid and a gas) were modeled and populated with 3375 atoms each. Temperature and density values were taken from the Lennard-Jones fluid phase diagram&amp;lt;ref&amp;gt;J. P. Hansen and L.&lt;br /&gt;
Verlet, &#039;&#039;Phys. Rev.&#039;&#039;, 1969, &#039;&#039;&#039;184&#039;&#039;&#039;, 151–161.&amp;lt;/ref&amp;gt; reproduced in Fig. 1. These were defined as:&lt;br /&gt;
&lt;br /&gt;
*solid: fcc lattice, temperature 1.2, density 1.2;&lt;br /&gt;
*liquid: sc lattice, temperature 1.2 , density 0.8;&lt;br /&gt;
*vapour: sc lattice, temperature 1.2, density 0.05.&lt;br /&gt;
&lt;br /&gt;
The ensemble was defined as NVT. The timestep for all simulations was set to 0.002. The trajectories of the atoms were recorded and VMD was used to calculate the radial distribution function and its integral from these trajectories. The data was then analysed using Python. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Diffusion coefficient calculations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The same three systems as above were modeled, this time with 8000 atoms each. The timestep was set to 0.002 and each simulation was run for 5000 steps. The Lennard-Jones cutoff was set to 3.2. The ensemble was defined as NVT. The mean squared displacement (MSD) and the velocity autocorrelation function (VACF) at each step were calculated for all systems. The data was analysed using Python. The MSD plots were fitted to a straight line and the gradient was used to calculate the diffusion coefficient. The VACF integrals were plotted as a function of time and, again, used to calculate the diffusion coefficient. The same data analysis was conducted using supplied data which modeled larger systems.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;MSD&#039;&#039;&#039; is a measure of the deviation of the position of a particle with respect to a reference position over time. It can be thought of as a measure of how much the system moves over time. The MSD is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;{\rm MSD}\equiv\langle (r-r_0)^2\rangle=\frac{1}{N}\sum_{n=1}^N (r_n(t) - r_n(0))^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient (D) can be calculated from the MSD, using&amp;lt;ref name=&amp;quot;:1&amp;quot;&amp;gt;O. J. Eder, &#039;&#039;J. Chem. Phys.&#039;&#039;, 1977, &#039;&#039;&#039;66&#039;&#039;&#039;, 3866–3870.&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;VACF&#039;&#039;&#039; is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\delta t\right) = \left\langle \mathbf{v}\left(t\right) \cdot \mathbf{v}\left(t+\delta t\right)\right\rangle&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and is effectively a measure of how closely related the velocity of a particle is (at time t) to its initial velocity (at time t=0). This correlation is &amp;quot;perturbed&amp;quot; by collisions; at very long times (i.e. when t tends to infinity) we expect the VACF to be zero, as all particles will have collided at least once and their velocities will be uncorrelated.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient is proportional to the integral of the VACF&amp;lt;ref name=&amp;quot;:1&amp;quot; /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{3}\int_0^\infty \mathrm{d}\delta t \left\langle\mathbf{v}\left(0\right)\cdot\mathbf{v}\left(\delta t\right)\right\rangle=\frac{1}{3}\int_0^\infty C\left(\delta t\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good, I could reproduce your results with this information. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Results &amp;amp; Discussion==&lt;br /&gt;
===Equilibration===&lt;br /&gt;
&lt;br /&gt;
Plots of energy, temperature and pressure vs time were obtained for a timestep value of 0.001. These are reproduced in Fig. 2-4. It can be seen that all three plots reach a &amp;quot;plateau&amp;quot; very quickly; equilibration is almost instantaneous. The values oscillate slightly, as a result of the approximations required by the simulation. These oscillations are however very small (note the scale of the y-axis). &lt;br /&gt;
{|&lt;br /&gt;
&lt;br /&gt;
|[[File:Ad5215 Ts001 Eng.png|thumb|left|Fig. 2: Energy vs time (ts 0.001)]]&lt;br /&gt;
|[[File:Ad5215 Ts001 Temp.png|thumb|left|Fig. 3: Temperature vs time (ts 0.001)]]&lt;br /&gt;
|[[File:Ad5215 Ts001 Press.png|thumb|right|Fig. 4: Pressure vs time (ts 0.001)]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An important feature of these simulations is the timestep. The shorter the timestep the more &amp;quot;accurate&amp;quot; the simulation, but the more computational power this will require. In this case, plots of the total energy vs time were obtained for all five timestep values (Fig. 5).&lt;br /&gt;
&lt;br /&gt;
[[File:Ad515 Allts energy.png|frame|center|Fig. 5: Energy vs time for all timesteps]]&lt;br /&gt;
&lt;br /&gt;
The lowest energy is given by timestep values of 0.001 and 0.0025. These energies are almost identical; the 0.001 energy is lower, but the difference in energies is only 0.005%. In addition to this, for simulating a total time of e.g. 100s, ts = 0.0025 requires 40,000 steps, while ts = 0.001 requires 100,000 steps. Therefore, the 0.0025 timestep is the better choice, as the difference in energies is not large enough to warrant the use of more computational power (as required by the 0.001 timestep). The 0.015 timestep is a poor choice. Not only is the energy the highest of the five, but, unlike in the other four cases, the system does not reach equilibrium and the energy keeps increasing. &lt;br /&gt;
&lt;br /&gt;
Based on this data, further simulations were run using a 0.0025 timestep (unless a different value was required by the lab script).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Equilibration is not typically discussed in the results section of a scientific paper. Simply &amp;quot;systems were equilibrium for X timesteps/unit with a timestep of Y&amp;quot; would be sufficient. You get the marks for the task however. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Densities and the ideal gas law===&lt;br /&gt;
&lt;br /&gt;
Plots of density vs temperature for two different pressures are reproduced in Fig. 6. The density given by the ideal gas law was also calculated and plotted on the same graph. &lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 densvstemp.png|frame|center|Fig. 6: Plots of density vs temperature comparing experimental and theoretical data]]&lt;br /&gt;
&lt;br /&gt;
It can be seen that the results of the simulation do not match those given by the theoretical approach. This is because the ideal gas law does not take into account any interaction between particles, i.e. it assumes that the gas behaves ideally. In the Lennard-Jones model the particles experience attractive and repulsive forces; the repulsive forces dominate &amp;lt;span style=color:red&amp;gt; be careful to convey precise meaning: when do repulsive forces dominate? &amp;lt;/span&amp;gt;and cause the system to be more diffuse and thus have a lower simulated density. &lt;br /&gt;
&lt;br /&gt;
The discrepancy between theory and simulation increases with increasing pressure because this &amp;quot;pushes&amp;quot; the particles closer together and increases the effect of Lennard-Jones forces. It also increases with decreasing temperature; at low temperatures, the Lennard-Jones forces dominate, while at high temperatures thermal motion is more significant.&amp;lt;span style=color:red&amp;gt; I understand what you are trying to say here, however a more precise/succinct explanation would have been helpful. For example, rationalising your results in terms of the potential energy surface and available thermal energy ... &amp;quot;at the high temperature limit, LJ particles have enough kinetic energy to easily surmount all kinetic energy barriers in the PES&amp;quot;, or something more elegantly worded.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Heat capacities===&lt;br /&gt;
&lt;br /&gt;
The variation in heat capacity with temperature is shown in Fig. 7. The system is under the NVE ensemble so we are dealing with the isochoric heat capacity, C&amp;lt;sub&amp;gt;V&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Heatcaps.png|frame|center|Fig. 7: Heat capacity variation with temperature]]&lt;br /&gt;
&lt;br /&gt;
The heat capacity decreases with increasing temperature. This agrees with the formula for heat capacity, which shows inverse proportionality to temperature. However, this is not the full extent of the explanation.&lt;br /&gt;
&lt;br /&gt;
Heat capacity is a measure of how much energy (heat) is required to increase the temperature of a system. At higher temperatures more energetic states become available and the spacing between them decreases - this makes populating higher states easier, leading to a decrease in heat capacity. &lt;br /&gt;
&lt;br /&gt;
In addition to this, increasing the temperature can lead to a phase change and thus to an increase in the degrees of freedom available to the system (e.g. melting causes a solid - rigid, fewer degrees of freedom - to change into a liquid).&lt;br /&gt;
&lt;br /&gt;
===The Radial Distribution Function (RDF)===&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 RDFs 3phase.png|frame|right|Fig. 8: RDFs for systems in different phases]]&lt;br /&gt;
&lt;br /&gt;
The radial distribution function for a solid, liquid and gas is reproduced in Fig. 8. The RDF shows how a system is arranged, relative to the position of one particle in the system; effectively, it is a measure of long-range order. A peak corresponds to a shell of atoms around the central particle. The intensity of the peak (effectively its integral) is proportional to the number of atoms within this shell. &lt;br /&gt;
&lt;br /&gt;
All three RDFs (vapour, liquid, solid) show an initial peak, but differ in their behaviour at longer distances. The RDF for a system in the gas phase rapidly reaches a value of 1 and plateaus. This is because a gas is, by its very nature, disordered. Atoms are free to move and they tend to disperse, not arrange themselves in shells. The RDF for a liquid oscillates slightly after the initial peak but also plateaus at 1 after a short distance. The initial peak corresponds to a solvation shell around the central particle. The subsequent smaller peaks show that a liquid has some degree of order - the forces between the particles are strong enough to restrict their movement to a degree. &lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 small lat.png|thumb|FCC lattice showing first three neighbouring lattice sites for a central atom (light pink)]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the solid system is different to the other two, as it shows long-range order. It does not plateau but instead shows peaks of decreasing intensity. This can be explained by looking at the structure of the solid crystal. This was defined in the simulation as a face-centred cubic (FCC) lattice, shown in Figure 9. The particles are arranged in shells, at distances which depend on the lattice spacing of the crystal. This can be calculated from the lattice density (1.2).&lt;br /&gt;
&lt;br /&gt;
The first three peaks in the RDF plot correspond to the first three neighbouring sites of the central particle, coloured in blue, purple and green respectively. The lattice spacing and the coordination number of each site can be calculated by considering the geometry of the crystal:&lt;br /&gt;
&lt;br /&gt;
*Shell 1 is found at &amp;lt;math&amp;gt; r_1 = \frac{\sqrt{2}}{2}a = 1.056&amp;lt;/math&amp;gt; and holds &amp;lt;math&amp;gt;12&amp;lt;/math&amp;gt; atoms. &lt;br /&gt;
*Shell 2 is found at &amp;lt;math&amp;gt; r_2 = a = 1.494&amp;lt;/math&amp;gt; and holds &amp;lt;math&amp;gt;6&amp;lt;/math&amp;gt;atoms.&lt;br /&gt;
*Shell 3 is found at &amp;lt;math&amp;gt; r_3 = \frac{\sqrt{6}}{2}a = 1.830&amp;lt;/math&amp;gt; and holds &amp;lt;math&amp;gt;24&amp;lt;/math&amp;gt; atoms.&lt;br /&gt;
&lt;br /&gt;
These values agree with those found by the RDF. The coordination numbers match those calculated from the running integral, which has values of 12.15, 17.98 and 42.3 respectively.&lt;br /&gt;
&lt;br /&gt;
===The diffusion coefficient, D===&lt;br /&gt;
&lt;br /&gt;
Plots of the total mean squared displacement vs time are reproduced in Appendix A. Plots of the VACF vs time are reproduced in Appendix B. Plots of the VACF running integral vs time are reproduced in Appendix B.&lt;br /&gt;
&lt;br /&gt;
Figure 10 below shows the time evolution of the VACF for a solid, a liquid and a gas, as well as for an ideal harmonic oscillator. &lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Velocity Autocorrelation Functions small.png|frame|center|Fig. 10: VACF plots for small scale simulations]]&lt;br /&gt;
&lt;br /&gt;
The VACF is effectively a measure of how closely related the velocity of a particle is (at time t) to its initial velocity (at time t=0). This correlation is &amp;quot;perturbed&amp;quot; by collisions or by interactions with other particles; at very long times (i.e. when t tends to infinity) we expect the VACF to be zero and the velocities to be uncorrelated. &amp;lt;span style=color:red&amp;gt; What does the first minimum indicate? &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The harmonic oscillator shows perfectly oscillatory behaviour, with constant amplitude in time: the velocity goes from an initial state to an uncorrelated one and then back to the initial state. The solid shows similar behaviour: the VACF oscillates about 0 but dampens with time. This is because in a solid the atoms have fixed positions in a lattice; the forces between the particles are strong and these will oscillate in place for a while. The VACF takes much longer to reach zero than in the case of a liquid or a gas. The gas VACF tends slowly to zero; the interactions between particles in a gas are minimal, which means that the velocity at time is not very different from an initial velocity. A liquid is somewhere in-between these two phases: the particles have more freedom of movement than they do in a solid, but the attractive forces are strong enough to cause a perturbation in the velocities; the VACF shows a very slight oscillation, but then quickly dampens to zero. &lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients can be calculated in two different ways, either from the gradient of an MSD plot or from the integral of the VACF. These calculations were performed and the D values are given in Table 1.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Table 1: Diffusion coefficients &amp;lt;math&amp;gt; D / m^2 s^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; | Phase&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | MSD data&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | VACF data&lt;br /&gt;
|- &lt;br /&gt;
! Small simulation &lt;br /&gt;
! Large simulation &lt;br /&gt;
! Small simulation&lt;br /&gt;
! Large simulation&lt;br /&gt;
|- &lt;br /&gt;
! Gas &lt;br /&gt;
| 2.536&lt;br /&gt;
| 2.542&lt;br /&gt;
| 3.294&lt;br /&gt;
| 3.268 &lt;br /&gt;
|- &lt;br /&gt;
! Gas, linear region &lt;br /&gt;
| 3.317&lt;br /&gt;
| 3.217&lt;br /&gt;
| ---&lt;br /&gt;
| ---&lt;br /&gt;
|- &lt;br /&gt;
! Liquid&lt;br /&gt;
| 0.085 &lt;br /&gt;
| 0.087 &lt;br /&gt;
| 0.098&lt;br /&gt;
| 0.090&lt;br /&gt;
|-  &lt;br /&gt;
! Solid&lt;br /&gt;
| 5.825 x 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
| 4.391 x 10&amp;lt;sup&amp;gt;-4&amp;lt;/sup&amp;gt;&lt;br /&gt;
| -1.845 x 10^&amp;lt;sup&amp;gt;-4&amp;lt;/sup&amp;gt;&lt;br /&gt;
| 4.558 x 10^&amp;lt;sup&amp;gt;-5&amp;lt;/sup&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The largest error in the case of the MSD measurements comes from the fact that the gas phase gives rise to a curved plot, which cannot be feasibly fitted to a straight line. This is because particles in a gas will diffuse readily and thus the system will take longer to reach equilibrium (the linear region) than, say, a liquid. A longer simulation that would allow the system to reach equilibrium and then collect a larger amount of data would provide a more accurate result, as in this case the linear region that was used only comprised about 20% of the total data. In the case of a liquid, the MSD function is linear and provides the best fit and thus the most accurate result. The MSD for a solid establishes linear behaviour quickly, as the particles are &amp;quot;fixed&amp;quot;. The diffusion coefficient values are very small; this shows that in a solid no diffusion (or almost none) takes place.&lt;br /&gt;
&lt;br /&gt;
In the case of the VACF measurements the largest error comes from using the trapezium rule to compute the integral. The smaller the timestep, the more accurate the measurement - in this case the timestep is relatively small but some error still remains. &lt;br /&gt;
&lt;br /&gt;
The errors in both of these measurements cause the diffusion coefficients to differ slightly. The difference between the MSD- and VACF-calculated diffusion coefficients are 0.67%, 15.3% and 31780% for the gas, liquid and solid phases respectively. The difference in the case of the solid phase is incredibly large but not significant as we have established diffusion is not a significant process for solids. The difference for the liquid phase is quite small and likely comes from the poor fit of the MSD plot and the short duration of the simulation.&lt;br /&gt;
&lt;br /&gt;
===Appendix A: MSD plots===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Ad5215 Gas phase MSD, large atom count.png|Gas phase MSD (large scale)&lt;br /&gt;
File:Ad5215 Gas phase MSD, large atom count - linear region.png|Gas phase MSD, linear region (large scale)&lt;br /&gt;
File:Ad5215 Gas phase MSD, small atom count.png|Gas phase MSD (small scale)&lt;br /&gt;
File:Ad5215 as phase MSD, small atom count - linear region.png|Gas phase MSD, linear region (small scale)&lt;br /&gt;
File:Ad5215 Liquid phase MSD, large atom count.png|Liquid phase MSD (large scale)&lt;br /&gt;
File:Ad5215 Liquid phase MSD, small atom count.png|Liquid phase MSD (small scale&lt;br /&gt;
File:Ad5215 Solid phase MSD, large atom count.png|Solid phase MSD (large scale)&lt;br /&gt;
File:Ad5215 Solid phase MSD, small atom count.png|Solid phase MSD (small scale)&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Appendix B: VACF running integral plots===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Ad5215 Gas phase VACF Integral, large scale.png|Gas phase (large scale)&lt;br /&gt;
File:Ad5215 Gas phase VACF Integral, small scale.png|Gas phase (small scale)&lt;br /&gt;
File:Ad5215 Liquid phase VACF Integral, large scale.png|Liquid phase (large scale)&lt;br /&gt;
File:Ad5215 Liquid phase VACF Integral, small scale.png|Liquid phase (small scale)&lt;br /&gt;
File:AD5215 Solid phase VACF Integral, large scale.png|Solid phase (large scale)&lt;br /&gt;
File:Ad5215 Solid phase VACF Integral, small scale.png|Solid phase (small scale)&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
This lab provided insight into the thermodynamic properties of systems and how these change with phase, temperature, pressure. Of course, the systems investigated were small, but modeling larger, more complicated systems is possible and could prove useful. A particular domain where this kind of research would be invaluable is, as previously mentioned, molecular gastronomy: understanding phase changes and the properties of liquids, solids and gels can lead to the advancement of this (pseudo)-scientific discipline.&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:AD5215LS&amp;diff=696260</id>
		<title>Rep:AD5215LS</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:AD5215LS&amp;diff=696260"/>
		<updated>2018-04-16T13:18:00Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Densities and the ideal gas law */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Tasks=&lt;br /&gt;
==Section 2: Introduction==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by &amp;lt;math&amp;gt; x\left(t\right) = A\cos\left(\omega t + \phi\right)&amp;lt;/math&amp;gt; (the values of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Excel file attached [[:File:AD5215_HO.xls|here]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 error vs time.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The change in energy goes down as the timestep value becomes smaller. For a timestep of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 0.25 &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; the change in energy is &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 1.58% &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; while for a timestep of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 0.05 &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; the change in energy is &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 0.06% &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;. The energy change is &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 1.01% &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; for a timestep of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 0.2 &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;. A timestep that is too large could lead to the simulation effectively &amp;quot;missing&amp;quot; any changes in the system that happen on a shorter timescale than that of the timestep. Therefore, it is important to monitor the energy to ensure that the change is not too drastic and we are observing the behaviour of the system closely. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK:&amp;lt;/big&amp;gt; For a single Lennard-Jones interaction, &amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;, find the separation, &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt;, at which the potential energy is zero. What is the force at this separation? Find the equilibrium separation, &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, and work out the well depth (&amp;lt;math&amp;gt;\phi\left(r_{eq}\right)&amp;lt;/math&amp;gt;). Evaluate the integrals &amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\int_{2.5\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\int_{3\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;\sigma = \epsilon = 1.0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;&#039;&#039;Find the separation at which the potential energy is zero&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 lj zero pot.JPG]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;&#039;&#039;FInd the force at &amp;lt;math&amp;gt;r=\sigma&amp;lt;/math&amp;gt;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The force is the derivative of potential wrt to distance:&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 lj Force.JPG]]&lt;br /&gt;
&lt;br /&gt;
At separation &amp;lt;math&amp;gt;r=\sigma&amp;lt;/math&amp;gt; this will be&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 force(R).JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;&#039;&#039;Equilibrium separation and well depth&#039;&#039;&amp;lt;\span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The equilibrium separation is the separation when &amp;lt;math&amp;gt; \frac{d \phi}{dr} = 0.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 lj equilibrium req.JPG]]&lt;br /&gt;
&lt;br /&gt;
The well depth at this separation is&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 ls lj epsilon.JPG]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; negative epsilon &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;&#039;&#039;Integrals&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 lj int1.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 int2.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 int3.JPG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions. Estimate the volume of &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; water molecules under standard conditions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; V = 1\ mL, \ \rho = 1\ g/mL, \ M = 18\ g/mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
m = V \rho = 1\ g&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
N = nN_a = \frac{m}{M} \times N_a = \frac{6.022 \times 10^{23}}{18} = 3.35 \times 10{22}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
N molecules occupy 1 mL. Therefore, the volume of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;1 molecule&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; of water will be &amp;lt;math&amp;gt;V_0 = \frac{1}{N} = \frac{1}{3.35 \times 10{22}} = 2.99 \times10^{-23}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The volume of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;1000 molecules&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; will be &amp;lt;math&amp;gt;1000 \times V_0 = 2.99 \times10^{-20} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, &#039;&#039;after the periodic boundary conditions have been applied&#039;&#039;?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It ends up at position &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;(0.2, 0.1, 0.7)&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: The Lennard-Jones parameters for argon are &amp;lt;math&amp;gt;\sigma = 0.34\mathrm{nm}, \epsilon\ /\ k_B= 120 \mathrm{K}&amp;lt;/math&amp;gt;. If the LJ cutoff is &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;, what is it in real units? What is the well depth in &amp;lt;math&amp;gt;\mathrm{kJ\ mol}^{-1}&amp;lt;/math&amp;gt;? What is the reduced temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt; in real units?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r = \sigma \times r^*&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r = 0.34 \times 3.2 = 1.088\ nm &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\ K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\epsilon = 120 \times k_B &amp;lt;/math&amp;gt; for 1 particle&lt;br /&gt;
&lt;br /&gt;
For a mole of particles: &amp;lt;math&amp;gt;\epsilon = 120 \times k_B \times N_A &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \epsilon = 0.997\, kJ mol^{-1} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T = T^* \times \frac{\epsilon}{k_BT}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T = 1.5 \times 120 &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;
==Section 3: Equilibration==&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Randomly generated positions can lead to two atoms being very close together, which would result in a large repulsive potential. This would then affect any propagation in time of the system, which would lead to undesirable behaviour, especially when using larger timesteps. The system would most likely behave &amp;quot;appropriately&amp;quot; for small enough timesteps, but this would require running longer simulations. This would be less effective; a larger timestep that still results in an accurate simulation is ideal. &amp;lt;span style=color:red&amp;gt; good! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Density: &amp;lt;math&amp;gt; \rho = \frac{N}{V} = \frac{N}{l^3} &amp;lt;/math&amp;gt; ---&amp;gt; Length: &amp;lt;math&amp;gt; l=\sqrt[3]{\frac{N}{\rho}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;simple cubic lattice&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; with &amp;lt;math&amp;gt; \rho = 0.8 &amp;lt;/math&amp;gt;, the length, l, is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \sqrt[3]{\frac{1}{0.8}}=1.07722 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;face-centered cubic lattice&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; with &amp;lt;math&amp;gt; \rho = 1.2 &amp;lt;/math&amp;gt;, the length, l, is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \sqrt[3]{\frac{4}{1.2}}=1.4938 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The box would still contain &amp;lt;math&amp;gt; 10 \times 10 \times 10 = 1000 &amp;lt;/math&amp;gt; lattice units. For an FCC there are 4 atoms per lattice unit. Therefore the total number of atoms would be &amp;lt;math&amp;gt; 4 \times 1000 = 4000 &amp;lt;/math&amp;gt; atoms.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Mass&amp;quot; sets the mass of a particular type of atom (in this case, the mass of type 1 atoms is 1). &amp;quot;Pair&amp;quot; refers to pair potentials. The lj/cut command computes the 12/6 Lennard-Jones potential, cut sets the cut-off for r. Pair_coeff sets the values for the 2 parameters, sigma and epsilon. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; Velocity Verlet. &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; A simple Verlet algorithm wouldn&#039;t require the initial velocity, but would instead require &amp;lt;math&amp;gt;\mathbf{x}_i\left(-\delta t\right)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The line &amp;quot;variable timestep equal 0.001&amp;quot; defines a variable timestep which is the assigned a value. This allows for the variable to be called later on if needed. This is convenient for the user as it means that if the same variable is required multiple times (in this case, the variable timestep is called twice) changing its value is easier, as this only needs to be done once (in the line defining the variable).&lt;br /&gt;
&lt;br /&gt;
==Section 4: Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 ljls gamma.JPG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. How often will values of the temperature, etc., be sampled for the average? How many measurements contribute to the average? Looking to the following line, how much time will you simulate?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From the manual, the structure of the command is &amp;quot;ave/time Nevery Nrepeat Nfreq&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*Nevery (100) = use input values every this many timesteps (total no. of data points is 100,000 so this will give 1000 values to be averaged in the next step; records an average of 100 values)&lt;br /&gt;
&lt;br /&gt;
*Nrepeat (1000) = no. of times to use input values for calculating averages (i.e. average over 1000 values)&lt;br /&gt;
&lt;br /&gt;
*Nfreq (100,000) = calculate averages every this many timesteps (same no. specified in the &amp;quot;run&amp;quot; command)&lt;br /&gt;
&lt;br /&gt;
The timestep is 0.0025 and the simulation runs for 100,000 steps. Therefore we are simulating a total time of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;250 seconds &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Section 7: Dynamical properties and the diffusion coefficient==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a HO model:&lt;br /&gt;
[[File:Ad5215 Vacf HO model.JPG]]&lt;br /&gt;
&lt;br /&gt;
The VACF is given by&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 VACF deriv.JPG]]&lt;br /&gt;
&lt;br /&gt;
We evaluate the two integrals separately. Integral 2 is&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i2.JPG]]&lt;br /&gt;
&lt;br /&gt;
Using [[File:Ad5215 Vacf cos(2x).JPG]] we can write&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i2 2.JPG]]&lt;br /&gt;
&lt;br /&gt;
Integral 1 is&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i1 1.JPG]]&lt;br /&gt;
&lt;br /&gt;
Using [[File:Ad5215 Vacf sin(A+B).JPG]] we can write&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i1 2.JPG]]&lt;br /&gt;
&lt;br /&gt;
We evaluate the last integral separately.&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i3.JPG]]&lt;br /&gt;
&lt;br /&gt;
Substituting this back we obtain:&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i1 3.JPG]]&lt;br /&gt;
&lt;br /&gt;
Substituting I1 and I2 into the formula for C we obtain&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf c1.JPG]]&lt;br /&gt;
&lt;br /&gt;
Sin is an odd function, i.e. [[File:Ad5215 Vacf sinodd.JPG]]. Thus&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf c2.JPG]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; There is definitely a shorter way of doing this, but yes. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Report=&lt;br /&gt;
&lt;br /&gt;
==Abstract==&lt;br /&gt;
&lt;br /&gt;
Solid, liquid and gaseous systems were modeled using LAMMPS and a 12-6 Lennard-Jones forcefield. A suitable timestep of 0.0025 was determined. Simulations were run to obtain thermodynamic data (temperatures, pressures, densities, heat capacities). Calculated densities were found to be lower than those predicted by the ideal gas law. The simulated heat capacities showed a trend, decreasing with increasing temperature. The RDF was calculated for systems in all three phases. As expected, the RDF for a solid showed peaks decaying in amplitude. Lattice spacings and coordination numbers for the solid FCC lattice were calculated. The MSD and the VACF were plotted for the same three systems and the diffusion coefficient was calculated for both measurements. The two methods did not result in identical values; still, the difference was only 0.67% for the diffusion coefficients in the gas phase.&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good, concise abstract that summaries main results. Perhaps 1 sentence of motivation would have been nice. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Food constitutes a huge part of our lives, whether we actively think about it or not. Cooking, in some form or other, has been around ever since the first human realised that fire makes raw meat tastier and more convenient to eat. Nowadays, the food industry is enormous and cooking has become a successful blend of art and science. Perhaps the most pertinent example of this is molecular gastronomy, a subdiscipline of food science that seeks to investigate the physical and chemical transformations of ingredients during the cooking process. In their review, Balham et al refer to molecular gastronomy as an &amp;quot;emerging scientific discipline&amp;quot;.&amp;lt;ref&amp;gt;P. Barham, L. H. Skibsted, W. L. P. Bredie and J. Risbo, &#039;&#039;Symp.&lt;br /&gt;
A Q. J. Mod. Foreign Lit.&#039;&#039;, 2010, 2313–2365.&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In fact, molecular gastronomy relies heavily on processes such as gelification and infusion and on materials such as gels, foams and powders. It also uses equipment that is heavily reminiscent of a laboratory - some kitchens are fitted with butane burners, syringes and dehydrators.  &lt;br /&gt;
&lt;br /&gt;
Clever presentations and unusual sensations and are piquing the interest of many people; in some places, molecular gastronomy restaurants have become tourist attractions.&amp;lt;ref&amp;gt;D. Tüzünkan and A. Albayrak, &#039;&#039;Procedia&lt;br /&gt;
- Soc. Behav. Sci.&#039;&#039;, 2015, &#039;&#039;&#039;195&#039;&#039;&#039;, 446–452.&amp;lt;/ref&amp;gt; Simulating the thermodynamic properties of systems can provide a better understanding of physical systems and can lead to the growth and development of this industry.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; An interesting topic and motivation! An explicit connection between gastronomy and the results you intend to present/discuss would be nice. For example how is the diffusion coefficient relevant? The introduction of a scientific paper usually includes the background theory, such as in your case, the equations for diffusion coefficient. You have included this in the methodology, which while logical, is not standard practice for most papers/journals. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Aims and Objectives==&lt;br /&gt;
&lt;br /&gt;
* become familiar with LAMMPS and how simulating a physical system works&lt;br /&gt;
* model the behaviour of systems under the 12-6 Lennard-Jones potential&lt;br /&gt;
* calculate the physical properties (temperature, pressure, density, etc) of a system using such simulations&lt;br /&gt;
* comparing the results of the simulations to theory (e.g. simulated density vs density given by the ideal gas law)&lt;br /&gt;
* calculating the diffusion coefficient for systems in different phases (gas, liquid, solid) by two different methods (from the MSD and from the VACF)&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
&#039;&#039;&#039;General methods&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A 12-6 Lennard-Jones system was modeled usings LAMMPS and all simulations were run using Imperial&#039;s High Performance Computer. &lt;br /&gt;
The potential for such a system is given by&amp;lt;ref name=&amp;quot;:0&amp;quot;&amp;gt;P. Atkins, J. De Paula, &#039;&#039;Physical&lt;br /&gt;
Chemistry&#039;&#039;, OUP Oxford, 9th edn., 2009.&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All calculations used reduced units:&amp;lt;math&amp;gt;r^* = r/{\sigma}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;E^* = E/{\epsilon}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;T^* = {k_BT}/{\epsilon}.&amp;lt;/math&amp;gt;&lt;br /&gt;
The Lennard-Jones parameters &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\epsilon&amp;lt;/math&amp;gt; were set to 1.0 for all simulations. The cutoff for Lennard-Jones interactions was set at r*=3 unless otherwise stated. The mass of the atoms was set to 1.0. The temperature, pressure, lattice density and timestep values were varied. For all calculations the velocity Verlet algorithm was employed. The atoms were assigned random velocities within the simulation, while ensuring that the Boltzmann distribution of states is followed. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Determining a suitable timestep&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A simple cubic lattice with a density of 0.8 was defined and the simulation was populated with 1000 atoms (10 x 10 x 10 dimensions). The ensemble was defined as the microcanonical (NVE) ensemble. Five values for the timestep were tested: 0.015, 0.01, 0.0075, 0.0025, 0.001 and each simulation was run for a total time of 100 seconds. Values for the energy, temperature and pressure of the system were recorded at each step. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Variation of density with temperature and pressure&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A simple cubic lattice with a density of 0.8 was defined and the simulation was populated with 3375 atoms (15 x 15 x 15 dimensions). The timestep for all simulations was set to 0.0025. The ensemble was defined as NPT and 10 different thermodynamic states were simulated (two pressures, 2.5 and 3.5, each associated with five temperatures: 3.0, 6.0, 9.0, 12.0 and 15.0). Values for the energy, temperature and pressure of the system were recorded at each step, as well as average values for the density, temperature and pressure of the system at the end of the simulation. Plots of density vs time were obtained, both for the simulated data and for densities predicted by the ideal gas law&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;, &amp;lt;math&amp;gt; PM = \rho RT.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Heat capacity calculations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A simple cubic lattice with a density of 0.2 was defined and populated with 3375 atoms. The timestep for all simulations was set to 0.0025. An NVT ensemble was simulated for five temperatures: 2.0, 2.2, 2.4, 2.6 and 2.8. Then, a subsequent simulation was run to establish an NVE ensemble and measure the properties of the system. Average values for temperature, energy, volume and heat capacity were calculated. This procedure was repeated for a simple cubic lattice with a density of 0.8. An example input script can be found [[:File: Example_script_heatcap_ad5215.in|here]].&lt;br /&gt;
&lt;br /&gt;
The heat capacity of a system is given by&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = \frac{\partial E}{\partial T} = \frac{\mathrm{Var}\left[E\right]}{k_B T^2} = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where E is the internal energy and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;{\mathrm{Var}\left[E\right]}={\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
is the variance in internal energy. The &amp;lt;math&amp;gt;N^2&amp;lt;/math&amp;gt; term is required because LAMMPS automatically outputs the energy &#039;&#039;&#039;per atom&#039;&#039;&#039;, not the &#039;&#039;&#039;total&#039;&#039;&#039; energy. &lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 LJfluid phase diag.JPG|thumb|Fig. 1: Phase diagram for the Lennard-Jones fluid]]&lt;br /&gt;
&#039;&#039;&#039;RDF calculations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Three systems (a liquid, a solid and a gas) were modeled and populated with 3375 atoms each. Temperature and density values were taken from the Lennard-Jones fluid phase diagram&amp;lt;ref&amp;gt;J. P. Hansen and L.&lt;br /&gt;
Verlet, &#039;&#039;Phys. Rev.&#039;&#039;, 1969, &#039;&#039;&#039;184&#039;&#039;&#039;, 151–161.&amp;lt;/ref&amp;gt; reproduced in Fig. 1. These were defined as:&lt;br /&gt;
&lt;br /&gt;
*solid: fcc lattice, temperature 1.2, density 1.2;&lt;br /&gt;
*liquid: sc lattice, temperature 1.2 , density 0.8;&lt;br /&gt;
*vapour: sc lattice, temperature 1.2, density 0.05.&lt;br /&gt;
&lt;br /&gt;
The ensemble was defined as NVT. The timestep for all simulations was set to 0.002. The trajectories of the atoms were recorded and VMD was used to calculate the radial distribution function and its integral from these trajectories. The data was then analysed using Python. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Diffusion coefficient calculations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The same three systems as above were modeled, this time with 8000 atoms each. The timestep was set to 0.002 and each simulation was run for 5000 steps. The Lennard-Jones cutoff was set to 3.2. The ensemble was defined as NVT. The mean squared displacement (MSD) and the velocity autocorrelation function (VACF) at each step were calculated for all systems. The data was analysed using Python. The MSD plots were fitted to a straight line and the gradient was used to calculate the diffusion coefficient. The VACF integrals were plotted as a function of time and, again, used to calculate the diffusion coefficient. The same data analysis was conducted using supplied data which modeled larger systems.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;MSD&#039;&#039;&#039; is a measure of the deviation of the position of a particle with respect to a reference position over time. It can be thought of as a measure of how much the system moves over time. The MSD is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;{\rm MSD}\equiv\langle (r-r_0)^2\rangle=\frac{1}{N}\sum_{n=1}^N (r_n(t) - r_n(0))^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient (D) can be calculated from the MSD, using&amp;lt;ref name=&amp;quot;:1&amp;quot;&amp;gt;O. J. Eder, &#039;&#039;J. Chem. Phys.&#039;&#039;, 1977, &#039;&#039;&#039;66&#039;&#039;&#039;, 3866–3870.&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;VACF&#039;&#039;&#039; is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\delta t\right) = \left\langle \mathbf{v}\left(t\right) \cdot \mathbf{v}\left(t+\delta t\right)\right\rangle&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and is effectively a measure of how closely related the velocity of a particle is (at time t) to its initial velocity (at time t=0). This correlation is &amp;quot;perturbed&amp;quot; by collisions; at very long times (i.e. when t tends to infinity) we expect the VACF to be zero, as all particles will have collided at least once and their velocities will be uncorrelated.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient is proportional to the integral of the VACF&amp;lt;ref name=&amp;quot;:1&amp;quot; /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{3}\int_0^\infty \mathrm{d}\delta t \left\langle\mathbf{v}\left(0\right)\cdot\mathbf{v}\left(\delta t\right)\right\rangle=\frac{1}{3}\int_0^\infty C\left(\delta t\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good, I could reproduce your results with this information. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Results &amp;amp; Discussion==&lt;br /&gt;
===Equilibration===&lt;br /&gt;
&lt;br /&gt;
Plots of energy, temperature and pressure vs time were obtained for a timestep value of 0.001. These are reproduced in Fig. 2-4. It can be seen that all three plots reach a &amp;quot;plateau&amp;quot; very quickly; equilibration is almost instantaneous. The values oscillate slightly, as a result of the approximations required by the simulation. These oscillations are however very small (note the scale of the y-axis). &lt;br /&gt;
{|&lt;br /&gt;
&lt;br /&gt;
|[[File:Ad5215 Ts001 Eng.png|thumb|left|Fig. 2: Energy vs time (ts 0.001)]]&lt;br /&gt;
|[[File:Ad5215 Ts001 Temp.png|thumb|left|Fig. 3: Temperature vs time (ts 0.001)]]&lt;br /&gt;
|[[File:Ad5215 Ts001 Press.png|thumb|right|Fig. 4: Pressure vs time (ts 0.001)]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An important feature of these simulations is the timestep. The shorter the timestep the more &amp;quot;accurate&amp;quot; the simulation, but the more computational power this will require. In this case, plots of the total energy vs time were obtained for all five timestep values (Fig. 5).&lt;br /&gt;
&lt;br /&gt;
[[File:Ad515 Allts energy.png|frame|center|Fig. 5: Energy vs time for all timesteps]]&lt;br /&gt;
&lt;br /&gt;
The lowest energy is given by timestep values of 0.001 and 0.0025. These energies are almost identical; the 0.001 energy is lower, but the difference in energies is only 0.005%. In addition to this, for simulating a total time of e.g. 100s, ts = 0.0025 requires 40,000 steps, while ts = 0.001 requires 100,000 steps. Therefore, the 0.0025 timestep is the better choice, as the difference in energies is not large enough to warrant the use of more computational power (as required by the 0.001 timestep). The 0.015 timestep is a poor choice. Not only is the energy the highest of the five, but, unlike in the other four cases, the system does not reach equilibrium and the energy keeps increasing. &lt;br /&gt;
&lt;br /&gt;
Based on this data, further simulations were run using a 0.0025 timestep (unless a different value was required by the lab script).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Equilibration is not typically discussed in the results section of a scientific paper. Simply &amp;quot;systems were equilibrium for X timesteps/unit with a timestep of Y&amp;quot; would be sufficient. You get the marks for the task however. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Densities and the ideal gas law===&lt;br /&gt;
&lt;br /&gt;
Plots of density vs temperature for two different pressures are reproduced in Fig. 6. The density given by the ideal gas law was also calculated and plotted on the same graph. &lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 densvstemp.png|frame|center|Fig. 6: Plots of density vs temperature comparing experimental and theoretical data]]&lt;br /&gt;
&lt;br /&gt;
It can be seen that the results of the simulation do not match those given by the theoretical approach. This is because the ideal gas law does not take into account any interaction between particles, i.e. it assumes that the gas behaves ideally. In the Lennard-Jones model the particles experience attractive and repulsive forces; the repulsive forces dominate &amp;lt;span style=color:red&amp;gt; be careful to convey precise meaning: when do repulsive forces dominate? &amp;lt;/span&amp;gt;and cause the system to be more diffuse and thus have a lower simulated density. &lt;br /&gt;
&lt;br /&gt;
The discrepancy between theory and simulation increases with increasing pressure because this &amp;quot;pushes&amp;quot; the particles closer together and increases the effect of Lennard-Jones forces. It also increases with decreasing temperature; at low temperatures, the Lennard-Jones forces dominate, while at high temperatures thermal motion is more significant.&amp;lt;span style=color:red&amp;gt; I understand what you are trying to say here, however a more precise/succinct explanation would have been helpful. For example, rationalising your results in terms of the potential energy surface and available thermal energy ... &amp;quot;at the high temperature limit, LJ particles have enough kinetic energy to easily surmount all kinetic energy barriers in the PES&amp;quot;, or something more elegantly worded.  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Heat capacities===&lt;br /&gt;
&lt;br /&gt;
The variation in heat capacity with temperature is shown in Fig. 7. The system is under the NVE ensemble so we are dealing with the isochoric heat capacity, C&amp;lt;sub&amp;gt;V&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Heatcaps.png|frame|center|Fig. 7: Heat capacity variation with temperature]]&lt;br /&gt;
&lt;br /&gt;
The heat capacity decreases with increasing temperature. This agrees with the formula for heat capacity, which shows inverse proportionality to temperature. However, this is not the full extent of the explanation.&lt;br /&gt;
&lt;br /&gt;
Heat capacity is a measure of how much energy (heat) is required to increase the temperature of a system. At higher temperatures more energetic states become available and the spacing between them decreases - this makes populating higher states easier, leading to a decrease in heat capacity. &lt;br /&gt;
&lt;br /&gt;
In addition to this, increasing the temperature can lead to a phase change and thus to an increase in the degrees of freedom available to the system (e.g. melting causes a solid - rigid, fewer degrees of freedom - to change into a liquid).&lt;br /&gt;
&lt;br /&gt;
===The Radial Distribution Function (RDF)===&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 RDFs 3phase.png|frame|right|Fig. 8: RDFs for systems in different phases]]&lt;br /&gt;
&lt;br /&gt;
The radial distribution function for a solid, liquid and gas is reproduced in Fig. 8. The RDF shows how a system is arranged, relative to the position of one particle in the system; effectively, it is a measure of long-range order. A peak corresponds to a shell of atoms around the central particle. The intensity of the peak (effectively its integral) is proportional to the number of atoms within this shell. &lt;br /&gt;
&lt;br /&gt;
All three RDFs (vapour, liquid, solid) show an initial peak, but differ in their behaviour at longer distances. The RDF for a system in the gas phase rapidly reaches a value of 1 and plateaus. This is because a gas is, by its very nature, disordered. Atoms are free to move and they tend to disperse, not arrange themselves in shells. The RDF for a liquid oscillates slightly after the initial peak but also plateaus at 1 after a short distance. The initial peak corresponds to a solvation shell around the central particle. The subsequent smaller peaks show that a liquid has some degree of order - the forces between the particles are strong enough to restrict their movement to a degree. &lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 small lat.png|thumb|FCC lattice showing first three neighbouring lattice sites for a central atom (light pink)]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the solid system is different to the other two, as it shows long-range order. It does not plateau but instead shows peaks of decreasing intensity. This can be explained by looking at the structure of the solid crystal. This was defined in the simulation as a face-centred cubic (FCC) lattice, shown in Figure 9. The particles are arranged in shells, at distances which depend on the lattice spacing of the crystal. This can be calculated from the lattice density (1.2).&lt;br /&gt;
&lt;br /&gt;
The first three peaks in the RDF plot correspond to the first three neighbouring sites of the central particle, coloured in blue, purple and green respectively. The lattice spacing and the coordination number of each site can be calculated by considering the geometry of the crystal:&lt;br /&gt;
&lt;br /&gt;
*Shell 1 is found at &amp;lt;math&amp;gt; r_1 = \frac{\sqrt{2}}{2}a = 1.056&amp;lt;/math&amp;gt; and holds &amp;lt;math&amp;gt;12&amp;lt;/math&amp;gt; atoms. &lt;br /&gt;
*Shell 2 is found at &amp;lt;math&amp;gt; r_2 = a = 1.494&amp;lt;/math&amp;gt; and holds &amp;lt;math&amp;gt;6&amp;lt;/math&amp;gt;atoms.&lt;br /&gt;
*Shell 3 is found at &amp;lt;math&amp;gt; r_3 = \frac{\sqrt{6}}{2}a = 1.830&amp;lt;/math&amp;gt; and holds &amp;lt;math&amp;gt;24&amp;lt;/math&amp;gt; atoms.&lt;br /&gt;
&lt;br /&gt;
These values agree with those found by the RDF. The coordination numbers match those calculated from the running integral, which has values of 12.15, 17.98 and 42.3 respectively.&lt;br /&gt;
&lt;br /&gt;
===The diffusion coefficient, D===&lt;br /&gt;
&lt;br /&gt;
Plots of the total mean squared displacement vs time are reproduced in Appendix A. Plots of the VACF vs time are reproduced in Appendix B. Plots of the VACF running integral vs time are reproduced in Appendix B.&lt;br /&gt;
&lt;br /&gt;
Figure 10 below shows the time evolution of the VACF for a solid, a liquid and a gas, as well as for an ideal harmonic oscillator. &lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Velocity Autocorrelation Functions small.png|frame|center|Fig. 10: VACF plots for small scale simulations]]&lt;br /&gt;
&lt;br /&gt;
The VACF is effectively a measure of how closely related the velocity of a particle is (at time t) to its initial velocity (at time t=0). This correlation is &amp;quot;perturbed&amp;quot; by collisions or by interactions with other particles; at very long times (i.e. when t tends to infinity) we expect the VACF to be zero and the velocities to be uncorrelated. &lt;br /&gt;
&lt;br /&gt;
The harmonic oscillator shows perfectly oscillatory behaviour, with constant amplitude in time: the velocity goes from an initial state to an uncorrelated one and then back to the initial state. The solid shows similar behaviour: the VACF oscillates about 0 but dampens with time. This is because in a solid the atoms have fixed positions in a lattice; the forces between the particles are strong and these will oscillate in place for a while. The VACF takes much longer to reach zero than in the case of a liquid or a gas. The gas VACF tends slowly to zero; the interactions between particles in a gas are minimal, which means that the velocity at time is not very different from an initial velocity. A liquid is somewhere in-between these two phases: the particles have more freedom of movement than they do in a solid, but the attractive forces are strong enough to cause a perturbation in the velocities; the VACF shows a very slight oscillation, but then quickly dampens to zero. &lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients can be calculated in two different ways, either from the gradient of an MSD plot or from the integral of the VACF. These calculations were performed and the D values are given in Table 1.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Table 1: Diffusion coefficients &amp;lt;math&amp;gt; D / m^2 s^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; | Phase&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | MSD data&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | VACF data&lt;br /&gt;
|- &lt;br /&gt;
! Small simulation &lt;br /&gt;
! Large simulation &lt;br /&gt;
! Small simulation&lt;br /&gt;
! Large simulation&lt;br /&gt;
|- &lt;br /&gt;
! Gas &lt;br /&gt;
| 2.536&lt;br /&gt;
| 2.542&lt;br /&gt;
| 3.294&lt;br /&gt;
| 3.268 &lt;br /&gt;
|- &lt;br /&gt;
! Gas, linear region &lt;br /&gt;
| 3.317&lt;br /&gt;
| 3.217&lt;br /&gt;
| ---&lt;br /&gt;
| ---&lt;br /&gt;
|- &lt;br /&gt;
! Liquid&lt;br /&gt;
| 0.085 &lt;br /&gt;
| 0.087 &lt;br /&gt;
| 0.098&lt;br /&gt;
| 0.090&lt;br /&gt;
|-  &lt;br /&gt;
! Solid&lt;br /&gt;
| 5.825 x 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
| 4.391 x 10&amp;lt;sup&amp;gt;-4&amp;lt;/sup&amp;gt;&lt;br /&gt;
| -1.845 x 10^&amp;lt;sup&amp;gt;-4&amp;lt;/sup&amp;gt;&lt;br /&gt;
| 4.558 x 10^&amp;lt;sup&amp;gt;-5&amp;lt;/sup&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The largest error in the case of the MSD measurements comes from the fact that the gas phase gives rise to a curved plot, which cannot be feasibly fitted to a straight line. This is because particles in a gas will diffuse readily and thus the system will take longer to reach equilibrium (the linear region) than, say, a liquid. A longer simulation that would allow the system to reach equilibrium and then collect a larger amount of data would provide a more accurate result, as in this case the linear region that was used only comprised about 20% of the total data. In the case of a liquid, the MSD function is linear and provides the best fit and thus the most accurate result. The MSD for a solid establishes linear behaviour quickly, as the particles are &amp;quot;fixed&amp;quot;. The diffusion coefficient values are very small; this shows that in a solid no diffusion (or almost none) takes place.&lt;br /&gt;
&lt;br /&gt;
In the case of the VACF measurements the largest error comes from using the trapezium rule to compute the integral. The smaller the timestep, the more accurate the measurement - in this case the timestep is relatively small but some error still remains. &lt;br /&gt;
&lt;br /&gt;
The errors in both of these measurements cause the diffusion coefficients to differ slightly. The difference between the MSD- and VACF-calculated diffusion coefficients are 0.67%, 15.3% and 31780% for the gas, liquid and solid phases respectively. The difference in the case of the solid phase is incredibly large but not significant as we have established diffusion is not a significant process for solids. The difference for the liquid phase is quite small and likely comes from the poor fit of the MSD plot and the short duration of the simulation.&lt;br /&gt;
&lt;br /&gt;
===Appendix A: MSD plots===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Ad5215 Gas phase MSD, large atom count.png|Gas phase MSD (large scale)&lt;br /&gt;
File:Ad5215 Gas phase MSD, large atom count - linear region.png|Gas phase MSD, linear region (large scale)&lt;br /&gt;
File:Ad5215 Gas phase MSD, small atom count.png|Gas phase MSD (small scale)&lt;br /&gt;
File:Ad5215 as phase MSD, small atom count - linear region.png|Gas phase MSD, linear region (small scale)&lt;br /&gt;
File:Ad5215 Liquid phase MSD, large atom count.png|Liquid phase MSD (large scale)&lt;br /&gt;
File:Ad5215 Liquid phase MSD, small atom count.png|Liquid phase MSD (small scale&lt;br /&gt;
File:Ad5215 Solid phase MSD, large atom count.png|Solid phase MSD (large scale)&lt;br /&gt;
File:Ad5215 Solid phase MSD, small atom count.png|Solid phase MSD (small scale)&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Appendix B: VACF running integral plots===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Ad5215 Gas phase VACF Integral, large scale.png|Gas phase (large scale)&lt;br /&gt;
File:Ad5215 Gas phase VACF Integral, small scale.png|Gas phase (small scale)&lt;br /&gt;
File:Ad5215 Liquid phase VACF Integral, large scale.png|Liquid phase (large scale)&lt;br /&gt;
File:Ad5215 Liquid phase VACF Integral, small scale.png|Liquid phase (small scale)&lt;br /&gt;
File:AD5215 Solid phase VACF Integral, large scale.png|Solid phase (large scale)&lt;br /&gt;
File:Ad5215 Solid phase VACF Integral, small scale.png|Solid phase (small scale)&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
This lab provided insight into the thermodynamic properties of systems and how these change with phase, temperature, pressure. Of course, the systems investigated were small, but modeling larger, more complicated systems is possible and could prove useful. A particular domain where this kind of research would be invaluable is, as previously mentioned, molecular gastronomy: understanding phase changes and the properties of liquids, solids and gels can lead to the advancement of this (pseudo)-scientific discipline.&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:AD5215LS&amp;diff=696259</id>
		<title>Rep:AD5215LS</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:AD5215LS&amp;diff=696259"/>
		<updated>2018-04-16T13:04:31Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Densities and the ideal gas law */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Tasks=&lt;br /&gt;
==Section 2: Introduction==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by &amp;lt;math&amp;gt; x\left(t\right) = A\cos\left(\omega t + \phi\right)&amp;lt;/math&amp;gt; (the values of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Excel file attached [[:File:AD5215_HO.xls|here]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 error vs time.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The change in energy goes down as the timestep value becomes smaller. For a timestep of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 0.25 &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; the change in energy is &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 1.58% &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; while for a timestep of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 0.05 &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; the change in energy is &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 0.06% &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;. The energy change is &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 1.01% &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; for a timestep of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 0.2 &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;. A timestep that is too large could lead to the simulation effectively &amp;quot;missing&amp;quot; any changes in the system that happen on a shorter timescale than that of the timestep. Therefore, it is important to monitor the energy to ensure that the change is not too drastic and we are observing the behaviour of the system closely. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK:&amp;lt;/big&amp;gt; For a single Lennard-Jones interaction, &amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;, find the separation, &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt;, at which the potential energy is zero. What is the force at this separation? Find the equilibrium separation, &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, and work out the well depth (&amp;lt;math&amp;gt;\phi\left(r_{eq}\right)&amp;lt;/math&amp;gt;). Evaluate the integrals &amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\int_{2.5\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\int_{3\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;\sigma = \epsilon = 1.0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;&#039;&#039;Find the separation at which the potential energy is zero&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 lj zero pot.JPG]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;&#039;&#039;FInd the force at &amp;lt;math&amp;gt;r=\sigma&amp;lt;/math&amp;gt;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The force is the derivative of potential wrt to distance:&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 lj Force.JPG]]&lt;br /&gt;
&lt;br /&gt;
At separation &amp;lt;math&amp;gt;r=\sigma&amp;lt;/math&amp;gt; this will be&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 force(R).JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;&#039;&#039;Equilibrium separation and well depth&#039;&#039;&amp;lt;\span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The equilibrium separation is the separation when &amp;lt;math&amp;gt; \frac{d \phi}{dr} = 0.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 lj equilibrium req.JPG]]&lt;br /&gt;
&lt;br /&gt;
The well depth at this separation is&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 ls lj epsilon.JPG]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; negative epsilon &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;&#039;&#039;Integrals&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 lj int1.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 int2.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 int3.JPG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions. Estimate the volume of &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; water molecules under standard conditions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; V = 1\ mL, \ \rho = 1\ g/mL, \ M = 18\ g/mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
m = V \rho = 1\ g&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
N = nN_a = \frac{m}{M} \times N_a = \frac{6.022 \times 10^{23}}{18} = 3.35 \times 10{22}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
N molecules occupy 1 mL. Therefore, the volume of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;1 molecule&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; of water will be &amp;lt;math&amp;gt;V_0 = \frac{1}{N} = \frac{1}{3.35 \times 10{22}} = 2.99 \times10^{-23}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The volume of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;1000 molecules&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; will be &amp;lt;math&amp;gt;1000 \times V_0 = 2.99 \times10^{-20} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, &#039;&#039;after the periodic boundary conditions have been applied&#039;&#039;?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It ends up at position &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;(0.2, 0.1, 0.7)&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: The Lennard-Jones parameters for argon are &amp;lt;math&amp;gt;\sigma = 0.34\mathrm{nm}, \epsilon\ /\ k_B= 120 \mathrm{K}&amp;lt;/math&amp;gt;. If the LJ cutoff is &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;, what is it in real units? What is the well depth in &amp;lt;math&amp;gt;\mathrm{kJ\ mol}^{-1}&amp;lt;/math&amp;gt;? What is the reduced temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt; in real units?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r = \sigma \times r^*&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r = 0.34 \times 3.2 = 1.088\ nm &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\ K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\epsilon = 120 \times k_B &amp;lt;/math&amp;gt; for 1 particle&lt;br /&gt;
&lt;br /&gt;
For a mole of particles: &amp;lt;math&amp;gt;\epsilon = 120 \times k_B \times N_A &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \epsilon = 0.997\, kJ mol^{-1} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T = T^* \times \frac{\epsilon}{k_BT}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T = 1.5 \times 120 &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;
==Section 3: Equilibration==&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Randomly generated positions can lead to two atoms being very close together, which would result in a large repulsive potential. This would then affect any propagation in time of the system, which would lead to undesirable behaviour, especially when using larger timesteps. The system would most likely behave &amp;quot;appropriately&amp;quot; for small enough timesteps, but this would require running longer simulations. This would be less effective; a larger timestep that still results in an accurate simulation is ideal. &amp;lt;span style=color:red&amp;gt; good! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Density: &amp;lt;math&amp;gt; \rho = \frac{N}{V} = \frac{N}{l^3} &amp;lt;/math&amp;gt; ---&amp;gt; Length: &amp;lt;math&amp;gt; l=\sqrt[3]{\frac{N}{\rho}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;simple cubic lattice&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; with &amp;lt;math&amp;gt; \rho = 0.8 &amp;lt;/math&amp;gt;, the length, l, is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \sqrt[3]{\frac{1}{0.8}}=1.07722 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;face-centered cubic lattice&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; with &amp;lt;math&amp;gt; \rho = 1.2 &amp;lt;/math&amp;gt;, the length, l, is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \sqrt[3]{\frac{4}{1.2}}=1.4938 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The box would still contain &amp;lt;math&amp;gt; 10 \times 10 \times 10 = 1000 &amp;lt;/math&amp;gt; lattice units. For an FCC there are 4 atoms per lattice unit. Therefore the total number of atoms would be &amp;lt;math&amp;gt; 4 \times 1000 = 4000 &amp;lt;/math&amp;gt; atoms.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Mass&amp;quot; sets the mass of a particular type of atom (in this case, the mass of type 1 atoms is 1). &amp;quot;Pair&amp;quot; refers to pair potentials. The lj/cut command computes the 12/6 Lennard-Jones potential, cut sets the cut-off for r. Pair_coeff sets the values for the 2 parameters, sigma and epsilon. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; Velocity Verlet. &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; A simple Verlet algorithm wouldn&#039;t require the initial velocity, but would instead require &amp;lt;math&amp;gt;\mathbf{x}_i\left(-\delta t\right)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The line &amp;quot;variable timestep equal 0.001&amp;quot; defines a variable timestep which is the assigned a value. This allows for the variable to be called later on if needed. This is convenient for the user as it means that if the same variable is required multiple times (in this case, the variable timestep is called twice) changing its value is easier, as this only needs to be done once (in the line defining the variable).&lt;br /&gt;
&lt;br /&gt;
==Section 4: Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 ljls gamma.JPG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. How often will values of the temperature, etc., be sampled for the average? How many measurements contribute to the average? Looking to the following line, how much time will you simulate?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From the manual, the structure of the command is &amp;quot;ave/time Nevery Nrepeat Nfreq&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*Nevery (100) = use input values every this many timesteps (total no. of data points is 100,000 so this will give 1000 values to be averaged in the next step; records an average of 100 values)&lt;br /&gt;
&lt;br /&gt;
*Nrepeat (1000) = no. of times to use input values for calculating averages (i.e. average over 1000 values)&lt;br /&gt;
&lt;br /&gt;
*Nfreq (100,000) = calculate averages every this many timesteps (same no. specified in the &amp;quot;run&amp;quot; command)&lt;br /&gt;
&lt;br /&gt;
The timestep is 0.0025 and the simulation runs for 100,000 steps. Therefore we are simulating a total time of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;250 seconds &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Section 7: Dynamical properties and the diffusion coefficient==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a HO model:&lt;br /&gt;
[[File:Ad5215 Vacf HO model.JPG]]&lt;br /&gt;
&lt;br /&gt;
The VACF is given by&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 VACF deriv.JPG]]&lt;br /&gt;
&lt;br /&gt;
We evaluate the two integrals separately. Integral 2 is&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i2.JPG]]&lt;br /&gt;
&lt;br /&gt;
Using [[File:Ad5215 Vacf cos(2x).JPG]] we can write&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i2 2.JPG]]&lt;br /&gt;
&lt;br /&gt;
Integral 1 is&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i1 1.JPG]]&lt;br /&gt;
&lt;br /&gt;
Using [[File:Ad5215 Vacf sin(A+B).JPG]] we can write&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i1 2.JPG]]&lt;br /&gt;
&lt;br /&gt;
We evaluate the last integral separately.&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i3.JPG]]&lt;br /&gt;
&lt;br /&gt;
Substituting this back we obtain:&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i1 3.JPG]]&lt;br /&gt;
&lt;br /&gt;
Substituting I1 and I2 into the formula for C we obtain&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf c1.JPG]]&lt;br /&gt;
&lt;br /&gt;
Sin is an odd function, i.e. [[File:Ad5215 Vacf sinodd.JPG]]. Thus&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf c2.JPG]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; There is definitely a shorter way of doing this, but yes. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Report=&lt;br /&gt;
&lt;br /&gt;
==Abstract==&lt;br /&gt;
&lt;br /&gt;
Solid, liquid and gaseous systems were modeled using LAMMPS and a 12-6 Lennard-Jones forcefield. A suitable timestep of 0.0025 was determined. Simulations were run to obtain thermodynamic data (temperatures, pressures, densities, heat capacities). Calculated densities were found to be lower than those predicted by the ideal gas law. The simulated heat capacities showed a trend, decreasing with increasing temperature. The RDF was calculated for systems in all three phases. As expected, the RDF for a solid showed peaks decaying in amplitude. Lattice spacings and coordination numbers for the solid FCC lattice were calculated. The MSD and the VACF were plotted for the same three systems and the diffusion coefficient was calculated for both measurements. The two methods did not result in identical values; still, the difference was only 0.67% for the diffusion coefficients in the gas phase.&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good, concise abstract that summaries main results. Perhaps 1 sentence of motivation would have been nice. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Food constitutes a huge part of our lives, whether we actively think about it or not. Cooking, in some form or other, has been around ever since the first human realised that fire makes raw meat tastier and more convenient to eat. Nowadays, the food industry is enormous and cooking has become a successful blend of art and science. Perhaps the most pertinent example of this is molecular gastronomy, a subdiscipline of food science that seeks to investigate the physical and chemical transformations of ingredients during the cooking process. In their review, Balham et al refer to molecular gastronomy as an &amp;quot;emerging scientific discipline&amp;quot;.&amp;lt;ref&amp;gt;P. Barham, L. H. Skibsted, W. L. P. Bredie and J. Risbo, &#039;&#039;Symp.&lt;br /&gt;
A Q. J. Mod. Foreign Lit.&#039;&#039;, 2010, 2313–2365.&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In fact, molecular gastronomy relies heavily on processes such as gelification and infusion and on materials such as gels, foams and powders. It also uses equipment that is heavily reminiscent of a laboratory - some kitchens are fitted with butane burners, syringes and dehydrators.  &lt;br /&gt;
&lt;br /&gt;
Clever presentations and unusual sensations and are piquing the interest of many people; in some places, molecular gastronomy restaurants have become tourist attractions.&amp;lt;ref&amp;gt;D. Tüzünkan and A. Albayrak, &#039;&#039;Procedia&lt;br /&gt;
- Soc. Behav. Sci.&#039;&#039;, 2015, &#039;&#039;&#039;195&#039;&#039;&#039;, 446–452.&amp;lt;/ref&amp;gt; Simulating the thermodynamic properties of systems can provide a better understanding of physical systems and can lead to the growth and development of this industry.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; An interesting topic and motivation! An explicit connection between gastronomy and the results you intend to present/discuss would be nice. For example how is the diffusion coefficient relevant? The introduction of a scientific paper usually includes the background theory, such as in your case, the equations for diffusion coefficient. You have included this in the methodology, which while logical, is not standard practice for most papers/journals. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Aims and Objectives==&lt;br /&gt;
&lt;br /&gt;
* become familiar with LAMMPS and how simulating a physical system works&lt;br /&gt;
* model the behaviour of systems under the 12-6 Lennard-Jones potential&lt;br /&gt;
* calculate the physical properties (temperature, pressure, density, etc) of a system using such simulations&lt;br /&gt;
* comparing the results of the simulations to theory (e.g. simulated density vs density given by the ideal gas law)&lt;br /&gt;
* calculating the diffusion coefficient for systems in different phases (gas, liquid, solid) by two different methods (from the MSD and from the VACF)&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
&#039;&#039;&#039;General methods&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A 12-6 Lennard-Jones system was modeled usings LAMMPS and all simulations were run using Imperial&#039;s High Performance Computer. &lt;br /&gt;
The potential for such a system is given by&amp;lt;ref name=&amp;quot;:0&amp;quot;&amp;gt;P. Atkins, J. De Paula, &#039;&#039;Physical&lt;br /&gt;
Chemistry&#039;&#039;, OUP Oxford, 9th edn., 2009.&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All calculations used reduced units:&amp;lt;math&amp;gt;r^* = r/{\sigma}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;E^* = E/{\epsilon}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;T^* = {k_BT}/{\epsilon}.&amp;lt;/math&amp;gt;&lt;br /&gt;
The Lennard-Jones parameters &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\epsilon&amp;lt;/math&amp;gt; were set to 1.0 for all simulations. The cutoff for Lennard-Jones interactions was set at r*=3 unless otherwise stated. The mass of the atoms was set to 1.0. The temperature, pressure, lattice density and timestep values were varied. For all calculations the velocity Verlet algorithm was employed. The atoms were assigned random velocities within the simulation, while ensuring that the Boltzmann distribution of states is followed. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Determining a suitable timestep&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A simple cubic lattice with a density of 0.8 was defined and the simulation was populated with 1000 atoms (10 x 10 x 10 dimensions). The ensemble was defined as the microcanonical (NVE) ensemble. Five values for the timestep were tested: 0.015, 0.01, 0.0075, 0.0025, 0.001 and each simulation was run for a total time of 100 seconds. Values for the energy, temperature and pressure of the system were recorded at each step. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Variation of density with temperature and pressure&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A simple cubic lattice with a density of 0.8 was defined and the simulation was populated with 3375 atoms (15 x 15 x 15 dimensions). The timestep for all simulations was set to 0.0025. The ensemble was defined as NPT and 10 different thermodynamic states were simulated (two pressures, 2.5 and 3.5, each associated with five temperatures: 3.0, 6.0, 9.0, 12.0 and 15.0). Values for the energy, temperature and pressure of the system were recorded at each step, as well as average values for the density, temperature and pressure of the system at the end of the simulation. Plots of density vs time were obtained, both for the simulated data and for densities predicted by the ideal gas law&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;, &amp;lt;math&amp;gt; PM = \rho RT.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Heat capacity calculations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A simple cubic lattice with a density of 0.2 was defined and populated with 3375 atoms. The timestep for all simulations was set to 0.0025. An NVT ensemble was simulated for five temperatures: 2.0, 2.2, 2.4, 2.6 and 2.8. Then, a subsequent simulation was run to establish an NVE ensemble and measure the properties of the system. Average values for temperature, energy, volume and heat capacity were calculated. This procedure was repeated for a simple cubic lattice with a density of 0.8. An example input script can be found [[:File: Example_script_heatcap_ad5215.in|here]].&lt;br /&gt;
&lt;br /&gt;
The heat capacity of a system is given by&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = \frac{\partial E}{\partial T} = \frac{\mathrm{Var}\left[E\right]}{k_B T^2} = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where E is the internal energy and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;{\mathrm{Var}\left[E\right]}={\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
is the variance in internal energy. The &amp;lt;math&amp;gt;N^2&amp;lt;/math&amp;gt; term is required because LAMMPS automatically outputs the energy &#039;&#039;&#039;per atom&#039;&#039;&#039;, not the &#039;&#039;&#039;total&#039;&#039;&#039; energy. &lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 LJfluid phase diag.JPG|thumb|Fig. 1: Phase diagram for the Lennard-Jones fluid]]&lt;br /&gt;
&#039;&#039;&#039;RDF calculations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Three systems (a liquid, a solid and a gas) were modeled and populated with 3375 atoms each. Temperature and density values were taken from the Lennard-Jones fluid phase diagram&amp;lt;ref&amp;gt;J. P. Hansen and L.&lt;br /&gt;
Verlet, &#039;&#039;Phys. Rev.&#039;&#039;, 1969, &#039;&#039;&#039;184&#039;&#039;&#039;, 151–161.&amp;lt;/ref&amp;gt; reproduced in Fig. 1. These were defined as:&lt;br /&gt;
&lt;br /&gt;
*solid: fcc lattice, temperature 1.2, density 1.2;&lt;br /&gt;
*liquid: sc lattice, temperature 1.2 , density 0.8;&lt;br /&gt;
*vapour: sc lattice, temperature 1.2, density 0.05.&lt;br /&gt;
&lt;br /&gt;
The ensemble was defined as NVT. The timestep for all simulations was set to 0.002. The trajectories of the atoms were recorded and VMD was used to calculate the radial distribution function and its integral from these trajectories. The data was then analysed using Python. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Diffusion coefficient calculations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The same three systems as above were modeled, this time with 8000 atoms each. The timestep was set to 0.002 and each simulation was run for 5000 steps. The Lennard-Jones cutoff was set to 3.2. The ensemble was defined as NVT. The mean squared displacement (MSD) and the velocity autocorrelation function (VACF) at each step were calculated for all systems. The data was analysed using Python. The MSD plots were fitted to a straight line and the gradient was used to calculate the diffusion coefficient. The VACF integrals were plotted as a function of time and, again, used to calculate the diffusion coefficient. The same data analysis was conducted using supplied data which modeled larger systems.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;MSD&#039;&#039;&#039; is a measure of the deviation of the position of a particle with respect to a reference position over time. It can be thought of as a measure of how much the system moves over time. The MSD is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;{\rm MSD}\equiv\langle (r-r_0)^2\rangle=\frac{1}{N}\sum_{n=1}^N (r_n(t) - r_n(0))^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient (D) can be calculated from the MSD, using&amp;lt;ref name=&amp;quot;:1&amp;quot;&amp;gt;O. J. Eder, &#039;&#039;J. Chem. Phys.&#039;&#039;, 1977, &#039;&#039;&#039;66&#039;&#039;&#039;, 3866–3870.&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;VACF&#039;&#039;&#039; is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\delta t\right) = \left\langle \mathbf{v}\left(t\right) \cdot \mathbf{v}\left(t+\delta t\right)\right\rangle&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and is effectively a measure of how closely related the velocity of a particle is (at time t) to its initial velocity (at time t=0). This correlation is &amp;quot;perturbed&amp;quot; by collisions; at very long times (i.e. when t tends to infinity) we expect the VACF to be zero, as all particles will have collided at least once and their velocities will be uncorrelated.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient is proportional to the integral of the VACF&amp;lt;ref name=&amp;quot;:1&amp;quot; /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{3}\int_0^\infty \mathrm{d}\delta t \left\langle\mathbf{v}\left(0\right)\cdot\mathbf{v}\left(\delta t\right)\right\rangle=\frac{1}{3}\int_0^\infty C\left(\delta t\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good, I could reproduce your results with this information. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Results &amp;amp; Discussion==&lt;br /&gt;
===Equilibration===&lt;br /&gt;
&lt;br /&gt;
Plots of energy, temperature and pressure vs time were obtained for a timestep value of 0.001. These are reproduced in Fig. 2-4. It can be seen that all three plots reach a &amp;quot;plateau&amp;quot; very quickly; equilibration is almost instantaneous. The values oscillate slightly, as a result of the approximations required by the simulation. These oscillations are however very small (note the scale of the y-axis). &lt;br /&gt;
{|&lt;br /&gt;
&lt;br /&gt;
|[[File:Ad5215 Ts001 Eng.png|thumb|left|Fig. 2: Energy vs time (ts 0.001)]]&lt;br /&gt;
|[[File:Ad5215 Ts001 Temp.png|thumb|left|Fig. 3: Temperature vs time (ts 0.001)]]&lt;br /&gt;
|[[File:Ad5215 Ts001 Press.png|thumb|right|Fig. 4: Pressure vs time (ts 0.001)]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An important feature of these simulations is the timestep. The shorter the timestep the more &amp;quot;accurate&amp;quot; the simulation, but the more computational power this will require. In this case, plots of the total energy vs time were obtained for all five timestep values (Fig. 5).&lt;br /&gt;
&lt;br /&gt;
[[File:Ad515 Allts energy.png|frame|center|Fig. 5: Energy vs time for all timesteps]]&lt;br /&gt;
&lt;br /&gt;
The lowest energy is given by timestep values of 0.001 and 0.0025. These energies are almost identical; the 0.001 energy is lower, but the difference in energies is only 0.005%. In addition to this, for simulating a total time of e.g. 100s, ts = 0.0025 requires 40,000 steps, while ts = 0.001 requires 100,000 steps. Therefore, the 0.0025 timestep is the better choice, as the difference in energies is not large enough to warrant the use of more computational power (as required by the 0.001 timestep). The 0.015 timestep is a poor choice. Not only is the energy the highest of the five, but, unlike in the other four cases, the system does not reach equilibrium and the energy keeps increasing. &lt;br /&gt;
&lt;br /&gt;
Based on this data, further simulations were run using a 0.0025 timestep (unless a different value was required by the lab script).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Equilibration is not typically discussed in the results section of a scientific paper. Simply &amp;quot;systems were equilibrium for X timesteps/unit with a timestep of Y&amp;quot; would be sufficient. You get the marks for the task however. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Densities and the ideal gas law===&lt;br /&gt;
&lt;br /&gt;
Plots of density vs temperature for two different pressures are reproduced in Fig. 6. The density given by the ideal gas law was also calculated and plotted on the same graph. &lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 densvstemp.png|frame|center|Fig. 6: Plots of density vs temperature comparing experimental and theoretical data]]&lt;br /&gt;
&lt;br /&gt;
It can be seen that the results of the simulation do not match those given by the theoretical approach. This is because the ideal gas law does not take into account any interaction between particles, i.e. it assumes that the gas behaves ideally. In the Lennard-Jones model the particles experience attractive and repulsive forces; the repulsive forces dominate &amp;lt;span style=color:red&amp;gt; be careful to convey precise meaning: when do repulsive forces dominate? &amp;lt;/span&amp;gt;and cause the system to be more diffuse and thus have a lower simulated density. &lt;br /&gt;
&lt;br /&gt;
The discrepancy between theory and simulation increases with increasing pressure because this &amp;quot;pushes&amp;quot; the particles closer together and increases the effect of Lennard-Jones forces. It also increases with decreasing temperature; at low temperatures, the Lennard-Jones forces dominate, while at high temperatures thermal motion is more significant.&lt;br /&gt;
&lt;br /&gt;
===Heat capacities===&lt;br /&gt;
&lt;br /&gt;
The variation in heat capacity with temperature is shown in Fig. 7. The system is under the NVE ensemble so we are dealing with the isochoric heat capacity, C&amp;lt;sub&amp;gt;V&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Heatcaps.png|frame|center|Fig. 7: Heat capacity variation with temperature]]&lt;br /&gt;
&lt;br /&gt;
The heat capacity decreases with increasing temperature. This agrees with the formula for heat capacity, which shows inverse proportionality to temperature. However, this is not the full extent of the explanation.&lt;br /&gt;
&lt;br /&gt;
Heat capacity is a measure of how much energy (heat) is required to increase the temperature of a system. At higher temperatures more energetic states become available and the spacing between them decreases - this makes populating higher states easier, leading to a decrease in heat capacity. &lt;br /&gt;
&lt;br /&gt;
In addition to this, increasing the temperature can lead to a phase change and thus to an increase in the degrees of freedom available to the system (e.g. melting causes a solid - rigid, fewer degrees of freedom - to change into a liquid).&lt;br /&gt;
&lt;br /&gt;
===The Radial Distribution Function (RDF)===&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 RDFs 3phase.png|frame|right|Fig. 8: RDFs for systems in different phases]]&lt;br /&gt;
&lt;br /&gt;
The radial distribution function for a solid, liquid and gas is reproduced in Fig. 8. The RDF shows how a system is arranged, relative to the position of one particle in the system; effectively, it is a measure of long-range order. A peak corresponds to a shell of atoms around the central particle. The intensity of the peak (effectively its integral) is proportional to the number of atoms within this shell. &lt;br /&gt;
&lt;br /&gt;
All three RDFs (vapour, liquid, solid) show an initial peak, but differ in their behaviour at longer distances. The RDF for a system in the gas phase rapidly reaches a value of 1 and plateaus. This is because a gas is, by its very nature, disordered. Atoms are free to move and they tend to disperse, not arrange themselves in shells. The RDF for a liquid oscillates slightly after the initial peak but also plateaus at 1 after a short distance. The initial peak corresponds to a solvation shell around the central particle. The subsequent smaller peaks show that a liquid has some degree of order - the forces between the particles are strong enough to restrict their movement to a degree. &lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 small lat.png|thumb|FCC lattice showing first three neighbouring lattice sites for a central atom (light pink)]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the solid system is different to the other two, as it shows long-range order. It does not plateau but instead shows peaks of decreasing intensity. This can be explained by looking at the structure of the solid crystal. This was defined in the simulation as a face-centred cubic (FCC) lattice, shown in Figure 9. The particles are arranged in shells, at distances which depend on the lattice spacing of the crystal. This can be calculated from the lattice density (1.2).&lt;br /&gt;
&lt;br /&gt;
The first three peaks in the RDF plot correspond to the first three neighbouring sites of the central particle, coloured in blue, purple and green respectively. The lattice spacing and the coordination number of each site can be calculated by considering the geometry of the crystal:&lt;br /&gt;
&lt;br /&gt;
*Shell 1 is found at &amp;lt;math&amp;gt; r_1 = \frac{\sqrt{2}}{2}a = 1.056&amp;lt;/math&amp;gt; and holds &amp;lt;math&amp;gt;12&amp;lt;/math&amp;gt; atoms. &lt;br /&gt;
*Shell 2 is found at &amp;lt;math&amp;gt; r_2 = a = 1.494&amp;lt;/math&amp;gt; and holds &amp;lt;math&amp;gt;6&amp;lt;/math&amp;gt;atoms.&lt;br /&gt;
*Shell 3 is found at &amp;lt;math&amp;gt; r_3 = \frac{\sqrt{6}}{2}a = 1.830&amp;lt;/math&amp;gt; and holds &amp;lt;math&amp;gt;24&amp;lt;/math&amp;gt; atoms.&lt;br /&gt;
&lt;br /&gt;
These values agree with those found by the RDF. The coordination numbers match those calculated from the running integral, which has values of 12.15, 17.98 and 42.3 respectively.&lt;br /&gt;
&lt;br /&gt;
===The diffusion coefficient, D===&lt;br /&gt;
&lt;br /&gt;
Plots of the total mean squared displacement vs time are reproduced in Appendix A. Plots of the VACF vs time are reproduced in Appendix B. Plots of the VACF running integral vs time are reproduced in Appendix B.&lt;br /&gt;
&lt;br /&gt;
Figure 10 below shows the time evolution of the VACF for a solid, a liquid and a gas, as well as for an ideal harmonic oscillator. &lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Velocity Autocorrelation Functions small.png|frame|center|Fig. 10: VACF plots for small scale simulations]]&lt;br /&gt;
&lt;br /&gt;
The VACF is effectively a measure of how closely related the velocity of a particle is (at time t) to its initial velocity (at time t=0). This correlation is &amp;quot;perturbed&amp;quot; by collisions or by interactions with other particles; at very long times (i.e. when t tends to infinity) we expect the VACF to be zero and the velocities to be uncorrelated. &lt;br /&gt;
&lt;br /&gt;
The harmonic oscillator shows perfectly oscillatory behaviour, with constant amplitude in time: the velocity goes from an initial state to an uncorrelated one and then back to the initial state. The solid shows similar behaviour: the VACF oscillates about 0 but dampens with time. This is because in a solid the atoms have fixed positions in a lattice; the forces between the particles are strong and these will oscillate in place for a while. The VACF takes much longer to reach zero than in the case of a liquid or a gas. The gas VACF tends slowly to zero; the interactions between particles in a gas are minimal, which means that the velocity at time is not very different from an initial velocity. A liquid is somewhere in-between these two phases: the particles have more freedom of movement than they do in a solid, but the attractive forces are strong enough to cause a perturbation in the velocities; the VACF shows a very slight oscillation, but then quickly dampens to zero. &lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients can be calculated in two different ways, either from the gradient of an MSD plot or from the integral of the VACF. These calculations were performed and the D values are given in Table 1.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Table 1: Diffusion coefficients &amp;lt;math&amp;gt; D / m^2 s^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; | Phase&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | MSD data&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | VACF data&lt;br /&gt;
|- &lt;br /&gt;
! Small simulation &lt;br /&gt;
! Large simulation &lt;br /&gt;
! Small simulation&lt;br /&gt;
! Large simulation&lt;br /&gt;
|- &lt;br /&gt;
! Gas &lt;br /&gt;
| 2.536&lt;br /&gt;
| 2.542&lt;br /&gt;
| 3.294&lt;br /&gt;
| 3.268 &lt;br /&gt;
|- &lt;br /&gt;
! Gas, linear region &lt;br /&gt;
| 3.317&lt;br /&gt;
| 3.217&lt;br /&gt;
| ---&lt;br /&gt;
| ---&lt;br /&gt;
|- &lt;br /&gt;
! Liquid&lt;br /&gt;
| 0.085 &lt;br /&gt;
| 0.087 &lt;br /&gt;
| 0.098&lt;br /&gt;
| 0.090&lt;br /&gt;
|-  &lt;br /&gt;
! Solid&lt;br /&gt;
| 5.825 x 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
| 4.391 x 10&amp;lt;sup&amp;gt;-4&amp;lt;/sup&amp;gt;&lt;br /&gt;
| -1.845 x 10^&amp;lt;sup&amp;gt;-4&amp;lt;/sup&amp;gt;&lt;br /&gt;
| 4.558 x 10^&amp;lt;sup&amp;gt;-5&amp;lt;/sup&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The largest error in the case of the MSD measurements comes from the fact that the gas phase gives rise to a curved plot, which cannot be feasibly fitted to a straight line. This is because particles in a gas will diffuse readily and thus the system will take longer to reach equilibrium (the linear region) than, say, a liquid. A longer simulation that would allow the system to reach equilibrium and then collect a larger amount of data would provide a more accurate result, as in this case the linear region that was used only comprised about 20% of the total data. In the case of a liquid, the MSD function is linear and provides the best fit and thus the most accurate result. The MSD for a solid establishes linear behaviour quickly, as the particles are &amp;quot;fixed&amp;quot;. The diffusion coefficient values are very small; this shows that in a solid no diffusion (or almost none) takes place.&lt;br /&gt;
&lt;br /&gt;
In the case of the VACF measurements the largest error comes from using the trapezium rule to compute the integral. The smaller the timestep, the more accurate the measurement - in this case the timestep is relatively small but some error still remains. &lt;br /&gt;
&lt;br /&gt;
The errors in both of these measurements cause the diffusion coefficients to differ slightly. The difference between the MSD- and VACF-calculated diffusion coefficients are 0.67%, 15.3% and 31780% for the gas, liquid and solid phases respectively. The difference in the case of the solid phase is incredibly large but not significant as we have established diffusion is not a significant process for solids. The difference for the liquid phase is quite small and likely comes from the poor fit of the MSD plot and the short duration of the simulation.&lt;br /&gt;
&lt;br /&gt;
===Appendix A: MSD plots===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Ad5215 Gas phase MSD, large atom count.png|Gas phase MSD (large scale)&lt;br /&gt;
File:Ad5215 Gas phase MSD, large atom count - linear region.png|Gas phase MSD, linear region (large scale)&lt;br /&gt;
File:Ad5215 Gas phase MSD, small atom count.png|Gas phase MSD (small scale)&lt;br /&gt;
File:Ad5215 as phase MSD, small atom count - linear region.png|Gas phase MSD, linear region (small scale)&lt;br /&gt;
File:Ad5215 Liquid phase MSD, large atom count.png|Liquid phase MSD (large scale)&lt;br /&gt;
File:Ad5215 Liquid phase MSD, small atom count.png|Liquid phase MSD (small scale&lt;br /&gt;
File:Ad5215 Solid phase MSD, large atom count.png|Solid phase MSD (large scale)&lt;br /&gt;
File:Ad5215 Solid phase MSD, small atom count.png|Solid phase MSD (small scale)&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Appendix B: VACF running integral plots===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Ad5215 Gas phase VACF Integral, large scale.png|Gas phase (large scale)&lt;br /&gt;
File:Ad5215 Gas phase VACF Integral, small scale.png|Gas phase (small scale)&lt;br /&gt;
File:Ad5215 Liquid phase VACF Integral, large scale.png|Liquid phase (large scale)&lt;br /&gt;
File:Ad5215 Liquid phase VACF Integral, small scale.png|Liquid phase (small scale)&lt;br /&gt;
File:AD5215 Solid phase VACF Integral, large scale.png|Solid phase (large scale)&lt;br /&gt;
File:Ad5215 Solid phase VACF Integral, small scale.png|Solid phase (small scale)&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
This lab provided insight into the thermodynamic properties of systems and how these change with phase, temperature, pressure. Of course, the systems investigated were small, but modeling larger, more complicated systems is possible and could prove useful. A particular domain where this kind of research would be invaluable is, as previously mentioned, molecular gastronomy: understanding phase changes and the properties of liquids, solids and gels can lead to the advancement of this (pseudo)-scientific discipline.&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:AD5215LS&amp;diff=696258</id>
		<title>Rep:AD5215LS</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:AD5215LS&amp;diff=696258"/>
		<updated>2018-04-16T13:02:59Z</updated>

		<summary type="html">&lt;p&gt;Org12: /* Equilibration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Tasks=&lt;br /&gt;
==Section 2: Introduction==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns &amp;quot;ANALYTICAL&amp;quot;, &amp;quot;ERROR&amp;quot;, and &amp;quot;ENERGY&amp;quot;: &amp;quot;ANALYTICAL&amp;quot; should contain the value of the classical solution for the position at time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;quot;ERROR&amp;quot; should contain the &#039;&#039;absolute&#039;&#039; difference between &amp;quot;ANALYTICAL&amp;quot; and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and &amp;quot;ENERGY&amp;quot; should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by &amp;lt;math&amp;gt; x\left(t\right) = A\cos\left(\omega t + \phi\right)&amp;lt;/math&amp;gt; (the values of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; are worked out for you in the sheet).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Excel file attached [[:File:AD5215_HO.xls|here]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 error vs time.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your &amp;quot;simulation&amp;quot;? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The change in energy goes down as the timestep value becomes smaller. For a timestep of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 0.25 &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; the change in energy is &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 1.58% &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; while for a timestep of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 0.05 &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; the change in energy is &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 0.06% &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;. The energy change is &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 1.01% &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; for a timestep of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; 0.2 &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;. A timestep that is too large could lead to the simulation effectively &amp;quot;missing&amp;quot; any changes in the system that happen on a shorter timescale than that of the timestep. Therefore, it is important to monitor the energy to ensure that the change is not too drastic and we are observing the behaviour of the system closely. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK:&amp;lt;/big&amp;gt; For a single Lennard-Jones interaction, &amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;, find the separation, &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt;, at which the potential energy is zero. What is the force at this separation? Find the equilibrium separation, &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, and work out the well depth (&amp;lt;math&amp;gt;\phi\left(r_{eq}\right)&amp;lt;/math&amp;gt;). Evaluate the integrals &amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\int_{2.5\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\int_{3\sigma}^\infty \phi\left(r\right)\mathrm{d}r&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;\sigma = \epsilon = 1.0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;&#039;&#039;Find the separation at which the potential energy is zero&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 lj zero pot.JPG]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;&#039;&#039;FInd the force at &amp;lt;math&amp;gt;r=\sigma&amp;lt;/math&amp;gt;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The force is the derivative of potential wrt to distance:&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 lj Force.JPG]]&lt;br /&gt;
&lt;br /&gt;
At separation &amp;lt;math&amp;gt;r=\sigma&amp;lt;/math&amp;gt; this will be&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 force(R).JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;&#039;&#039;Equilibrium separation and well depth&#039;&#039;&amp;lt;\span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The equilibrium separation is the separation when &amp;lt;math&amp;gt; \frac{d \phi}{dr} = 0.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 lj equilibrium req.JPG]]&lt;br /&gt;
&lt;br /&gt;
The well depth at this separation is&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 ls lj epsilon.JPG]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; negative epsilon &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;&#039;&#039;Integrals&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 lj int1.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 int2.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 int3.JPG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Estimate the number of water molecules in 1ml of water under standard conditions. Estimate the volume of &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; water molecules under standard conditions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; V = 1\ mL, \ \rho = 1\ g/mL, \ M = 18\ g/mol&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
m = V \rho = 1\ g&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
N = nN_a = \frac{m}{M} \times N_a = \frac{6.022 \times 10^{23}}{18} = 3.35 \times 10{22}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
N molecules occupy 1 mL. Therefore, the volume of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;1 molecule&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; of water will be &amp;lt;math&amp;gt;V_0 = \frac{1}{N} = \frac{1}{3.35 \times 10{22}} = 2.99 \times10^{-23}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The volume of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;1000 molecules&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; will be &amp;lt;math&amp;gt;1000 \times V_0 = 2.99 \times10^{-20} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, &#039;&#039;after the periodic boundary conditions have been applied&#039;&#039;?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It ends up at position &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;(0.2, 0.1, 0.7)&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: The Lennard-Jones parameters for argon are &amp;lt;math&amp;gt;\sigma = 0.34\mathrm{nm}, \epsilon\ /\ k_B= 120 \mathrm{K}&amp;lt;/math&amp;gt;. If the LJ cutoff is &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;, what is it in real units? What is the well depth in &amp;lt;math&amp;gt;\mathrm{kJ\ mol}^{-1}&amp;lt;/math&amp;gt;? What is the reduced temperature &amp;lt;math&amp;gt;T^* = 1.5&amp;lt;/math&amp;gt; in real units?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r = \sigma \times r^*&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r = 0.34 \times 3.2 = 1.088\ nm &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\ K &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\epsilon = 120 \times k_B &amp;lt;/math&amp;gt; for 1 particle&lt;br /&gt;
&lt;br /&gt;
For a mole of particles: &amp;lt;math&amp;gt;\epsilon = 120 \times k_B \times N_A &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \epsilon = 0.997\, kJ mol^{-1} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T = T^* \times \frac{\epsilon}{k_BT}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T = 1.5 \times 120 &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;
==Section 3: Equilibration==&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Randomly generated positions can lead to two atoms being very close together, which would result in a large repulsive potential. This would then affect any propagation in time of the system, which would lead to undesirable behaviour, especially when using larger timesteps. The system would most likely behave &amp;quot;appropriately&amp;quot; for small enough timesteps, but this would require running longer simulations. This would be less effective; a larger timestep that still results in an accurate simulation is ideal. &amp;lt;span style=color:red&amp;gt; good! &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of &amp;lt;math&amp;gt;0.8&amp;lt;/math&amp;gt;. Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Density: &amp;lt;math&amp;gt; \rho = \frac{N}{V} = \frac{N}{l^3} &amp;lt;/math&amp;gt; ---&amp;gt; Length: &amp;lt;math&amp;gt; l=\sqrt[3]{\frac{N}{\rho}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;simple cubic lattice&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; with &amp;lt;math&amp;gt; \rho = 0.8 &amp;lt;/math&amp;gt;, the length, l, is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \sqrt[3]{\frac{1}{0.8}}=1.07722 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;face-centered cubic lattice&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; with &amp;lt;math&amp;gt; \rho = 1.2 &amp;lt;/math&amp;gt;, the length, l, is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \sqrt[3]{\frac{4}{1.2}}=1.4938 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The box would still contain &amp;lt;math&amp;gt; 10 \times 10 \times 10 = 1000 &amp;lt;/math&amp;gt; lattice units. For an FCC there are 4 atoms per lattice unit. Therefore the total number of atoms would be &amp;lt;math&amp;gt; 4 \times 1000 = 4000 &amp;lt;/math&amp;gt; atoms.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Using the [http://lammps.sandia.gov/doc/Section_commands.html#cmd_5 LAMMPS manual], find the purpose of the following commands in the input script:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Mass&amp;quot; sets the mass of a particular type of atom (in this case, the mass of type 1 atoms is 1). &amp;quot;Pair&amp;quot; refers to pair potentials. The lj/cut command computes the 12/6 Lennard-Jones potential, cut sets the cut-off for r. Pair_coeff sets the values for the 2 parameters, sigma and epsilon. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Given that we are specifying &amp;lt;math&amp;gt;\mathbf{x}_i\left(0\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbf{v}_i\left(0\right)&amp;lt;/math&amp;gt;, which integration algorithm are we going to use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt; Velocity Verlet. &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt; A simple Verlet algorithm wouldn&#039;t require the initial velocity, but would instead require &amp;lt;math&amp;gt;\mathbf{x}_i\left(-\delta t\right)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Look at the lines below.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
variable timestep equal 0.001&lt;br /&gt;
variable n_steps equal floor(100/${timestep})&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION ###&lt;br /&gt;
run ${n_steps}&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The second line (starting &amp;quot;variable timestep...&amp;quot;) tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestep 0.001&lt;br /&gt;
run 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The line &amp;quot;variable timestep equal 0.001&amp;quot; defines a variable timestep which is the assigned a value. This allows for the variable to be called later on if needed. This is convenient for the user as it means that if the same variable is required multiple times (in this case, the variable timestep is called twice) changing its value is easier, as this only needs to be done once (in the line defining the variable).&lt;br /&gt;
&lt;br /&gt;
==Section 4: Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: We need to choose &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; so that the temperature is correct &amp;lt;math&amp;gt;T = \mathfrak{T}&amp;lt;/math&amp;gt; if we multiply every velocity &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;. We can write two equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solve these to determine &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 ljls gamma.JPG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: Use the [http://lammps.sandia.gov/doc/fix_ave_time.html manual page] to find out the importance of the three numbers &#039;&#039;100 1000 100000&#039;&#039;. How often will values of the temperature, etc., be sampled for the average? How many measurements contribute to the average? Looking to the following line, how much time will you simulate?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From the manual, the structure of the command is &amp;quot;ave/time Nevery Nrepeat Nfreq&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*Nevery (100) = use input values every this many timesteps (total no. of data points is 100,000 so this will give 1000 values to be averaged in the next step; records an average of 100 values)&lt;br /&gt;
&lt;br /&gt;
*Nrepeat (1000) = no. of times to use input values for calculating averages (i.e. average over 1000 values)&lt;br /&gt;
&lt;br /&gt;
*Nfreq (100,000) = calculate averages every this many timesteps (same no. specified in the &amp;quot;run&amp;quot; command)&lt;br /&gt;
&lt;br /&gt;
The timestep is 0.0025 and the simulation runs for 100,000 steps. Therefore we are simulating a total time of &amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:#D80B60&amp;quot;&amp;gt;250 seconds &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Section 7: Dynamical properties and the diffusion coefficient==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;TASK&amp;lt;/big&amp;gt;: In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a HO model:&lt;br /&gt;
[[File:Ad5215 Vacf HO model.JPG]]&lt;br /&gt;
&lt;br /&gt;
The VACF is given by&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 VACF deriv.JPG]]&lt;br /&gt;
&lt;br /&gt;
We evaluate the two integrals separately. Integral 2 is&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i2.JPG]]&lt;br /&gt;
&lt;br /&gt;
Using [[File:Ad5215 Vacf cos(2x).JPG]] we can write&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i2 2.JPG]]&lt;br /&gt;
&lt;br /&gt;
Integral 1 is&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i1 1.JPG]]&lt;br /&gt;
&lt;br /&gt;
Using [[File:Ad5215 Vacf sin(A+B).JPG]] we can write&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i1 2.JPG]]&lt;br /&gt;
&lt;br /&gt;
We evaluate the last integral separately.&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i3.JPG]]&lt;br /&gt;
&lt;br /&gt;
Substituting this back we obtain:&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf i1 3.JPG]]&lt;br /&gt;
&lt;br /&gt;
Substituting I1 and I2 into the formula for C we obtain&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf c1.JPG]]&lt;br /&gt;
&lt;br /&gt;
Sin is an odd function, i.e. [[File:Ad5215 Vacf sinodd.JPG]]. Thus&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Vacf c2.JPG]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; There is definitely a shorter way of doing this, but yes. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Report=&lt;br /&gt;
&lt;br /&gt;
==Abstract==&lt;br /&gt;
&lt;br /&gt;
Solid, liquid and gaseous systems were modeled using LAMMPS and a 12-6 Lennard-Jones forcefield. A suitable timestep of 0.0025 was determined. Simulations were run to obtain thermodynamic data (temperatures, pressures, densities, heat capacities). Calculated densities were found to be lower than those predicted by the ideal gas law. The simulated heat capacities showed a trend, decreasing with increasing temperature. The RDF was calculated for systems in all three phases. As expected, the RDF for a solid showed peaks decaying in amplitude. Lattice spacings and coordination numbers for the solid FCC lattice were calculated. The MSD and the VACF were plotted for the same three systems and the diffusion coefficient was calculated for both measurements. The two methods did not result in identical values; still, the difference was only 0.67% for the diffusion coefficients in the gas phase.&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good, concise abstract that summaries main results. Perhaps 1 sentence of motivation would have been nice. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Food constitutes a huge part of our lives, whether we actively think about it or not. Cooking, in some form or other, has been around ever since the first human realised that fire makes raw meat tastier and more convenient to eat. Nowadays, the food industry is enormous and cooking has become a successful blend of art and science. Perhaps the most pertinent example of this is molecular gastronomy, a subdiscipline of food science that seeks to investigate the physical and chemical transformations of ingredients during the cooking process. In their review, Balham et al refer to molecular gastronomy as an &amp;quot;emerging scientific discipline&amp;quot;.&amp;lt;ref&amp;gt;P. Barham, L. H. Skibsted, W. L. P. Bredie and J. Risbo, &#039;&#039;Symp.&lt;br /&gt;
A Q. J. Mod. Foreign Lit.&#039;&#039;, 2010, 2313–2365.&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In fact, molecular gastronomy relies heavily on processes such as gelification and infusion and on materials such as gels, foams and powders. It also uses equipment that is heavily reminiscent of a laboratory - some kitchens are fitted with butane burners, syringes and dehydrators.  &lt;br /&gt;
&lt;br /&gt;
Clever presentations and unusual sensations and are piquing the interest of many people; in some places, molecular gastronomy restaurants have become tourist attractions.&amp;lt;ref&amp;gt;D. Tüzünkan and A. Albayrak, &#039;&#039;Procedia&lt;br /&gt;
- Soc. Behav. Sci.&#039;&#039;, 2015, &#039;&#039;&#039;195&#039;&#039;&#039;, 446–452.&amp;lt;/ref&amp;gt; Simulating the thermodynamic properties of systems can provide a better understanding of physical systems and can lead to the growth and development of this industry.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; An interesting topic and motivation! An explicit connection between gastronomy and the results you intend to present/discuss would be nice. For example how is the diffusion coefficient relevant? The introduction of a scientific paper usually includes the background theory, such as in your case, the equations for diffusion coefficient. You have included this in the methodology, which while logical, is not standard practice for most papers/journals. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Aims and Objectives==&lt;br /&gt;
&lt;br /&gt;
* become familiar with LAMMPS and how simulating a physical system works&lt;br /&gt;
* model the behaviour of systems under the 12-6 Lennard-Jones potential&lt;br /&gt;
* calculate the physical properties (temperature, pressure, density, etc) of a system using such simulations&lt;br /&gt;
* comparing the results of the simulations to theory (e.g. simulated density vs density given by the ideal gas law)&lt;br /&gt;
* calculating the diffusion coefficient for systems in different phases (gas, liquid, solid) by two different methods (from the MSD and from the VACF)&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
&#039;&#039;&#039;General methods&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A 12-6 Lennard-Jones system was modeled usings LAMMPS and all simulations were run using Imperial&#039;s High Performance Computer. &lt;br /&gt;
The potential for such a system is given by&amp;lt;ref name=&amp;quot;:0&amp;quot;&amp;gt;P. Atkins, J. De Paula, &#039;&#039;Physical&lt;br /&gt;
Chemistry&#039;&#039;, OUP Oxford, 9th edn., 2009.&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi\left(r\right) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All calculations used reduced units:&amp;lt;math&amp;gt;r^* = r/{\sigma}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;E^* = E/{\epsilon}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;T^* = {k_BT}/{\epsilon}.&amp;lt;/math&amp;gt;&lt;br /&gt;
The Lennard-Jones parameters &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\epsilon&amp;lt;/math&amp;gt; were set to 1.0 for all simulations. The cutoff for Lennard-Jones interactions was set at r*=3 unless otherwise stated. The mass of the atoms was set to 1.0. The temperature, pressure, lattice density and timestep values were varied. For all calculations the velocity Verlet algorithm was employed. The atoms were assigned random velocities within the simulation, while ensuring that the Boltzmann distribution of states is followed. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Determining a suitable timestep&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A simple cubic lattice with a density of 0.8 was defined and the simulation was populated with 1000 atoms (10 x 10 x 10 dimensions). The ensemble was defined as the microcanonical (NVE) ensemble. Five values for the timestep were tested: 0.015, 0.01, 0.0075, 0.0025, 0.001 and each simulation was run for a total time of 100 seconds. Values for the energy, temperature and pressure of the system were recorded at each step. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Variation of density with temperature and pressure&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A simple cubic lattice with a density of 0.8 was defined and the simulation was populated with 3375 atoms (15 x 15 x 15 dimensions). The timestep for all simulations was set to 0.0025. The ensemble was defined as NPT and 10 different thermodynamic states were simulated (two pressures, 2.5 and 3.5, each associated with five temperatures: 3.0, 6.0, 9.0, 12.0 and 15.0). Values for the energy, temperature and pressure of the system were recorded at each step, as well as average values for the density, temperature and pressure of the system at the end of the simulation. Plots of density vs time were obtained, both for the simulated data and for densities predicted by the ideal gas law&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;, &amp;lt;math&amp;gt; PM = \rho RT.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Heat capacity calculations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A simple cubic lattice with a density of 0.2 was defined and populated with 3375 atoms. The timestep for all simulations was set to 0.0025. An NVT ensemble was simulated for five temperatures: 2.0, 2.2, 2.4, 2.6 and 2.8. Then, a subsequent simulation was run to establish an NVE ensemble and measure the properties of the system. Average values for temperature, energy, volume and heat capacity were calculated. This procedure was repeated for a simple cubic lattice with a density of 0.8. An example input script can be found [[:File: Example_script_heatcap_ad5215.in|here]].&lt;br /&gt;
&lt;br /&gt;
The heat capacity of a system is given by&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C_V = \frac{\partial E}{\partial T} = \frac{\mathrm{Var}\left[E\right]}{k_B T^2} = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where E is the internal energy and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;{\mathrm{Var}\left[E\right]}={\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
is the variance in internal energy. The &amp;lt;math&amp;gt;N^2&amp;lt;/math&amp;gt; term is required because LAMMPS automatically outputs the energy &#039;&#039;&#039;per atom&#039;&#039;&#039;, not the &#039;&#039;&#039;total&#039;&#039;&#039; energy. &lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 LJfluid phase diag.JPG|thumb|Fig. 1: Phase diagram for the Lennard-Jones fluid]]&lt;br /&gt;
&#039;&#039;&#039;RDF calculations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Three systems (a liquid, a solid and a gas) were modeled and populated with 3375 atoms each. Temperature and density values were taken from the Lennard-Jones fluid phase diagram&amp;lt;ref&amp;gt;J. P. Hansen and L.&lt;br /&gt;
Verlet, &#039;&#039;Phys. Rev.&#039;&#039;, 1969, &#039;&#039;&#039;184&#039;&#039;&#039;, 151–161.&amp;lt;/ref&amp;gt; reproduced in Fig. 1. These were defined as:&lt;br /&gt;
&lt;br /&gt;
*solid: fcc lattice, temperature 1.2, density 1.2;&lt;br /&gt;
*liquid: sc lattice, temperature 1.2 , density 0.8;&lt;br /&gt;
*vapour: sc lattice, temperature 1.2, density 0.05.&lt;br /&gt;
&lt;br /&gt;
The ensemble was defined as NVT. The timestep for all simulations was set to 0.002. The trajectories of the atoms were recorded and VMD was used to calculate the radial distribution function and its integral from these trajectories. The data was then analysed using Python. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Diffusion coefficient calculations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The same three systems as above were modeled, this time with 8000 atoms each. The timestep was set to 0.002 and each simulation was run for 5000 steps. The Lennard-Jones cutoff was set to 3.2. The ensemble was defined as NVT. The mean squared displacement (MSD) and the velocity autocorrelation function (VACF) at each step were calculated for all systems. The data was analysed using Python. The MSD plots were fitted to a straight line and the gradient was used to calculate the diffusion coefficient. The VACF integrals were plotted as a function of time and, again, used to calculate the diffusion coefficient. The same data analysis was conducted using supplied data which modeled larger systems.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;MSD&#039;&#039;&#039; is a measure of the deviation of the position of a particle with respect to a reference position over time. It can be thought of as a measure of how much the system moves over time. The MSD is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;{\rm MSD}\equiv\langle (r-r_0)^2\rangle=\frac{1}{N}\sum_{n=1}^N (r_n(t) - r_n(0))^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient (D) can be calculated from the MSD, using&amp;lt;ref name=&amp;quot;:1&amp;quot;&amp;gt;O. J. Eder, &#039;&#039;J. Chem. Phys.&#039;&#039;, 1977, &#039;&#039;&#039;66&#039;&#039;&#039;, 3866–3870.&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{6}\frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;VACF&#039;&#039;&#039; is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\delta t\right) = \left\langle \mathbf{v}\left(t\right) \cdot \mathbf{v}\left(t+\delta t\right)\right\rangle&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and is effectively a measure of how closely related the velocity of a particle is (at time t) to its initial velocity (at time t=0). This correlation is &amp;quot;perturbed&amp;quot; by collisions; at very long times (i.e. when t tends to infinity) we expect the VACF to be zero, as all particles will have collided at least once and their velocities will be uncorrelated.&lt;br /&gt;
&lt;br /&gt;
The diffusion coefficient is proportional to the integral of the VACF&amp;lt;ref name=&amp;quot;:1&amp;quot; /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;D = \frac{1}{3}\int_0^\infty \mathrm{d}\delta t \left\langle\mathbf{v}\left(0\right)\cdot\mathbf{v}\left(\delta t\right)\right\rangle=\frac{1}{3}\int_0^\infty C\left(\delta t\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Good, I could reproduce your results with this information. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Results &amp;amp; Discussion==&lt;br /&gt;
===Equilibration===&lt;br /&gt;
&lt;br /&gt;
Plots of energy, temperature and pressure vs time were obtained for a timestep value of 0.001. These are reproduced in Fig. 2-4. It can be seen that all three plots reach a &amp;quot;plateau&amp;quot; very quickly; equilibration is almost instantaneous. The values oscillate slightly, as a result of the approximations required by the simulation. These oscillations are however very small (note the scale of the y-axis). &lt;br /&gt;
{|&lt;br /&gt;
&lt;br /&gt;
|[[File:Ad5215 Ts001 Eng.png|thumb|left|Fig. 2: Energy vs time (ts 0.001)]]&lt;br /&gt;
|[[File:Ad5215 Ts001 Temp.png|thumb|left|Fig. 3: Temperature vs time (ts 0.001)]]&lt;br /&gt;
|[[File:Ad5215 Ts001 Press.png|thumb|right|Fig. 4: Pressure vs time (ts 0.001)]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An important feature of these simulations is the timestep. The shorter the timestep the more &amp;quot;accurate&amp;quot; the simulation, but the more computational power this will require. In this case, plots of the total energy vs time were obtained for all five timestep values (Fig. 5).&lt;br /&gt;
&lt;br /&gt;
[[File:Ad515 Allts energy.png|frame|center|Fig. 5: Energy vs time for all timesteps]]&lt;br /&gt;
&lt;br /&gt;
The lowest energy is given by timestep values of 0.001 and 0.0025. These energies are almost identical; the 0.001 energy is lower, but the difference in energies is only 0.005%. In addition to this, for simulating a total time of e.g. 100s, ts = 0.0025 requires 40,000 steps, while ts = 0.001 requires 100,000 steps. Therefore, the 0.0025 timestep is the better choice, as the difference in energies is not large enough to warrant the use of more computational power (as required by the 0.001 timestep). The 0.015 timestep is a poor choice. Not only is the energy the highest of the five, but, unlike in the other four cases, the system does not reach equilibrium and the energy keeps increasing. &lt;br /&gt;
&lt;br /&gt;
Based on this data, further simulations were run using a 0.0025 timestep (unless a different value was required by the lab script).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=color:red&amp;gt; Equilibration is not typically discussed in the results section of a scientific paper. Simply &amp;quot;systems were equilibrium for X timesteps/unit with a timestep of Y&amp;quot; would be sufficient. You get the marks for the task however. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Densities and the ideal gas law===&lt;br /&gt;
&lt;br /&gt;
Plots of density vs temperature for two different pressures are reproduced in Fig. 6. The density given by the ideal gas law was also calculated and plotted on the same graph. &lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 densvstemp.png|frame|center|Fig. 6: Plots of density vs temperature comparing experimental and theoretical data]]&lt;br /&gt;
&lt;br /&gt;
It can be seen that the results of the simulation do not match those given by the theoretical approach. This is because the ideal gas law does not take into account any interaction between particles, i.e. it assumes that the gas behaves ideally. In the Lennard-Jones model the particles experience attractive and repulsive forces; the repulsive forces dominate and cause the system to be more diffuse and thus have a lower simulated density. &lt;br /&gt;
&lt;br /&gt;
The discrepancy between theory and simulation increases with increasing pressure because this &amp;quot;pushes&amp;quot; the particles closer together and increases the effect of Lennard-Jones forces. It also increases with decreasing temperature; at low temperatures, the Lennard-Jones forces dominate, while at high temperatures thermal motion is more significant.&lt;br /&gt;
&lt;br /&gt;
===Heat capacities===&lt;br /&gt;
&lt;br /&gt;
The variation in heat capacity with temperature is shown in Fig. 7. The system is under the NVE ensemble so we are dealing with the isochoric heat capacity, C&amp;lt;sub&amp;gt;V&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Heatcaps.png|frame|center|Fig. 7: Heat capacity variation with temperature]]&lt;br /&gt;
&lt;br /&gt;
The heat capacity decreases with increasing temperature. This agrees with the formula for heat capacity, which shows inverse proportionality to temperature. However, this is not the full extent of the explanation.&lt;br /&gt;
&lt;br /&gt;
Heat capacity is a measure of how much energy (heat) is required to increase the temperature of a system. At higher temperatures more energetic states become available and the spacing between them decreases - this makes populating higher states easier, leading to a decrease in heat capacity. &lt;br /&gt;
&lt;br /&gt;
In addition to this, increasing the temperature can lead to a phase change and thus to an increase in the degrees of freedom available to the system (e.g. melting causes a solid - rigid, fewer degrees of freedom - to change into a liquid).&lt;br /&gt;
&lt;br /&gt;
===The Radial Distribution Function (RDF)===&lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 RDFs 3phase.png|frame|right|Fig. 8: RDFs for systems in different phases]]&lt;br /&gt;
&lt;br /&gt;
The radial distribution function for a solid, liquid and gas is reproduced in Fig. 8. The RDF shows how a system is arranged, relative to the position of one particle in the system; effectively, it is a measure of long-range order. A peak corresponds to a shell of atoms around the central particle. The intensity of the peak (effectively its integral) is proportional to the number of atoms within this shell. &lt;br /&gt;
&lt;br /&gt;
All three RDFs (vapour, liquid, solid) show an initial peak, but differ in their behaviour at longer distances. The RDF for a system in the gas phase rapidly reaches a value of 1 and plateaus. This is because a gas is, by its very nature, disordered. Atoms are free to move and they tend to disperse, not arrange themselves in shells. The RDF for a liquid oscillates slightly after the initial peak but also plateaus at 1 after a short distance. The initial peak corresponds to a solvation shell around the central particle. The subsequent smaller peaks show that a liquid has some degree of order - the forces between the particles are strong enough to restrict their movement to a degree. &lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 small lat.png|thumb|FCC lattice showing first three neighbouring lattice sites for a central atom (light pink)]]&lt;br /&gt;
&lt;br /&gt;
The RDF for the solid system is different to the other two, as it shows long-range order. It does not plateau but instead shows peaks of decreasing intensity. This can be explained by looking at the structure of the solid crystal. This was defined in the simulation as a face-centred cubic (FCC) lattice, shown in Figure 9. The particles are arranged in shells, at distances which depend on the lattice spacing of the crystal. This can be calculated from the lattice density (1.2).&lt;br /&gt;
&lt;br /&gt;
The first three peaks in the RDF plot correspond to the first three neighbouring sites of the central particle, coloured in blue, purple and green respectively. The lattice spacing and the coordination number of each site can be calculated by considering the geometry of the crystal:&lt;br /&gt;
&lt;br /&gt;
*Shell 1 is found at &amp;lt;math&amp;gt; r_1 = \frac{\sqrt{2}}{2}a = 1.056&amp;lt;/math&amp;gt; and holds &amp;lt;math&amp;gt;12&amp;lt;/math&amp;gt; atoms. &lt;br /&gt;
*Shell 2 is found at &amp;lt;math&amp;gt; r_2 = a = 1.494&amp;lt;/math&amp;gt; and holds &amp;lt;math&amp;gt;6&amp;lt;/math&amp;gt;atoms.&lt;br /&gt;
*Shell 3 is found at &amp;lt;math&amp;gt; r_3 = \frac{\sqrt{6}}{2}a = 1.830&amp;lt;/math&amp;gt; and holds &amp;lt;math&amp;gt;24&amp;lt;/math&amp;gt; atoms.&lt;br /&gt;
&lt;br /&gt;
These values agree with those found by the RDF. The coordination numbers match those calculated from the running integral, which has values of 12.15, 17.98 and 42.3 respectively.&lt;br /&gt;
&lt;br /&gt;
===The diffusion coefficient, D===&lt;br /&gt;
&lt;br /&gt;
Plots of the total mean squared displacement vs time are reproduced in Appendix A. Plots of the VACF vs time are reproduced in Appendix B. Plots of the VACF running integral vs time are reproduced in Appendix B.&lt;br /&gt;
&lt;br /&gt;
Figure 10 below shows the time evolution of the VACF for a solid, a liquid and a gas, as well as for an ideal harmonic oscillator. &lt;br /&gt;
&lt;br /&gt;
[[File:Ad5215 Velocity Autocorrelation Functions small.png|frame|center|Fig. 10: VACF plots for small scale simulations]]&lt;br /&gt;
&lt;br /&gt;
The VACF is effectively a measure of how closely related the velocity of a particle is (at time t) to its initial velocity (at time t=0). This correlation is &amp;quot;perturbed&amp;quot; by collisions or by interactions with other particles; at very long times (i.e. when t tends to infinity) we expect the VACF to be zero and the velocities to be uncorrelated. &lt;br /&gt;
&lt;br /&gt;
The harmonic oscillator shows perfectly oscillatory behaviour, with constant amplitude in time: the velocity goes from an initial state to an uncorrelated one and then back to the initial state. The solid shows similar behaviour: the VACF oscillates about 0 but dampens with time. This is because in a solid the atoms have fixed positions in a lattice; the forces between the particles are strong and these will oscillate in place for a while. The VACF takes much longer to reach zero than in the case of a liquid or a gas. The gas VACF tends slowly to zero; the interactions between particles in a gas are minimal, which means that the velocity at time is not very different from an initial velocity. A liquid is somewhere in-between these two phases: the particles have more freedom of movement than they do in a solid, but the attractive forces are strong enough to cause a perturbation in the velocities; the VACF shows a very slight oscillation, but then quickly dampens to zero. &lt;br /&gt;
&lt;br /&gt;
The diffusion coefficients can be calculated in two different ways, either from the gradient of an MSD plot or from the integral of the VACF. These calculations were performed and the D values are given in Table 1.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Table 1: Diffusion coefficients &amp;lt;math&amp;gt; D / m^2 s^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; | Phase&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | MSD data&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | VACF data&lt;br /&gt;
|- &lt;br /&gt;
! Small simulation &lt;br /&gt;
! Large simulation &lt;br /&gt;
! Small simulation&lt;br /&gt;
! Large simulation&lt;br /&gt;
|- &lt;br /&gt;
! Gas &lt;br /&gt;
| 2.536&lt;br /&gt;
| 2.542&lt;br /&gt;
| 3.294&lt;br /&gt;
| 3.268 &lt;br /&gt;
|- &lt;br /&gt;
! Gas, linear region &lt;br /&gt;
| 3.317&lt;br /&gt;
| 3.217&lt;br /&gt;
| ---&lt;br /&gt;
| ---&lt;br /&gt;
|- &lt;br /&gt;
! Liquid&lt;br /&gt;
| 0.085 &lt;br /&gt;
| 0.087 &lt;br /&gt;
| 0.098&lt;br /&gt;
| 0.090&lt;br /&gt;
|-  &lt;br /&gt;
! Solid&lt;br /&gt;
| 5.825 x 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
| 4.391 x 10&amp;lt;sup&amp;gt;-4&amp;lt;/sup&amp;gt;&lt;br /&gt;
| -1.845 x 10^&amp;lt;sup&amp;gt;-4&amp;lt;/sup&amp;gt;&lt;br /&gt;
| 4.558 x 10^&amp;lt;sup&amp;gt;-5&amp;lt;/sup&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The largest error in the case of the MSD measurements comes from the fact that the gas phase gives rise to a curved plot, which cannot be feasibly fitted to a straight line. This is because particles in a gas will diffuse readily and thus the system will take longer to reach equilibrium (the linear region) than, say, a liquid. A longer simulation that would allow the system to reach equilibrium and then collect a larger amount of data would provide a more accurate result, as in this case the linear region that was used only comprised about 20% of the total data. In the case of a liquid, the MSD function is linear and provides the best fit and thus the most accurate result. The MSD for a solid establishes linear behaviour quickly, as the particles are &amp;quot;fixed&amp;quot;. The diffusion coefficient values are very small; this shows that in a solid no diffusion (or almost none) takes place.&lt;br /&gt;
&lt;br /&gt;
In the case of the VACF measurements the largest error comes from using the trapezium rule to compute the integral. The smaller the timestep, the more accurate the measurement - in this case the timestep is relatively small but some error still remains. &lt;br /&gt;
&lt;br /&gt;
The errors in both of these measurements cause the diffusion coefficients to differ slightly. The difference between the MSD- and VACF-calculated diffusion coefficients are 0.67%, 15.3% and 31780% for the gas, liquid and solid phases respectively. The difference in the case of the solid phase is incredibly large but not significant as we have established diffusion is not a significant process for solids. The difference for the liquid phase is quite small and likely comes from the poor fit of the MSD plot and the short duration of the simulation.&lt;br /&gt;
&lt;br /&gt;
===Appendix A: MSD plots===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Ad5215 Gas phase MSD, large atom count.png|Gas phase MSD (large scale)&lt;br /&gt;
File:Ad5215 Gas phase MSD, large atom count - linear region.png|Gas phase MSD, linear region (large scale)&lt;br /&gt;
File:Ad5215 Gas phase MSD, small atom count.png|Gas phase MSD (small scale)&lt;br /&gt;
File:Ad5215 as phase MSD, small atom count - linear region.png|Gas phase MSD, linear region (small scale)&lt;br /&gt;
File:Ad5215 Liquid phase MSD, large atom count.png|Liquid phase MSD (large scale)&lt;br /&gt;
File:Ad5215 Liquid phase MSD, small atom count.png|Liquid phase MSD (small scale&lt;br /&gt;
File:Ad5215 Solid phase MSD, large atom count.png|Solid phase MSD (large scale)&lt;br /&gt;
File:Ad5215 Solid phase MSD, small atom count.png|Solid phase MSD (small scale)&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Appendix B: VACF running integral plots===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Ad5215 Gas phase VACF Integral, large scale.png|Gas phase (large scale)&lt;br /&gt;
File:Ad5215 Gas phase VACF Integral, small scale.png|Gas phase (small scale)&lt;br /&gt;
File:Ad5215 Liquid phase VACF Integral, large scale.png|Liquid phase (large scale)&lt;br /&gt;
File:Ad5215 Liquid phase VACF Integral, small scale.png|Liquid phase (small scale)&lt;br /&gt;
File:AD5215 Solid phase VACF Integral, large scale.png|Solid phase (large scale)&lt;br /&gt;
File:Ad5215 Solid phase VACF Integral, small scale.png|Solid phase (small scale)&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
This lab provided insight into the thermodynamic properties of systems and how these change with phase, temperature, pressure. Of course, the systems investigated were small, but modeling larger, more complicated systems is possible and could prove useful. A particular domain where this kind of research would be invaluable is, as previously mentioned, molecular gastronomy: understanding phase changes and the properties of liquids, solids and gels can lead to the advancement of this (pseudo)-scientific discipline.&lt;/div&gt;</summary>
		<author><name>Org12</name></author>
	</entry>
</feed>